/* =========================================================
   Archiv – App Styles
   Dunkel, weiche Ecken, Hellblau als Akzent.
   Jeder Song und jede Creator*in hat eine Buchstaben-Kachel
   in einer eigenen, zufälligen Farbe.
   ========================================================= */

:root {
    --bg: #000000;          /* Rahmen der App */
    --panel: #121212;       /* Hauptflächen */
    --raise: #1f1f1f;       /* Karten, Eingaben */
    --hover: #2a2a2a;
    --line: #2e2e2e;
    --text: #ffffff;
    --dim: #b3b3b3;
    --faint: #7c7c7c;

    --accent: #6cc7ff;      /* Hellblau */
    --accent-hi: #a3dcff;
    --accent-ink: #00121d;
    --accent-soft: rgba(108, 199, 255, .14);

    --danger: #ff7a70;
    --good: #6cc7ff;

    --r-s: 4px;
    --r-m: 8px;
    --r-l: 12px;

    --font: "Figtree", "Segoe UI", system-ui, -apple-system, sans-serif;

    color-scheme: dark;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; height: 100%; }

body {
    margin: 0;
    height: 100%;
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.45;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    overflow: hidden;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; letter-spacing: -.01em; }
p { margin: 0; }
code { background: var(--raise); padding: 1px 6px; border-radius: var(--r-s); font-size: .92em; }
[hidden] { display: none !important; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--r-s); }

.muted { color: var(--faint); }

.ico { flex: none; display: block; }

/* ---------- Buchstaben-Kacheln ---------- */

.tile {
    --c: #555;
    --ink: #fff;
    display: inline-grid;
    place-items: center;
    flex: none;
    aspect-ratio: 1;
    border-radius: var(--r-s);
    background:
        radial-gradient(120% 90% at 20% 10%, rgba(255, 255, 255, .22), transparent 55%),
        radial-gradient(90% 80% at 90% 100%, rgba(0, 0, 0, .28), transparent 60%),
        var(--c);
    color: var(--ink);
    font-weight: 800;
    line-height: 1;
    user-select: none;
    overflow: hidden;
}

