:root{--bg: #f7f2ea;--surface: #fffdf9;--surface-2: #efe7da;--text: #2a2118;--muted: #7a6a58;--line: #e0d4c2;--accent: #a8601f;--accent-text: #fff;--chord: #a8601f;--pattern: #e9d6ff;--pattern-text: #5b2a99;--bad: #b3261e;--busy: #2f6fb0;color-scheme:light}@media(prefers-color-scheme:dark){:root:not([data-theme=light]){--bg: #1c1712;--surface: #26201a;--surface-2: #322a22;--text: #f1e8dc;--muted: #a8998a;--line: #3d342b;--accent: #e0a060;--accent-text: #1c1712;--chord: #f0b070;--pattern: #3b2a55;--pattern-text: #d9bfff;--bad: #ff8a80;--busy: #8cbcf0;color-scheme:dark}}:root[data-theme=dark]{--bg: #1c1712;--surface: #26201a;--surface-2: #322a22;--text: #f1e8dc;--muted: #a8998a;--line: #3d342b;--accent: #e0a060;--accent-text: #1c1712;--chord: #f0b070;--pattern: #3b2a55;--pattern-text: #d9bfff;--bad: #ff8a80;--busy: #8cbcf0;color-scheme:dark}*{box-sizing:border-box}html{-webkit-text-size-adjust:100%}body{margin:0;background:var(--bg);color:var(--text);font:17px/1.45 -apple-system,BlinkMacSystemFont,SF Pro Text,Segoe UI,system-ui,sans-serif;-webkit-tap-highlight-color:transparent}a{color:var(--accent);text-decoration:none}h1,h2,h3{margin:0;line-height:1.2}h1{font-size:22px}h2{font-size:19px}.page{max-width:1100px;margin:0 auto;padding:max(16px,env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) 48px max(16px,env(safe-area-inset-left))}.page.narrow{max-width:720px}.page.wide{max-width:1400px}.bar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:20px;min-height:48px}.brand{font-size:28px;letter-spacing:-.02em}.title-block{flex:1;min-width:0;text-align:center}.title-block h1{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.bar-actions{display:flex;gap:8px}.back{font-size:17px;white-space:nowrap;min-width:80px}button,.button{font:inherit;font-size:16px;min-height:44px;padding:0 16px;border-radius:10px;border:1px solid var(--line);background:var(--surface);color:var(--text);cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:6px}button:disabled{opacity:.5;cursor:default}button.primary,.button.primary{background:var(--accent);border-color:var(--accent);color:var(--accent-text);font-weight:600}button.on{background:var(--surface-2);border-color:var(--accent);color:var(--accent)}button.danger{color:var(--bad)}button.link{border:none;background:none;color:var(--accent);padding:0 4px;min-height:0}input,textarea{font:inherit;color:var(--text);background:var(--surface);border:1px solid var(--line);border-radius:10px;padding:10px 12px;width:100%}textarea{font-family:ui-monospace,SF Mono,Menlo,monospace;font-size:15px;line-height:1.5}label{display:flex;flex-direction:column;gap:4px;font-size:14px;color:var(--muted)}.row{display:flex;gap:12px;align-items:flex-end;margin-bottom:12px;flex-wrap:wrap}.row>label{flex:0 0 120px}.row>label.grow{flex:1 1 240px}.row.end{justify-content:flex-end}.row.center{justify-content:center}.form{display:flex;flex-direction:column;gap:14px}.muted{color:var(--muted)}.small{font-size:14px}.block{display:block}.error{color:var(--bad)}.error-box{white-space:pre-wrap;text-align:left;background:var(--surface);border:1px solid var(--line);border-radius:10px;padding:12px;color:var(--bad);max-width:640px;margin:0 auto 16px;font-size:14px}.pill{display:inline-block;font-size:13px;padding:1px 8px;border-radius:99px;background:var(--surface-2);color:var(--muted)}.pill.busy{color:var(--busy)}.pill.bad{color:var(--bad)}.empty{text-align:center;padding:64px 0}.song-grid{list-style:none;padding:0;margin:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:12px}.song-card{display:flex;gap:14px;padding:12px;background:var(--surface);border:1px solid var(--line);border-radius:14px;color:var(--text)}.song-card img,.art-placeholder{width:72px;height:72px;border-radius:8px;flex:none;object-fit:cover}.art-placeholder{display:grid;place-items:center;background:var(--surface-2);color:var(--muted);font-size:28px}.art-placeholder.small,.result img{width:52px;height:52px}.song-card-text{display:flex;flex-direction:column;min-width:0;flex:1;gap:2px}.song-card-text strong,.song-card-text .muted{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.song-card-meta{display:flex;gap:6px;margin-top:4px}.progress{height:4px;border-radius:2px;background:var(--surface-2);margin-top:auto;overflow:hidden}.progress>div{height:100%;background:var(--accent)}.search{font-size:20px;padding:14px 16px;margin-bottom:12px}.results{list-style:none;padding:0;margin:0 0 16px;display:flex;flex-direction:column;gap:6px}.result{width:100%;justify-content:flex-start;text-align:left;padding:8px;min-height:68px;gap:12px}.result img{border-radius:6px}.result>span{display:flex;flex-direction:column;min-width:0}.result .muted{font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.toolbar{display:flex;flex-wrap:wrap;gap:10px 18px;align-items:center;margin-bottom:16px;position:sticky;top:0;z-index:2;background:var(--bg);padding:8px 0}.toolbar .group{display:flex;align-items:center;gap:6px}.toolbar .label{color:var(--muted);font-size:14px}.toolbar .key{min-width:44px;text-align:center;font-size:18px}.segmented{gap:0!important}.segmented button{border-radius:0}.segmented button:first-child{border-radius:10px 0 0 10px}.segmented button:last-child{border-radius:0 10px 10px 0;margin-left:-1px}.loading-state{text-align:center;padding:64px 16px;max-width:560px;margin:0 auto;display:flex;flex-direction:column;gap:12px;align-items:center}.spinner{width:40px;height:40px;border:4px solid var(--surface-2);border-top-color:var(--accent);border-radius:50%;animation:spin 1s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.metronome{display:flex;flex-wrap:wrap;align-items:center;gap:16px;padding:12px 16px;background:var(--surface);border:1px solid var(--line);border-radius:14px;margin-bottom:16px}.beats{display:flex;gap:8px}.beats span{width:14px;height:14px;border-radius:50%;background:var(--surface-2)}.beats span:first-child{outline:2px solid var(--line)}.beats span.on{background:var(--accent)}.tempo{flex:1 1 260px;color:var(--text);font-size:15px}.tempo input{padding:0;border:none;background:none;accent-color:var(--accent)}.disagreements{background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:16px;margin-bottom:20px;display:flex;flex-direction:column;gap:14px}.disagreement{display:flex;flex-direction:column;gap:6px;border-top:1px solid var(--line);padding-top:12px}.option{display:grid;grid-template-columns:150px 1fr auto;gap:12px;align-items:center}.option .source{font-size:13px;color:var(--muted)}.option code{font-size:14px;overflow-wrap:anywhere}.option.current code{color:var(--accent)}@media(max-width:640px){.option{grid-template-columns:1fr auto}.option .source{grid-column:1 / -1}}.sheet{line-height:1.25}@media(min-width:1000px)and (orientation:landscape){.page.wide>.sheet{columns:2;column-gap:48px}}.sheet-section{break-inside:avoid;margin-bottom:1.2em}.sheet-section h3{font-size:.75em;text-transform:uppercase;letter-spacing:.08em;color:var(--muted);margin-bottom:.4em}.sheet-line{display:flex;flex-wrap:wrap;align-items:flex-end;margin-bottom:.35em}.seg{display:inline-flex;flex-direction:column;white-space:pre}.chord{color:var(--chord);font-weight:700;padding-right:.5em;min-height:1.3em;position:relative}.chords-only .lyric{display:none}.chords-only .chord{padding-right:1em}.words-only .seg{white-space:pre-wrap}.chord.in-pattern{background:var(--pattern);color:var(--pattern-text);margin-top:1.1em}.chord.pattern-first{border-radius:6px 0 0 6px;padding-left:.25em}.chord.pattern-last{border-radius:0 6px 6px 0}.chord.pattern-first.pattern-last{border-radius:6px}.pattern-label{position:absolute;bottom:100%;left:0;font-size:.6em;font-weight:600;white-space:nowrap;color:var(--pattern-text)}.sheet-gap{height:.6em}.sources{margin-top:32px}.editor{display:grid;grid-template-columns:1fr 1fr;gap:16px}.editor textarea{min-height:70vh}.editor-preview{background:var(--surface);border:1px solid var(--line);border-radius:10px;padding:12px;max-height:70vh;overflow:auto}@media(max-width:800px){.editor{grid-template-columns:1fr}}.history{display:grid;grid-template-columns:260px 1fr;gap:20px}.version-list{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:6px}.version-list a{display:block;padding:10px 12px;border-radius:10px;border:1px solid var(--line);background:var(--surface);color:var(--text)}.version-list a.on{border-color:var(--accent)}.version-list .pill{margin-left:4px}@media(max-width:800px){.history{grid-template-columns:1fr}}
