:root{color-scheme:dark;--bg:#191919;--fg:#dddddd;--ink:#252525;--muted:#969696;--subtle:#343434;--surface:#252525;--accent:#dddddd;--header:52px;--footer:128px;--lyric-radius:14px}
*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--fg);font:15px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI","Microsoft YaHei",sans-serif;-webkit-font-smoothing:antialiased;height:100vh;height:100dvh;overflow:hidden}button,input,select{font:inherit}button,a,select,input{touch-action:manipulation;-webkit-tap-highlight-color:transparent}button{border:0;color:inherit;background:none;cursor:pointer}button:disabled{opacity:.35;cursor:default}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:2px solid var(--fg);outline-offset:3px}[hidden]{display:none!important}.ui-icon{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}.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}
/* One quiet surface. Space and typography carry the hierarchy. */
.header{height:calc(var(--header) + env(safe-area-inset-top));padding:env(safe-area-inset-top) 10px 0;display:flex;align-items:center;gap:8px;max-width:780px;margin:auto}.toolbar-button{width:44px;height:44px;flex-shrink:0;display:grid;place-items:center;border-radius:50%}.toolbar-button:active{background:var(--surface)}.track-identity{min-width:0;flex:1;text-align:center}.track-identity h1{font-size:16px;line-height:1.3;font-weight:650;letter-spacing:-.3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:0}
main{position:relative;max-width:780px;margin:auto;height:calc(100dvh - var(--header) - env(safe-area-inset-top) - var(--footer) - env(safe-area-inset-bottom));display:flex;flex-direction:column;padding:0 12px}.lyrics-viewport{flex:1;overflow-y:auto;overscroll-behavior:contain;min-height:0;scrollbar-width:none;mask-image:linear-gradient(transparent,#000 2%,#000 97%,transparent);overflow-anchor:none}.lyrics-viewport::-webkit-scrollbar{display:none}#lyrics{padding:12px 0 50px}.line{display:flex;position:relative;gap:8px;padding:11px 10px;min-height:68px;margin-bottom:9px;border:1px solid transparent;border-radius:var(--lyric-radius);transition:background .16s,border-color .16s,opacity .16s}.line-content{flex:1;min-width:0}.line-meta{display:flex;align-items:center;gap:8px;height:17px;margin-bottom:5px;color:var(--muted);line-height:17px}.line-meta button{font-size:10px;min-height:17px;line-height:17px;padding:0;color:var(--muted);text-align:left;font-variant-numeric:tabular-nums}.line-text{font-size:clamp(20px,5.7vw,26px);line-height:1.38;font-weight:650;letter-spacing:-.5px;color:#888888;overflow-wrap:anywhere}.word{display:inline-flex;align-items:center;justify-content:center;max-width:100%;font:inherit;line-height:1.15;letter-spacing:inherit;color:inherit;padding:.16em .24em;margin-left:-.24em;margin-right:-.14em;min-height:30px;vertical-align:baseline;text-align:center;border-radius:var(--lyric-radius);transition:color .08s,background .08s}.word-label{min-width:0;transform:translateY(var(--word-optical-offset,-.12em))}.word:disabled{opacity:1}.word:active:not(:disabled){background:#ffffff0c}.line.active{background:var(--surface)}.line.active .line-text,.line.in-range .line-text,.line.draft-selected .line-text{color:var(--fg)}.word.word-current{color:var(--fg);background:#3b3b3b;box-shadow:inset 0 0 0 1.5px #aaaaaa}.word.word-passed{color:#b4b4b4}
.line-actions{width:36px;flex-shrink:0;align-self:center}.line-actions button{display:grid;place-items:center;width:44px;height:44px;margin-left:-4px;border-radius:11px;color:#999999}.line-actions .ui-icon{width:19px;height:19px}.line-actions button[aria-pressed=true]{background:var(--fg);color:var(--ink);opacity:1}.line.in-range{background:var(--surface);border-color:#4a4a4a}.line.range-start,.line.range-end{border-color:#6b6b6b}.line.locked{opacity:.3}.line.locked .word{cursor:default}.line.draft-selected{border-color:#9b9b9b;background:#303030}.range-label{font-size:10px;letter-spacing:.1px;color:#b0b0b0}.draft-selected .range-label{color:#dddddd}.picking .word,.picking .line-meta button{pointer-events:none}.picking .line{cursor:pointer}.line>.choose{flex:0 0 38px;width:38px;align-self:center;min-height:52px;padding:3px 0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;color:var(--fg)}.pick-circle{display:flex;align-items:center;justify-content:center;width:23px;height:23px;border:1.5px solid #888888;border-radius:50%}.pick-circle .ui-icon{width:15px;height:15px;stroke-width:2.4}.pick-label{font-size:10px;line-height:1.3;white-space:nowrap}.choose[aria-pressed=true] .pick-circle{background:var(--fg);border-color:var(--fg);color:var(--ink)}#lyrics.picking .line-actions{display:none}.empty-lyrics{font-size:15px;color:var(--muted);padding:35px 8px;line-height:1.8}
/* Distinct filled states survive the switch to a neutral palette. */
.practice-bar{display:flex;align-items:center;justify-content:space-between;gap:8px;height:40px;min-height:40px;flex-shrink:0}.mode-actions{display:flex;align-items:center;gap:5px}.practice-bar button{min-height:36px;padding:6px 10px;font-size:11px;border-radius:18px;border:1px solid #505050;white-space:nowrap}.practice-bar button:active{background:var(--surface)}#pickRange[aria-pressed=true]{background:var(--surface);border-color:#8a8a8a}.mode-badge{flex:0 1 auto;max-width:65%;display:inline-flex;align-items:center;gap:7px;padding:5px 8px;border-radius:16px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:11px;color:#a0a0a0}.mode-badge:before{content:'';width:5px;height:5px;border-radius:50%;background:#888888;flex-shrink:0}#modeBar[data-playing=true] .mode-badge:before{background:#dddddd}#modeBar[data-mode=line] .mode-badge,#modeBar[data-mode=range] .mode-badge{background:var(--fg);color:var(--ink)}#modeBar[data-mode=line] .mode-badge:before,#modeBar[data-mode=range] .mode-badge:before{background:#626262}#modeBar[data-mode=select] .mode-badge{background:#303030;color:var(--fg)}#modeBar[data-mode=select] .mode-badge:before{background:var(--fg)}#modeBar[data-mode=select] #pickRange{display:none}.follow-button{position:absolute;right:20px;bottom:54px;display:inline-flex;align-items:center;gap:5px;min-height:40px;padding:8px 13px;border:1px solid #505050;background:var(--surface);color:var(--fg);font-size:12px;border-radius:24px;box-shadow:0 3px 14px #00000024;z-index:2}.follow-button .ui-icon{width:16px;height:16px}
.player{position:fixed;bottom:0;left:0;right:0;max-width:780px;margin:auto;height:calc(var(--footer) + env(safe-area-inset-bottom));padding:7px 22px calc(12px + env(safe-area-inset-bottom));background:var(--bg)}.timeline{display:flex;align-items:center;gap:10px;font-size:11px;color:var(--muted);font-variant-numeric:tabular-nums}.timeline>span{min-width:30px}.timeline>span:last-child{text-align:right}.timeline input{width:100%;min-width:0;appearance:none;height:30px;background:transparent;cursor:pointer;margin:0}.timeline input::-webkit-slider-runnable-track{height:3px;border-radius:3px;background:linear-gradient(to right,var(--fg) var(--progress,0%),#444444 var(--progress,0%))}.timeline input::-webkit-slider-thumb{appearance:none;border-radius:50%;width:11px;height:11px;background:var(--fg);margin-top:-4px}.timeline input::-moz-range-track{height:3px;background:#444444;border-radius:3px}.timeline input::-moz-range-progress{background:var(--fg)}.timeline input::-moz-range-thumb{background:var(--fg);border:0;width:11px;height:11px;border-radius:50%}.controls{display:grid;grid-template-columns:60px 1fr 60px;align-items:center;margin-top:6px}.speed{position:relative;display:flex;align-items:center;justify-content:center}.speed select{appearance:none;border:0;background:transparent;color:var(--fg);font-size:14px;height:44px;width:60px;cursor:pointer;padding:2px 20px 2px 3px}.speed>.ui-icon{position:absolute;right:4px;width:14px;height:14px;pointer-events:none}.speed option{background:var(--surface)}.transport{display:flex;align-items:center;justify-content:center;gap:20px}.transport>button{display:grid;place-items:center;width:44px;height:52px}.transport>button>.ui-icon{width:25px;height:25px;stroke-width:2.1}.transport .play{width:54px;height:54px;border-radius:50%;background:var(--fg);color:var(--ink);padding:0}.play .ui-icon{width:22px;height:22px;fill:currentColor;stroke-width:0}.play[aria-label="播放"] .ui-icon{transform:translateX(1px)}
.play[data-playing=false] [data-play-icon=pause],.play[data-playing=true] [data-play-icon=play]{display:none}
/* Sheets use the same quiet material as the player. */
dialog{width:min(480px,calc(100% - 24px));max-height:calc(90dvh - env(safe-area-inset-bottom));overflow:auto;border:1px solid #3c3c3c;border-radius:24px;padding:20px;background:var(--bg);color:var(--fg);box-shadow:0 20px 60px #00000040}dialog::backdrop{background:#00000088;backdrop-filter:blur(5px)}.dialog-heading{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:12px}.dialog-heading h2{font-size:21px;margin:0;font-weight:650;letter-spacing:-.5px}.dialog-heading button{display:grid;place-items:center;min-width:44px;min-height:44px;border-radius:50%;background:var(--surface)}.dialog-heading .ui-icon{width:19px;height:19px}.muted{font-size:12px;color:var(--muted);line-height:1.8;margin:0 0 18px}.menu-action{display:flex;align-items:center;gap:12px;width:100%;text-align:left;min-height:54px;padding:13px 4px;border-top:1px solid var(--subtle);font-size:14px}.menu-action .ui-icon{width:20px;height:20px;color:#a0a0a0}dialog label{display:block;color:#b0b0b0;font-size:13px;margin:18px 0 10px}dialog input{width:100%;background:var(--surface);color:var(--fg);border:1px solid #444444;border-radius:12px;padding:12px;font-size:16px;margin:8px 0 0;min-width:0}.file-label{padding:13px;border:1px dashed #646464;border-radius:14px}.file-label input{padding:6px 0;border:0;font-size:12px;background:transparent}.file-label small{display:block;font-size:11px;color:var(--muted);line-height:1.8;margin-top:7px}.primary{display:block;background:var(--fg);color:var(--ink);border-radius:14px;width:100%;padding:13px;font-size:14px;font-weight:600;min-height:48px;margin-top:16px;text-align:center;text-decoration:none}.error{color:#dddddd;font-weight:600;font-size:12px;line-height:1.7}.library-list{display:flex;flex-direction:column}.library-track{width:100%;text-align:left;padding:14px 4px;border-bottom:1px solid var(--subtle)}.library-track strong{display:block;font-size:14px;overflow-wrap:anywhere}.library-track small{display:block;font-size:11px;color:var(--muted);margin-top:4px}.demo-button{font-size:13px;min-height:48px;margin-top:10px;padding:8px 0;text-align:left}.toast{position:fixed;bottom:calc(var(--footer) + 48px + env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);width:max-content;max-width:90%;background:var(--fg);color:var(--ink);border-radius:14px;padding:10px 15px;font-size:12px;line-height:1.6;z-index:10;opacity:0;pointer-events:none}.toast.visible{opacity:1}
@media(max-width:699px){dialog{margin:auto auto calc(12px + env(safe-area-inset-bottom))}}
@media(min-width:700px){:root{--header:56px;--footer:134px}.header{padding-left:24px;padding-right:24px}main{padding:0 28px}.line-text{font-size:30px}.line{padding:12px 14px;min-height:78px}.player{padding:10px 34px calc(12px + env(safe-area-inset-bottom))}.transport{gap:30px}}
@media(max-width:350px){.line-text{font-size:20px}.line{padding:8px 6px}.line-actions{width:32px}.line-actions button{width:44px;margin-left:-6px}.line>.choose{flex-basis:32px;width:32px}.player{padding-left:15px;padding-right:15px}.transport{gap:10px}.mode-badge{font-size:10px;padding:5px 6px}.practice-bar button{padding:7px;font-size:10px}}
@media(max-height:500px) and (orientation:landscape){:root{--header:44px;--footer:108px}.line-text{font-size:20px}.line{padding:6px 12px}.player{padding-top:3px}.controls{margin-top:0}.transport .play{height:46px;width:46px}.transport>button{height:46px}}
@media(prefers-reduced-motion:reduce){.line,.word{transition:none}}

/* Keep text fields legible on the charcoal sheet surface. */
dialog input::placeholder{color:#929292}
/* Chinese UI uses the system PingFang font; keep Latin lyric metrics intact. */
body{font-family:"PingFang SC","PingFang TC",-apple-system,BlinkMacSystemFont,"Segoe UI","Microsoft YaHei",sans-serif}
.line-text,.track-identity{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif}
/* Prepared pronunciation marks never consume another lyric row. */
.reading-word{position:relative;display:inline-block;max-width:100%;margin-left:-.24em;margin-right:-.14em}
.reading-word>.word{margin-left:0;margin-right:0}
.word-label{position:relative;display:inline-block;overflow:visible}
.reading-baseline{display:inline-block;width:0;height:0;vertical-align:baseline;pointer-events:none}
.reading-link{display:none;position:absolute;left:var(--link-left,calc(100% - .08em));top:var(--link-top,1em);width:var(--link-width,.4em);height:6px;line-height:1;pointer-events:none;color:#bcbcbc}
.reading-link svg{display:block;width:100%;height:100%;overflow:visible;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round}
.reading-link path{vector-effect:non-scaling-stroke}
.reading-link sup{position:absolute;bottom:6px;left:50%;transform:translateX(-50%);font-size:.4em;line-height:1}
.reading-flap{position:relative}.reading-flap sup{display:none;position:absolute;left:50%;top:-.5em;font-size:.42em;line-height:1;pointer-events:none}
.reading-visible .reading-link,.reading-visible .reading-flap sup{display:block}
.reading-visible .reading-weak{opacity:.7}.reading-visible .word-current .reading-weak{opacity:1}
.reading-omit,.reading-hold{position:relative;text-decoration:none}
.reading-visible .reading-omit::after{content:'';position:absolute;left:var(--mark-center-x,50%);top:var(--mark-center-y,.55em);width:1.8px;height:var(--mark-slash-height,.85em);background:#dddddd;box-shadow:0 0 0 1px var(--bg);border-radius:1px;transform:translate(-50%,-50%) rotate(28deg);pointer-events:none}
.reading-visible .reading-hold::after{content:'';position:absolute;left:var(--mark-center-x,50%);top:var(--mark-dot-top,1.1em);width:var(--mark-dot-width,.4em);height:3px;transform:translateX(-50%);background:center/100% 3px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='3' viewBox='0 0 12 3'%3E%3Ccircle cx='2' cy='1.5' r='1' fill='%23bcbcbc'/%3E%3Ccircle cx='6' cy='1.5' r='1' fill='%23bcbcbc'/%3E%3Ccircle cx='10' cy='1.5' r='1' fill='%23bcbcbc'/%3E%3C/svg%3E");pointer-events:none}
.reading-toggle{display:flex;align-items:center;justify-content:space-between;width:100%;min-height:60px;padding:8px 4px;text-align:left;font-size:14px}
.reading-toggle small{display:block;color:var(--muted);font-size:11px;margin-top:3px}
.reading-switch{display:flex;align-items:center;justify-content:flex-start;width:44px;height:26px;padding:3px;background:#505050;border-radius:13px;flex-shrink:0}
.reading-switch>span{width:20px;height:20px;background:var(--fg);border-radius:50%}
.reading-toggle[aria-checked=true] .reading-switch{justify-content:flex-end;background:var(--fg)}
.reading-toggle[aria-checked=true] .reading-switch>span{background:var(--ink)}
.reading-legend,.reading-coverage{font-size:11px;color:var(--muted);line-height:1.7;margin:4px 4px 10px}.reading-coverage:empty{display:none}
.library-heading{font-size:12px;color:var(--muted);font-weight:500;margin:20px 0 6px}
/* Gentle falloff around the current line. Selection and manual browsing stay clear. */
#lyrics.lyric-focus:not(.picking) .line:not(.locked){opacity:var(--line-focus,1)}
/* Keep offscreen sentences out of mode-transition layout and paint work. */
.line{content-visibility:auto;contain-intrinsic-size:auto 110px}

/* Parenthetical backing vocals do not own foreground practice boundaries. */
.backing-vocal{display:block;margin-top:8px;color:var(--muted);font-size:.78em;font-weight:500;letter-spacing:0;line-height:1.5}.backing-label{display:block;margin-bottom:3px;font-size:10px;font-weight:450;letter-spacing:.04em}.backing-vocal .word{cursor:default}.backing-vocal .word-label{transform:translateY(-.12em)}
.import-progress{display:grid;gap:12px;padding:16px 0;border-top:1px solid var(--line,#383838);font-size:14px;line-height:1.6}.import-progress[hidden]{display:none}.import-progress small{color:var(--muted);font-size:12px}.import-progress progress{width:100%;height:5px;accent-color:var(--fg)}#importDetails{padding:4px 0 12px}#importDetails summary{color:var(--muted);font-size:13px;cursor:pointer}#importDetails label{display:block;margin-top:14px}#importForm input:disabled{opacity:.55}
/* Figma: Verse / Audio import / v35. One calm guide, with usable playback below. */
.preparation{max-width:430px;margin:0 auto;padding:24px 2px 20px}.preparation-identity{padding:4px 0 24px}.preparation-identity h2{font-size:23px;line-height:1.3;font-weight:600;letter-spacing:-.5px;margin:0;overflow-wrap:anywhere}.preparation-identity p{font-size:13px;color:var(--muted);margin:6px 0 0}.preparation-card{width:342px;max-width:100%;padding:20px;border:0;border-radius:0;background:transparent}.preparation-card .preparation-eyebrow{color:#969696;font-size:12px;line-height:18px;margin:0 0 12px}.preparation-card h3{font-size:21px;font-weight:400;letter-spacing:0;margin:0 0 8px;line-height:30px}.preparation-card p{color:#a3a3a3;font-size:13px;line-height:22px;margin:0}
.preparation-card{min-height:236px}
.preparation-activity{position:relative;overflow:hidden;height:2px;margin:22px 0 18px;background:#383838}
.preparation-activity span{display:block;width:18%;height:2px;background:var(--fg);animation:preparation-activity 1.6s ease-in-out infinite}
@keyframes preparation-activity{from{transform:translateX(-100%)}to{transform:translateX(560%)}}
.preparation:is([data-state=waiting],[data-state=queued],[data-state=reconnecting]) .preparation-activity span{animation:none;transform:translateX(220%)}
.preparation:is([data-state=failed],[data-state=succeeded]) .preparation-activity{display:none}
.preparation-progress summary{display:flex;align-items:center;gap:8px;width:max-content;max-width:100%;min-height:44px;padding:0;list-style:none;cursor:pointer;color:#a3a3a3;font-size:13px;line-height:20px;touch-action:manipulation;-webkit-tap-highlight-color:transparent}
.preparation-progress summary::-webkit-details-marker{display:none}.preparation-progress summary::marker{content:''}.preparation-progress summary:focus-visible{outline:2px solid var(--fg);outline-offset:4px}
.preparation-progress summary img{display:block;width:16px;height:16px;flex:none;transition:transform .15s ease}.preparation-progress[open] summary img{transform:rotate(180deg)}
.preparation-progress[open] .preparation-steps{margin:16px 0}
@media(prefers-reduced-motion:reduce){.preparation-activity span{animation:none;transform:translateX(220%)}.preparation-progress summary img{transition:none}}
/* Read-only timeline: linear markers cannot be mistaken for selection controls. */
.preparation-steps{position:relative;list-style:none;padding:0;margin:24px 0;display:grid;gap:16px}
.preparation-steps::before{content:'';position:absolute;left:.5px;top:10px;bottom:10px;width:1px;background:#383838}
.preparation-steps li{position:relative;display:flex;align-items:center;gap:12px;min-height:20px;font-size:14px;color:#747474;line-height:20px}
.preparation-steps li::before{content:'';position:relative;z-index:1;flex:none;width:2px;height:20px;background:#383838}
.preparation-steps li[data-state=done]{color:#969696}
.preparation-steps li[data-state=done]::before{background:#747474}
.preparation-steps li[data-state=done]::after{content:'✓';font-size:11px;line-height:20px}
.preparation-steps li[data-state=current]{color:var(--fg)}
.preparation-steps li[data-state=current]::before{background:var(--fg)}
.preparation-card .preparation-note{font-size:11px;color:#929292;line-height:19.8px}.preparation-action{min-height:44px;display:flex;gap:10px;align-items:center;margin-top:14px;padding:8px 0;font-size:14px;font-weight:600}.preparation-action .ui-icon{width:16px;height:16px}.preparation-wave{height:16px;display:flex;gap:3px;align-items:center}.preparation-wave i{display:block;width:2px;background:#aaa;border-radius:2px;height:7px;animation:preparation-wave 1.3s ease-in-out infinite alternate}.preparation-wave i:nth-child(2){height:15px;animation-delay:-.4s}.preparation-wave i:nth-child(3){height:11px;animation-delay:-.8s}.preparation-wave i:nth-child(4){height:5px;animation-delay:-.6s}.preparation[data-state=failed] .preparation-wave i,.preparation[data-state=succeeded] .preparation-wave i{animation:none}.preparation[data-state=succeeded] .preparation-steps{display:none}.preparation[data-state=succeeded]{padding-top:12px}.preparation[data-state=succeeded] .preparation-identity{display:none}.preparation[data-state=succeeded] .preparation-card{padding:20px}.preparing .empty-lyrics{display:none}.background-import{display:flex;align-items:center;justify-content:center;gap:10px;width:100%;font-size:12px;color:var(--muted);min-height:44px;padding:12px 8px}.preparation-dot{height:6px;width:6px;border-radius:50%;background:#bbb;animation:preparation-wave 1.3s ease-in-out infinite alternate}@keyframes preparation-wave{to{opacity:.35;transform:scaleY(.5)}}@media(prefers-reduced-motion:reduce){.preparation-wave i,.preparation-dot{animation:none}}@media(max-width:350px){.preparation{padding-top:16px}}

.library-row{display:flex;align-items:center;gap:8px;border-bottom:1px solid var(--subtle)}.library-row .library-track{flex:1;min-width:0;border-bottom:0}.remove-import{flex:none;display:grid;place-items:center;width:44px;height:44px;color:var(--muted);border-radius:12px}.remove-import:hover,.remove-import:active{color:var(--fg);background:var(--surface)}.remove-import:disabled{opacity:.25}.remove-import .ui-icon{width:19px;height:19px}#removeImportDialog h2{font-size:21px;letter-spacing:-.5px;margin:0 0 16px}#removeImportName{font-size:15px;overflow-wrap:anywhere;margin:0 0 12px}.remove-import-actions{display:flex;gap:12px;margin-top:20px}.remove-import-actions button{flex:1;min-height:46px;border-radius:14px;border:1px solid #555;font-size:14px}#confirmRemoveImport{background:var(--fg);color:var(--ink);border-color:var(--fg);font-weight:600}
