/* /music player + /music-admin — gold on velvet, not linked from home. */
.music-page {
    flex: 1 1 auto;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    background-color: #14080c;
    background-image:
        linear-gradient(165deg, #2a0e16 0%, #14080c 48%, #0a0507 100%),
        radial-gradient(ellipse 90% 70% at 80% 0%, rgba(185, 28, 28, 0.28) 0%, transparent 55%),
        radial-gradient(900px 420px at 50% 0%, rgba(234, 179, 8, 0.12), transparent 58%);
    color: #fde68a;
}

/* Keep the player in the viewport so the list scrolls above the dock, not under it. */
.music-page:not(.tag-page) {
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
}

/* The player is a fixed-viewport shell: the only scrollers are the lyrics / song list.
   The page itself must never scroll sideways, so a stray bottom scrollbar cannot appear. */
html:has(.music-page:not(.tag-page)),
body:has(.music-page:not(.tag-page)) {
    overflow-x: hidden;
}

.music-copy {
    flex: 0 0 auto;
    margin: 0;
    padding: .45rem .75rem .2rem;
    text-align: center;
    font-size: .88rem;
    letter-spacing: .04em;
    color: #fff;
    opacity: .92;
    user-select: none;
    -webkit-user-select: none;
    cursor: default;
    -webkit-tap-highlight-color: transparent;
}

.music-copy-all {
    margin-right: .35em;
}

.music-header {
    flex: 0 0 auto;
    text-align: center;
    padding: .35rem .75rem .55rem;
    border-bottom: 1px solid rgba(234, 179, 8, 0.38);
}

.music-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
}

/* /now: one merged top bar - the back button, the cover chip and the title all
   share a single row. The sleep timer lives on the /music list view, so it is
   not repeated here, which frees up the room this row needs. */
.music-header.music-now-head {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: .55rem;
    text-align: left;
    padding: .4rem .7rem;
}

.music-now-head .music-back {
    flex: 0 0 auto;
}

.music-now-head .music-now-arttoggle {
    flex: 0 0 auto;
}

.music-now-head .music-now-art {
    width: 38px;
    height: 38px;
    border-radius: 8px;
}

.music-now-head .music-now-title {
    margin: 0;
    font-size: 1.12rem;
    font-weight: 650;
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: left;
}

.music-album-pick {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    min-height: 2.4rem;
    max-width: min(70vw, 20rem);
    padding: 0 .55rem 0 .55rem;
    border: 1px solid rgba(201, 168, 106, .55);
    border-radius: 999px;
    background: rgba(11, 20, 36, 0.45);
    color: inherit;
}

.music-album-pick .music-chip-art {
    margin-right: 0;
    flex: 0 0 auto;
}

.music-album-select {
    appearance: none;
    -webkit-appearance: none;
    flex: 1 1 auto;
    min-width: 7rem;
    max-width: 100%;
    border: 0;
    background: transparent url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%23c9a86a' d='M1 1l5 5 5-5'/></svg>") no-repeat right 0.15rem center;
    color: inherit;
    font: inherit;
    font-size: .92rem;
    padding: .35rem 1.35rem .35rem 0;
    cursor: pointer;
}

.music-album-select:focus {
    outline: none;
}

.music-album-select option {
    background: #1a0b10;
    color: #fde68a;
}

.music-title {
    margin: 0;
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 700;
    letter-spacing: .04em;
}

.music-sub {
    margin: .35rem 0 0;
    opacity: .78;
    font-size: .95rem;
}

.music-pop {
    position: relative;
    margin: 0 0 0 auto;
}

.music-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: .35rem;
}

.music-menu-scrim {
    position: fixed;
    inset: 0;
    z-index: 20;
    background: transparent;
}

.music-icon {
    appearance: none;
    position: relative;
    border: none;
    background: transparent;
    color: #fde68a;
    border-radius: 10px;
    min-width: 2.4rem;
    min-height: 2.4rem;
    padding: 0 .45rem;
    cursor: pointer;
    font: inherit;
}

.music-icon[data-tip]::after {
    content: attr(data-tip);
    position: absolute;
    left: 50%;
    top: calc(100% + .45rem);
    transform: translateX(-50%);
    white-space: nowrap;
    padding: .38rem .6rem;
    border-radius: 8px;
    border: 1px solid rgba(201, 168, 106, .5);
    background: rgba(11, 20, 36, .96);
    color: #fde68a;
    font-size: .75rem;
    letter-spacing: .01em;
    opacity: 0;
    pointer-events: none;
    z-index: 30;
    box-shadow: 0 10px 24px rgba(0, 0, 0, .4);
    transition: opacity .12s ease .5s;
}

.music-icon[data-tip]:hover::after,
.music-icon[data-tip]:focus-visible::after {
    opacity: 1;
}

.music-icon.on {
    color: #facc15;
    text-shadow: 0 0 8px rgba(250, 204, 21, .55);
}

.music-repeat {
    appearance: none;
    position: relative;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    min-width: 2.7rem;
    min-height: 2.7rem;
    padding: .15rem .35rem;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #e8d5a3;
    cursor: pointer;
    font: inherit;
    line-height: 1;
}

.music-repeat:hover {
    color: #facc15;
}

.music-repeat[data-tip]::after {
    content: attr(data-tip);
    position: absolute;
    left: 50%;
    bottom: calc(100% + .4rem);
    transform: translateX(-50%);
    white-space: nowrap;
    padding: .38rem .6rem;
    border-radius: 8px;
    border: 1px solid rgba(201, 168, 106, .5);
    background: rgba(11, 20, 36, .96);
    color: #fde68a;
    font-size: .75rem;
    letter-spacing: .01em;
    opacity: 0;
    pointer-events: none;
    z-index: 30;
    box-shadow: 0 10px 24px rgba(0, 0, 0, .4);
    transition: opacity .12s ease .5s;
}

.music-repeat[data-tip]:hover::after,
.music-repeat[data-tip]:focus-visible::after {
    opacity: 1;
}

/* Controls pinned to the right edge (the transport "repeat" and the toolbar sleep timer)
   hang their tooltip to the left of the button so the text is never clipped at the edge
   and never widens the page. */
