/* Transparent background adaptation of LyricWindow/FadingLine visual mechanics.
   Reference: YouRanCoder/LimbusLyricSimulator, ui/lyric_window.py and fading_line.py. */
.lyric-backdrop{position:fixed;inset:0;z-index:6;pointer-events:none!important;user-select:none;overflow:hidden;background:transparent!important;border:0!important;border-radius:0!important;box-shadow:none!important;isolation:isolate;contain:layout paint style;--lyric-text:#fffeef;--lyric-gold:#d8a523}
.lyric-backdrop *{pointer-events:none!important;user-select:none;box-sizing:border-box}
.lyric-backdrop[hidden]{display:none!important}
.bg-lyric-lines{position:absolute;inset:0;overflow:hidden;background:transparent}
.bg-lyric-cue{position:absolute;margin:0;padding:10px 14px 18px 8px;width:max-content;max-width:90vw;font-family:"Microsoft YaHei","Noto Sans SC","PingFang SC",sans-serif;font-weight:800;font-size:var(--lyric-size,37px);line-height:1.3;letter-spacing:5px;color:var(--lyric-text);text-align:left;transform:perspective(1400px) rotateY(var(--lyric-perspective,-2deg));transform-origin:0 50%;opacity:.88;will-change:opacity,transform}
.bg-lyric-row{display:block;margin:0;line-height:1.3;transform:rotate(var(--lyric-angle,0deg));transform-origin:0 50%;overflow-wrap:anywhere}
.bg-lyric-char{display:inline-block;white-space:pre;color:inherit;opacity:0;text-shadow:3px 3px 0 #a48025,0 0 4px #d8a52352;transform:rotate(calc(-1 * var(--lyric-angle,0deg))) translate(var(--jitter-x,0px),var(--jitter-y,0px));transform-origin:50% 70%;animation:bg-lyric-reveal 1ms linear forwards,bg-lyric-shiver 572ms ease-in-out infinite;animation-delay:calc(var(--char-index,0) * var(--reveal-ms,50ms)),calc(var(--char-index,0) * -37ms)}
.bg-lyric-cue.is-latin{font-family:Georgia,"Times New Roman",serif;font-weight:700;letter-spacing:4px}
.bg-lyric-cue.is-latin .bg-lyric-char{-webkit-text-stroke:.8px var(--lyric-gold);paint-order:stroke fill;text-shadow:0 0 4px #d8a52352}
.bg-lyric-row.is-latin{font-family:Georgia,"Times New Roman",serif;font-weight:700}
.bg-lyric-row.is-latin .bg-lyric-char{-webkit-text-stroke:.8px var(--lyric-gold);paint-order:stroke fill}
.bg-lyric-translation{display:block;font-size:.68em;font-weight:600;line-height:1.45;letter-spacing:3px;margin-top:.2em;opacity:.8}
.bg-lyric-cue.is-ghost{animation:bg-lyric-fade 660ms linear both;pointer-events:none}
.bg-lyric-cue.is-ghost .bg-lyric-char{animation:none;opacity:1}
.bg-lyric-cue.is-latin.is-ghost .bg-lyric-char{color:transparent}
.lyric-backdrop.is-paused .bg-lyric-char{animation:none;opacity:1;transition:none}
.lyric-backdrop.effects-off .bg-lyric-char{animation:none;opacity:1;transition:none;transform:none}
.lyric-backdrop.effects-off .bg-lyric-row,.lyric-backdrop.effects-off .bg-lyric-cue{transform:none}
.lyric-backdrop.effects-off .is-ghost{display:none}
.home-lyrics-launch.icon-btn{width:auto;min-width:77px;gap:5px;padding:5px 7px;font-size:10px;white-space:nowrap;color:var(--text-light);border:1px solid var(--border);border-radius:7px}
.home-lyrics-launch svg{width:14px;height:14px}
.home-lyrics-launch[aria-pressed="true"]{color:var(--gold);border-color:#d8a52355}
.background-lyric-note{display:flex;align-items:center;gap:7px;min-height:0;color:var(--muted);font-size:9px;line-height:1.7;margin-top:6px}
.background-lyric-note:has(#lyric-backdrop-status:empty):has(#lyric-backdrop-retry[hidden]){display:none}
#lyric-backdrop-retry{background:none;border:1px solid var(--border);color:var(--text-light);padding:2px 6px;border-radius:5px;font:inherit;cursor:pointer}
#gp-background-btn[aria-pressed="true"]{color:#d8a523;border-color:#d8a52377;background:#d8a5230d}
body.light .lyric-backdrop{--lyric-text:#63521e;--lyric-gold:#a47b21}
/* A constant visible active frame avoids step-end rounding at fractional LRC delays. */
@keyframes bg-lyric-reveal{from{opacity:1}to{opacity:1}}
@keyframes bg-lyric-shiver{0%,100%{transform:rotate(calc(-1 * var(--lyric-angle,0deg))) translate(0,0)}35%{transform:rotate(calc(-1 * var(--lyric-angle,0deg))) translate(var(--jitter-x,0px),var(--jitter-y,0px))}72%{transform:rotate(calc(-1 * var(--lyric-angle,0deg))) translate(calc(var(--jitter-x,0px) * -.5),calc(var(--jitter-y,0px) * -.5))}}
@keyframes bg-lyric-fade{from{opacity:.65;transform:perspective(1400px) rotateY(var(--lyric-perspective,-2deg)) translateY(0)}to{opacity:0;transform:perspective(1400px) rotateY(var(--lyric-perspective,-2deg)) translateY(-22px)}}
@media(max-width:680px){.bg-lyric-cue{font-size:var(--lyric-size,29px);max-width:92vw;letter-spacing:3px;padding:8px 8px 15px 4px}.bg-lyric-cue.is-latin{letter-spacing:2px}.bg-lyric-translation{font-size:.65em;letter-spacing:2px}.background-lyric-note{font-size:8px}}
@media(prefers-reduced-motion:reduce){.lyric-backdrop .bg-lyric-char{animation:none!important;opacity:1!important;transition:none!important;transform:none!important}.lyric-backdrop .bg-lyric-row,.lyric-backdrop .bg-lyric-cue{transform:none!important}.lyric-backdrop .is-ghost{display:none!important}}