.tile-round { border-radius: 50%; }
.tile-xs  { width: 24px; font-size: 12px; }
.tile-s   { width: 40px; font-size: 18px; }
.tile-m   { width: 56px; font-size: 24px; }
.tile-l   { width: 64px; font-size: 28px; }
.tile-lib { width: 48px; font-size: 21px; border-radius: 6px; }
.tile-lib.tile-round { border-radius: 50%; }
.tile-xl  { width: 100%; font-size: 52cqw; border-radius: 6px; box-shadow: 0 8px 24px rgba(0, 0, 0, .5); }
.tile-xl.tile-round { border-radius: 50%; }
.tile-ghost { --c: #282828; --ink: #7c7c7c; background: #282828; }

.fav-tile {
    background: linear-gradient(135deg, #3b2bd4 0%, #5a78e6 45%, #b7e3ff 100%);
    color: #fff;
}
.top-tile {
    background: linear-gradient(135deg, #07324d 0%, #1d7fb8 50%, #6cc7ff 100%);
    color: #fff;
}

/* ---------- App-Rahmen ---------- */

.app {
    display: grid;
    height: 100vh;
    height: 100dvh;
    grid-template-columns: 72px minmax(0, 1fr) clamp(300px, 21vw, 380px);
    grid-template-rows: 64px minmax(0, 1fr) auto;
    grid-template-areas:
        "top top top"
        "lib main np"
        "player player player";
    column-gap: 8px;
    padding: 0 8px;
    padding-top: env(safe-area-inset-top, 0px);
}

.app.no-panel { grid-template-columns: 72px minmax(0, 1fr) 0; }
.app.no-panel .nowplaying { display: none; }

/* ---------- Obere Leiste ---------- */

.topbar {
    grid-area: top;
    display: grid;
    grid-template-columns: 1fr minmax(0, auto) 1fr;
    align-items: center;
    gap: 12px;
    padding: 0 8px;
}

.topbar-left, .topbar-right { display: flex; align-items: center; gap: 4px; }
.topbar-right { justify-content: flex-end; gap: 12px; }
.topbar-center { display: flex; align-items: center; gap: 8px; }

.icon-btn {
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--dim);
    cursor: pointer;
    transition: color .15s, transform .1s;
}
.icon-btn:hover { color: var(--text); }
.icon-btn:active { transform: scale(.94); }
.icon-lg { width: 52px; height: 52px; }

.nav-arrow { background: rgba(0, 0, 0, .7); }
.nav-arrow:disabled { opacity: .4; cursor: default; }

.home-btn {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--raise);
    color: var(--dim);
    transition: transform .1s, color .15s;
}
.home-btn:hover { color: var(--text); transform: scale(1.04); }
.home-btn .i-in { display: none; }
.home-btn.is-here { color: var(--text); }
.home-btn.is-here .i-in { display: block; }
.home-btn.is-here .i-out { display: none; }

.searchbar {
    display: flex;
    align-items: center;
    gap: 10px;
    width: min(474px, 42vw);
    height: 48px;
    padding: 0 8px 0 14px;
    border-radius: 999px;
    background: var(--raise);
    color: var(--dim);
    border: 1px solid transparent;
    transition: background .15s, border-color .15s;
}
.searchbar:hover { background: var(--hover); border-color: #3a3a3a; }
.searchbar:focus-within { border-color: var(--text); background: var(--hover); }
.searchbar input {
    flex: 1;
    min-width: 0;
    border: 0;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-size: 16px;
    outline: none;
}
.searchbar input::placeholder { color: var(--dim); }
.searchbar input::-webkit-search-cancel-button { filter: invert(1); opacity: .5; }
.searchbar-sep { width: 1px; height: 24px; background: #555; }

.admin-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 32px;
    padding: 0 14px;
    border-radius: 999px;
    background: var(--text);
    color: #000;
    font-weight: 700;
    font-size: 14px;
    transition: transform .1s;
}
.admin-pill:hover { transform: scale(1.04); }

.me { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--raise); }
.me-tile { width: 32px; font-size: 15px; }

/* Menü hinter den drei Punkten */
.menu { position: relative; }
.menu-pop {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 50;
    min-width: 250px;
    padding: 4px;
    border-radius: var(--r-s);
    background: #282828;
    box-shadow: 0 16px 24px rgba(0, 0, 0, .3), 0 6px 8px rgba(0, 0, 0, .2);
}
.menu-pop a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 2px;
    font-size: 14px;
    color: #e5e5e5;
}
.menu-pop a:hover { background: #3e3e3e; color: #fff; }
.menu-who { padding: 10px 12px 12px; border-bottom: 1px solid #3e3e3e; margin-bottom: 4px; }
.menu-who strong { display: block; }
.menu-who span { color: var(--dim); font-size: 13px; }

/* ---------- Bibliothek links ---------- */

.library {
    grid-area: lib;
    display: flex;
    flex-direction: column;
    min-height: 0;
    border-radius: var(--r-m);
    background: var(--panel);
}
.library-head { display: grid; place-items: center; padding: 16px 0 8px; }
.library-list {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 4px 8px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    scrollbar-width: none;
}
.library-list::-webkit-scrollbar { display: none; }

.lib-item {
    position: relative;
    display: grid;
    place-items: center;
    padding: 4px;
    border-radius: 6px;
}
.lib-item:hover { background: #1a1a1a; }
.lib-item.is-here { background: #232323; }
.lib-text { display: none; }

.lib-item::after {
    content: attr(data-tip);
    position: fixed;
    left: 90px;
    transform: translateY(-50%);
    margin-top: 28px;
    padding: 6px 10px;
    border-radius: var(--r-s);
    background: #282828;
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity .12s;
    z-index: 60;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .5);
}
.lib-item:hover::after { opacity: 1; transition-delay: .35s; }

/* ---------- Hauptbereich ---------- */

.main {
    grid-area: main;
    min-height: 0;
    overflow-y: auto;
    border-radius: var(--r-m);
    background: var(--panel);
    scrollbar-color: #555 transparent;
}
.view { min-height: 100%; position: relative; }
.view.is-loading { opacity: .6; transition: opacity .2s .1s; }

.page { padding: 20px 24px 48px; }

.page-tinted {
    background: linear-gradient(to bottom,
        color-mix(in srgb, var(--hero) 32%, #121212) 0,
        #121212 620px);
    padding-top: 0;
}

/* Filter-Chips */
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
    display: inline-flex;
    align-items: center;
    height: 32px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .07);
    font-size: 14px;
    font-weight: 500;
    transition: background .15s;
}
.chip:hover { background: rgba(255, 255, 255, .12); }
.chip.is-on { background: var(--text); color: #000; }

/* ---------- Startseite ---------- */

.page-home {
    background: linear-gradient(to bottom, #1b3240 0, #121212 330px);
}

.hello { font-size: 28px; font-weight: 800; margin: 24px 0 16px; }

.quick {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px 12px;
    margin-bottom: 40px;
}
.quick-item {
    display: flex;
    align-items: center;
    gap: 14px;
    height: 64px;
    overflow: hidden;
    border-radius: var(--r-s);
    background: rgba(255, 255, 255, .07);
    font-weight: 700;
    transition: background .15s;
}
.quick-item:hover { background: rgba(255, 255, 255, .16); }
.quick-art {
    width: 64px;
    height: 64px;
    border-radius: 0;
    font-size: 28px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .5);
}
.quick-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-right: 12px; }

.section { margin-bottom: 36px; }
.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}
.section-head h2 { font-size: 24px; font-weight: 800; }
.section-head-page { padding-top: 28px; margin-bottom: 24px; }
.section-head-page h1 { font-size: 32px; font-weight: 800; }
.section-kicker { color: var(--dim); font-size: 13px; }
.section-more { color: var(--dim); font-size: 14px; font-weight: 700; white-space: nowrap; }
.section-more:hover { color: var(--text); text-decoration: underline; }

.archive-note { color: var(--faint); font-size: 13px; margin-top: 12px; }

/* Kartenreihen */
.shelf {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(150px, 188px);
    gap: 4px;
    margin: 0 -12px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
}
.shelf::-webkit-scrollbar { display: none; }

.grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
    gap: 4px;
    margin: 0 -12px;
}

.card {
    display: block;
    padding: 12px;
    border-radius: 6px;
    scroll-snap-align: start;
    cursor: pointer;
    transition: background .2s;
    min-width: 0;
}
.card:hover, .card:focus-visible { background: var(--raise); }

.card-art { position: relative; container-type: inline-size; margin-bottom: 10px; }

.card-title {
    font-size: 15px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.card-sub {
    color: var(--dim);
    font-size: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-top: 2px;
}
.card-meta { color: var(--faint); font-size: 12px; margin-top: 4px; }
.creator-card .card-title, .creator-card .card-sub { text-align: left; }

.card-play {
    position: absolute;
    right: 8px;
    bottom: 8px;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 50%;
    background: var(--accent);
    color: var(--accent-ink);
    box-shadow: 0 8px 8px rgba(0, 0, 0, .3);
    cursor: pointer;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity .2s, transform .2s, background .15s;
}
.card-play .ico { margin-left: 2px; }
.card:hover .card-play, .card:focus-within .card-play, .card.is-current .card-play { opacity: 1; transform: none; }
.card-play:hover { background: var(--accent-hi); transform: scale(1.05) !important; }
.card.is-current .card-title { color: var(--accent); }

.rank {
    position: absolute;
    left: 8px;
    top: 8px;
    min-width: 30px;
    height: 30px;
    padding: 0 8px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(0, 0, 0, .72);
    color: #fff;
    font-weight: 800;
    font-size: 14px;
}

/* ---------- Kopfbereiche (Playlist / Creator) ---------- */

.hero {
    display: flex;
    align-items: flex-end;
    gap: 24px;
    padding: 64px 0 24px;
}
.hero-art {
    width: clamp(128px, 18vw, 232px);
    border-radius: 6px;
    box-shadow: 0 4px 60px rgba(0, 0, 0, .5);
}
.hero-art .ico { width: 38%; height: auto; }
.hero-text { min-width: 0; }
.hero-type { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 500; }
.hero-title {
    font-size: clamp(40px, 7.4vw, 96px);
    font-weight: 900;
    letter-spacing: -.04em;
    line-height: .98;
    margin: 6px 0 14px;
    overflow-wrap: anywhere;
}
.hero-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 14px; color: rgba(255, 255, 255, .8); }
.hero-meta strong { color: var(--text); }

/* Creator-Banner: die Farbe der Creator*in und ihr Buchstabe riesig */
.hero-creator {
    position: relative;
    min-height: 360px;
    margin: 0 -24px;
    padding: 64px 24px 28px;
    overflow: hidden;
    background:
        linear-gradient(to bottom, rgba(0, 0, 0, 0) 20%, rgba(0, 0, 0, .55) 100%),
        linear-gradient(115deg, color-mix(in srgb, var(--hero) 85%, #000) 0%, color-mix(in srgb, var(--hero) 45%, #000) 100%);
}
.hero-watermark {
    position: absolute;
    right: -2%;
    top: 50%;
    transform: translateY(-50%) rotate(-8deg);
    font-size: clamp(260px, 42vw, 560px);
    font-weight: 900;
    line-height: .8;
    color: rgba(255, 255, 255, .12);
    pointer-events: none;
    user-select: none;
}
.hero-creator .hero-text { position: relative; }
.hero-creator .hero-type .ico { color: var(--accent); }
.hero-creator .hero-title { text-shadow: 0 2px 30px rgba(0, 0, 0, .25); }

.actions {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px 0;
    min-height: 32px;
}
.big-play {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    border: 0;
    border-radius: 50%;
    background: var(--accent);
    color: var(--accent-ink);
    cursor: pointer;
    transition: transform .1s, background .15s;
}
.big-play .ico { margin-left: 2px; }
.big-play:hover { transform: scale(1.04); background: var(--accent-hi); }
.big-play.is-playing .ico { margin-left: 0; }
.action-tile { width: 40px; font-size: 18px; border-radius: 6px; border: 2px solid rgba(255,255,255,.25); }

.list-filter {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    height: 36px;
    padding: 0 12px;
    border-radius: var(--r-s);
    background: rgba(255, 255, 255, .07);
    color: var(--dim);
}
.list-filter input {
    width: 190px;
    border: 0;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-size: 14px;
    outline: none;
}

/* ---------- Songliste ---------- */

.tracklist { --cols: 40px minmax(0, 1fr) minmax(90px, 1fr) 104px 64px; }
.tracklist.has-plays { --cols: 40px minmax(0, 4fr) minmax(90px, 1.3fr) minmax(90px, 1.1fr) 104px 64px; }
.tracklist.has-plays.has-added { --cols: 40px minmax(0, 4fr) minmax(90px, 1.2fr) minmax(90px, 1.1fr) minmax(90px, 1.1fr) 104px 64px; }

.track {
    display: grid;
    grid-template-columns: var(--cols);
    align-items: center;
    gap: 16px;
    height: 56px;
    padding: 0 16px;
    border-radius: var(--r-s);
    color: var(--dim);
    font-size: 14px;
    cursor: default;
}
.track:not(.track-head):hover, .track:focus-visible { background: rgba(255, 255, 255, .1); }
.track.is-selected { background: rgba(255, 255, 255, .18); }

.track-head {
    height: 36px;
    margin-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
    border-radius: 0;
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--panel);
}
.track-head .t-time { display: flex; justify-content: flex-end; }

.t-num { position: relative; text-align: right; font-variant-numeric: tabular-nums; font-size: 16px; }
.t-num .play-ico, .t-num .eq { display: none; }
.track:hover .t-num .n, .track:focus-visible .t-num .n { display: none; }
.track:hover .t-num .play-ico, .track:focus-visible .t-num .play-ico { display: flex; justify-content: flex-end; color: var(--text); }
.is-ranked .t-num .n { font-weight: 800; color: var(--text); }

.t-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.t-text { display: flex; flex-direction: column; min-width: 0; }
.t-name {
    color: var(--text);
    font-size: 16px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.t-by, .t-by a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t-by a:hover, .np-text a:hover, .pl-by a:hover { color: var(--text); text-decoration: underline; }
.track:hover .t-by { color: var(--text); }
.t-plays, .t-added { font-variant-numeric: tabular-nums; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.t-time { text-align: right; font-variant-numeric: tabular-nums; }
.t-fav { display: flex; justify-content: flex-end; gap: 4px; }

.track.is-current .t-name { color: var(--accent); }
.track.is-current .t-num .n { display: none; }
.track.is-current .t-num .eq { display: inline-flex; }
.track.is-current:hover .t-num .eq { display: none; }
.track.is-current.is-paused .t-num .eq i { animation-play-state: paused; }

.eq { align-items: flex-end; justify-content: flex-end; gap: 2px; height: 14px; width: 100%; }
.eq i { display: block; width: 3px; height: 100%; background: var(--accent); border-radius: 1px; animation: eq .9s ease-in-out infinite; transform-origin: bottom; }
.eq i:nth-child(2) { animation-delay: -.3s; }
.eq i:nth-child(3) { animation-delay: -.6s; }
@keyframes eq { 0%, 100% { transform: scaleY(.3); } 50% { transform: scaleY(1); } }

/* Merken-Knopf */
.fav {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--dim);
    cursor: pointer;
    opacity: 0;
    transition: opacity .1s, transform .1s, color .15s;
}
.fav .fav-on { display: none; color: var(--accent); }
.fav.is-on { opacity: 1; }
.fav.is-on .fav-on { display: block; }
.fav.is-on .fav-off { display: none; }
.fav:hover { color: var(--text); transform: scale(1.06); }
.track:hover .fav, .track:focus-within .fav, .fav.is-always { opacity: 1; }
.fav.pop { animation: pop .3s ease-out; }
@keyframes pop { 50% { transform: scale(1.3); } }

@media (hover: none) { .fav { opacity: 1; } }

/* ---------- Creator-Seite ---------- */

.creator-cols {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(240px, 1fr);
    gap: 40px;
    align-items: start;
}
.sub-title { font-size: 24px; font-weight: 800; margin-bottom: 16px; }
.creator-side .sub-title:not(:first-child) { margin-top: 28px; }
.creator-main .track-head { display: none; }

.side-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 8px;
    border-radius: 6px;
    margin-bottom: 4px;
}
.side-card:hover { background: rgba(255, 255, 255, .08); }
.side-card strong { display: block; font-size: 16px; }
.side-card small { color: var(--dim); font-size: 14px; }
.side-art { position: relative; flex: none; }
.side-heart {
    position: absolute;
    right: -4px;
    bottom: -4px;
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--accent-ink);
    border: 3px solid var(--panel);
}

/* ---------- Suche ---------- */

.browse {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 20px;
}
.browse-item {
    position: relative;
    aspect-ratio: 1.6;
    overflow: hidden;
    padding: 16px;
    border-radius: var(--r-m);
    background: var(--c);
    color: var(--ink);
}
.browse-name { position: relative; z-index: 1; font-size: 22px; font-weight: 800; overflow-wrap: anywhere; }
.browse-letter {
    position: absolute;
    right: -6%;
    bottom: -18%;
    font-size: 150px;
    font-weight: 900;
    line-height: 1;
    opacity: .3;
    transform: rotate(25deg);
    transition: transform .25s;
}
.browse-item:hover .browse-letter { transform: rotate(18deg) scale(1.05); }

/* ---------- Leere Zustände & Meldungen ---------- */

.empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
    padding: 64px 24px;
    color: var(--dim);
}
.empty h3 { color: var(--text); font-size: 24px; font-weight: 800; }
.empty p { max-width: 440px; }
.empty .btn { margin-top: 8px; }