.music-repeat[data-tip]::after,
.music-pop .music-icon[data-tip]::after {
    left: auto;
    right: 0;
    transform: none;
}

/* Hints (data-tip) are hover affordances. A press would otherwise leave the hint stuck on
   screen (taps keep a sticky :hover, and the pointer is still over the button after a click),
   so we drop it the moment the control is pressed and re-arm it on the next fresh hover.
   Declared after the :hover/:focus-visible rules so it wins the specificity tie. */
.music-icon[data-tip][data-tip-hide]::after,
.music-repeat[data-tip][data-tip-hide]::after {
    opacity: 0;
    transition: none;
}

.music-repeat svg {
    width: 1.2rem;
    height: 1.2rem;
    fill: currentColor;
}

.music-repeat span {
    font-size: .58rem;
    letter-spacing: .1em;
    font-weight: 700;
}

.music-repeat.on {
    color: #fde68a;
}

.music-menu {
    position: absolute;
    z-index: 21;
    left: auto;
    right: 0;
    top: calc(100% + .4rem);
    transform: none;
    width: min(360px, calc(100vw - 2rem));
    margin: 0;
    display: grid;
    border: 1px solid #c9a86a;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(11, 20, 36, 0.96);
    text-align: left;
    box-shadow: 0 18px 40px rgba(0, 0, 0, .55);
}

.music-menu-item {
    appearance: none;
    border: 0;
    border-bottom: 1px solid rgba(201, 168, 106, .25);
    background: transparent;
    color: inherit;
    padding: .7rem .9rem;
    text-align: left;
    font: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: .5rem;
}

.music-menu-item:last-child { border-bottom: 0; }

.music-search {
    width: min(520px, 100%);
    margin: .6rem auto 0;
    display: block;
    padding: .55rem .75rem;
    border-radius: 10px;
    border: 1px solid rgba(201, 168, 106, .55);
    background: rgba(0, 0, 0, .28);
    color: #fde68a;
    font: inherit;
}

.music-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .4rem;
    margin-top: .75rem;
}

.music-chip {
    appearance: none;
    border: 1px solid rgba(201, 168, 106, .5);
    background: rgba(11, 20, 36, 0.4);
    color: inherit;
    border-radius: 999px;
    padding: .28rem .75rem;
    font: inherit;
    font-size: .88rem;
    cursor: pointer;
}

.music-chip.on {
    border-color: #facc15;
    background: rgba(201, 168, 106, .22);
}

.music-chip-art,
.music-row-art,
.music-dock-art,
.music-admin-thumb {
    object-fit: cover;
    background: rgba(0, 0, 0, .35);
    border: 1px solid rgba(201, 168, 106, .35);
}

.music-chip-art {
    width: 1.15rem;
    height: 1.15rem;
    border-radius: 4px;
    margin-right: .35rem;
    vertical-align: middle;
}

.music-row-art {
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 6px;
    flex: 0 0 auto;
    cursor: grab;
    user-select: none;
    touch-action: none;
}
.music-row-art:active { cursor: grabbing; }

.music-dock-art {
    width: 52px;
    height: 52px;
    border-radius: 8px;
    flex: 0 0 auto;
}

.music-dock-art.spinning {
    animation: music-spin 12s linear infinite;
}

.music-admin-thumb {
    width: 2.15rem;
    height: 2.15rem;
    max-width: 2.15rem;
    max-height: 2.15rem;
    border-radius: 6px;
    display: block;
    flex: 0 0 auto;
}

