/* Song pages, the public library, and the "how should we play this?" drawer. Builds on tunebun.css. */
.song-body { padding: 0; }
.sp-page { max-width: 1040px; margin: 0 auto; padding: 18px 16px 70px; display: grid; gap: 18px; }
.sp-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sp-back, .sp-brand { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: 999px; font-weight: 800; font-size: 13.5px; color: var(--muted); text-decoration: none; background: var(--bg); box-shadow: var(--raised-sm); position: relative; overflow: hidden; }
.sp-back:hover { color: var(--text); }
.sp-brand { box-shadow: none; padding-left: 4px; font-size: 16px; color: var(--text); }
.sp-nav-r { display: flex; align-items: center; gap: 14px; }
.switch.compact { gap: 10px; } .switch.compact small { display: block; }
.sp-page .stage-sing { height: clamp(420px, 66vh, 680px); border-radius: 30px; box-shadow: 0 30px 60px -28px rgba(10, 12, 30, .6), var(--raised-sm); }
.sp-cover { width: 100%; max-width: 380px; aspect-ratio: 1; border-radius: 36px; box-shadow: var(--raised); background: var(--grad) center/cover; margin: 0 auto; }

/* dock: title, like/share, transport */
.sp-dock { border-radius: 28px; padding: 16px 18px; background: var(--bg); box-shadow: var(--raised); display: grid; gap: 14px; position: sticky; bottom: 12px; z-index: 5; }
.sp-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.sp-t { min-width: 0; display: grid; line-height: 1.25; }
.sp-t b { font-size: 17px; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-t span { color: var(--muted); font-weight: 600; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-acts { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sp-ico { position: relative; overflow: hidden; width: 42px; height: 42px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center; color: var(--muted); background: var(--bg); box-shadow: var(--raised-sm); transition: transform .2s var(--ease), color .2s; }
.sp-ico:active { box-shadow: var(--inset-sm); transform: scale(.95); }
.sp-ico:hover { color: var(--text); }
.sp-ico .i { width: 20px; height: 20px; }
.sp-ico[aria-pressed="true"] { color: #ff5c8d; }
.sp-ico[aria-pressed="true"] .i { fill: currentColor; animation: heartPop .45s var(--ease); }
@keyframes heartPop { 40% { transform: scale(1.35); } }
.sp-stat { font-size: 12px; font-weight: 700; color: var(--muted); padding: 7px 12px; border-radius: 99px; box-shadow: var(--inset-sm); white-space: nowrap; }
.sp-stat b { color: var(--text); }
.sp-mode { font-size: 12px; font-weight: 800; padding: 7px 12px; border-radius: 99px; border: 0; cursor: pointer; background: var(--bg); box-shadow: var(--inset-sm); color: var(--muted); display: inline-flex; gap: 6px; align-items: center; }
.sp-mode[data-m="cache"] { color: var(--ok); }
.sp-mode::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.sp-ctl { display: flex; align-items: center; gap: 18px; }
.sp-big { flex: none; width: 66px; height: 66px; border-radius: 50%; border: 0; cursor: pointer; background: var(--grad); color: #fff; box-shadow: var(--glow); display: grid; place-items: center; position: relative; overflow: hidden; transition: transform .2s var(--ease); }
.sp-big:active { transform: scale(.94); }
.sp-big .i { width: 28px; height: 28px; }
.sp-big.loading { pointer-events: none; }
.sp-big.loading::after { content: ""; position: absolute; width: 26px; height: 26px; border-radius: 50%; border: 3px solid #fff; border-right-color: transparent; animation: spin .7s linear infinite; }
.sp-big.loading .i { opacity: 0; }
.sp-time { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; font-variant-numeric: tabular-nums; font-size: 13px; color: var(--muted); font-weight: 700; }
.sp-time input { flex: 1; min-width: 60px; }
.sp-custom { min-width: 0; }
.sp-foot { text-align: center; color: var(--faint); font-size: 12.5px; font-weight: 600; }
@media (max-width: 640px) {
  .sp-page { padding: 12px 10px 90px; gap: 14px; }
  .sp-page .stage-sing { height: 60vh; border-radius: 24px; }
  .sp-dock { border-radius: 24px; padding: 14px; }
  .sp-big { width: 58px; height: 58px; }
  .switch.compact small { display: none; }
}

/* ===================================================== "How should we play this?" drawer */
.tbl-veil { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: flex-end; justify-content: center; background: rgba(10, 12, 26, 0); transition: background .3s; padding: 0 12px env(safe-area-inset-bottom); }
.tbl-veil.show { background: rgba(10, 12, 26, .55); backdrop-filter: blur(3px); }
.tbl-drawer { width: min(520px, 100%); max-height: 92vh; overflow: auto; margin-bottom: 12px; padding: 12px 20px 20px; border-radius: 30px; outline: none; color: var(--text); background: var(--bg); box-shadow: 0 -10px 60px rgba(0, 0, 0, .4); transform: translateY(110%); transition: transform .42s var(--ease); display: grid; gap: 14px; }
.tbl-veil.show .tbl-drawer { transform: none; }
.tbl-grip { justify-self: center; width: 44px; height: 5px; border-radius: 99px; background: var(--faint); opacity: .5; }
.tbl-head { display: flex; align-items: center; gap: 10px; } .tbl-head h3 { font-size: 19px; letter-spacing: -.01em; }
.tbl-beta { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 3px 9px; border-radius: 99px; color: #fff; background: var(--grad); }
.tbl-sub { color: var(--muted); font-size: 14px; margin-top: -6px; }
.tbl-probe { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; color: var(--muted); padding: 10px 14px; border-radius: 16px; box-shadow: var(--inset-sm); min-height: 42px; }
.tbl-probe b { color: var(--text); font-size: 15px; } .tbl-err { color: var(--bad); }
.tbl-spin { width: 16px; height: 16px; border-radius: 50%; border: 2.5px solid var(--accent); border-right-color: transparent; animation: spin .7s linear infinite; flex: none; display: inline-block; }
.tbl-opts { display: grid; gap: 12px; }
.tbl-opt { position: relative; display: flex; gap: 14px; align-items: flex-start; text-align: left; padding: 16px; border: 0; border-radius: 22px; cursor: pointer; background: var(--bg); box-shadow: var(--raised-sm); color: var(--text); transition: transform .2s var(--ease), box-shadow .2s; }
.tbl-opt:hover { transform: translateY(-1px); } .tbl-opt:active { box-shadow: var(--inset-sm); transform: none; }
.tbl-opt.rec { box-shadow: var(--raised-sm), 0 0 0 2px color-mix(in srgb, var(--accent) 65%, transparent); }
.tbl-opt b { display: block; font-size: 15.5px; margin-bottom: 3px; } .tbl-opt small { display: block; color: var(--muted); font-size: 13px; line-height: 1.4; font-weight: 500; }
.tbl-ic { flex: none; width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; font-size: 19px; background: var(--grad); color: #fff; box-shadow: var(--glow); }
.tbl-rec { position: absolute; top: -9px; right: 14px; font-style: normal; font-size: 11px; font-weight: 800; padding: 3px 10px; border-radius: 99px; background: var(--ok); color: #fff; }
.tbl-prog { display: grid; gap: 10px; }
.tbl-bar { height: 12px; border-radius: 99px; box-shadow: var(--inset-sm); overflow: hidden; background: var(--bg); } .tbl-bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--grad); transition: width .2s linear; }
.tbl-stats { display: flex; justify-content: space-between; font-size: 13px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.tbl-skip { border: 0; background: none; color: var(--muted); font-weight: 700; font-size: 13px; cursor: pointer; padding: 6px 10px; border-radius: 99px; } .tbl-skip:hover { color: var(--text); }
.tbl-rem { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); cursor: pointer; } .tbl-rem input { accent-color: var(--accent); width: 17px; height: 17px; }
.tbl-toast { position: fixed; left: 50%; bottom: 22px; z-index: 1001; transform: translate(-50%, 160%); transition: transform .4s var(--ease); display: flex; align-items: center; gap: 12px; max-width: calc(100% - 24px); padding: 12px 16px; border-radius: 99px; color: var(--text); background: var(--bg); box-shadow: var(--raised), 0 10px 30px rgba(0, 0, 0, .25); font-size: 13.5px; font-weight: 600; }
.tbl-toast.show { transform: translate(-50%, 0); } .tbl-toast.warn { border-radius: 22px; flex-wrap: wrap; }
.tbl-act { border: 0; border-radius: 99px; height: 34px; padding: 0 14px; background: var(--grad); color: #fff; font-weight: 800; font-size: 13px; cursor: pointer; box-shadow: var(--glow); }
@media (min-width: 700px) { .tbl-veil { align-items: center; } .tbl-drawer { margin: 0; } }

/* ===================================================== public library */
.lib-page { max-width: 1120px; margin: 0 auto; padding: 22px 16px 90px; display: grid; gap: 26px; }
.lib-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.lib-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 900; font-size: 19px; letter-spacing: -.01em; color: var(--text); text-decoration: none; }
.lib-hero { display: grid; gap: 10px; padding: 8px 4px 0; }
.lib-hero h1 { font-size: clamp(30px, 6vw, 52px); line-height: 1.05; letter-spacing: -.03em; margin: 0; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; width: fit-content; }
.lib-hero p { color: var(--muted); font-size: clamp(15px, 2.4vw, 18px); max-width: 560px; }
.lib-tools { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.lib-search { flex: 1; min-width: 220px; position: relative; }
.lib-search input { width: 100%; height: 48px; padding: 0 18px 0 46px; border: 0; border-radius: 999px; background: var(--bg); box-shadow: var(--inset); font: inherit; color: var(--text); }
.lib-search input:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 2px; }
.lib-search svg { position: absolute; left: 16px; top: 14px; width: 20px; height: 20px; color: var(--faint); }
.lib-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 22px; }
.lib-card { position: relative; display: grid; gap: 12px; padding: 12px 12px 16px; border-radius: 28px; background: var(--bg); box-shadow: var(--raised); text-decoration: none; color: inherit; transition: transform .3s var(--ease), box-shadow .3s; animation: libIn .5s var(--ease) both; animation-delay: calc(var(--n, 0) * 45ms); }
.lib-card:hover { transform: translateY(-4px); box-shadow: 10px 14px 26px var(--sh-d), -8px -8px 18px var(--sh-l); }
.lib-card:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 3px; border-radius: 28px; }
@keyframes libIn { from { opacity: 0; transform: translateY(14px); } }
.lib-art { position: relative; aspect-ratio: 1; border-radius: 20px; overflow: hidden; background: var(--grad) center/cover; display: grid; place-items: center; color: rgba(255, 255, 255, .9); }
.lib-art > svg { width: 44px; height: 44px; opacity: .85; }
.lib-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(10, 12, 30, .45)); opacity: 0; transition: opacity .3s; }
.lib-card:hover .lib-art::after { opacity: 1; }
.lib-play { position: absolute; right: 12px; bottom: 12px; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: #ff5c8d; box-shadow: 0 8px 20px rgba(0, 0, 0, .3); transform: translateY(8px) scale(.9); opacity: 0; transition: transform .3s var(--ease), opacity .3s; z-index: 1; }
.lib-card:hover .lib-play, .lib-card:focus-visible .lib-play { transform: none; opacity: 1; }
.lib-play svg { width: 20px; height: 20px; fill: currentColor; stroke: none; }
.lib-meta { display: grid; gap: 2px; padding: 0 6px; min-width: 0; }
.lib-meta b { font-size: 16px; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lib-meta span { color: var(--muted); font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lib-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 6px; }
.lib-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.lib-tag { font-size: 11px; font-weight: 800; padding: 3px 9px; border-radius: 99px; background: var(--bg); box-shadow: var(--inset-sm); color: var(--muted); }
.lib-like { position: relative; z-index: 2; border: 0; background: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: var(--faint); cursor: pointer; transition: transform .2s var(--ease), color .2s; }
.lib-like:hover { color: #ff5c8d; transform: scale(1.1); }
.lib-like[aria-pressed="true"] { color: #ff5c8d; } .lib-like[aria-pressed="true"] svg { fill: currentColor; animation: heartPop .45s var(--ease); }
.lib-like svg { width: 21px; height: 21px; }
.lib-adm { position: absolute; top: 20px; left: 20px; z-index: 2; font-size: 11px; font-weight: 800; padding: 4px 10px; border-radius: 99px; color: #fff; background: rgba(15, 17, 36, .72); backdrop-filter: blur(6px); }
.lib-empty { text-align: center; color: var(--muted); padding: 60px 10px; display: grid; gap: 8px; }
.lib-empty b { font-size: 20px; color: var(--text); }
.lib-foot { text-align: center; color: var(--faint); font-size: 12.5px; font-weight: 600; }
@media (max-width: 520px) { .lib-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; } .lib-card { padding: 9px 9px 12px; border-radius: 22px; } .lib-meta b { font-size: 14.5px; } }
@media (prefers-reduced-motion: reduce) { .lib-card, .tbl-drawer, .tbl-toast { animation: none; transition: none; } }
.lib-link { color: inherit; text-decoration: none; }
.lib-link::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: 28px; }
.lib-link:focus-visible { outline: none; }
.lib-card:focus-within { box-shadow: var(--raised), 0 0 0 3px color-mix(in srgb, var(--accent) 50%, transparent); }
.lib-card[hidden] { display: none; }
.lib-top .btn { text-decoration: none; }

/* ---- live listeners ---- */
.sp-live { display: inline-flex; align-items: center; gap: 7px; margin-top: 6px; font-style: normal; font-size: 12px; font-weight: 700; color: var(--muted); }
.sp-live i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); opacity: .5; }
.sp-live[data-n]:not([data-n="0"]) i { background: #34d399; opacity: 1; box-shadow: 0 0 0 0 rgba(52, 211, 153, .6); animation: livePulse 1.8s ease-out infinite; }
.sp-live[data-n]:not([data-n="0"]) { color: var(--text); }
@keyframes livePulse { 70% { box-shadow: 0 0 0 9px rgba(52, 211, 153, 0); } 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); } }
.sp-stat i { font-style: normal; font-size: 10px; margin-left: 4px; padding: 2px 7px; border-radius: 99px; background: var(--grad); color: #fff; }
.lib-live { position: absolute; left: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 99px; font-size: 11.5px; font-weight: 800; color: #fff; background: rgba(10, 12, 26, .62); backdrop-filter: blur(6px); }
.lib-live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #34d399; animation: livePulse 1.8s ease-out infinite; }
.lib-live[data-n="0"]::before { background: #9aa0b8; animation: none; }

/* ---- 8D headphones notice ---- */
.eight-veil { position: fixed; inset: 0; z-index: 900; display: grid; place-items: start center; padding: max(18px, env(safe-area-inset-top)) 16px 0; pointer-events: none; }
.eight-card { pointer-events: auto; position: relative; width: min(440px, 100%); overflow: hidden; display: grid; grid-template-columns: 76px 1fr auto; gap: 14px; align-items: center; padding: 16px 16px 16px 14px; border-radius: 28px;
  color: #fff; background: linear-gradient(135deg, rgba(40, 24, 78, .94), rgba(22, 24, 58, .94)); backdrop-filter: blur(18px); box-shadow: 0 24px 60px rgba(8, 6, 30, .5), inset 0 1px 0 rgba(255, 255, 255, .18);
  transform: translateY(-140%) scale(.96); opacity: 0; transition: transform .7s var(--ease), opacity .4s; }
.eight-card.show { transform: none; opacity: 1; }
.eight-card::before { content: ""; position: absolute; inset: -40% -10% auto auto; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(244, 114, 182, .42), transparent 65%); pointer-events: none; }
.eight-card::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--grad); transform-origin: left; animation: eightBar var(--t, 9s) linear forwards; }
@keyframes eightBar { from { transform: scaleX(1); } to { transform: scaleX(0); } }
.eight-orb { position: relative; width: 76px; height: 76px; }
.eight-orb .ring { position: absolute; inset: 0; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, .22); }
.eight-orb .ring.r2 { inset: 11px; border-color: rgba(255, 255, 255, .32); }
.eight-orb .sph { position: absolute; left: 50%; top: 50%; width: 18px; height: 18px; margin: -9px; border-radius: 50%; background: var(--grad); box-shadow: 0 0 16px rgba(244, 114, 182, .9); }
.eight-orb .dot { position: absolute; inset: 0; animation: eightSpin 3.2s linear infinite; }
.eight-orb .dot::after { content: ""; position: absolute; top: -4px; left: 50%; width: 9px; height: 9px; margin-left: -4.5px; border-radius: 50%; background: #fff; box-shadow: 0 0 12px #fff; }
.eight-orb .dot.d2 { inset: 11px; animation-duration: 2.1s; animation-direction: reverse; }
.eight-orb .dot.d2::after { width: 6px; height: 6px; margin-left: -3px; top: -3px; background: #f9a8d4; box-shadow: 0 0 10px #f9a8d4; }
@keyframes eightSpin { to { transform: rotate(360deg); } }
.eight-card b { display: block; font-size: 15.5px; letter-spacing: -.01em; }
.eight-card p { margin: 4px 0 0; font-size: 13px; line-height: 1.45; color: rgba(255, 255, 255, .78); }
.eight-card .eight-x { align-self: start; width: 32px; height: 32px; border: 0; border-radius: 50%; color: #fff; background: rgba(255, 255, 255, .12); cursor: pointer; font-size: 14px; }
.eight-card .eight-x:hover { background: rgba(255, 255, 255, .22); }
@media (max-width: 420px) { .eight-card { grid-template-columns: 56px 1fr auto; gap: 11px; } .eight-orb { width: 56px; height: 56px; } .eight-orb .dot.d2 { inset: 8px; } .eight-orb .ring.r2 { inset: 8px; } .eight-orb .sph { width: 14px; height: 14px; margin: -7px; } }
@media (prefers-reduced-motion: reduce) { .eight-orb .dot, .eight-card::after, .sp-live i { animation: none; } .eight-card { transition: opacity .3s; transform: none; } }

/* ---- protection ---- */
.sp-lock { position: fixed; inset: 0; z-index: 2000; display: grid; place-items: center; padding: 24px; text-align: center; color: #fff; background: rgba(8, 8, 22, .94); backdrop-filter: blur(14px); }
.sp-lock div { max-width: 380px; } .sp-lock b { display: block; font-size: 20px; margin-bottom: 8px; } .sp-lock p { margin: 0; opacity: .75; line-height: 1.5; }
.song-body.prot { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.song-body.prot input, .song-body.prot textarea { -webkit-user-select: text; user-select: text; }
.song-body.prot img { -webkit-user-drag: none; }

/* ===================================================== Queue sheet */
.sp-skip { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center; color: var(--muted); background: var(--bg); box-shadow: var(--raised-sm); position: relative; overflow: hidden; transition: transform .2s var(--ease), color .2s; }
.sp-skip[hidden], .sp-ico[hidden] { display: none; }
.sp-skip:hover { color: var(--text); } .sp-skip:active { transform: scale(.93); box-shadow: var(--inset-sm); }
.sp-skip .i { width: 20px; height: 20px; }
.sp-ico.tg[aria-pressed="true"] { color: var(--accent, #7b5cff); } .sp-ico.tg[aria-pressed="true"] .i { fill: none; animation: none; }
.sp-badge { position: absolute; top: 2px; right: 2px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 99px; font-size: 10.5px; line-height: 17px; font-style: normal; font-weight: 800; color: #fff; background: linear-gradient(135deg, #ff8fc0, #7b5cff); }
.lib-q { position: absolute; z-index: 2; right: 10px; top: 10px; width: 36px; height: 36px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center; color: #fff; background: rgba(12, 14, 30, .55); backdrop-filter: blur(8px); opacity: 0; transform: scale(.9); transition: opacity .2s, transform .2s var(--ease); }
.lib-card:hover .lib-q, .lib-q:focus-visible, .lib-q.on { opacity: 1; transform: none; } @media (hover: none) { .lib-q { opacity: 1; transform: none; } }
.lib-q .i { width: 18px; height: 18px; }
.lib-qfab { position: fixed; z-index: 30; right: 16px; bottom: 16px; height: 48px; padding: 0 18px 0 14px; border-radius: 99px; border: 0; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; font: inherit; font-weight: 800; font-size: 14px; color: #fff; background: var(--grad); box-shadow: var(--glow); }
.lib-qfab .i { width: 20px; height: 20px; } .lib-qfab b { font-style: normal; background: rgba(255, 255, 255, .26); border-radius: 99px; padding: 1px 8px; font-size: 12px; }

.qs-veil { position: fixed; inset: 0; z-index: 80; display: grid; align-items: end; justify-items: center; background: rgba(6, 8, 20, .5); backdrop-filter: blur(5px); opacity: 0; transition: opacity .25s var(--ease); }
.qs-veil.show { opacity: 1; }
.qs { --qs-row: #232644; --qs-text: #f2f3ff; width: min(560px, 100%); max-height: min(720px, 88vh); display: grid; grid-template-rows: auto auto auto auto 1fr auto; border-radius: 28px 28px 0 0; color: var(--qs-text); background: #171a33; box-shadow: 0 -20px 60px rgba(0, 0, 0, .45), inset 0 0 0 1px rgba(255, 255, 255, .08); transform: translateY(40px); transition: transform .35s var(--ease); padding-bottom: env(safe-area-inset-bottom); }
.qs-veil.show .qs { transform: none; }
@media (min-width: 700px) { .qs-veil { align-items: center; } .qs { border-radius: 28px; max-height: min(680px, 86vh); } }
.qs-grip { width: 42px; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .22); margin: 10px auto 0; }
.qs-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 16px 6px 20px; }
.qs-h h3 { margin: 0; font-size: 18px; letter-spacing: -.01em; } .qs-h h3 small { font-size: 13px; opacity: .6; font-weight: 600; }
.qs-tools { display: flex; gap: 6px; }
.qs-t { position: relative; overflow: hidden; width: 38px; height: 38px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center; color: #fff; font: inherit; background: rgba(255, 255, 255, .1); transition: background .2s, transform .2s var(--ease); }
.qs-t:hover { background: rgba(255, 255, 255, .18); } .qs-t:active { transform: scale(.92); } .qs-t .i { width: 18px; height: 18px; }
.qs-t[aria-pressed="true"] { background: linear-gradient(135deg, #ff8fc0, #9aa6ff); color: #1a1530; }
.qs-one { position: absolute; right: 6px; bottom: 5px; font-size: 9px; font-style: normal; }
.qs-tabs { display: flex; gap: 6px; padding: 4px 16px 8px; }
.qs-tabs button { flex: 1; height: 36px; border-radius: 12px; border: 0; cursor: pointer; font: inherit; font-size: 13px; font-weight: 700; color: rgba(255, 255, 255, .75); background: transparent; transition: background .2s, color .2s; }
.qs-tabs button[aria-selected="true"] { color: #fff; background: rgba(255, 255, 255, .13); }
.qs-search { padding: 0 16px 8px; } .qs-search[hidden] { display: none; }
.qs-search input { width: 100%; height: 40px; border-radius: 12px; border: 0; padding: 0 14px; color: #fff; font: inherit; font-size: 14px; background: rgba(255, 255, 255, .09); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); }
.qs-search input:focus { outline: 2px solid #b4a8ff; outline-offset: 1px; }
.qs-body { overflow: auto; padding: 4px 16px 10px; display: grid; gap: 8px; align-content: start; min-height: 120px; overscroll-behavior: contain; }
.qs-body .swipe-row { margin-bottom: 0; }
.qs-hint { margin: 0; padding: 6px 20px 14px; font-size: 12px; opacity: .6; text-align: center; min-height: 1em; }
.qs-empty { display: grid; gap: 6px; text-align: center; padding: 34px 20px; } .qs-empty b { font-size: 15px; } .qs-empty span { font-size: 13px; opacity: .65; line-height: 1.5; }
.qr-art { flex: none; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--grad, linear-gradient(135deg, #ff8fc0, #7b5cff)) center/cover; color: #fff; box-shadow: 0 6px 14px -6px rgba(0, 0, 0, .6); }
.qr-art .i { width: 20px; height: 20px; }
.qr-main { flex: 1; min-width: 0; display: grid; text-align: left; line-height: 1.3; border: 0; background: none; color: inherit; font: inherit; padding: 8px 0; cursor: pointer; }
.qr-main.static { cursor: inherit; }
.qr-main b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .qr-main span { font-size: 12px; opacity: .65; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qr-dur { flex: none; font-style: normal; font-size: 12px; opacity: .6; font-variant-numeric: tabular-nums; }
.qr-add { position: relative; overflow: hidden; flex: none; width: 34px; height: 34px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center; color: #fff; background: rgba(255, 255, 255, .12); }
.qr-add:hover { background: rgba(255, 255, 255, .2); } .qr-add .i { width: 18px; height: 18px; }
.is-cur .swipe-row__surface { box-shadow: inset 3px 0 0 #ff8fc0; background: color-mix(in srgb, var(--sr-row) 82%, #ff8fc0 18%); }
.qr-eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 14px; flex: none; } .qr-eq s { width: 3px; background: #ff8fc0; border-radius: 2px; animation: qEq .9s ease-in-out infinite; } .qr-eq s:nth-child(2) { animation-delay: .2s; } .qr-eq s:nth-child(3) { animation-delay: .4s; }
@keyframes qEq { 0%, 100% { height: 4px; } 50% { height: 14px; } }
@media (prefers-reduced-motion: reduce) { .qr-eq s { animation: none; height: 10px; } .qs, .qs-veil { transition: none; } }

.sp-big.busy { animation: qBusy 1s ease-in-out infinite; } @keyframes qBusy { 50% { opacity: .55; transform: scale(.95); } }
@media (prefers-reduced-motion: reduce) { .sp-big.busy { animation: none; opacity: .6; } }

/* phones: keep the dock inside the screen when the queue buttons are showing */
.sp-page { grid-template-columns: minmax(0, 1fr); }
.sp-dock, .sp-meta, .sp-ctl, .stage-sing { min-width: 0; }
@media (max-width: 520px) {
  .sp-ctl { gap: 10px; flex-wrap: wrap; }
  .sp-time { flex-basis: 100%; order: 3; }
  .sp-big { width: 58px; height: 58px; } .sp-skip { width: 40px; height: 40px; }
  .sp-ctl { justify-content: center; }
  .sp-acts { gap: 8px; } .sp-ico { width: 40px; height: 40px; }
  .qs-tabs button { font-size: 12.5px; padding: 0 4px; }
  .qs-h { padding-left: 16px; }
}

/* ===================================================== Library: albums */
.lib-tools { flex-wrap: wrap; }
.lib-n { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 4px; border-radius: 99px; font-size: 11px; font-weight: 800; background: color-mix(in srgb, var(--accent) 22%, transparent); color: var(--accent); }
.lib-albums { display: grid; gap: 36px; margin-top: 4px; }
.lib-album[hidden] { display: none; }
.lib-ah { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin: 0 0 16px; }
.lib-aart { width: 84px; height: 84px; flex: none; border-radius: 22px; display: grid; place-items: center; color: var(--accent); background: var(--bg) center / cover no-repeat; box-shadow: var(--raised-sm); }
.lib-atx { flex: 1; min-width: 160px; }
.lib-atx h2 { margin: 0; font-size: 21px; line-height: 1.2; letter-spacing: -.01em; }
.lib-atx p { margin: 3px 0 0; font-size: 13px; color: var(--muted); }
.lib-aact { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 560px) { .lib-aart { width: 64px; height: 64px; border-radius: 18px; } .lib-atx h2 { font-size: 18px; } }

/* network notice */
.ng { position: fixed; left: 50%; top: calc(12px + env(safe-area-inset-top, 0px)); z-index: 90; transform: translate(-50%, -140%); display: flex; align-items: center; gap: 10px; max-width: min(92vw, 460px); padding: 10px 14px; border-radius: 16px; background: rgba(20, 20, 26, .92); color: #fff; font: 600 13px/1.35 inherit; box-shadow: 0 10px 30px rgba(0,0,0,.4); border: 1px solid rgba(255,255,255,.14); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); transition: transform .28s cubic-bezier(.2,.8,.2,1), opacity .28s; opacity: 0; }
.ng.show { transform: translate(-50%, 0); opacity: 1; }
.ng[data-k="net"] { border-color: #e5384c; }
.ng[data-k="saved"] { border-color: #46c28a; }
.ng-spin { flex: none; width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255,255,255,.25); border-top-color: #fff; animation: ng-r .8s linear infinite; }
.ng-go { flex: none; border: 0; border-radius: 99px; padding: 6px 12px; background: #fff; color: #111; font: 700 12px/1 inherit; cursor: pointer; }
@keyframes ng-r { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .ng-spin { animation-duration: 2s; } .ng { transition: none; } }

/* keyboard focus + shortcut list */
.sp-page :is(button, a, input, select, [tabindex]):focus-visible, .sg-tools :is(button):focus-visible, .sg-pop :is(button, input):focus-visible { outline: 3px solid color-mix(in srgb, var(--accent, #ff7fb4) 70%, #fff); outline-offset: 2px; }
.kb-veil { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 16px; background: rgba(8, 8, 14, .55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); opacity: 0; transition: opacity .2s; }
.kb-veil.show { opacity: 1; }
.kb { position: relative; width: min(560px, 100%); max-height: 86vh; overflow: auto; padding: 22px 24px 18px; border-radius: 22px; background: var(--bg, #1b1b24); color: var(--text, #fff); box-shadow: 0 24px 70px rgba(0,0,0,.5); outline: none; }
.kb h3 { margin: 0 0 6px; font-size: 18px; }
.kb h4 { margin: 16px 0 6px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; opacity: .65; }
.kb dl { margin: 0; display: grid; gap: 6px; }
.kb dl div { display: flex; justify-content: space-between; gap: 14px; align-items: center; font-size: 14px; }
.kb dt { display: flex; align-items: center; gap: 4px; flex: none; }
.kb dd { margin: 0; text-align: right; opacity: .85; }
.kb kbd { min-width: 26px; padding: 3px 8px; border-radius: 8px; text-align: center; font: 600 12px/1.3 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: rgba(127,127,127,.2); border: 1px solid rgba(127,127,127,.35); border-bottom-width: 2px; }
.kb i { font-style: normal; opacity: .5; font-size: 11px; }
.kb p { margin: 16px 0 0; font-size: 12px; opacity: .6; }
.kb-x { position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; border: 0; border-radius: 50%; background: rgba(127,127,127,.18); color: inherit; cursor: pointer; }
@media (prefers-reduced-motion: reduce) { .kb-veil { transition: none; } }

/* ---- lyrics studio (owner, beta) ---- */
.ls-open-btn { font-size: 15px; font-weight: 700; }
.ls-open-btn sup { font-size: 9px; margin-left: 1px; color: var(--accent, #ff7fb4); }
.ls { position: fixed; z-index: 70; display: flex; flex-direction: column; background: rgba(20, 20, 28, .96); color: #f2f2f7; font-size: 13px; box-shadow: 0 -10px 40px rgba(0, 0, 0, .45); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border: 1px solid rgba(255,255,255,.1); }
.ls[hidden] { display: none; }
@media (min-width: 900px) { .ls { top: 0; right: 0; bottom: 0; width: 440px; border-radius: 0; border-width: 0 0 0 1px; } body.ls-open .sp-page { margin-right: 440px; } }
@media (max-width: 899px) { .ls { left: 0; right: 0; bottom: 0; height: 56vh; border-radius: 18px 18px 0 0; } body.ls-open .sp-page { padding-bottom: 56vh; } }
.ls-h { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid rgba(255,255,255,.08); }
.ls-h b { font-size: 15px; }
.ls-h em { font-style: normal; font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: #7b5cff; color: #fff; }
.ls-vis { margin-left: auto; font-size: 11px; opacity: .75; }
.ls-vis[data-pub="1"] { color: #7bffb0; opacity: 1; }
.ls-x { border: 0; width: 30px; height: 30px; border-radius: 50%; background: rgba(255,255,255,.1); color: inherit; cursor: pointer; }
.ls-body { flex: 1; overflow: auto; padding: 10px 14px; display: grid; gap: 10px; align-content: start; }
.ls-player { display: flex; align-items: center; gap: 10px; }
.ls-player input[type=range] { flex: 1; }
.ls-player time { font: 600 12px ui-monospace, Menlo, Consolas, monospace; opacity: .85; }
.ls-card { padding: 10px 12px; border-radius: 14px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.07); }
.ls-card h4 { margin: 0 0 8px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; opacity: .7; }
.ls-card h4 small { text-transform: none; letter-spacing: 0; font-weight: 500; opacity: .8; }
.ls-offrow { display: flex; align-items: center; gap: 8px; }
.ls-offrow input { flex: 1; }
.ls-offrow output { min-width: 62px; text-align: right; font: 600 12px ui-monospace, Menlo, Consolas, monospace; }
.ls-hint { margin: 6px 0 0; font-size: 12px; opacity: .65; line-height: 1.4; }
.ls-row2 { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; align-items: center; }
.ls-row2 label { display: flex; align-items: center; gap: 6px; font-size: 12px; }
.ls select, .ls input[type=color] { background: rgba(255,255,255,.1); color: inherit; border: 1px solid rgba(255,255,255,.15); border-radius: 8px; padding: 4px 6px; }
.ls-btn { border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.08); color: inherit; border-radius: 10px; padding: 6px 10px; font: 600 12px inherit; cursor: pointer; }
.ls-btn:hover { background: rgba(255,255,255,.16); }
.ls-btn.pri { background: linear-gradient(135deg, #ff7fb4, #7b5cff); border-color: transparent; color: #fff; }
.ls-btn.ghost { background: transparent; }
.ls-btn.on { outline: 2px solid #7bffb0; }
.ls-btn:disabled { opacity: .5; }
.ls-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.ls-chips button { border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.06); color: inherit; border-radius: 99px; padding: 4px 10px; font: 600 12px inherit; cursor: pointer; }
.ls-chips button[aria-pressed="true"], .ls-chips button.on { background: #fff; color: #111; }
.ls-lines { display: grid; gap: 4px; }
.ls-line { border-radius: 12px; padding: 6px 8px; border: 1px solid transparent; }
.ls-line.act { background: rgba(255, 127, 180, .16); }
.ls-line.sel { border-color: rgba(255,255,255,.3); background: rgba(255,255,255,.07); }
.ls-line.ptr { box-shadow: inset 3px 0 0 #7bffb0; }
.ls-top { display: flex; align-items: center; gap: 8px; }
.ls-t { flex: none; border: 0; background: rgba(255,255,255,.1); color: inherit; border-radius: 8px; padding: 3px 7px; font: 600 11px ui-monospace, Menlo, Consolas, monospace; cursor: pointer; }
.ls-t.none { opacity: .5; }
.ls-tx { flex: 1; cursor: pointer; line-height: 1.35; }
.ls-tag { font-style: normal; font-size: 9px; font-weight: 700; margin-left: 6px; padding: 1px 6px; border-radius: 99px; background: var(--c); color: #111; vertical-align: middle; }
.ls-ops { flex: none; display: flex; gap: 4px; }
.ls-ops button { border: 1px solid rgba(255,255,255,.16); background: transparent; color: inherit; border-radius: 8px; padding: 2px 7px; font: 600 11px inherit; cursor: pointer; }
.ls-ops button:hover { background: rgba(255,255,255,.14); }
.ls-words { display: flex; flex-wrap: wrap; gap: 5px; padding: 8px 2px 2px 54px; }
.ls-w { border: 1px solid rgba(255,255,255,.2); background: transparent; color: inherit; border-radius: 8px; padding: 3px 8px; font: 600 13px inherit; cursor: pointer; }
.ls-w.on { background: #fff; color: #111; }
.ls-w.fx { border-color: #ffe27a; }
.ls-f { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-top: 1px solid rgba(255,255,255,.08); }
.ls-f span { margin-right: auto; font-size: 12px; opacity: .75; }
.sp-stat span:not([hidden]) ~ span:not([hidden])::before { content: " · "; opacity: .6; }
.sp-stat .off { opacity: .55; text-decoration: underline dotted; }

/* lyrics studio: effect editor motion */
.ls-demo { display: flex; align-items: center; justify-content: center; padding: 10px; margin: 6px 0; border-radius: 12px; background: rgba(0,0,0,.35); font: 800 28px/1.2 inherit; }
.ls-demo .w { display: inline-block; color: #fff; -webkit-text-fill-color: #fff; background: none; animation: none; filter: none; opacity: 1; transform: none; }
.ls-demo .w.rr { animation: lsRe .6s cubic-bezier(.2,.8,.2,1); }
.ls-demo .w.fx-gradient, .ls-demo .w.fx-gloss, .ls-demo .w.fx-color, .ls-demo .w.fx-shimmer, .ls-demo .w.fx-rainbow { position: relative; }
@keyframes lsRe { from { transform: scale(.85); opacity: .3; } to { transform: none; opacity: 1; } }
.ls-chips button.bump { animation: lsBump .35s cubic-bezier(.3,1.6,.5,1); }
@keyframes lsBump { 0% { transform: scale(.88); } 100% { transform: scale(1); } }
.ls-line.flash { animation: lsFlash .9s ease-out; }
@keyframes lsFlash { 0% { box-shadow: 0 0 0 0 rgba(255,226,122,.7); background: rgba(255,226,122,.18); } 100% { box-shadow: 0 0 0 14px rgba(255,226,122,0); background: transparent; } }
.ls-tag { cursor: pointer; background: linear-gradient(90deg, var(--c), var(--c2, var(--c))); transition: transform .15s; }
.ls-tag:hover { transform: translateY(-1px); }
.ls-tag b { margin-left: 4px; cursor: pointer; opacity: .6; font-weight: 800; }
.ls-tag b:hover { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .ls-demo .w.rr, .ls-chips button.bump, .ls-line.flash { animation: none; } }

.tb-save { height: 34px; padding: 0 14px; border: 0; border-radius: 999px; font: inherit; font-weight: 800; font-size: 12.5px; color: var(--muted); background: var(--bg); box-shadow: var(--raised-sm); cursor: pointer; white-space: nowrap; }
.tb-save[hidden] { display: none; } .tb-save.on { color: var(--text); } .tb-save.busy { opacity: .75; }