.flash {
    margin: 16px 24px 0;
    padding: 12px 16px;
    border-radius: var(--r-m);
    font-weight: 600;
    font-size: 14px;
}
.flash-ok { background: var(--accent); color: var(--accent-ink); }
.flash-error { background: #3a1513; color: #ffb4ad; border: 1px solid #6b2521; }
.view > .flash { position: relative; z-index: 3; }

.toast {
    position: fixed;
    left: 50%;
    bottom: 110px;
    z-index: 100;
    max-width: min(520px, 92vw);
    padding: 10px 16px;
    border-radius: var(--r-m);
    background: var(--accent);
    color: var(--accent-ink);
    font-weight: 600;
    font-size: 14px;
    box-shadow: 0 16px 32px rgba(0, 0, 0, .5);
    transform: translate(-50%, 20px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s, transform .2s;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.toast.is-error { background: #5a1d18; color: #ffd2cd; }

/* ---------- Läuft gerade (rechte Spalte) ---------- */

.nowplaying {
    grid-area: np;
    min-height: 0;
    overflow-y: auto;
    border-radius: var(--r-m);
    background: var(--panel);
    padding: 16px;
    scrollbar-width: thin;
    scrollbar-color: #555 transparent;
}
.np-empty {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 24px;
    text-align: center;
    color: var(--faint);
}
.np-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.np-head strong { font-size: 16px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.np-art { container-type: inline-size; margin-bottom: 16px; }
.np-art .tile { width: 100%; font-size: 50cqw; border-radius: var(--r-m); }
.np-meta { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.np-text { min-width: 0; }
.np-text h2 { font-size: 24px; font-weight: 800; line-height: 1.15; overflow-wrap: anywhere; }
.np-text p { color: var(--dim); font-size: 16px; margin-top: 4px; }
.np-plays { color: var(--faint); font-size: 13px; margin-top: 6px; }

.np-card {
    margin-top: 20px;
    padding: 16px;
    border-radius: var(--r-m);
    background: var(--raise);
}
.np-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 14px; }
.np-creator { display: flex; align-items: center; gap: 14px; }
.np-creator + .np-creator { margin-top: 14px; }
.np-creator .tile { width: 64px; font-size: 28px; }
.np-creator-text { flex: 1; min-width: 0; }
.np-creator-text strong { display: block; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.np-creator-text span { color: var(--dim); font-size: 14px; }

.pill-btn {
    display: inline-flex;
    align-items: center;
    height: 32px;
    padding: 0 15px;
    border-radius: 999px;
    border: 1px solid #7c7c7c;
    background: transparent;
    color: var(--text);
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
    transition: transform .1s, border-color .15s;
}
.pill-btn:hover { border-color: var(--text); transform: scale(1.04); }

.np-queue .q-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 6px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    text-align: left;
    cursor: pointer;
}
.np-queue .q-item:hover { background: var(--hover); }
.q-text { min-width: 0; display: flex; flex-direction: column; }
.q-text strong { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.q-text span { color: var(--dim); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Player-Leiste ---------- */

.player {
    grid-area: player;
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(0, 2fr) minmax(180px, 1fr);
    align-items: center;
    gap: 16px;
    height: 88px;
    padding: 0 8px;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    box-sizing: content-box;
}

.pl-now { display: flex; align-items: center; gap: 12px; min-width: 0; }
.pl-art .tile { width: 56px; font-size: 24px; }
.pl-text { display: flex; flex-direction: column; min-width: 0; }
.pl-title { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-title:hover { text-decoration: underline; }
.pl-by { color: var(--dim); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-now .fav { opacity: 1; flex: none; }

.pl-center { display: flex; flex-direction: column; align-items: center; gap: 6px; max-width: 720px; width: 100%; justify-self: center; }
.pl-controls { display: flex; align-items: center; gap: 16px; }
.pl-controls .icon-btn { width: 32px; height: 32px; }

.play-btn {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: var(--text);
    color: #000;
    cursor: pointer;
    transition: transform .1s;
}
.play-btn:hover { transform: scale(1.06); }
.play-btn .i-pause { display: none; }
.play-btn .i-play { margin-left: 2px; }
.is-playing .play-btn .i-play { display: none; }
.is-playing .play-btn .i-pause { display: block; }

.pl-toggle { position: relative; }
.pl-toggle.is-on { color: var(--accent); }
.pl-toggle.is-on::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 4px;
    height: 4px;
    margin-left: -2px;
    border-radius: 50%;
    background: var(--accent);
}
.repeat-one {
    display: none;
    position: absolute;
    top: 3px;
    right: 1px;
    font-size: 9px;
    font-weight: 800;
    line-height: 1;
    padding: 1px 2px;
    border-radius: 3px;
    background: var(--panel);
}
[data-mode="one"] .repeat-one { display: block; }

.pl-progress { display: flex; align-items: center; gap: 8px; width: 100%; }
.pl-time { font-size: 12px; color: var(--dim); min-width: 40px; text-align: center; font-variant-numeric: tabular-nums; }

.pl-right { display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
.pl-right .icon-btn { width: 32px; height: 32px; }
.pl-volume { width: 110px; flex: none; }
[data-mute] .i-muted { display: none; }
[data-mute].is-muted .i-vol { display: none; }
[data-mute].is-muted .i-muted { display: block; }

/* Schieberegler wie bei Spotify: weiss, bei Hover hellblau */
.range {
    --p: 0%;
    flex: 1;
    height: 12px;
    margin: 0;
    background: transparent;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}
.range::-webkit-slider-runnable-track {
    height: 4px;
    border-radius: 2px;
    background: linear-gradient(to right, var(--text) var(--p), #4d4d4d var(--p));
}
.range::-moz-range-track { height: 4px; border-radius: 2px; background: #4d4d4d; }
.range::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--text); }
.range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    margin-top: -4px;
    border-radius: 50%;
    background: #fff;
    border: 0;
    opacity: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, .5);
}
.range::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 0; opacity: 0; }
.range:hover::-webkit-slider-runnable-track, .range:focus-visible::-webkit-slider-runnable-track {
    background: linear-gradient(to right, var(--accent) var(--p), #4d4d4d var(--p));
}
.range:hover::-moz-range-progress, .range:focus-visible::-moz-range-progress { background: var(--accent); }
.range:hover::-webkit-slider-thumb, .range:focus-visible::-webkit-slider-thumb { opacity: 1; }
.range:hover::-moz-range-thumb, .range:focus-visible::-moz-range-thumb { opacity: 1; }

/* ---------- Formulare & Knöpfe ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 40px;
    padding: 0 20px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: var(--text);
    color: #000;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
    transition: transform .1s, background .15s, border-color .15s;
}
.btn:hover { transform: scale(1.03); }
.btn:disabled { opacity: .5; cursor: default; transform: none; }
.btn-accent { background: var(--accent); color: var(--accent-ink); }
.btn-accent:hover { background: var(--accent-hi); }
.btn-ghost { background: transparent; color: var(--text); border-color: #7c7c7c; }
.btn-ghost:hover { border-color: var(--text); }
.btn-danger { background: transparent; color: var(--danger); border-color: #6b2521; }
.btn-danger:hover { border-color: var(--danger); }
.btn-block { width: 100%; }
.btn-lg { height: 52px; font-size: 16px; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; min-width: 0; }
.field > span { font-size: 14px; font-weight: 700; }
.field small { color: var(--faint); font-weight: 400; }

.input {
    width: 100%;
    height: 44px;
    padding: 0 14px;
    border: 1px solid #3e3e3e;
    border-radius: 6px;
    background: var(--raise);
    color: var(--text);
    font: inherit;
    font-size: 15px;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}
.input:hover { border-color: #6e6e6e; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.input-sm { height: 36px; font-size: 14px; }
.input-lg { height: 52px; font-size: 17px; letter-spacing: .04em; }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--dim) 50%), linear-gradient(135deg, var(--dim) 50%, transparent 50%); background-position: calc(100% - 18px) 19px, calc(100% - 13px) 19px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
.input[type="datetime-local"]::-webkit-calendar-picker-indicator { filter: invert(1); }

.input-wrap { position: relative; display: flex; }
.input-wrap .input { padding-right: 44px; }
.input-wrap .icon-btn { position: absolute; right: 4px; top: 4px; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.form-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.inline-form { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.inline-form .input { flex: 1; min-width: 160px; }

/* ---------- Admin ---------- */

.page-admin { max-width: 1200px; }

.admin-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}
.admin-stats div { padding: 16px; border-radius: var(--r-m); background: var(--raise); }
.admin-stats strong { display: block; font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; }
.admin-stats span { color: var(--dim); font-size: 13px; }

.tabs { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    padding: 0 18px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .07);
    font-weight: 600;
    font-size: 14px;
}
.tab:hover { background: rgba(255, 255, 255, .12); }
.tab.is-on { background: var(--text); color: #000; }

.panel {
    padding: 24px;
    margin-bottom: 20px;
    border-radius: var(--r-m);
    background: #181818;
}
.panel h2 { font-size: 20px; font-weight: 800; margin-bottom: 8px; }
.panel h2 small { color: var(--faint); font-weight: 600; font-size: 15px; margin-left: 4px; }
.panel-lead { color: var(--dim); font-size: 14px; margin-bottom: 18px; max-width: 72ch; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; flex-wrap: wrap; }
.panel-head h2 { margin: 0; }
.panel-head .list-filter { margin-left: 0; }

.drop {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 36px 20px;
    margin-bottom: 20px;
    border: 2px dashed #4a4a4a;
    border-radius: var(--r-l);
    color: var(--dim);
    text-align: center;
    cursor: pointer;
    transition: border-color .15s, background .15s, color .15s;
}
.drop strong { color: var(--text); font-size: 16px; }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop:hover, .drop.is-over { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.drop.has-files { border-style: solid; border-color: var(--accent); }

.picker { border: 1px solid #333; border-radius: var(--r-m); padding: 10px; background: #141414; }
.picker-search { margin-bottom: 10px; }
.picker-list { display: flex; flex-wrap: wrap; gap: 8px; max-height: 200px; overflow-y: auto; }
.pick {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 34px;
    padding: 0 12px 0 5px;
    border-radius: 999px;
    border: 1px solid #3e3e3e;
    background: var(--raise);
    font-size: 14px;
    cursor: pointer;
    user-select: none;
}
.pick:hover { border-color: #7c7c7c; }
.pick input { position: absolute; opacity: 0; pointer-events: none; }
.pick:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-hi); }
.pick:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }

.upload-queue { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.uq-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 12px;
    padding: 10px 14px;
    border-radius: var(--r-m);
    background: var(--raise);
    font-size: 14px;
}
.uq-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.uq-state { color: var(--dim); }
.uq-bar { grid-column: 1 / -1; height: 4px; border-radius: 2px; background: #3a3a3a; overflow: hidden; }
.uq-bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .15s; }
.uq-item.is-done .uq-state { color: var(--accent); }
.uq-item.is-error .uq-state { color: var(--danger); }
.uq-item.is-error .uq-bar i { background: var(--danger); }

.admin-list { display: flex; flex-direction: column; gap: 2px; }
.admin-row { border-radius: var(--r-m); }
.admin-row[open] { background: #202020; }
.admin-row summary {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) repeat(3, minmax(90px, auto)) 32px;
    align-items: center;
    gap: 16px;
    padding: 8px 12px;
    border-radius: var(--r-m);
    list-style: none;
    cursor: pointer;
}
.admin-row summary::-webkit-details-marker { display: none; }
.admin-row summary:hover { background: rgba(255, 255, 255, .06); }
.ar-main { display: flex; flex-direction: column; min-width: 0; }
.ar-main strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ar-main small { color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ar-num { color: var(--dim); font-size: 14px; text-align: right; font-variant-numeric: tabular-nums; display: flex; flex-direction: column; }
.ar-num small { color: var(--faint); font-size: 12px; }
.ar-edit { color: var(--faint); display: grid; place-items: center; }
.admin-row[open] .ar-edit { color: var(--accent); }
.ar-body { padding: 8px 12px 16px; }
.ar-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.ar-actions-end { justify-content: flex-end; margin-top: 4px; }
.ar-form { margin-bottom: 12px; }

.badge {
    display: inline-flex;
    align-items: center;
    height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}
.badge-active { background: var(--accent-soft); color: var(--accent); }
.badge-expired { background: #3a1513; color: #ffb4ad; }
.badge-paused { background: #2e2e2e; color: var(--dim); }

.code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: .06em; }
.code-tools { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.code-tools .muted { font-size: 13px; }
.code-form { margin-top: 4px; }
.inline-form-wrap select { flex: 0 1 200px; }

/* ---------- Passwort-Seite ---------- */

.gate-body { overflow: hidden; background: #000; }

.gate-mosaic {
    position: fixed;
    inset: -20vmax;
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 14px;
    transform: rotate(-10deg);
    opacity: .5;
    pointer-events: none;
}
.gate-mosaic span {
    display: grid;
    place-items: center;
    aspect-ratio: 1;
    border-radius: 10px;
    background:
        radial-gradient(120% 90% at 20% 10%, rgba(255, 255, 255, .22), transparent 55%),
        var(--c);
    color: var(--ink);
    font-weight: 900;
    font-size: clamp(28px, 5vw, 72px);
    animation: tile-in .7s ease-out both;
}
.gate-mosaic span:nth-child(3n)   { animation-delay: .08s; }
.gate-mosaic span:nth-child(3n+1) { animation-delay: .16s; }
.gate-mosaic span:nth-child(4n)   { animation-delay: .24s; }
.gate-mosaic span:nth-child(5n)   { animation-delay: .32s; }
@keyframes tile-in { from { opacity: 0; transform: scale(.85); } }

.gate-mosaic::after {
    content: "";
    position: fixed;
    inset: 0;
    background: radial-gradient(closest-side, rgba(0, 0, 0, .92), rgba(0, 0, 0, .55));
}

.gate {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    place-items: center;
    padding: 24px;
}
.gate-card {
    width: min(420px, 100%);
    padding: 40px 36px 36px;
    border-radius: 16px;
    background: rgba(18, 18, 18, .94);
    box-shadow: 0 30px 80px rgba(0, 0, 0, .7);
    backdrop-filter: blur(10px);
}
.gate-mark {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: var(--accent);
    color: var(--accent-ink);
    margin-bottom: 22px;
}
.gate-card h1 { font-size: 36px; font-weight: 900; letter-spacing: -.03em; }
.gate-lead { color: var(--dim); margin: 8px 0 24px; }
.gate-card .flash { margin: 0 0 18px; }
.gate-form .field { margin-bottom: 20px; }

/* ---------- Kleinere Bildschirme ---------- */

@media (max-width: 1200px) {
    .quick { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .creator-cols { grid-template-columns: 1fr; }
    .app:not(.no-panel) { grid-template-columns: 72px minmax(0, 1fr) 300px; }
}

@media (max-width: 1000px) {
    .app, .app:not(.no-panel) { grid-template-columns: 72px minmax(0, 1fr) 0; }
    .nowplaying {
        position: fixed;
        right: 8px;
        top: 72px;
        bottom: 104px;
        width: min(360px, calc(100vw - 16px));
        z-index: 40;
        box-shadow: 0 20px 60px rgba(0, 0, 0, .7);
    }
    .app:not(.panel-open) .nowplaying { display: none; }
    .tracklist.has-plays.has-added { --cols: 40px minmax(0, 4fr) minmax(90px, 1.3fr) 104px 64px; }
    .tracklist .t-added { display: none; }
    .form-grid-3 { grid-template-columns: 1fr; }
    .admin-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
    body { font-size: 14px; }
    .app, .app:not(.no-panel) {
        grid-template-columns: minmax(0, 1fr) 0;
        grid-template-areas:
            "top top"
            "main np"
            "player player";
        padding: 0;
        padding-top: env(safe-area-inset-top, 0px);
    }
    .library { display: none; }
    .main { border-radius: 0; }
    .topbar { grid-template-columns: auto minmax(0, 1fr) auto; gap: 6px; padding: 0 6px; }
    .nav-arrow { display: none; }
    .topbar-center { min-width: 0; }
    .home-btn { width: 40px; height: 40px; flex: none; }
    .searchbar { width: 100%; height: 40px; }
    .searchbar-sep, .searchbar .icon-btn { display: none; }
    .admin-pill { padding: 0 10px; }
    .admin-pill .ico + * { display: none; }
    .me { display: none; }

    .page { padding: 12px 14px 32px; }
    .page-tinted { padding-top: 0; }
    .hero { flex-direction: column; align-items: flex-start; padding-top: 28px; gap: 16px; }
    .hero-art { width: 150px; }
    .hero-creator { margin: 0 -14px; padding: 80px 14px 20px; min-height: 280px; }
    .list-filter { display: none; }
    .quick { gap: 8px; }
    .quick-item { height: 56px; gap: 8px; font-size: 13px; }
    .quick-art { width: 56px; height: 56px; font-size: 22px; }

    .tracklist, .tracklist.has-plays, .tracklist.has-plays.has-added { --cols: minmax(0, 1fr) 72px; }
    .track { gap: 10px; padding: 0 6px; }
    .track .t-num, .track .t-plays, .track .t-made, .track .t-added, .track .t-time { display: none; }
    .track-head { display: none; }

    .player {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas: "now ctrl" "prog prog";
        height: auto;
        gap: 2px 10px;
        padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px));
        background: #1a1a1a;
    }
    .pl-now { grid-area: now; }
    .pl-art .tile { width: 44px; font-size: 20px; }
    .pl-center { display: contents; }
    .pl-controls { grid-area: ctrl; gap: 6px; }
    .pl-controls [data-shuffle], .pl-controls [data-repeat] { display: none; }
    .pl-progress { grid-area: prog; }
    .pl-time { min-width: 34px; font-size: 11px; }
    .pl-right { display: none; }
    .nowplaying { top: 64px; bottom: 120px; }
    .toast { bottom: 130px; }

    .form-grid { grid-template-columns: 1fr; }
    .admin-row summary { grid-template-columns: auto minmax(0, 1fr) 24px; }
    .admin-row summary .ar-num { display: none; }
    .shelf { grid-auto-columns: minmax(130px, 150px); }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* =====================================================================
 * Playlists, Folgen, Zusammenarbeit, Creator-Reihenfolge
 * ===================================================================== */

/* Bibliothek: Kopf mit Plus, Trenner */
.library-head { gap: 6px; }

.library-head a.icon-btn { color: var(--dim); }
.library-head a.icon-btn:hover, .library-head a.icon-btn.is-here { color: var(--text); }
.lib-add { width: 32px; height: 32px; border-radius: 50%; background: #1f1f1f; color: var(--dim); }
.lib-add:hover { background: #2a2a2a; color: var(--text); }
.lib-sep { display: block; height: 1px; margin: 6px 10px; background: #2a2a2a; }

/* Menü-Einträge als Knöpfe */
.menu-pop button {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 12px;
    border: 0;
    border-radius: 2px;
    background: transparent;
    color: #e5e5e5;
    font: inherit;
    font-size: 14px;
    text-align: left;
    cursor: pointer;
}
.menu-pop button:hover { background: #3e3e3e; color: #fff; }
.menu-pop .menu-danger { color: var(--danger); }
.menu-pop .menu-danger:hover { color: #ffb0aa; }

/* Folgen */
.follow-btn {
    display: inline-flex;
    align-items: center;
    height: 32px;
    padding: 0 16px;
    border-radius: 999px;
    border: 1px solid #8a8a8a;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: transform .1s, border-color .15s, color .15s;
}
.follow-btn:hover { border-color: var(--text); transform: scale(1.04); }
.follow-btn .f-on { display: none; }
.follow-btn.is-on { border-color: var(--accent); color: var(--accent); }
.follow-btn.is-on .f-on { display: inline; }
.follow-btn.is-on .f-off { display: none; }

.hero-stats { gap: 18px; font-size: 15px; }
.hero-stats strong { font-weight: 800; }

/* Über-Karte auf der Creator-Seite */
.about-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border-radius: var(--r-m);
    background: linear-gradient(135deg, color-mix(in srgb, var(--c) 22%, #181818), #181818 70%);
}
.about-card dl { display: flex; gap: 22px; flex-wrap: wrap; margin: 0; }
.about-card dt { color: var(--dim); font-size: 12px; }
.about-card dd { margin: 2px 0 0; font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }

/* Zusammenarbeit */
.collabs { margin-top: 40px; }
.collab-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}
.collab {
    padding: 14px;
    border-radius: var(--r-m);
    background: #181818;
    transition: background .15s;
}
.collab:hover { background: #222; }
.collab-head { display: flex; align-items: center; gap: 12px; }
.collab-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.collab-text strong { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.collab-text small { color: var(--dim); font-size: 13px; white-space: nowrap; }
.collab-head:hover strong { text-decoration: underline; }
.collab-count {
    flex: none;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 12px;
    font-weight: 700;
}
.collab-songs { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.collab-songs li { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--dim); }
.collab-songs li span:not(.tile) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.collab-songs li small { font-variant-numeric: tabular-nums; font-size: 12px; }
.collab-songs li.more { padding-left: 38px; font-size: 13px; }
.collab-songs .tile-xs { flex: none; width: 28px; font-size: 13px; border-radius: 4px; }

/* Playlist-Knöpfe in Listen */
.plist-remove:hover { color: var(--danger); }
.tracklist.has-quick { --cols: 40px minmax(0, 4fr) minmax(90px, 1.3fr) minmax(90px, 1.1fr) 120px 64px; }
.plist-quick { height: 30px; padding: 0 14px; font-size: 13px; }
.plist-quick.is-done { border-color: var(--accent); color: var(--accent); pointer-events: none; }
.plist-find .list-filter-wide { margin: 0 0 12px; width: min(420px, 100%); }
.plist-find .list-filter-wide input { width: 100%; }
.plist-find .tracklist .track.is-hidden { display: none; }
.hint { display: flex; align-items: center; gap: 6px; margin: 14px 16px 0; color: var(--faint); font-size: 13px; }

/* Ziehen zum Sortieren */
.is-playlist .t-num { display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
.grip {
    display: grid;
    place-items: center;
    width: 18px;
    height: 28px;
    color: var(--faint);
    cursor: grab;
    touch-action: none;
    opacity: 0;
}
.track:hover .grip, .track.is-dragging .grip { opacity: 1; }
.track.is-dragging { background: rgba(108, 199, 255, .14) !important; box-shadow: 0 6px 18px rgba(0, 0, 0, .45); cursor: grabbing; }
.track.is-dragging .grip { cursor: grabbing; }
.is-playlist .track:hover .t-num .play-ico { display: none; }
@media (hover: none) { .grip { opacity: 1; } }

/* Popover „Zu Playlist hinzufügen" */
.plist-pop {
    position: fixed;
    z-index: 80;
    width: 280px;
    max-height: min(420px, 70vh);
    display: flex;
    flex-direction: column;
    padding: 4px;
    border-radius: var(--r-s);
    background: #282828;
    box-shadow: 0 16px 24px rgba(0, 0, 0, .45), 0 6px 8px rgba(0, 0, 0, .3);
}
.plist-pop h4 { margin: 0; padding: 10px 12px 6px; font-size: 12px; color: var(--dim); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.plist-pop-list { overflow-y: auto; }
.plist-pop button {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 7px 10px;
    border: 0;
    border-radius: 3px;
    background: transparent;
    color: #e5e5e5;
    font: inherit;
    font-size: 14px;
    text-align: left;
    cursor: pointer;
}
.plist-pop button:hover { background: #3e3e3e; color: #fff; }
.plist-pop button .tile { width: 32px; font-size: 14px; border-radius: 4px; flex: none; }
.plist-pop .pp-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plist-pop .pp-state { color: var(--accent); flex: none; }
.plist-pop .pp-new { border-bottom: 1px solid #3e3e3e; border-radius: 3px 3px 0 0; margin-bottom: 4px; padding: 10px; }
.plist-pop .pp-new .pp-plus { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 4px; background: #3e3e3e; }
.plist-pop .pp-empty { padding: 8px 12px 12px; color: var(--dim); font-size: 13px; }

/* Dialog (Name eingeben, Löschen bestätigen) */
.dlg {
    width: min(420px, calc(100vw - 32px));
    padding: 24px;
    border: 0;
    border-radius: var(--r-m);
    background: #282828;
    color: var(--text);
    box-shadow: 0 24px 48px rgba(0, 0, 0, .6);
}
.dlg::backdrop { background: rgba(0, 0, 0, .7); }
.dlg h3 { margin: 0 0 14px; font-size: 22px; font-weight: 800; }
.dlg p { margin: 0 0 16px; color: var(--dim); }
.dlg .input { width: 100%; }
.dlg-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }

/* Creator-Reihenfolge im Adminbereich */
.picker-chosen {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 10px;
}
.picker-chosen:empty { display: none; }
.picker-chosen .pick {
    display: flex;
    height: 42px;
    padding: 0 6px 0 5px;
    border-radius: var(--r-s);
    border-color: var(--accent);
    background: var(--accent-soft);
    color: var(--text);
    cursor: default;
}
.picker-chosen .pick > span:not(.pick-tools):not(.pick-pos):not(.tile) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick .tile { flex: none; width: 24px; height: 24px; font-size: 12px; }
.pick-pos {
    display: none;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--accent-ink);
    font-size: 12px;
    font-weight: 800;
    flex: none;
}
.picker-chosen .pick-pos { display: grid; }
.pick-tools { display: none; gap: 2px; margin-left: auto; }
.picker-chosen .pick-tools { display: flex; }
.pick-tools button {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--dim);
    cursor: pointer;
}
.pick-tools button:hover { background: rgba(255, 255, 255, .1); color: var(--text); }
.pick-tools button:disabled { opacity: .25; cursor: default; background: transparent; }
.picker-note { margin: 6px 0 0; color: var(--faint); font-size: 12px; }

@media (max-width: 760px) {
    .tracklist.has-quick { --cols: minmax(0, 1fr) 110px; }
    .hero-stats { gap: 12px; font-size: 13px; }
    .collab-grid { grid-template-columns: 1fr; }
    .about-card dl { gap: 14px; }
}

[data-pl-fav], [data-np-fav] { display: flex; align-items: center; gap: 2px; }

.hero-art.tile { font-size: 112px; }
@media (max-width: 760px) { .hero-art.tile { font-size: 76px; } }

/* Entstehungsdatum */
.t-made { font-variant-numeric: tabular-nums; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.card-made { color: var(--faint); }
.np-made { color: var(--faint); font-size: 13px; margin-top: 2px; }
.np-made:empty { display: none; }
.track:not(.track-head) { user-select: none; -webkit-user-select: none; }

/* =====================================================================
 * Startseite: genau 8 Karten pro Reihe
 * ===================================================================== */
.shelf.shelf-row {
    grid-auto-flow: row;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    grid-auto-columns: auto;
    overflow: visible;
}
.shelf.shelf-row > :nth-child(n+9) { display: none; }

/* weniger Platz im Hauptbereich: weniger Karten, aber nie eine zweite Zeile */
.page-home { container-type: inline-size; }
@container (max-width: 980px) {
    .shelf.shelf-row { grid-template-columns: repeat(6, minmax(0, 1fr)); }
    .shelf.shelf-row > :nth-child(n+7) { display: none; }
}
@container (max-width: 700px) {
    .shelf.shelf-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .shelf.shelf-row > :nth-child(n+5) { display: none; }
}
/* schmal (Handy): alle 8 in einer wischbaren Reihe */
@container (max-width: 520px) {
    .shelf.shelf-row {
        grid-auto-flow: column;
        grid-template-columns: none;
        grid-auto-columns: minmax(130px, 42%);
        overflow-x: auto;
    }
    .shelf.shelf-row > :nth-child(n+5) { display: block; }
    .shelf.shelf-row > :nth-child(n+9) { display: none; }
}
.card-sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Cover statt Buchstabe */
.tile.has-cover { position: relative; overflow: hidden; background: #282828; }
.tile.has-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; display: block; }

/* =====================================================================
 * Konto-Menü oben rechts (wie Spotify)
 * ===================================================================== */
button.me { position: relative; border: 0; padding: 0; cursor: pointer; color: inherit; transition: transform .1s; }
button.me:hover { transform: scale(1.04); }
.me-lock {
    position: absolute;
    right: 2px;
    bottom: 2px;
    display: none;
    place-items: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--accent-ink);
    border: 2px solid #000;
}
.me.is-private .me-lock { display: grid; }
.me.is-private .me-tile { box-shadow: 0 0 0 2px var(--accent); }
.menu-pop.menu-pop-right { left: auto; right: 0; min-width: 240px; }
.me-menu .menu-pop a { padding: 11px 12px; font-size: 15px; }
.menu-sep { display: block; height: 1px; margin: 4px 0; background: #3e3e3e; }
.menu-pop .menu-toggle-row { justify-content: space-between; font-size: 15px; padding: 11px 12px; }
.switch {
    position: relative;
    width: 34px;
    height: 20px;
    border-radius: 999px;
    background: #535353;
    transition: background .15s;
    flex: none;
}
.switch::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
    transition: transform .15s;
}
[aria-pressed="true"] > .switch { background: var(--accent); }
[aria-pressed="true"] > .switch::after { transform: translateX(14px); background: #000; }

/* Anmeldung: Wechsel Anmelden/Registrieren */
.gate-switch { margin: 18px 0 0; text-align: center; color: var(--dim); font-size: 14px; }
.gate-switch a { color: var(--text); font-weight: 700; text-decoration: underline; }

.np-art .tile.has-cover { border-radius: 8px; }

/* Spotify-Vorschau im Adminbereich */
.spotify-preview {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
    padding: 8px;
    border-radius: var(--r-s);
    background: #242424;
    font-size: 13px;
}
.spotify-preview[hidden] { display: none; }
.spotify-preview img { width: 56px; height: 56px; border-radius: 4px; object-fit: cover; flex: none; }
.spotify-preview strong { display: block; font-size: 14px; }
.spotify-preview small { color: var(--dim); }
.spotify-error { color: var(--danger); }
.check { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 13px; color: var(--dim); cursor: pointer; }
.uq-item.is-warn .uq-state { color: #ffc36b; }
.badge-admin { background: var(--accent-soft); color: var(--accent); }

/* Konto & Profil */
.page-narrow { max-width: 920px; }
.account-head { display: flex; align-items: center; gap: 24px; padding: 40px 0 28px; }
.account-head h1 { margin: 2px 0 6px; font-size: clamp(32px, 5vw, 56px); font-weight: 900; letter-spacing: -.03em; }
.account-avatar { width: 128px; font-size: 56px; box-shadow: 0 8px 40px rgba(0, 0, 0, .5); flex: none; }
.stack-form .ar-actions { margin-top: 12px; }
.inline-note { margin-top: 14px; }
.device-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.device { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-s); background: #242424; }
.device span { display: flex; flex-direction: column; }
.device small { color: var(--dim); }
.account-foot { margin: 24px 4px 40px; font-size: 13px; }
.hero-avatar.tile { border-radius: 50%; }
.notice { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: var(--r-s); background: var(--accent-soft); color: var(--accent); }
.history-day .sub-title small { font-size: 14px; font-weight: 500; margin-left: 6px; }
@media (max-width: 760px) {
    .account-head { flex-direction: column; align-items: flex-start; gap: 14px; }
    .account-avatar { width: 96px; font-size: 42px; }
}

/* =====================================================================
 * „Läuft gerade“ – größer, im Stil von Spotify
 * ===================================================================== */
.nowplaying { padding: 0 16px 16px; }
.np-head {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 -16px 8px;
    padding: 14px 16px 12px;
    background: var(--panel);
    justify-content: flex-start;
}
.np-head strong { flex: 1; min-width: 0; font-size: 16px; font-weight: 700; }
.np-context { color: var(--faint); font-size: 12px; max-width: 40%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.np-context:empty { display: none; }
.np-art { margin-bottom: 20px; }
.np-art .tile { border-radius: 10px; box-shadow: 0 8px 28px rgba(0, 0, 0, .45); }
.np-text h2 { font-size: 24px; font-weight: 800; letter-spacing: -.01em; line-height: 1.15; }
.np-text p { font-size: 15px; margin-top: 4px; }
.np-meta [data-np-fav] { padding-top: 6px; }
.np-meta [data-np-fav] .fav .ico { width: 22px; height: 22px; }

.np-artist {
    margin-top: 20px;
    border-radius: 10px;
    overflow: hidden;
    background: #1f1f1f;
}
.np-artist + .np-artist { margin-top: 12px; }
.np-artist-banner {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background:
        radial-gradient(120% 90% at 20% 10%, color-mix(in srgb, var(--c) 85%, #fff 15%) 0, transparent 60%),
        linear-gradient(160deg, var(--c), color-mix(in srgb, var(--c) 40%, #000) 90%);
}
.np-artist-banner::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, .45), transparent 45%);
}
.np-artist-letter {
    position: absolute;
    right: -4%;
    bottom: -22%;
    font-size: 150px;
    font-weight: 900;
    line-height: 1;
    color: var(--ink);
    opacity: .9;
    transition: transform .3s ease;
}
.np-artist-banner:hover .np-artist-letter { transform: scale(1.04); }
.np-artist-label {
    position: absolute;
    z-index: 1;
    left: 16px;
    top: 14px;
    right: 16px;
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    text-shadow: 0 1px 8px rgba(0, 0, 0, .4);
}
.np-artist-body { padding: 14px 16px 16px; }
.np-artist-name { display: block; font-size: 16px; font-weight: 800; }
.np-artist-name:hover { text-decoration: underline; }
.np-artist-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; }
.np-artist-plays { color: var(--dim); font-size: 14px; }
.np-artist-plays strong { color: var(--text); font-weight: 700; }
.np-artist-bio { margin-top: 10px; color: var(--dim); font-size: 13px; }

/* Lautstärke unten rechts etwas kleiner */
.range.pl-volume { width: 92px; flex: none; }
.card-meta-me { color: var(--accent); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Künstler-Karte: echtes Profilbild und Zahlen wie bei Spotify */
.np-artist-banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.np-artist-banner.has-image .np-artist-letter { display: none; }
.np-artist-row { align-items: center; }
.np-artist-stats { display: flex; flex-direction: column; gap: 2px; color: var(--dim); font-size: 15px; min-width: 0; }
.np-artist-stats > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.np-artist-body { padding-bottom: 18px; }

/* Profilbild im Creator-Banner */
.hero-creator { display: flex; align-items: flex-end; gap: 24px; }
.hero-avatar-img { position: relative; width: clamp(128px, 15vw, 220px); flex: none; box-shadow: 0 8px 40px rgba(0, 0, 0, .5); }
.hero-avatar-img.has-cover { font-size: 0; }
.creator-spotify { margin-bottom: 14px; }
.creator-spotify .inline-form .input { flex: 1; }

/* =====================================================================
 * Alben, EPs, Singles – und geteilte Playlists
 * ===================================================================== */
.hero-release { display: flex; align-items: flex-end; gap: 24px; }
.hero-release .hero-art { border-radius: 6px; }
.hero-artist { display: inline-flex; align-items: center; }
.hero-artist:hover { text-decoration: underline; }
.chips-sm { margin: 0 0 14px; }
.chips-sm .chip { height: 32px; padding: 0 14px; font-size: 13px; border: 0; cursor: pointer; font-family: inherit; }
.disco-item { display: block; min-width: 0; }
.disco-item.is-hidden { display: none; }
.release-card .card-art .tile { border-radius: 6px; }
.field-label { margin: 0 0 8px; font-size: 13px; font-weight: 700; color: var(--dim); }
.field-label small { font-weight: 500; }
.picker-chosen .pick .tile-xs { border-radius: 4px; }

/* =====================================================================
 * Bibliothek links: ausklappbar wie bei Spotify
 * ===================================================================== */
.app.lib-open { grid-template-columns: 340px minmax(0, 1fr) clamp(300px, 21vw, 380px); }
.app.lib-open.no-panel { grid-template-columns: 340px minmax(0, 1fr); }

.library-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 14px 12px 8px;
}
.lib-title {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--dim);
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}
.lib-title:hover { color: var(--text); }
.lib-title span { display: none; }
.lib-create {
    display: none;
    height: 32px;
    padding: 0 14px;
    gap: 8px;
    background: #1f1f1f;
    font-size: 14px;
}
.lib-create:hover { background: #2a2a2a; }
.library-filters, .library-search { display: none; }

.app.lib-open .lib-title span,
.app.lib-open .lib-create { display: flex; }
.app.lib-open .library-filters {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 12px 8px;
    scrollbar-width: none;
}
.app.lib-open .library-filters::-webkit-scrollbar { display: none; }
.library-filters .chip { flex: none; height: 32px; padding: 0 10px; border: 0; font-family: inherit; font-size: 13px; cursor: pointer; }
.app.lib-open .library-search { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 12px 8px; }
.lib-find { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; height: 32px; padding: 0 10px; border-radius: 4px; color: var(--dim); }
.lib-find:focus-within, .lib-find:hover { background: #1f1f1f; }
.lib-find input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--text); font: inherit; font-size: 14px; outline: none; }
.lib-sort { color: var(--dim); font-size: 13px; white-space: nowrap; }

.app.lib-open .lib-item {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    place-items: stretch;
    padding: 6px 8px;
}
.app.lib-open .lib-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}
.app.lib-open .lib-text strong { font-size: 15px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app.lib-open .lib-text small { display: flex; align-items: center; gap: 5px; color: var(--dim); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app.lib-open .lib-text small .ico { color: var(--accent); }
.app.lib-open .lib-item.is-here .lib-text strong { color: var(--accent); }
.app.lib-open .lib-item::after { display: none; }
.lib-item.is-hidden { display: none !important; }
.lib-empty { padding: 12px; color: var(--dim); font-size: 13px; }
.app:not(.lib-open) .lib-empty { display: none; }
.lib-sep { display: none; }

@media (max-width: 1100px) {
    .app.lib-open { grid-template-columns: 280px minmax(0, 1fr); }
    .app.lib-open .nowplaying { display: none; }
}


/* Logo oben links */
.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-right: 6px;
    color: var(--text);
    font-weight: 900;
    font-size: 17px;
    letter-spacing: .08em;
}
.brand-mark {
    position: relative;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: var(--accent);
    flex: none;
}
.brand-mark::after {
    content: "";
    position: absolute;
    left: 8px; top: 8px;
    width: 12px; height: 12px;
    border-radius: 50%;
    background: var(--bg);
}
.brand:hover .brand-mark { background: var(--accent-hi); }
@media (max-width: 760px) { .brand-text { display: none; } }

.tile.has-cover .tile-letter { visibility: hidden; }

/* =====================================================================
 * Warteschlange und Kontextmenü
 * ===================================================================== */
.np-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.np-card-head h3 small { color: var(--faint); font-weight: 500; font-size: 13px; margin-left: 4px; }
.link-btn { border: 0; background: none; color: var(--dim); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.link-btn:hover { color: var(--text); text-decoration: underline; }
.q-row { display: flex; align-items: center; gap: 4px; border-radius: 6px; }
.q-row:hover { background: #2a2a2a; }
.q-row .q-item { flex: 1; min-width: 0; }
.q-row.is-manual .q-text strong::before { content: "+ "; color: var(--accent); }
.q-remove { opacity: 0; width: 30px; height: 30px; flex: none; }
.q-row:hover .q-remove, .q-remove:focus-visible { opacity: 1; }
@media (hover: none) { .q-remove { opacity: 1; } }

.ctx-menu {
    position: fixed;
    z-index: 90;
    width: 250px;
    padding: 4px;
    border-radius: 6px;
    background: #282828;
    box-shadow: 0 16px 24px rgba(0, 0, 0, .5), 0 6px 8px rgba(0, 0, 0, .3);
    animation: ctx-in .12s ease-out;
}
@keyframes ctx-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.ctx-head { display: flex; align-items: center; gap: 10px; padding: 8px 10px 10px; border-bottom: 1px solid #3e3e3e; margin-bottom: 4px; }
.ctx-head span { display: flex; flex-direction: column; min-width: 0; }
.ctx-head strong, .ctx-head small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ctx-head small { color: var(--dim); font-size: 12px; }
.ctx-menu button, .ctx-menu a {
    display: block;
    width: 100%;
    padding: 10px 12px;
    border: 0;
    border-radius: 3px;
    background: transparent;
    color: #e5e5e5;
    font: inherit;
    font-size: 14px;
    text-align: left;
    cursor: pointer;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ctx-menu button:hover, .ctx-menu a:hover { background: #3e3e3e; color: #fff; }

.song-more { opacity: 0; }
.track:hover .song-more, .song-more:focus-visible { opacity: 1; }
@media (hover: none) { .song-more { opacity: 1; } }
.card-more {
    position: absolute;
    top: 8px;
    right: 8px;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, .55);
    color: #fff;
    cursor: pointer;
    opacity: 0;
    transition: opacity .15s;
}
.track-card:hover .card-more, .card-more:focus-visible { opacity: 1; }
@media (hover: none) { .card-more { opacity: 1; } }

/* Upload über Spotify-Link */
.field-spotify { margin-bottom: 18px; }
.field-spotify label { font-weight: 800; }
.upload-more { margin: 16px 0; border: 1px solid var(--line); border-radius: var(--r-m); padding: 12px 14px; }
.upload-more summary { cursor: pointer; font-weight: 700; }
.upload-more summary small { color: var(--dim); font-weight: 500; }
.upload-more[open] summary { margin-bottom: 12px; }
.spotify-preview small + small { display: block; margin-top: 2px; }

/* Künstlerseite: Top 10 (erst 5) */
.top-list:not(.is-open) .track:not(.track-head):nth-of-type(n+7) { display: none; }
.top-more { margin: 10px 0 0 16px; }

/* Eigene Bibliothek einer Künstler*in */
.page-disco { padding-top: 28px; }
.disco-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.disco-back { display: flex; align-items: center; gap: 14px; }
.disco-back h1 { margin: 0; font-size: 28px; font-weight: 800; }
.disco-back:hover h1 { text-decoration: underline; }
.disco-tools { display: flex; align-items: center; gap: 6px; }
.disco-drop { display: inline-flex; align-items: center; gap: 4px; padding: 6px 8px; }
.disco-tools .icon-btn.is-on { color: var(--accent); }
.menu-pop a.is-on { color: var(--accent); }
.disco-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 8px 16px;
}
.disco-grid .card-sub, .discography .card-sub { white-space: normal; }