.music-body {
    flex: 1 1 auto;
    min-height: 0;
    box-sizing: border-box;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

.music-page.is-now {
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
}

.music-page.is-now .music-body {
    padding-bottom: 0;
}

.music-back {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.4rem;
    min-height: 2.4rem;
    padding: 0;
    border: 0;
    background: transparent;
    color: #fde68a;
    font-size: 1.45rem;
    line-height: 1;
    cursor: pointer;
}

.music-back:hover { color: #facc15; }

.music-now-hero {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: .55rem 1rem .35rem;
    gap: .45rem;
}

.music-now-art {
    width: min(38vw, 168px);
    height: min(38vw, 168px);
    object-fit: cover;
    border-radius: 14px;
    border: 1px solid rgba(201, 168, 106, .45);
    box-shadow: 0 10px 28px rgba(0, 0, 0, .4);
}

/* /now: the cover doubles as a toggle — tap it to swap the lyrics for a large cover,
   tap the large cover to bring the lyrics back. */
.music-now-arttoggle {
    appearance: none;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    line-height: 0;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.music-now-arttoggle .music-now-art {
    display: block;
}

.music-now-arttoggle:hover .music-now-art,
.music-now-arttoggle:focus-visible .music-now-art {
    border-color: rgba(250, 204, 21, .85);
}

.music-now-hero .music-now-title {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 650;
    max-width: 92vw;
}

.music-now-hero.no-lyrics {
    flex: 1 1 auto;
    min-height: 0;
    justify-content: center;
    gap: .85rem;
    padding: .9rem 1rem 1rem;
}

.music-now-hero.no-lyrics .music-now-art {
    width: min(80vw, 320px);
    height: min(80vw, 320px);
}

.music-now-art.spinning,
.music-mini-art.spinning {
    animation: music-spin 12s linear infinite;
}

/* The large hero cover (opened by tapping the spinning title-band art, or shown
   for songs without lyrics) is a still image - the big one never spins. */
.music-now-hero.no-lyrics .music-now-art.spinning {
    animation: none;
}

.music-mini {
    appearance: none;
    width: 100%;
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: 0 0 .15rem;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.music-mini-art {
    width: 44px;
    height: 44px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid rgba(201, 168, 106, .35);
    flex: 0 0 auto;
}

.music-mini-meta {
    min-width: 0;
    display: grid;
    gap: .1rem;
    flex: 1;
}

.music-mini-kicker {
    font-size: .68rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    opacity: .65;
}

.music-mini-title {
    font-weight: 650;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.music-mini-go { opacity: .7; }

.music-stage {
    width: min(640px, 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.music-disc {
    width: 168px;
    height: 168px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 50% 50%, #3a1a14 0 18%, #1a0a0c 19% 42%, #c9a86a 43% 46%, #1a0a0c 47% 100%);
    box-shadow:
        0 0 0 8px rgba(201, 168, 106, .22),
        0 18px 40px rgba(0, 0, 0, .45);
    position: relative;
}

.music-disc.spinning {
    animation: music-spin 8s linear infinite;
}

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

.music-now {
    text-align: center;
    width: 100%;
}

.music-now-title {
    font-size: 1.35rem;
    font-weight: 650;
    margin: 0;
}

.music-now-artist {
    margin: .25rem 0 0;
    opacity: .8;
    font-size: .95rem;
}

.music-controls {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    width: 100%;
}

.music-controls-main {
    grid-column: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .65rem;
}

.music-controls .music-repeat {
    grid-column: 3;
    justify-self: end;
    margin-left: 0;
    margin-right: .1rem;
}

/* Overlap / gap toggle: moved from the top toolbar to the bottom-left of the transport row,
   mirroring the repeat control on the right. Its glyph is 30% larger, it keeps the neutral
   "timer" colour in both states, and its tooltip opens upward and is left-aligned to the
   button so the long text never runs off the left edge of the viewport. */
.music-controls > .music-icon {
    grid-column: 1;
    justify-self: start;
    min-width: 2.7rem;
    min-height: 2.7rem;
    font-size: 1.3em;
}

.music-controls > .music-icon.on {
    color: #fde68a;
    text-shadow: none;
}

.music-controls > .music-icon[data-tip]::after {
    top: auto;
    bottom: calc(100% + .4rem);
    left: 0;
    transform: none;
}

.music-btn {
    appearance: none;
    border: 1px solid #c9a86a;
    background: rgba(11, 20, 36, 0.55);
    color: #fde68a;
    border-radius: 8px;
    min-width: 2.7rem;
    min-height: 2.7rem;
    cursor: pointer;
    font: inherit;
    font-size: 1.15rem;
}

.music-page:not(.tag-page) .music-btn {
    border-radius: 999px;
}

.music-btn-play {
    min-width: 3.5rem;
    min-height: 3.5rem;
    font-size: 1.35rem;
    background: rgba(201, 168, 106, .18);
}

.music-btn:hover {
    border-color: #facc15;
    background: rgba(20, 32, 54, 0.8);
}

.music-seek {
    width: 100%;
    display: flex;
    align-items: center;
    gap: .65rem;
    font-variant-numeric: tabular-nums;
    font-size: .82rem;
    opacity: .9;
}

.music-seek input[type="range"] {
    flex: 1;
    accent-color: #c9a86a;
}

.music-hidden-audio {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.music-list {
    width: min(640px, 100%);
    display: flex;
    flex-direction: column;
    gap: .45rem;
    padding: 1rem .5rem;
    box-sizing: border-box;
}

.music-row {
    display: flex;
    align-items: center;
    gap: .45rem;
    width: 100%;
    text-align: left;
    padding: .55rem .325rem;
    border-radius: 12px;
    border: 1px solid #c9a86a;
    background: rgba(11, 20, 36, 0.62);
    color: inherit;
    font: inherit;
}

body.music-reordering,
body.music-reordering * {
    cursor: grabbing !important;
    user-select: none !important;
}

.music-row-play {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: .65rem;
    appearance: none;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.music-nudge {
    display: none;
    flex-direction: column;
    gap: .15rem;
}

.music-btn-tiny {
    min-width: 1.7rem;
    min-height: 1.5rem;
    font-size: .75rem;
    padding: 0;
}

.music-row:hover,
.music-row.active {
    border-color: #facc15;
    background: rgba(20, 32, 54, 0.88);
}

.music-row.dragging {
    opacity: .42;
}

.music-row.drop-before {
    box-shadow: inset 0 3px 0 #facc15;
}

.music-row.drop-after {
    box-shadow: inset 0 -3px 0 #facc15;
}

.music-row-num {
    opacity: .55;
    width: 1.5rem;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.music-row-meta {
    flex: 1;
    min-width: 0;
}

.music-row-title {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.music-row-artist {
    opacity: .72;
    font-size: .85rem;
}

.music-empty {
    opacity: .75;
    text-align: center;
    margin: 2rem 1rem;
}

.music-download-page .music-header {
    text-align: left;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}

.music-download-page .music-list {
    width: min(720px, 100%);
}

.music-download-page .music-row-art {
    cursor: default;
    touch-action: auto;
}

.music-download-count {
    margin: .85rem 0 0;
    text-align: center;
    font-size: .88rem;
    opacity: .75;
}

.music-download-btn {
    flex: 0 0 auto;
    min-width: 6.6rem;
    min-height: 2.4rem;
    padding: 0 .85rem;
    border-radius: 999px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .88rem;
    box-sizing: border-box;
    white-space: nowrap;
}

.music-download-btn:hover {
    border-color: #facc15;
    background: rgba(20, 32, 54, 0.8);
}

.music-download-lock {
    width: min(380px, 100%);
    justify-items: stretch;
    text-align: left;
}

.music-download-lock .tag-kicker,
.music-download-lock .studio-modal-title,
.music-download-lock .studio-modal-body {
    text-align: center;
}

.music-download-lock-label {
    display: block;
}

.music-download-lock input[type="password"] {
    width: 100%;
    padding: .65rem .75rem;
    border-radius: 10px;
    border: 1px solid rgba(201, 168, 106, .45);
    background: rgba(0, 0, 0, .32);
    color: #fde68a;
    font: inherit;
    box-sizing: border-box;
}

.music-download-lock input[type="password"]:focus {
    outline: none;
    border-color: #facc15;
    box-shadow: 0 0 0 3px rgba(250, 204, 21, .18);
}

.music-download-lock .music-btn {
    width: 100%;
    min-height: 2.8rem;
}

.music-download-lock-err {
    margin: 0;
    color: #fecaca;
    font-size: .9rem;
    text-align: center;
}

.music-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.music-admin-form {
    width: min(720px, 100%);
    display: grid;
    gap: .65rem;
    padding: 1rem;
    border: 1px solid #c9a86a;
    border-radius: 12px;
    background: rgba(11, 20, 36, 0.62);
}

.music-admin-form label {
    display: grid;
    gap: .3rem;
    font-size: .88rem;
}

.music-admin-form input[type="text"],
.music-admin-form input[type="file"] {
    padding: .55rem .65rem;
    border-radius: 8px;
    border: 1px solid rgba(201, 168, 106, .55);
    background: rgba(0, 0, 0, .28);
    color: #fde68a;
    font: inherit;
}

.music-admin-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem;
}

/* Rectangular 8px buttons on /music-admin (and tag studio). Keep pill .music-btn on /music. */
.studio-page button,
.tag-page button {
    border-radius: 8px;
}

.studio-page .music-btn,
.tag-page .music-btn {
    border-radius: 8px;
    min-width: 0;
    min-height: 2.4rem;
    height: auto;
    padding: .45rem 1.05rem;
    font-size: .95rem;
    line-height: 1.2;
    white-space: nowrap;
}

.studio-page .music-btn.music-btn-play,
.tag-page .music-btn.music-btn-play {
    min-width: 0;
    min-height: 2.4rem;
    font-size: .95rem;
}

.music-admin-actions .music-btn {
    flex: 0 1 auto;
    border-radius: 8px;
}

.music-admin-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr auto auto;
    gap: .45rem;
    align-items: center;
    width: min(720px, 100%);
    padding: .7rem .8rem;
    border: 1px solid #c9a86a;
    border-radius: 12px;
    background: rgba(11, 20, 36, 0.62);
}

.music-admin-row input {
    padding: .4rem .5rem;
    border-radius: 8px;
    border: 1px solid rgba(201, 168, 106, .45);
    background: rgba(0, 0, 0, .28);
    color: #fde68a;
    font: inherit;
}

.music-status {
    width: min(720px, 100%);
}

.music-dock {
    flex: 0 0 auto;
    position: sticky;
    bottom: 0;
    z-index: 5;
    width: 100%;
    box-sizing: border-box; /* width:100% must include the side padding, not add to it */
    padding: .7rem 1rem calc(.85rem + env(safe-area-inset-bottom));
    border-top: 1px solid rgba(234, 179, 8, 0.38);
    background: #0c0608;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .45rem;
}

.music-dock-list {
    gap: .4rem;
}

.music-dock-now {
    display: flex;
    align-items: center;
    gap: .75rem;
    width: min(640px, 100%);
}

.music-dock .music-disc {
    width: 52px;
    height: 52px;
    box-shadow: 0 0 0 3px rgba(201, 168, 106, .22);
    flex: 0 0 auto;
}

.music-dock .music-now {
    text-align: left;
    min-width: 0;
}

.music-dock .music-now-title {
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (min-width: 641px) {
    .tag-page {
        height: 100dvh;
        max-height: 100dvh;
        overflow: hidden;
    }
}
.tag-page .music-header { text-align: left; padding-left: 1.25rem; padding-right: 1.25rem; }
.tag-header { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: .75rem; }
.tag-kicker {
    margin: 0 0 .2rem;
    letter-spacing: .2em;
    text-transform: uppercase;
    font-size: .68rem;
    color: #facc15;
    opacity: .85;
}
.tag-kicker a { color: inherit; }
.tag-layout {
    display: flex;
    min-height: 0;
    flex: 1;
    --studio-left: 480px;
}
.tag-panel {
    flex: 0 0 var(--studio-left);
    width: var(--studio-left);
    max-width: 78vw;
    min-width: 360px;
    border-right: 0;
    padding: 1rem;
    overflow-y: auto;
    display: grid;
    align-content: start;
    gap: .85rem;
    background: linear-gradient(180deg, rgba(42, 14, 22, .45) 0%, transparent 12rem);
}
.tag-split {
    flex: 0 0 8px;
    width: 8px;
    cursor: col-resize;
    background: linear-gradient(180deg, rgba(250, 204, 21, .18), rgba(201, 168, 106, .08));
    border-left: 1px solid rgba(234, 179, 8, 0.28);
    border-right: 1px solid rgba(234, 179, 8, 0.28);
}
.tag-split:hover,
.tag-split:active {
    background: rgba(250, 204, 21, .35);
}
.tag-list {
    flex: 1 1 auto;
}
.tag-card {
    padding: 1rem;
    border: 1px solid rgba(201, 168, 106, .32);
    border-radius: 16px;
    background: rgba(11, 20, 36, 0.5);
    box-shadow: 0 10px 28px rgba(0, 0, 0, .22);
    display: grid;
    gap: .5rem;
}
.tag-art-card {
    grid-template-columns: 1fr;
    justify-items: stretch;
}
.tag-art-label {
    margin: 0;
    font-size: .72rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: #facc15;
    opacity: .8;
}
.tag-art-actions { display: grid; gap: .5rem; width: 100%; }
.tag-prompt { width: 100%; min-height: 5rem; resize: vertical; }
.tag-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: .45rem; }
.tag-toast {
    margin: 0;
    padding: .65rem .8rem;
    border-radius: 12px;
    border: 1px solid rgba(250, 204, 21, .4);
    background: rgba(201, 168, 106, .16);
    font-size: .9rem;
}
.tag-table-art {
    width: 2.2rem;
    height: 2.2rem;
    object-fit: cover;
    border-radius: 6px;
    background: rgba(0,0,0,.3);
    border: 1px solid rgba(201, 168, 106, .3);
}
.tag-panel label {
    display: grid;
    gap: .25rem;
    font-size: .8rem;
    opacity: .95;
}
.tag-panel input,
.tag-panel textarea {
    padding: .5rem .6rem;
    border-radius: 10px;
    border: 1px solid rgba(201, 168, 106, .45);
    background: rgba(0, 0, 0, .32);
    color: #fde68a;
    font: inherit;
}
.tag-panel input:focus,
.tag-panel textarea:focus {
    outline: none;
    border-color: #facc15;
    box-shadow: 0 0 0 3px rgba(250, 204, 21, .18);
}
.studio-cover {
    position: relative;
    width: min(100%, 260px);
    aspect-ratio: 1;
    margin: 0 auto .15rem;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(250, 204, 21, .45);
    box-shadow:
        0 0 0 7px rgba(201, 168, 106, .12),
        0 18px 40px rgba(0, 0, 0, .45);
    background:
        radial-gradient(circle at 50% 50%, #3a1a14 0 18%, #1a0a0c 19% 42%, #c9a86a 43% 46%, #1a0a0c 47% 100%);
}
.tag-cover { width: 100%; height: 100%; object-fit: cover; display: block; }
.tag-cover-file {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
    font-size: 0;
}
.studio-cover.is-over {
    outline: 3px solid #facc15;
    outline-offset: 2px;
}
.studio-cover-empty {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    font-size: .85rem;
    opacity: .8;
}
.studio-vinyl {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 50% 50%, #3a1a14 0 18%, #1a0a0c 19% 42%, #c9a86a 43% 46%, #1a0a0c 47% 100%);
    box-shadow: 0 0 0 4px rgba(201, 168, 106, .22);
}
.studio-cover-veil {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 5, 7, .55);
    font-weight: 600;
    letter-spacing: .04em;
    pointer-events: none;
}
.studio-cover.is-generating::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(110deg, transparent 30%, rgba(250, 204, 21, .22) 50%, transparent 70%);
    animation: studio-shimmer 1.4s linear infinite;
    pointer-events: none;
}
@keyframes studio-shimmer {
    from { transform: translateX(-60%); }
    to { transform: translateX(60%); }
}
.seg {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 3px;
    border-radius: 8px;
    border: 1px solid rgba(201, 168, 106, .4);
    background: rgba(0, 0, 0, .35);
}
.seg-btn {
    appearance: none;
    border: 0;
    background: transparent;
    color: inherit;
    border-radius: 8px;
    padding: .42rem .55rem;
    font: inherit;
    font-size: .82rem;
    cursor: pointer;
}
.seg-btn.on {
    background: rgba(201, 168, 106, .3);
    color: #fef3c7;
}
.prompt-chips {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
}
.prompt-chip {
    appearance: none;
    border: 1px solid rgba(201, 168, 106, .4);
    background: rgba(0, 0, 0, .22);
    color: inherit;
    border-radius: 8px;
    padding: .22rem .6rem;
    font: inherit;
    font-size: .75rem;
    cursor: pointer;
    opacity: .9;
}
.prompt-chip:hover { border-color: #facc15; }
.music-btn-grok {
    width: 100%;
    min-height: 2.8rem;
    border-radius: 8px;
    background: linear-gradient(180deg, rgba(250, 204, 21, .28), rgba(201, 168, 106, .12));
    font-size: 1rem;
    font-weight: 650;
}
.music-btn-grok:disabled { opacity: .45; cursor: default; }
.studio-hint {
    margin: 0;
    font-size: .75rem;
    opacity: .65;
}
.mp3-drop {
    position: relative;
    min-height: 8.6rem;
    border: 2px dashed rgba(201, 168, 106, .5);
    border-radius: 16px;
    background: rgba(0, 0, 0, .22);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1.1rem .9rem;
    gap: .2rem;
}
.mp3-drop.is-over,
.tag-list.is-over {
    border-color: #facc15;
    background: rgba(201, 168, 106, .16);
    box-shadow: inset 0 0 0 2px rgba(250, 204, 21, .45);
}
.tag-list.is-over {
    outline: 2px dashed #facc15;
    outline-offset: -8px;
    border-radius: 12px;
}
.mp3-drop-title { font-weight: 650; }
.mp3-drop-sub { margin: 0; font-size: .85rem; opacity: .72; }
.mp3-drop-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    font-size: 0;
}
.mp3-drop.is-busy { opacity: .85; }
.studio-rows {
    display: flex;
    flex-direction: column;
    gap: .22rem;
    overflow: auto;
    min-height: 0;
    flex: 1 1 auto;
    padding-bottom: .6rem;
}
.tag-count-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    flex-wrap: wrap;
}
.tag-check-all {
    display: flex;
    align-items: center;
    gap: .4rem;
    font-size: .85rem;
    opacity: .85;
    cursor: pointer;
}
.studio-row {
    display: grid;
    grid-template-columns: 1.05rem 1.85rem minmax(0, 1fr) auto;
    align-items: center;
    gap: .4rem;
    width: 100%;
    min-width: 0;
    text-align: left;
    padding: .32rem .45rem;
    border-radius: 8px;
    border: 1px solid rgba(201, 168, 106, .4);
    background: rgba(11, 20, 36, 0.55);
    color: inherit;
    font: inherit;
    font-size: .88rem;
    box-sizing: border-box;
}
.studio-row > * {
    min-width: 0;
}
.studio-row-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .3rem;
    flex: 0 0 auto;
    min-width: max-content;
}
.studio-row input[type="checkbox"] {
    width: 0.95rem;
    height: 0.95rem;
    margin: 0;
    flex: 0 0 auto;
    justify-self: center;
}
.studio-row-main {
    display: grid;
    grid-template-columns: 2.15rem minmax(0, 1fr);
    align-items: center;
    gap: .45rem;
    min-width: 0;
    appearance: none;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
    padding: 0;
}
.studio-row.on,
.studio-row:hover,
.studio-row.is-preview {
    border-color: #facc15;
    background: rgba(20, 32, 54, 0.88);
}
.studio-row-play {
    appearance: none;
    width: 1.85rem;
    height: 1.85rem;
    padding: 0;
    display: grid;
    place-items: center;
    border-radius: 8px;
    border: 1px solid rgba(201, 168, 106, .45);
    background: rgba(0, 0, 0, .28);
    color: #fde68a;
    cursor: pointer;
    flex: 0 0 auto;
    overflow: hidden;
    line-height: 0;
}
.studio-row-play svg {
    width: 0.95rem;
    height: 0.95rem;
    max-width: 0.95rem;
    max-height: 0.95rem;
    fill: currentColor;
    display: block;
}
.studio-row-play:hover,
.studio-row-play:focus-visible,
.studio-row-play.on {
    outline: none;
    border-color: #facc15;
    background: rgba(201, 168, 106, .28);
    color: #fff8d4;
}
.tag-page.has-preview {
    padding-bottom: 5.75rem;
}
.studio-preview-dock .studio-row-play {
    width: 2.2rem;
    height: 2.2rem;
}
.studio-preview-dock .studio-row-play svg {
    width: 1.05rem;
    height: 1.05rem;
    max-width: 1.05rem;
    max-height: 1.05rem;
}
.studio-preview-dock {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    display: grid;
    grid-template-columns: auto 1fr auto auto auto;
    align-items: center;
    gap: .55rem .7rem;
    padding: .65rem 1rem .7rem;
    border-top: 1px solid rgba(234, 179, 8, .4);
    background: rgba(10, 4, 7, .94);
    backdrop-filter: blur(8px);
}
.studio-preview-art {
    width: 44px;
    height: 44px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid rgba(201, 168, 106, .35);
    flex: 0 0 auto;
}
.studio-preview-art.spinning {
    animation: music-spin 12s linear infinite;
}
.studio-preview-meta {
    min-width: 0;
    display: grid;
    gap: .08rem;
}
.studio-preview-kicker {
    font-size: .68rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    opacity: .65;
}
.studio-preview-title {
    font-weight: 650;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.studio-preview-time {
    font-variant-numeric: tabular-nums;
    font-size: .82rem;
    opacity: .8;
    white-space: nowrap;
}
.studio-preview-stop {
    appearance: none;
    width: 2.35rem;
    height: 2.35rem;
    padding: 0;
    display: grid;
    place-items: center;
    border-radius: 8px;
    border: 1px solid rgba(201, 168, 106, .4);
    background: rgba(0, 0, 0, .28);
    color: #e8c98a;
    cursor: pointer;
}
.studio-preview-stop svg {
    width: 1.05rem;
    height: 1.05rem;
    fill: currentColor;
}
.studio-preview-stop:hover,
.studio-preview-stop:focus-visible {
    outline: none;
    border-color: #facc15;
    background: rgba(201, 168, 106, .28);
}
.studio-preview-seek {
    grid-column: 1 / -1;
    width: 100%;
    accent-color: #facc15;
    height: .35rem;
}
.studio-row-meta {
    min-width: 0;
    display: grid;
    gap: .08rem;
}
.studio-row .music-row-title,
.studio-row .music-row-artist {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.25;
}
.studio-row .music-row-artist {
    font-size: .75rem;
}
.studio-row-flag {
    appearance: none;
    font: inherit;
    font-size: .68rem;
    letter-spacing: .02em;
    text-transform: none;
    color: inherit;
    opacity: .9;
    min-width: 3.6rem;
    height: 1.85rem;
    padding: 0 .55rem;
    border-radius: 8px;
    border: 1px solid rgba(201, 168, 106, .35);
    background: rgba(0, 0, 0, .22);
    cursor: pointer;
    white-space: nowrap;
    line-height: 1;
}
.studio-row-timing {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    min-width: 4.6rem;
    height: 1.85rem;
    padding: 0 .55rem;
    border-radius: 8px;
    border: 1px solid rgba(250, 204, 21, .55);
    background: rgba(201, 168, 106, .18);
    color: #fde68a;
    font-size: .68rem;
    letter-spacing: .03em;
    text-transform: uppercase;
    white-space: nowrap;
}
.studio-row-timing-dot {
    width: .45rem;
    height: .45rem;
    border-radius: 50%;
    background: #facc15;
    box-shadow: 0 0 0 0 rgba(250, 204, 21, .7);
    animation: studio-timing-pulse 1.1s ease-in-out infinite;
}
@keyframes studio-timing-pulse {
    50% { opacity: .35; box-shadow: 0 0 0 5px rgba(250, 204, 21, 0); }
}
.studio-row.is-timing {
    border-color: rgba(250, 204, 21, .55);
}
.studio-row-flag.live {
    opacity: 1;
    color: #fde68a;
    border-color: rgba(250, 204, 21, .55);
    background: rgba(201, 168, 106, .18);
}
.studio-row-flag:hover,
.studio-row-flag:focus-visible {
    outline: none;
    border-color: #facc15;
    background: rgba(201, 168, 106, .28);
}
.studio-row-flag:disabled { opacity: .4; cursor: default; }
.studio-row.is-skipped {
    opacity: .62;
}
.studio-row.is-skipped .music-row-title {
    text-decoration: line-through;
    text-decoration-color: rgba(253, 230, 138, .4);
}
.studio-trash {
    appearance: none;
    width: 1.85rem;
    height: 1.85rem;
    padding: 0;
    display: grid;
    place-items: center;
    border-radius: 8px;
    border: 1px solid rgba(201, 168, 106, .4);
    background: rgba(0, 0, 0, .28);
    color: #e8c98a;
    cursor: pointer;
    flex: 0 0 auto;
    overflow: hidden;
    line-height: 0;
}
.studio-trash svg {
    width: 0.95rem;
    height: 0.95rem;
    max-width: 0.95rem;
    max-height: 0.95rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
    display: block;
}
.studio-trash:hover,
.studio-trash:focus-visible {
    outline: none;
    color: #fecaca;
    border-color: #f87171;
    background: rgba(127, 29, 29, .45);
    box-shadow: 0 0 0 3px rgba(248, 113, 113, .18);
}
.studio-trash:disabled { opacity: .4; cursor: default; }
.studio-row-lyrics {
    appearance: none;
    width: 1.85rem;
    height: 1.85rem;
    padding: 0;
    display: grid;
    place-items: center;
    border-radius: 8px;
    border: 1px solid rgba(201, 168, 106, .4);
    background: rgba(0, 0, 0, .28);
    color: #e8c98a;
    cursor: pointer;
    flex: 0 0 auto;
    overflow: hidden;
    line-height: 0;
}
.studio-row-lyrics svg {
    width: 0.95rem;
    height: 0.95rem;
    max-width: 0.95rem;
    max-height: 0.95rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
    display: block;
}
.studio-row-lyrics.has {
    color: #fde68a;
    border-color: rgba(250, 204, 21, .55);
    background: rgba(201, 168, 106, .18);
}
.studio-row-lyrics:hover,
.studio-row-lyrics:focus-visible {
    outline: none;
    border-color: #facc15;
    background: rgba(201, 168, 106, .28);
    color: #fff8d4;
}
.studio-row-lyrics:disabled { opacity: .4; cursor: default; }
.studio-lyrics-back {
    position: fixed;
    inset: 0;
    z-index: 45;
    display: grid;
    place-items: center;
    padding: 1rem;
    background: rgba(8, 3, 5, .78);
    backdrop-filter: blur(8px);
}
.studio-lyrics-modal {
    width: min(960px, 100%);
    height: min(92dvh, 100%);
    max-height: 92dvh;
    padding: 1.1rem 1.15rem 1rem;
    border-radius: 18px;
    border: 1px solid rgba(250, 204, 21, .4);
    background: linear-gradient(180deg, #2a1218 0%, #14080c 100%);
    color: #fde68a;
    box-shadow: 0 24px 50px rgba(0, 0, 0, .5);
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    gap: .7rem;
    min-height: 0;
}
.studio-lyrics-head {
    grid-row: 1;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .75rem;
}
.studio-lyrics-modal > .tag-toast {
    grid-row: 2;
}
.studio-lyrics-title {
    margin: .1rem 0 .2rem;
    font-size: 1.35rem;
}
.studio-lyrics-sub {
    margin: 0;
    opacity: .78;
    font-size: .88rem;
}
.studio-lyrics-editor {
    grid-row: 3;
    width: 100%;
    height: 100%;
    min-height: 0;
    resize: none;
    padding: .9rem 1rem;
    border-radius: 12px;
    border: 1px solid rgba(201, 168, 106, .45);
    background: rgba(0, 0, 0, .42);
    color: #fff8e7;
    font-family: "Cascadia Mono", Consolas, "Segoe UI", monospace;
    font-size: 1rem;
    line-height: 1.55;
}
.studio-lyrics-editor:focus {
    outline: none;
    border-color: #facc15;
    box-shadow: 0 0 0 3px rgba(250, 204, 21, .18);
}
.studio-lyrics-editor:disabled {
    opacity: .7;
}
.studio-lyrics-actions {
    grid-row: 4;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: .5rem;
}
.studio-lyrics-head .music-btn,
.studio-lyrics-actions .music-btn,
.studio-lyrics-head .music-btn.music-btn-play,
.studio-lyrics-actions .music-btn.music-btn-play {
    flex: 0 0 auto;
    width: auto;
    height: auto;
    min-width: 0;
    min-height: 2.4rem;
    max-height: none;
    padding: .45rem 1.05rem;
    border-radius: 8px;
    font-size: .95rem;
    line-height: 1.2;
    align-self: center;
}
.tag-toast.is-err {
    border-color: rgba(248, 113, 113, .55);
    color: #fecaca;
    background: rgba(127, 29, 29, .28);
}
.studio-modal-back {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: grid;
    place-items: center;
    padding: 1.25rem;
    background: rgba(8, 3, 5, .72);
    backdrop-filter: blur(6px);
}
.studio-modal {
    width: min(420px, 100%);
    padding: 1.35rem 1.3rem 1.15rem;
    border-radius: 18px;
    border: 1px solid rgba(250, 204, 21, .4);
    background: linear-gradient(180deg, #2a1218 0%, #14080c 100%);
    color: #fde68a;
    box-shadow: 0 24px 50px rgba(0, 0, 0, .5);
    display: grid;
    justify-items: center;
    text-align: center;
    gap: .7rem;
}
.studio-modal-icon {
    width: 3.1rem;
    height: 3.1rem;
    border-radius: 50%;
    display: grid;
    place-items: center;
    border: 1px solid rgba(248, 113, 113, .45);
    background: rgba(127, 29, 29, .35);
    color: #fecaca;
}
.studio-modal-icon svg {
    width: 1.45rem;
    height: 1.45rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.studio-modal-title {
    margin: 0;
    font-size: 1.2rem;
}
.studio-modal-body {
    margin: 0;
    opacity: .86;
    font-size: .95rem;
    line-height: 1.45;
}
.studio-modal-actions {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: .35rem;
}
.studio-modal-danger {
    background: rgba(127, 29, 29, .55);
    border-color: #f87171;
    color: #fecaca;
}
.tag-list { min-width: 0; min-height: 0; overflow: hidden; padding: .7rem .75rem .9rem; display: flex; flex-direction: column; gap: .4rem; container-type: inline-size; }
.tag-list-tools {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: .4rem;
}
.tag-list-tools:has(.studio-album-pick) {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
}
.tag-list .music-search { width: 100%; margin: 0; }
.studio-album-pick {
    display: grid;
    grid-template-columns: 1.7rem minmax(0, 1fr);
    align-items: center;
    gap: .45rem;
    width: 100%;
    min-width: 0;
    padding: .22rem .55rem .22rem .32rem;
    border-radius: 10px;
    border: 1px solid rgba(201, 168, 106, .55);
    background: rgba(0, 0, 0, .28);
    color: #fde68a;
    box-sizing: border-box;
}
.studio-album-pick:hover {
    border-color: rgba(250, 204, 21, .7);
}
.studio-album-pick:focus-within {
    border-color: #facc15;
    box-shadow: 0 0 0 3px rgba(250, 204, 21, .18);
}
.studio-album-art {
    width: 1.7rem;
    height: 1.7rem;
    max-width: 1.7rem;
    max-height: 1.7rem;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid rgba(201, 168, 106, .35);
    background: rgba(0, 0, 0, .35);
    display: block;
}
.studio-album-art.is-empty {
    border-radius: 50%;
    background:
        radial-gradient(circle at 50% 50%, #3a1a14 0 18%, #1a0a0c 19% 42%, #c9a86a 43% 46%, #1a0a0c 47% 100%);
    box-shadow: inset 0 0 0 1px rgba(201, 168, 106, .2);
}
.studio-album-select {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    min-width: 0;
    border: 0;
    background: transparent url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%23c9a86a' d='M1 1l5 5 5-5'/></svg>") no-repeat right 0.1rem center;
    color: #fde68a;
    font: inherit;
    font-size: .9rem;
    padding: .38rem 1.35rem .38rem 0;
    cursor: pointer;
    color-scheme: dark;
}
.studio-album-select:focus {
    outline: none;
}
.studio-album-select option {
    background: #1a0b10;
    color: #fde68a;
}
.studio-tool-select {
    display: block;
    width: 100%;
    min-width: 0;
}
.studio-tool-select select {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    min-width: 0;
    padding: .38rem 1.35rem .38rem .55rem;
    border-radius: 10px;
    border: 1px solid rgba(201, 168, 106, .55);
    background: rgba(0, 0, 0, .28) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%23c9a86a' d='M1 1l5 5 5-5'/></svg>") no-repeat right 0.5rem center;
    color: #fde68a;
    font: inherit;
    font-size: .85rem;
    cursor: pointer;
    color-scheme: dark;
}
.studio-tool-select select:focus {
    outline: none;
    border-color: #facc15;
    box-shadow: 0 0 0 3px rgba(250, 204, 21, .18);
}
.studio-tool-select select option {
    background: #1a0b10;
    color: #fde68a;
}
@container (max-width: 520px) {
    .tag-list-tools:has(.studio-album-pick) {
        grid-template-columns: 1fr;
    }
}
@container (max-width: 460px) {
    .studio-row-flag { display: none; }
}
.tag-count { margin: 0; opacity: .7; font-size: .85rem; min-width: 0; text-align: right; }
.tag-table-wrap { overflow: auto; flex: 1; min-height: 12rem; border: 1px solid rgba(201, 168, 106, .35); border-radius: 12px; background: rgba(8, 4, 6, .35); }
.tag-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.tag-table th, .tag-table td {
    padding: .5rem .6rem;
    border-bottom: 1px solid rgba(201, 168, 106, .18);
    text-align: left;
    white-space: nowrap;
    max-width: 14rem;
    overflow: hidden;
    text-overflow: ellipsis;
}
.tag-table th { position: sticky; top: 0; background: #1a0c10; z-index: 1; letter-spacing: .04em; font-size: .75rem; text-transform: uppercase; opacity: .8; }
.tag-table tr { cursor: pointer; }
.tag-table tr.on { background: rgba(201, 168, 106, .18); box-shadow: inset 3px 0 0 #facc15; }
.tag-table tr:hover { background: rgba(201, 168, 106, .1); }
.tag-fn { opacity: .7; max-width: 12rem; }

@media (max-width: 640px) {
    .music-admin-row {
        grid-template-columns: 1fr;
    }
    .music-title {
        font-size: 1.45rem;
    }
    .music-nudge {
        display: flex;
    }
    .music-body {
        padding-bottom: 1rem;
    }
    .music-header {
        padding: .7rem .8rem .55rem;
    }
    .tag-layout {
        flex-direction: column;
        --studio-left: auto;
    }
    .tag-panel {
        flex: 0 0 auto;
        width: 100%;
        max-width: none;
        min-width: 0;
        border-right: 0;
        border-bottom: 1px solid rgba(234, 179, 8, 0.28);
    }
    .tag-split { display: none; }
    .studio-preview-dock {
        grid-template-columns: auto 1fr auto auto;
        padding: .55rem .75rem calc(.55rem + env(safe-area-inset-bottom, 0px));
    }
    .studio-preview-time { display: none; }
    .tag-page.has-preview { padding-bottom: 6.25rem; }
}

.music-lyrics {
    width: 100%;
    max-width: none;
    max-height: min(42vh, 22rem);
    box-sizing: border-box;        /* width:100% must include the side padding */
    overflow-x: hidden;            /* lyrics never scroll sideways */
    overflow-y: auto;
    margin: 0;
    padding: .75rem 1rem;
    border-radius: 0;
    border: 0;
    background: transparent;
    text-align: center;
    scroll-behavior: smooth;
}

/* The lyrics / song-list scrollers get a thin gold-on-velvet scrollbar in place of the
   OS default so the track blends into the player. The standard scrollbar-* properties are
   used only where ::-webkit-scrollbar is unavailable (Firefox). Chrome/Edge/Safari take the
   custom rules below: setting scrollbar-color there would make the engine fall back to the
   native (arrowed) scrollbar and ignore the ::-webkit-scrollbar track/thumb styling. */
@supports not selector(::-webkit-scrollbar) {
    .music-lyrics,
    .music-body {
        scrollbar-width: thin;
        scrollbar-color: rgba(201, 168, 106, .6) rgba(0, 0, 0, .25);
    }
}

.music-lyrics::-webkit-scrollbar,
.music-body::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

.music-lyrics::-webkit-scrollbar-track,
.music-body::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, .28);
    border-radius: 999px;
}

.music-lyrics::-webkit-scrollbar-thumb,
.music-body::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(201, 168, 106, .7), rgba(201, 168, 106, .4));
    border: 2px solid transparent;
    border-radius: 999px;
    background-clip: padding-box;
}

.music-lyrics::-webkit-scrollbar-thumb:hover,
.music-body::-webkit-scrollbar-thumb:hover {
    background: rgba(250, 204, 21, .75);
    background-clip: padding-box;
}

.music-lyrics-fill {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    border-bottom: 0;
}
.music-lyric {
    margin: .15rem 0;
    font-size: 1.02rem;
    line-height: 1.45;
    opacity: .55;
    color: #8a7344;
    transition: color .2s ease, opacity .2s ease, transform .2s ease;
}
.music-lyric.on {
    opacity: 1;
    color: #c9a86a; /* same gold as .music-btn play-button border */
    font-weight: 700;
    transform: scale(1.04);
}
.music-lyric.plain { color: #8a7344; opacity: .55; }
