/* The score is the working surface. Controls stay within one compact dock. */
:root{font-family:var(--font);color:var(--ink);background:var(--bg);font-synthesis:none}
.language-link{font-size:14px;padding:10px 8px;white-space:nowrap}.site-header .language-link{margin-left:auto}.button[aria-disabled="true"]{opacity:.38;pointer-events:none}#notation{position:relative}.playback-cursor{position:absolute;left:0;top:0;width:3px;border-radius:2px;background:#dd2438;box-shadow:0 0 0 1px #ffffffb3,0 0 10px #dd24382b;z-index:3;pointer-events:auto;cursor:ew-resize;touch-action:none;will-change:transform}.reader-topline .language-link{font-size:12px;padding-inline:5px}
*{box-sizing:border-box} [hidden]{display:none!important} body{margin:0} a{color:inherit;text-decoration:none} button,input,select,summary{font:inherit;color:inherit}
button,a,select,summary{-webkit-tap-highlight-color:transparent;touch-action:manipulation} button,summary{cursor:pointer} button:disabled{opacity:.38;cursor:default}
button,select,summary{min-height:44px} button{border:0;background:none} button:hover:not(:disabled),summary:hover{background:var(--surface-2)} a:hover{color:var(--accent-text)}
:focus-visible{outline:3px solid var(--focus);outline-offset:3px} .sr-only{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.skip{position:fixed;top:-80px;z-index:100}.skip:focus{top:8px;padding:14px;background:var(--surface)}
.site-header{height:72px;border-bottom:1px solid var(--line);background:var(--surface);display:flex;align-items:center;justify-content:space-between;gap:16px;padding:0 max(24px,calc((100vw - 1140px)/2))}
.brand{display:flex;align-items:center;gap:12px;font-size:19px;font-weight:700}.brand-mark{border:1px solid var(--line-strong);width:40px;height:40px;border-radius:50%;display:grid;place-items:center;font:25px Georgia;color:var(--accent-text)}
main{max-width:1200px;padding:28px 28px 48px;margin:auto;min-height:calc(100dvh - 144px)}h1{font-size:30px;margin:0;line-height:1.4;font-weight:700;letter-spacing:-.02em}.heading{display:flex;justify-content:space-between;align-items:center;gap:15px;margin-bottom:20px}
.quiet{font-size:14px;padding:8px 12px;border-radius:6px;color:var(--muted)}.button{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:44px;padding:8px 14px;background:var(--surface);border:1px solid var(--line-strong);border-radius:7px;font-size:14px;white-space:nowrap}
.categories{display:flex;gap:8px;overflow-x:auto;margin-bottom:16px}.categories button{white-space:nowrap;border:1px solid var(--line);border-radius:24px;padding:8px 18px;background:var(--surface);font-size:14px}.categories .active{background:var(--green);border-color:var(--green);color:var(--on-accent)}
.toolbar{display:flex;gap:10px}.search{display:flex;align-items:center;gap:10px;background:var(--surface);border:1px solid var(--line-strong);border-radius:7px;flex:1;padding:0 14px;min-width:0}.search svg{width:20px;flex:none;color:var(--muted)}.search input{width:100%;font-size:16px;min-height:48px;border:0;background:none;outline:none}.toolbar select{border:1px solid var(--line-strong);border-radius:7px;background:var(--surface);padding:8px 12px;font-size:14px}
.library-filters{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px;margin-bottom:18px}.library-filters .categories{margin:0}.score-language-filter{display:flex;align-items:center;gap:10px}.filter-label{font-size:12px;color:var(--muted);white-space:nowrap}.language-segments{display:flex;gap:3px;padding:3px;border:1px solid var(--line-strong);border-radius:9px;background:var(--raised)}.language-segments button{min-width:66px;min-height:38px;padding:6px 12px;border-radius:6px;font-size:13px}.language-segments .active{background:var(--surface);color:var(--green);font-weight:700;box-shadow:0 1px 3px rgb(0 0 0/8%)}.language-segments button:hover:not(.active){background:var(--accent-soft)}
.list-caption{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:24px 0 12px;font-size:13px;color:var(--muted)}
/* The kinds of score in the heading's place, and ♥ beside each card */
.library-chips{display:flex;flex-wrap:wrap;gap:6px;flex:1;min-width:0;max-width:100%}
/* The caption row may be narrower than its buttons (they scroll on a phone), so it never widens the list */
#library-view .list-caption{min-width:0}
.library-chip{min-height:34px;padding:5px 14px;border:1px solid var(--line);border-radius:999px;background:var(--surface);color:var(--ink);font-size:13.5px;font-weight:600;white-space:nowrap}
.library-chip:hover{border-color:var(--green)}
.library-chip.active{border-color:var(--green);background:var(--green);color:var(--surface)}
.library-chip.liked-chip:not(.active){color:var(--rose)}
.score-card-wrap{position:relative;min-height:0;min-width:0}.score-card-wrap>.score-card{height:100%}
.like-score{position:absolute;right:1px;bottom:1px;width:28px;height:28px;min-height:28px;padding:0;border:0;border-radius:50%;background:transparent;color:var(--faint);font-size:16px;line-height:1;opacity:.75}
.like-score{top:1px;bottom:auto}
/* The ♥ sits in the card's top right corner, above the ＋, so the key and language tags keep the whole bottom line. */
.score-card-wrap>.score-card{padding-right:28px}
.score-card-wrap:hover .like-score,.personal-card-wrap:hover .like-score,.like-score:focus-visible,.like-score.on{opacity:1}
.like-score.on,.reader-like.on{color:var(--rose)}
.reader-like{flex:none;width:34px;height:34px;min-height:34px;padding:0;border:0;border-radius:50%;background:transparent;color:var(--faint);font-size:20px;line-height:1}
@media(max-width:560px){.library-chips{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;padding-bottom:2px}.library-chips::-webkit-scrollbar{display:none}.library-chip{min-height:32px;padding:4px 12px;font-size:13px}.like-score{opacity:1}}.list-caption h2{font-size:16px;color:var(--ink);margin:0}.score-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:10px;padding:14px;border:1px solid var(--line);border-radius:12px;background:var(--surface);align-items:stretch}.score-card{display:flex;flex-direction:column;align-items:center;gap:8px;padding:16px 10px 14px;min-width:0;border:1px solid transparent;border-radius:10px;text-align:center;transition:background .15s,border-color .15s}.score-card:hover{background:var(--surface-2);border-color:var(--line-strong);color:var(--ink)}.score-card:focus-visible{background:var(--surface-2)}.score-card h3{font-size:14px;font-weight:600;line-height:1.55;margin:0;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:2.9em}.score-card-languages{display:flex;flex-wrap:wrap;justify-content:center;gap:5px;min-height:21px}.language-badge{font-size:10px;line-height:1.7;padding:1px 7px;border-radius:4px;background:var(--surface-2);color:var(--accent-text);white-space:nowrap}.language-badge[lang=ja]{background:var(--amber-soft);color:var(--amber-text)}.score-card-status{font-size:11px;color:var(--amber-text);line-height:1.5}.private-badge{font-size:11px;color:var(--amber-text);font-weight:600}
.pagination{display:flex;align-items:center;justify-content:center;gap:22px;margin-top:24px;font-size:14px}.empty{grid-column:1/-1;padding:60px 20px;text-align:center;color:var(--muted);line-height:2}
/* Library pages fit the available window; additional scores use pagination. */
body:not(.reader-mode){height:100dvh;display:flex;flex-direction:column;overflow:hidden}
body:not(.reader-mode) .site-header{height:52px;flex:none;padding-inline:18px}
body:not(.reader-mode) main{flex:1;min-height:0;width:100%;max-width:none;display:flex;padding:10px 16px 8px}
#library-view{flex:1;min-width:0;min-height:0;display:grid;grid-template-rows:auto auto auto minmax(0,1fr) auto;gap:6px}
#library-view .heading,#library-view .library-filters,#library-view .list-caption,#library-view .pagination{margin:0}
#library-view h1{font-size:24px}
#library-view .categories{overflow:visible;flex-wrap:wrap}
#library-view .score-grid{min-height:0;grid-template-columns:repeat(var(--library-columns,2),minmax(0,1fr));grid-template-rows:repeat(var(--library-rows,1),minmax(0,1fr));gap:4px;padding:0;overflow:hidden;background:transparent;border:0;border-radius:0}
#library-view .score-card{position:relative;min-height:0;justify-content:center;align-items:stretch;gap:2px;padding:5px 6px;overflow:hidden;border:1px solid var(--line);border-radius:5px;text-align:left;background:var(--surface)}
#library-view .score-card:hover,#library-view .score-card:focus-visible{background:var(--surface-2);border-color:var(--accent-line)}
#library-view .score-card h3{font-size:13px;line-height:18px;min-height:36px;max-height:36px;flex:none;word-break:keep-all}
#library-view .score-card-meta{display:flex;align-items:center;gap:4px;min-height:16px;max-height:16px;overflow:hidden;white-space:nowrap;font-size:10px;line-height:14px}
#library-view .language-badge{font-size:10px;line-height:14px;padding:0 4px;flex:none}
#library-view .private-badge{position:static;font-size:10px;flex:none}
#library-view .score-card-status{font-size:10px;line-height:14px;overflow:hidden;text-overflow:ellipsis}
#library-view .toolbar .quiet{padding:0;width:34px;min-height:34px;flex:none;font-size:19px}
#library-view .empty{align-self:center;padding:12px}
body:not(.reader-mode) footer{flex:none;padding:8px 24px;font-size:11px}
@media(max-width:560px){
 body:not(.reader-mode) .site-header{height:54px;padding-inline:12px;gap:8px}
 body:not(.reader-mode) main{padding:10px 12px 8px}
 #library-view{gap:6px}#library-view h1{font-size:21px}
 #library-view .library-filters{gap:8px}#library-view .categories{gap:4px}
 #library-view .categories button{font-size:12px;padding:5px 8px;min-height:36px}
 #library-view .toolbar{flex-wrap:nowrap;gap:6px}#library-view .search{flex-basis:0;padding-inline:10px;gap:6px}
 #library-view .search svg{width:16px}#library-view .search input{font-size:14px;min-height:40px}
 #library-view .toolbar select{width:110px;min-width:0;font-size:12px;padding:5px;min-height:40px}
 #library-view .score-grid{padding:0;gap:4px}#library-view .score-card{padding:5px 6px;gap:2px}
 #library-view .pagination{gap:16px}#library-view .pagination .button{min-height:40px}
 body:not(.reader-mode) footer{padding:6px 12px}
}
@media(max-height:650px){
 body:not(.reader-mode) .site-header{height:48px}
 body:not(.reader-mode) main{padding:8px 12px}
 body:not(.reader-mode) footer{display:none}
 #library-view{grid-template-rows:auto auto auto minmax(0,1fr) auto;gap:6px}
 #library-view .heading{display:none}
 #library-view .library-filters{gap:6px}
 #library-view .categories button{min-height:34px;padding:5px 10px;font-size:12px}
 #library-view .language-segments button{min-height:32px;padding:4px 8px}
 #library-view .search input{min-height:36px}
 #library-view .toolbar select,#library-view .pagination .button{min-height:36px}
}
@media(max-height:450px){
 body:not(.reader-mode) .site-header{height:44px}
 body:not(.reader-mode) main{padding:6px 12px}
 #library-view{grid-template-rows:auto auto minmax(0,1fr) auto}
 #library-view .list-caption,#library-view .categories{display:none}
 #library-view .library-filters{justify-content:flex-end}
}
/* Account and score metadata are available without taking space from music. */
.menu{position:relative;flex:none}.menu summary{list-style:none;display:flex;align-items:center;justify-content:center;padding:8px 12px;border-radius:7px;font-size:14px;white-space:nowrap}.menu summary::-webkit-details-marker{display:none}.menu[open]>summary{background:var(--raised)}.menu-panel{position:absolute;right:0;top:calc(100% + 8px);z-index:50;width:320px;max-width:calc(100vw - 24px);padding:20px;background:var(--surface);border:1px solid var(--line);border-radius:12px;box-shadow:0 12px 38px rgb(0 0 0/13%);font-size:14px;line-height:1.7;max-height:70dvh;overflow:auto}
.account-menu .menu-panel{width:280px;display:grid;gap:12px}#account{font-size:13px;overflow-wrap:anywhere}.reader-meta{color:var(--muted);font-size:13px;margin:0 0 12px}.reader-notice{font-size:13px;color:var(--amber-text);margin:0 0 12px;line-height:1.7}.reader-notice.checked{color:var(--accent-text)}.credits{font-size:12px;color:var(--muted);margin:0;overflow-wrap:anywhere}.access-controls{border-top:1px solid var(--line);padding-top:16px;margin-top:16px;display:grid;gap:8px}.access-controls select{padding:8px 10px;border:1px solid var(--line-strong);background:var(--surface);border-radius:7px;font-size:16px;max-width:100%}#access-status{color:var(--amber-text);font-size:13px}
/* Tablet score reader */
.reader-mode .site-header,.reader-mode footer{display:none}.reader-mode main{max-width:1440px;padding:0 16px 24px;min-height:100dvh}.reader-dock{position:sticky;top:0;z-index:20;background:var(--bg);padding:6px 0 10px}.reader-topline{display:flex;align-items:center;gap:12px;min-height:48px}.back{display:inline-flex;align-items:center;gap:5px;min-height:44px;font-size:14px;white-space:nowrap;color:var(--muted);padding:0 8px}.reader-topline h1{font-family:inherit;font-size:16px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0;flex:1}.reader-info summary{color:var(--muted)}
.reader-controls{display:flex;align-items:center;gap:10px;flex-wrap:wrap;background:var(--surface);border:1px solid var(--line);border-radius:10px;padding:5px 8px}.transpose{display:flex;align-items:center;gap:2px;flex:none}.transpose button{min-width:44px;border-radius:6px;font-size:21px}.transpose output{font-size:14px;font-weight:600;min-width:82px;text-align:center;white-space:nowrap}.transpose .reset{font-size:13px;padding:8px;min-width:44px;color:var(--muted)}.reader-actions{display:flex;gap:6px}.reader-actions .button{border:0;background:var(--surface-2);color:var(--green);min-width:74px}.view-controls{display:flex;gap:6px;align-items:center;margin-left:auto}.view-controls select{max-width:145px;font-size:14px;padding:8px;border:0;background:var(--surface);border-radius:6px}.view-controls .button{border:0}
.source-controls{display:flex;align-items:center;gap:6px;margin-top:6px;padding:0 4px}.source-controls select{flex:1;min-width:0;max-width:100%;font-size:14px;background:transparent;border:0;border-radius:6px;padding:8px}.source-controls button{flex:none;min-width:44px}.page-controls{display:flex;align-items:center;gap:2px;border-left:1px solid var(--line);padding-left:8px;font-size:13px}.page-controls button{min-width:44px}.page-controls span{white-space:nowrap}
/* Sideways swipes turn the score and the list here, so Chrome's swipe-to-go-back stays off (the back button still works).
   The page never scrolls sideways: a double tap (on the keys, the score) does not zoom in, pinching still does,
   and anything wider than the window is cut off instead of widening the page. */
html{overscroll-behavior-x:none;touch-action:manipulation;overflow-x:hidden}
body{overflow-x:clip}
.paper{border:1px solid var(--line);background:var(--paper-bg);padding:20px 20px 24px;overflow-x:auto;overscroll-behavior-x:contain;min-height:350px;scroll-margin-top:170px}.score-titleline{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:2px 12px;margin:0 0 14px}.print-title{font-weight:700;letter-spacing:-.01em;font-size:21px;line-height:1.6;color:var(--paper-ink);margin:0;text-align:center;overflow-wrap:anywhere}#paper-key{font-size:12px;color:var(--paper-muted);white-space:nowrap;flex:none}.paper-credits{font-size:12px;line-height:1.5;color:var(--paper-muted);overflow-wrap:anywhere}.paper-credits:empty{display:none}#notation{margin:auto}#notation svg{display:block;width:100%;height:auto;margin:auto}
.paper.fit-page{min-height:0}
.error{padding:22px;background:var(--danger-soft);border:1px solid var(--danger-line);border-radius:8px;line-height:1.8;font-size:14px}.error button{margin-top:10px}.exit-focus{position:fixed;right:max(12px,env(safe-area-inset-right));top:max(12px,env(safe-area-inset-top));z-index:30;box-shadow:0 2px 12px rgb(0 0 0/8%);background:var(--surface);min-height:44px}.score-focus main{padding-top:0}.score-focus .paper{scroll-margin-top:0}.score-focus .score-titleline{padding-right:70px}
footer{display:flex;justify-content:space-between;gap:16px;padding:22px max(24px,calc((100vw - 1144px)/2));border-top:1px solid var(--line);font-size:12px;color:var(--muted);background:var(--surface)}#toast{position:fixed;bottom:max(20px,env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);padding:12px 18px;background:var(--toast-bg);color:var(--toast-ink);border-radius:8px;font-size:14px;max-width:90vw;z-index:60}
@media(min-width:1500px){.reader-mode main{padding-inline:24px}}
@media(max-width:900px){.reader-mode main{padding-inline:8px}.paper{padding:16px 10px 20px}.reader-dock{padding-top:2px}.print-title{font-size:19px}.reader-topline{gap:6px}.page-controls{border-left:0;padding-left:0}.reader-controls{gap:6px}}
@media(max-width:560px){
 .site-header{height:62px;padding:0 16px}.brand{font-size:17px;gap:9px}.brand-mark{width:34px;height:34px;font-size:22px}main{padding:22px 16px 36px}h1{font-size:26px}.heading{margin-bottom:16px}.categories{gap:6px;margin-bottom:12px}.categories button{padding:7px 13px}.toolbar{flex-wrap:wrap}.search{flex-basis:100%}.toolbar select{width:100%;font-size:16px;min-height:44px}
 .library-filters{gap:12px;margin-bottom:14px}.library-filters .categories{width:100%;margin:0}.score-language-filter{width:100%;justify-content:space-between}.language-segments{flex:1;max-width:300px}.language-segments button{flex:1;min-width:0;min-height:40px}.score-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:5px;padding:7px}.score-card{padding:14px 8px 12px;gap:7px}.score-card h3{font-size:14px}.language-badge{font-size:11px}.list-caption{margin-top:18px}
 .reader-mode main{padding:0 5px 16px}.reader-topline h1{font-size:14px}.reader-topline{gap:2px}.back{padding:0 6px}.back span{display:none}.back{font-size:28px;width:44px;justify-content:center}.reader-info summary{padding-inline:9px;font-size:13px}
 .reader-controls{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:2px 6px;padding:4px 6px;border-radius:8px}.transpose{gap:0}.transpose output{min-width:74px}.reader-actions{justify-self:end}.reader-actions .button{min-width:64px;padding-inline:10px}.view-controls{grid-column:1/-1;margin-left:0;border-top:1px solid var(--line);justify-content:space-between}.view-controls select{font-size:16px;max-width:160px}.page-controls{grid-column:1/-1;justify-content:center;border-top:1px solid var(--line)}.source-controls select{font-size:16px}.paper{padding:12px 6px 18px;scroll-margin-top:220px}.print-title{font-size:17px}.score-titleline{gap:7px;flex-wrap:wrap;margin-bottom:8px}#paper-key{font-size:12px}.menu-panel{padding:16px}.score-focus .score-titleline{padding-right:72px;justify-content:flex-start}.score-focus .print-title{text-align:left;font-size:16px}footer{padding:20px 16px}
}
.chord-sheet{color:var(--paper-ink);padding:6px 3%;font-size:16px}.chord-sheet h2{display:none}.chord-sheet h3{font-size:15px;letter-spacing:.5px;border-bottom:1px solid var(--paper-line);padding:8px 0;margin-top:22px}.chord-line{display:flex;flex-wrap:wrap;align-items:flex-end;line-height:1.7;margin-bottom:12px}.chord-segment{display:inline-flex;flex-direction:column;white-space:pre-wrap;min-width:1em}.chord-segment b{font-family:Arial,sans-serif;color:var(--paper-accent);padding-right:12px;font-size:15px}.chord-space{height:12px}.chord-credit{font-size:12px;color:var(--paper-muted);text-align:center}.chord-key{font-size:13px}
.chord-progression{gap:8px 0;align-items:stretch}.chord-measure{display:inline-flex;align-items:center;flex-wrap:wrap;gap:14px;padding:5px 14px;border-inline-start:1px solid var(--paper-line);min-width:62px;max-width:100%}.chord-measure:last-child{border-inline-end:1px solid var(--paper-line)}.chord-measure b{font-family:Arial,sans-serif;font-size:1em;white-space:nowrap;color:var(--paper-accent)}
.brand{letter-spacing:.06em}.brand-mark{font-style:italic}
.tempo-controls{display:flex;align-items:center;border-left:1px solid var(--line);padding-left:6px;flex:none}
.intro-toggle{flex:none;gap:5px!important;padding:0 5px;font-size:13px;white-space:nowrap}.intro-toggle[hidden]{display:none}.intro-toggle input{margin:0}
.tempo-controls button{width:40px;min-height:44px;font-size:19px;border-radius:6px}
.tempo-value{display:flex;align-items:center;gap:3px;font-size:18px}.tempo-value input{width:48px;min-height:44px;text-align:center;border:0;background:none;font-size:16px;font-weight:600;appearance:textfield;-moz-appearance:textfield}.tempo-value input::-webkit-inner-spin-button,.tempo-value input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}
.audio-menu .menu-panel{display:grid;gap:12px}.audio-menu .menu-panel select{width:100%;font-size:16px;border:1px solid var(--line);border-radius:6px;padding:8px}.audio-menu label{font-size:14px}.audio-note{font-size:13px;color:var(--muted);margin:0}.check-label{display:flex;align-items:center;min-height:36px;gap:10px}.check-label input{width:18px;height:18px;accent-color:var(--green)}#volume{width:100%;accent-color:var(--green)}.playback-status{font-size:13px;color:var(--green);padding:7px 10px 0;font-variant-numeric:tabular-nums}
#band-mixer{border-block:1px solid var(--line);padding-block:6px}#band-mixer>summary{justify-content:space-between;padding:6px 0}#band-mixer>summary::after{content:'＋'}#band-mixer[open]>summary::after{content:'−'}.band-track{display:grid;grid-template-columns:100px minmax(0,1fr);gap:8px;align-items:center}.band-track input[type=range]{width:100%;min-height:36px;accent-color:var(--green)}
.band-track .check-label{white-space:normal;gap:6px;line-height:1.35}.band-track .check-label input{margin:0;flex:none}.band-track .check-label span{min-width:0;overflow-wrap:anywhere}
.note-editor-controls{display:flex;align-items:center;gap:7px;flex-wrap:wrap;padding:9px 10px;border:1px solid var(--accent-line);border-radius:8px;background:var(--surface-2);margin-top:6px;font-size:13px}.note-editor-controls[hidden]{display:none}#note-editor-hint{flex:1 1 250px}#note-selection{min-width:62px;font-weight:700}.pitch-buttons{display:flex;gap:2px}.pitch-buttons button{min-height:38px;min-width:34px;background:var(--surface);border:1px solid var(--line);border-radius:5px;font-size:20px}.note-editor-controls .button,.note-editor-controls .quiet{min-height:38px;padding:6px 10px}#note-edit-status{flex-basis:100%;color:var(--muted)}#note-edit-status:empty{display:none}.editable-note{cursor:ns-resize;touch-action:none}.editable-note:hover,.selected-note{fill:var(--paper-accent);stroke:var(--paper-accent)}.editable-note:focus{outline:none}.editable-note:focus .notehead{filter:drop-shadow(0 0 4px #238761)}.note-drag-marker{position:absolute;z-index:8;pointer-events:none;border:2px solid var(--paper-accent);border-radius:50%;background:#d4efdfcc;font:bold 12px sans-serif;color:var(--paper-accent);line-height:1;overflow:visible;white-space:nowrap;box-shadow:0 0 0 4px #fff9}.note-drag-marker::after{content:'↕';padding-left:6px}
@media(max-width:1100px){.reader-controls{gap:4px}.transpose output{min-width:70px}.view-controls{margin-left:0}.audio-menu .menu-panel{right:0}.view-controls select{max-width:130px}}
@media(max-width:560px){.reader-controls{display:flex;flex-wrap:wrap;gap:3px}.transpose{flex:1}.transpose output{min-width:60px}.transpose button{min-width:38px}.tempo-controls{padding-left:2px}.tempo-controls button{width:34px;min-width:34px}.tempo-value input{width:40px}.reader-actions{margin-right:3px}.audio-menu{position:static}.reader-controls{position:relative}.audio-menu .menu-panel{top:100%;right:4px}.view-controls{border:0;flex:1;justify-content:flex-end}.view-controls select{max-width:112px;font-size:14px;padding:5px}.view-controls .button{padding-inline:8px}.page-controls{width:100%;border-top:1px solid var(--line);justify-content:center}.audio-menu summary{padding:8px;font-size:13px}.paper{scroll-margin-top:250px}}

/* Live harmony beside the score and a virtual keyboard docked under it. Both fold away. */
.reader-stage{display:flex;gap:12px;align-items:flex-start}.reader-stage>.paper{flex:1;min-width:0}
.panel-toggle{min-height:34px;padding:4px 12px;border:1px solid var(--line-strong);border-radius:7px;background:var(--surface);font-size:13px;font-weight:600;color:var(--green);white-space:nowrap}
.panel-toggle[aria-expanded="true"]{background:var(--raised);border-color:var(--line-strong)}
.harmony-panel{position:sticky;top:var(--dock-height,150px);flex:none;width:220px;display:flex;flex-direction:column;gap:8px;padding:10px;background:var(--surface);border:1px solid var(--line);border-radius:8px}
.harmony-panel.collapsed{width:auto;padding:6px;border-color:transparent;background:none}
.harmony-body{display:flex;flex-direction:column;gap:6px;text-align:center}
.harmony-caption{font-size:12px;color:var(--muted)}.harmony-symbol{font-size:34px;line-height:1.15;color:var(--green);font-weight:700;overflow-wrap:anywhere}.harmony-symbol.small{font-size:22px}
.harmony-name{font-size:13px;color:var(--muted);min-height:1.3em}
/* 음 이름 표기: 자동 (the score's key), always ♭ or always ♯ */
.note-spelling{display:inline-flex;align-items:center;justify-content:center;gap:6px;font-size:12px;color:var(--muted)}
.note-spelling select{min-height:28px;padding:2px 6px;font-size:12px;border:1px solid var(--line);border-radius:7px;background:var(--surface);color:var(--ink)}
.note-chips{display:flex;flex-wrap:wrap;justify-content:center;gap:4px}.note-chips span{padding:2px 8px;border-radius:999px;background:var(--surface-2);font-size:12px}
.harmony-staff .staff{width:100%;height:auto;display:block}
.keyboard-panel{padding:6px 0 8px;border-top:1px solid var(--line)}
.keyboard-bar{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.keyboard-tools{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-left:auto;font-size:13px}
.keyboard-tools .quiet{width:auto;min-height:34px;padding:4px 10px;font-size:13px;border:1px solid var(--line-strong);border-radius:7px;background:var(--surface)}
.keyboard-tools select{min-height:34px;font-size:13px;border:1px solid var(--line-strong);border-radius:7px;background:var(--surface);padding:2px 6px}
.keyboard-tools .check-label{min-height:34px;gap:6px}
.midi-status{color:var(--muted);font-size:12px;max-width:260px}
.pedal-dialog{width:min(400px,calc(100vw - 24px));padding:16px 18px;border:1px solid var(--line-strong);border-radius:12px;background:var(--surface);color:var(--ink);font-size:14px}.pedal-dialog h3{margin:0 0 6px;font-size:16px}.pedal-dialog p{margin:0 0 10px;font-size:13px;color:var(--muted)}
.pedal-row{display:flex;align-items:center;gap:8px;margin-bottom:8px}.pedal-row>span{flex:1}.pedal-row input{width:72px;min-height:34px;padding:2px 6px;border:1px solid var(--line-strong);border-radius:7px;background:var(--surface);color:var(--ink);font-size:14px;font-variant-numeric:tabular-nums}.pedal-row .quiet{min-width:136px}
.pedal-dialog .quiet{width:auto;min-height:34px;padding:4px 10px;font-size:13px;border:1px solid var(--line-strong);border-radius:7px;background:var(--surface);color:var(--ink)}.pedal-dialog .quiet.on{border-color:var(--violet);color:var(--violet-text)}
.pedal-actions{display:flex;justify-content:space-between;gap:8px}.pedal-dialog .pedal-note{min-height:1.4em;margin:6px 0}
.sustain-state{padding:3px 8px;border-radius:999px;background:var(--surface-2);color:var(--muted);font-size:12px}.sustain-state.on{background:var(--accent);color:var(--on-accent)}
.keyboard-body{margin-top:6px}
.keyboard{position:relative;height:96px;user-select:none;touch-action:none}
.keyboard .key{position:absolute;top:0;min-height:0;padding:0;display:flex;align-items:flex-end;justify-content:center;border-radius:0 0 5px 5px}
.keyboard .key.white{height:100%;background:#fff;border:1px solid #c9d2cb;z-index:1}
.keyboard .key.black{height:60%;background:#24342c;border:1px solid #1b2721;z-index:2}
.keyboard .key span{font-size:9px;color:#7b8a81;padding-bottom:4px;pointer-events:none}
.keyboard .key.white:hover{background:#f3f7f4}.keyboard .key.black:hover{background:#34473d}
.keyboard .key.playback{background:#f4cf7c}.keyboard .key.black.playback{background:#c99a34}
.keyboard .key.user{background:#7a4fd0}.keyboard .key.black.user{background:#54309f}.keyboard .key.user span{color:#fff}
.keyboard-hint{margin:4px 0 0;font-size:12px;color:var(--muted)}
body.score-focus .harmony-panel,body.score-focus .keyboard-panel{display:none}
@media(max-width:900px){.reader-stage{flex-direction:column;align-items:stretch}.reader-stage>.paper{flex:none}.harmony-panel{position:static;width:100%;flex-direction:row;align-items:center}.harmony-panel .harmony-body{flex-direction:row;flex-wrap:wrap;align-items:center;text-align:left;gap:4px 10px}.harmony-symbol{font-size:24px}.harmony-staff{display:none}}
@media(max-width:560px){.keyboard{height:72px}.keyboard-hint{display:none}.midi-status{max-width:100%}}
@media print{.harmony-panel,.keyboard-panel{display:none}}

/* Playback lives in the top dock: play/pause, time, a timeline that is also the
   section map, tempo and the accompaniment menu, on one compact row. */
.reader-bottom{position:sticky;bottom:0;z-index:15;margin-top:10px;background:var(--bg);box-shadow:0 -6px 16px rgb(0 0 0/6%)}
.playback-controls{display:flex;align-items:center;gap:8px;flex:1 1 420px;min-width:0}
.transport{display:flex;align-items:center;gap:4px;flex:none}
.play-toggle{width:38px;height:38px;min-height:38px;border-radius:50%;background:var(--green);color:var(--on-accent);font-size:15px;line-height:1;flex:none}
.play-toggle:hover:not(:disabled){background:var(--accent-hover)}
.stop-button{width:30px;height:30px;min-height:30px;border-radius:50%;border:1px solid var(--line-strong);background:var(--surface);color:var(--muted);font-size:11px;flex:none}
.playback-controls .playback-status{padding:0 2px;min-width:82px;font-size:13px;white-space:nowrap}
.timeline{position:relative;flex:1 1 auto;min-width:160px;height:30px;border-radius:6px;background:var(--surface-2);cursor:pointer;touch-action:none;overflow:hidden}
.timeline[aria-disabled="true"]{opacity:.5;pointer-events:none}
.timeline:focus-visible{outline-offset:2px}
.timeline-played{position:absolute;left:0;top:0;bottom:0;width:0;background:var(--danger-soft);pointer-events:none}
.timeline-head{position:absolute;top:0;bottom:0;left:0;width:3px;margin-left:-1.5px;background:#dd2438;border-radius:2px;pointer-events:none;z-index:2}
.timeline-sections{position:absolute;inset:0}
.segment{position:absolute;top:0;bottom:0;min-height:0;padding:0 6px;border:0;border-left:1px solid var(--bg);background:transparent;font-size:12px;color:var(--ink);text-align:left;overflow:hidden;cursor:pointer}
.segment span{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;pointer-events:none}
.segment:nth-child(even){background:var(--accent-tint)}
.segment[data-kind="intro"],.segment[data-kind="interlude"],.segment[data-kind="ending"]{color:var(--muted);font-style:italic}
.segment:hover{background:var(--accent-soft)}
.segment[aria-current]{color:var(--accent-text);font-weight:700}
/* A section waiting for the next bar line (see jumpToSection) */
.segment.pending{background:var(--accent-soft);animation:segment-wait .5s ease-in-out infinite alternate}
@keyframes segment-wait{to{background:var(--accent-tint)}}
@media(prefers-reduced-motion:reduce){.segment.pending{animation:none}}
.playback-controls .tempo-controls{border-left:0;padding-left:0}
.playback-controls .audio-menu summary{min-height:34px;padding:4px 10px;border:1px solid var(--line-strong);border-radius:7px;background:var(--surface);font-size:13px;white-space:nowrap}
.playback-controls .audio-menu summary::after{content:" ▾";color:var(--muted)}
.playback-cursor::before{content:"";position:absolute;top:0;bottom:0;left:-8px;width:19px}
.cursor-handle{position:absolute;left:50%;top:-9px;width:13px;height:13px;margin-left:-6.5px;border-radius:50%;background:#dd2438;box-shadow:0 0 0 2px #fff,0 1px 4px #0004}
/* Chord practice: the cursor waits on the chord, kept inside the staff so the chord name above stays clear. */
.playback-cursor.tight .cursor-handle{display:none}
@media(max-width:1100px){.playback-controls{flex-basis:100%;order:5}}
@media(max-width:560px){.playback-controls{grid-column:1/-1;flex-wrap:wrap;gap:6px}.timeline{order:9;flex-basis:100%}}
@media print{.reader-bottom,.playback-controls{display:none}}
body.score-focus .reader-bottom{display:none}
#notation[lang="ja"] .syl{font-feature-settings:"palt"}
.practice-toggle[aria-pressed="true"]{background:var(--accent);border-color:var(--accent);color:var(--on-accent)}
.practice-bar{display:flex;align-items:center;gap:6px 14px;flex-wrap:wrap;margin-bottom:6px;padding:6px 10px;border:1px solid var(--line-strong);border-radius:8px;background:var(--surface-2);font-size:13px}
.practice-bar[hidden]{display:none}
.practice-caption{color:var(--muted)}.practice-chord{font-size:24px;line-height:1.1;min-width:70px;color:var(--ink)}
.practice-tones{color:var(--green);font-weight:600}.practice-tones .bass{margin-left:6px;color:var(--amber-text)}
.practice-progress,.practice-score{color:var(--muted);font-variant-numeric:tabular-nums}.practice-score b{color:var(--ink)}
.practice-bar .quiet{min-height:30px;padding:3px 10px;font-size:13px;border:1px solid var(--line-strong);border-radius:7px;background:var(--surface)}
.practice-mic[aria-pressed="true"]{border-color:var(--green,#1f5a45);background:var(--green,#1f5a45);color:var(--on-accent)}
.practice-heard{display:inline-flex;align-items:center;gap:6px;color:var(--muted)}.practice-heard[hidden]{display:none}.practice-heard b{min-width:44px;font-size:18px;color:var(--ink)}
.practice-mic-info{min-height:24px;padding:1px 8px;border:1px solid var(--line-strong);border-radius:999px;background:var(--surface);font-size:11px;color:var(--muted);cursor:pointer}.practice-mic-info[aria-pressed="true"]{border-color:var(--accent);color:var(--accent-text)}
.practice-mic-device{max-width:180px;min-height:24px;font-size:12px;border:1px solid var(--line-strong);border-radius:6px;background:var(--surface)}.practice-mic-device[hidden]{display:none}.practice-mic-info[hidden]{display:none}
.mic-report{width:min(560px,calc(100vw - 24px));border:1px solid var(--line-strong);border-radius:12px}.mic-report textarea{width:100%;box-sizing:border-box;font:11px/1.35 ui-monospace,Consolas,monospace}.mic-report p{margin:0 0 8px;font-size:13px}
.practice-mic-detail{flex-basis:100%;font:12px/1.4 ui-monospace,Consolas,monospace;color:var(--ink)}.practice-mic-detail[hidden]{display:none}
.practice-mic-status{flex-basis:100%;color:var(--amber-text);font-size:12px}.practice-mic-status:empty{display:none}.practice-heard{flex-wrap:wrap}
/* 음표 연습: the step's notes by hand, and the keys to press after a wrong one. */
.practice-what{min-height:30px;font-size:13px}
.practice-bar.notes .practice-chord{font-size:20px}.practice-bar.notes .practice-chord b{font-weight:600}
.practice-chord .hand,.practice-help .hand{margin-left:6px;font-size:12px;font-weight:400;opacity:.7}
.practice-help{flex-basis:100%;font-size:13px}.practice-help:empty{display:none}
.practice-bar.notes~.keyboard .key.hint{box-shadow:inset 0 0 0 200px #c8b1f5}.practice-bar.notes~.keyboard .key.black.hint{box-shadow:inset 0 0 0 200px #7f52d6}
.practice-bar.notes~.keyboard .key.hint-bass{box-shadow:inset 0 0 0 200px #f1bd69}.practice-bar.notes~.keyboard .key.black.hint-bass{box-shadow:inset 0 0 0 200px #c98a2a}
.practice-chord .hand.right{color:var(--violet-text);opacity:1}.practice-chord .hand.left{color:var(--amber-text);opacity:1}
.practice-level{width:8px;height:8px;border-radius:50%;background:var(--accent);opacity:calc(.15 + var(--level,0)*.85);transform:scale(calc(.7 + var(--level,0)*.6))}
.practice-bar.good{animation:practice-good .5s}.practice-bar.bad{animation:practice-bad .4s}
@keyframes practice-good{0%{background:var(--accent-soft);border-color:var(--accent)}100%{background:var(--surface-2)}}
@keyframes practice-bad{0%,100%{transform:none}25%{transform:translateX(-5px);background:var(--danger-soft);border-color:var(--danger)}75%{transform:translateX(5px);background:var(--danger-soft)}}
.keyboard .key.hint{box-shadow:inset 0 -12px 0 #c8b1f5}.keyboard .key.black.hint{box-shadow:inset 0 -10px 0 #9a78e6}
.keyboard .key.hint-bass{box-shadow:inset 0 -12px 0 #f1bd69}
@media(max-width:560px){.practice-chord{font-size:20px}.practice-score{flex-basis:100%}}
@media(prefers-reduced-motion:reduce){.practice-bar.good,.practice-bar.bad{animation:none}}
/* Setlist (콘티): the library narrowed to one setlist, and its song list beside the score. */
.setlist-bar{display:flex;align-items:center;gap:6px;margin-left:auto;font-size:12px;color:var(--muted)}
.setlist-bar[hidden]{display:none}
.setlist-bar .button{min-height:30px;padding:3px 10px;font-size:12px}
#library-view .score-card.setlist-missing{opacity:.55;cursor:default}
.setlist-panel{display:flex;flex-direction:column;gap:6px;border-top:1px solid var(--line);padding-top:8px;text-align:left;font-size:13px}
.setlist-panel[hidden]{display:none}
.harmony-panel.collapsed .setlist-panel{width:200px;padding:8px;border:1px solid var(--line);border-radius:8px;background:var(--surface)}
.setlist-head{display:flex;flex-direction:column;gap:2px}
.setlist-label{font-size:11px;color:var(--muted)}
.setlist-title{font-weight:700;color:var(--ink);text-decoration:none;overflow-wrap:anywhere}.setlist-title:hover{text-decoration:underline}
.setlist-head small{font-size:11px;color:var(--muted)}
.setlist-nav{display:flex;align-items:center;justify-content:space-between;gap:4px}
.setlist-nav .button{min-height:32px;padding:3px 8px;font-size:12px;white-space:nowrap}
.setlist-nav .button[aria-disabled="true"]{opacity:.4;pointer-events:none}
.setlist-position{font-size:12px;color:var(--muted);white-space:nowrap}
.setlist-songs{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:1px;max-height:42vh;overflow:auto}
.setlist-songs a,.setlist-songs li>span{display:flex;gap:6px;align-items:baseline;padding:5px 6px;border-radius:6px;color:inherit;text-decoration:none}
.setlist-songs a:hover,.setlist-songs a:focus-visible{background:var(--surface-2)}
.setlist-songs li.current>span{background:var(--raised);color:var(--green);font-weight:700}
.setlist-songs li.unavailable{opacity:.5}
.setlist-order{flex:none;min-width:1.4em;text-align:right;font-size:11px;color:var(--muted)}
.setlist-song-title{overflow-wrap:anywhere}
@media(max-width:900px){.harmony-panel{flex-wrap:wrap}.setlist-panel{flex-basis:100%}.harmony-panel.collapsed .setlist-panel{width:auto}.setlist-songs{max-height:30vh}}
@media(max-width:560px){.setlist-bar #setlist-meta{display:none}}
@media print{.setlist-panel{display:none}}
/* Narrow screens: the chord panel stays pinned just above the keyboard, the
   keyboard controls fit one line, and the sustain indicator is left out. */
@media(max-width:900px){
 .harmony-panel{position:sticky;top:auto;bottom:var(--reader-bottom-height,0px);z-index:14;flex-wrap:wrap;gap:4px 8px;padding:5px 8px;margin-top:8px;box-shadow:0 -4px 12px rgb(0 0 0/7%)}
 .harmony-panel .panel-toggle{min-height:30px;padding:2px 10px;font-size:12px}
 .harmony-panel .harmony-body{flex:1;min-width:0;flex-wrap:nowrap;overflow:hidden;gap:4px 8px}
 .harmony-panel .harmony-caption{display:none}
 .harmony-panel .note-spelling{flex:none;order:-1}.harmony-panel .note-spelling>span{display:none}
 .harmony-panel .harmony-symbol{font-size:20px}
 .harmony-panel .harmony-name{font-size:12px;min-height:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 .harmony-panel .note-chips{flex-wrap:nowrap;overflow:hidden}
 .setlist-panel{flex-direction:row;align-items:center;gap:6px;padding-top:4px}
 .setlist-panel .setlist-head{flex:1;min-width:0}
 .setlist-panel .setlist-label,.setlist-panel .setlist-head small,.setlist-panel .setlist-songs{display:none}
 .setlist-panel .setlist-title{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:12px}
 .setlist-panel .setlist-nav{flex:none}
 .keyboard-bar{flex-wrap:nowrap;gap:6px;overflow-x:auto;scrollbar-width:none}
 .keyboard-bar .panel-toggle{min-height:32px;padding:3px 10px;font-size:12px}
 .keyboard-tools{flex-wrap:nowrap;margin-left:0;gap:6px}
 .keyboard-tools .quiet,.keyboard-tools select{min-height:32px;padding:3px 8px;font-size:12px}
 .keyboard-tools .check-label{min-height:32px;gap:4px;font-size:12px;white-space:nowrap}
 .keyboard-tools .check-label input{width:16px;height:16px}
 .sustain-state,.midi-status:empty{display:none}
 .midi-status{white-space:nowrap}
}
/* Phones: one control line — play, the timeline, the key menu and the settings menu. */
body.phone-controls .reader-controls{display:flex;flex-wrap:wrap;align-items:center;gap:4px;padding:4px 6px}
body.phone-controls #playback-controls{flex:1 1 100%;order:0;flex-wrap:nowrap;gap:5px;min-width:0}
body.phone-controls .timeline{order:0;flex:1 1 auto;flex-basis:auto;min-width:56px;height:30px}
body.phone-controls .segment{font-size:10px;padding:0 4px}
body.phone-controls .playback-controls .playback-status{min-width:0;font-size:11px;padding:0}
body.phone-controls .key-menu,body.phone-controls .more-menu{position:static;flex:none}
body.phone-controls .reader-controls{position:relative}
body.phone-controls .key-menu summary,body.phone-controls .more-menu summary{min-height:34px;padding:4px 8px;border:1px solid var(--line-strong);border-radius:7px;background:var(--surface);font-size:13px;font-weight:600;color:var(--green)}
body.phone-controls .key-menu summary::after{content:" ▾";color:var(--muted);font-weight:400}
body.phone-controls .more-menu summary{font-size:18px;line-height:1;padding:4px 10px}
body.phone-controls .key-menu .menu-panel,body.phone-controls .more-menu>.menu-panel{top:100%;right:4px;width:auto;min-width:230px;padding:12px}
body.phone-controls #key-menu-panel .transpose{justify-content:center}
body.phone-controls #more-menu-panel{display:grid;gap:10px}
body.phone-controls #more-menu-panel .tempo-controls{border:0;padding:0;justify-content:center}
body.phone-controls #more-menu-panel .view-controls{display:flex;flex-wrap:wrap;gap:8px;border:0;justify-content:flex-start}
body.phone-controls #more-menu-panel .view-controls select{max-width:none;flex:1 1 140px}
body.phone-controls #more-menu-panel .audio-menu{position:static}
body.phone-controls #more-menu-panel .audio-menu summary{justify-content:space-between;border:1px solid var(--line-strong);border-radius:7px;background:var(--surface);min-height:40px}
body.phone-controls #more-menu-panel .audio-menu .menu-panel{position:static;width:auto;max-width:none;max-height:none;margin-top:8px;padding:10px;box-shadow:none;border-radius:8px;background:var(--surface-2)}
@media(max-width:900px){.keyboard .key span{font-size:8px;padding-bottom:3px}}
body.phone-controls #more-menu-panel .audio-menu summary{font-size:14px;padding:6px 12px;font-weight:600}
@media(max-width:900px){.keyboard-tools .quiet{white-space:nowrap}}
#library-view .list-caption{flex-wrap:wrap;row-gap:4px}
#list-title{min-width:0;overflow-wrap:anywhere}
@media(max-width:700px){.setlist-bar{flex-basis:100%;margin-left:0;justify-content:flex-end;flex-wrap:wrap}}
/* Narrow screens: the setlist's previous/next sits at the end of the chord row. */
@media(max-width:900px){
 .harmony-panel{flex-wrap:nowrap}
 .setlist-panel{flex:none;flex-basis:auto;border-top:0;border-left:1px solid var(--line);padding:0 0 0 6px;margin:0}
 .setlist-panel .setlist-head,.setlist-panel .setlist-word{display:none}
 .setlist-panel .setlist-nav{gap:2px}
 .setlist-panel .setlist-nav .button{min-height:30px;min-width:30px;padding:2px 6px}
}

/* The main menu: studio, setlists, upload requests and the community, where the category buttons were. */
.main-menu{display:flex;flex-wrap:wrap;gap:8px}
.main-menu>a,.main-menu>button{display:inline-flex;align-items:center;justify-content:center;min-height:42px;white-space:nowrap;border:1px solid var(--line);border-radius:24px;padding:8px 18px;background:var(--surface);font-size:14px;font-weight:600;color:var(--ink)}
.main-menu>a:hover,.main-menu>button:hover{background:var(--surface-2)}
.main-menu [aria-current=page]{background:var(--green);border-color:var(--green);color:var(--on-accent)}
.main-menu [aria-current=page]:hover{background:var(--accent-hover)}
@media(max-width:560px){
 .main-menu{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:4px;width:100%}
 .main-menu>a,.main-menu>button{min-height:40px;padding:4px 2px;font-size:12px;white-space:normal;text-align:center;line-height:1.25;border-radius:9px}
 /* Six narrow buttons: Korean labels wrap between words (악보 / 업로드 / 요청), not inside them. */
 html:lang(ko) .main-menu>a,html:lang(ko) .main-menu>button{word-break:keep-all;overflow-wrap:anywhere}
}
@media(max-height:450px){#library-view .main-menu{display:none}}

.main-menu .community{position:relative}
.main-menu .community[data-unread]::after{content:attr(data-unread);position:absolute;top:-6px;right:-6px;min-width:19px;height:19px;padding:0 5px;border-radius:10px;background:var(--danger);color:var(--on-danger);font-size:11px;font-weight:700;line-height:19px;text-align:center;box-shadow:0 0 0 2px var(--surface)}
/* 계정 삭제 (account menu) and the iOS app's sign-in choice (native-auth.mjs) */
.delete-account{justify-self:start;color:var(--muted);font-size:13px}
.account-delete,.app-signin{border:0;border-radius:16px;padding:22px;width:min(420px,calc(100vw - 24px));color:var(--ink);background:var(--surface);box-shadow:0 20px 60px rgb(0 0 0/25%)}
.account-delete::backdrop,.app-signin::backdrop{background:var(--scrim)}
.account-delete h2,.app-signin h2{margin:0 0 8px;font-size:19px}
.account-delete p,.app-signin p{margin:0 0 10px;font-size:14px;line-height:1.6;color:var(--muted)}
.account-delete ul{margin:0 0 12px;padding-left:20px;font-size:14px;line-height:1.7}
.account-delete-check{display:flex;gap:8px;align-items:flex-start;font-size:14px;margin-bottom:14px}
.account-delete-actions{display:flex;justify-content:flex-end;gap:8px}
.account-delete .danger{border:0;border-radius:8px;padding:8px 16px;background:var(--danger);color:var(--on-danger);font-weight:700}
.app-signin form{display:grid;gap:10px}
.app-signin button{display:flex;align-items:center;justify-content:center;gap:10px;min-height:46px;border-radius:10px;font-size:15px;font-weight:700}
.app-signin-apple{border:0;background:#000;color:#fff}
.app-signin-google{border:1px solid var(--line-strong);background:#fff;color:#1f1f1f}
.app-signin-google span{font-weight:800;color:#4285f4}
.app-signin-cancel{border:0;background:none;color:var(--muted)}
footer .footer-links{display:flex;gap:14px;flex-wrap:wrap}

/* 연습 도구: a row of tools under the reader's controls, their panel, the pen's bar and layer, the fingerboard */
.tools-bar{display:flex;gap:6px;overflow-x:auto;scrollbar-width:none;padding:6px 2px 0;-webkit-overflow-scrolling:touch}
.tools-bar::-webkit-scrollbar{display:none}
.tools-bar button{flex:none;display:inline-flex;align-items:center;gap:5px;min-height:34px;padding:4px 12px 4px 9px;border:1px solid var(--line);border-radius:999px;background:var(--surface,#fff);color:var(--ink);font-size:13px;font-weight:600;white-space:nowrap}
.tools-bar svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;color:var(--green)}
.tools-bar button[aria-pressed=true]{background:var(--green);border-color:var(--green);color:var(--on-accent)}
.tools-bar button[aria-pressed=true] svg{color:var(--on-accent)}
.tools-bar button:disabled{opacity:.45}
.bars-hint{display:flex;align-items:center;flex-wrap:wrap;gap:4px 10px;margin:6px 0 0;padding:6px 10px;border-radius:10px;background:var(--amber-soft);color:var(--amber-text);font-size:13px}
.ink-bar{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin-top:6px;padding:6px 8px;border:1px solid var(--line);border-radius:12px;background:var(--surface,#fff)}
.ink-tools{display:flex;gap:2px;padding:2px;border-radius:9px;background:var(--surface-2)}
.ink-tools button{border:0;background:transparent;padding:5px 10px;border-radius:7px;font-size:13px;color:var(--ink)}
.ink-tools button[aria-pressed=true]{background:var(--surface);box-shadow:0 1px 2px rgb(0 0 0/15%);font-weight:700}
.ink-colors{display:flex;gap:5px}
.ink-bar .ink-color{flex:none;width:24px;min-width:0;height:24px;min-height:0;padding:0;border:2px solid #fff;border-radius:50%;background:var(--ink-color,#d22c2c);box-shadow:0 0 0 1px #0000004d}
.ink-bar .ink-color[aria-pressed=true]{box-shadow:0 0 0 2px var(--green)}
.ink-bar select{min-height:32px;padding:4px 8px;font-size:13px}
.ink-status{flex:1 1 auto;min-width:0;font-size:12px;color:var(--muted)}
.ink-status:empty{display:none}
.ink-done{margin-left:auto}
.score-ink{position:absolute;inset:0;z-index:3;overflow:visible;pointer-events:none}
.score-ink.drawing{pointer-events:auto;touch-action:none;cursor:crosshair}
.score-ink path{fill:none;stroke-linecap:round;stroke-linejoin:round}
.score-ink path.mark{opacity:.4;mix-blend-mode:multiply}
.score-ink text{font-family:inherit;font-weight:600}
.ink-text-input{position:absolute;z-index:4;min-width:160px;padding:3px 6px;border:1px solid var(--green);border-radius:6px;background:var(--surface);font-size:15px}
.tool-panel{position:fixed;right:16px;bottom:calc(var(--reader-bottom-height,0px) + 16px);z-index:40;display:flex;flex-direction:column;width:min(380px,calc(100vw - 24px));max-height:min(70dvh,560px);border:1px solid var(--line);border-radius:16px;background:var(--surface,#fff);box-shadow:0 18px 48px rgb(0 0 0/20%)}
.tool-panel-head{display:flex;align-items:center;justify-content:space-between;padding:10px 12px 6px 16px}
.tool-panel-head h3{margin:0;font-size:16px}
.tool-panel-body{display:grid;gap:10px;overflow:auto;padding:4px 16px 16px}
.tool-note{margin:0;font-size:12.5px;line-height:1.5;color:var(--muted)}
.tool-row{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.tool-field{display:inline-flex;align-items:center;gap:6px;font-size:13px}
.tool-field input[type=number]{width:64px}
.tool-status{font-size:13px;color:var(--muted)}
.tool-more summary{cursor:pointer;font-size:13px;color:var(--muted)}
.rec-go.on{border-color:#cf3434;background:#cf3434;color:#fff}
.rec-list{display:grid;gap:4px}
.rec-take{display:flex;align-items:center;gap:4px;padding:4px 6px;border:1px solid var(--line);border-radius:10px}
.rec-take button{min-width:32px}
.rec-name{flex:1;font-size:13.5px;font-weight:600}
.rec-name small{display:block;font-size:11.5px;font-weight:400;color:var(--muted)}
.tool-slider{display:grid;grid-template-columns:7.5em 1fr 3.6em;align-items:center;gap:6px;margin-top:6px;font-size:13px}
.tuner-face{display:grid;justify-items:center;gap:8px;padding:6px 0}
.tuner-note{font:700 44px/1 var(--serif,serif);color:var(--ink)}
.tuner-meter{position:relative;width:100%;height:26px;border-radius:13px;background:linear-gradient(90deg,var(--danger-soft),var(--surface-2) 40%,var(--accent-soft) 50%,var(--surface-2) 60%,var(--danger-soft))}
.tuner-center{position:absolute;top:3px;bottom:3px;left:50%;width:2px;margin-left:-1px;background:var(--accent)}
.tuner-needle{--cents:0;position:absolute;top:-3px;bottom:-3px;left:calc(50% + var(--cents) * 1%);width:6px;margin-left:-3px;border-radius:3px;background:#c0392b;transition:left .12s}
.tuner-meter.good .tuner-needle{background:#1f8a4d}
.tuner-cents{min-height:1.3em;font-size:13.5px;text-align:center;color:var(--muted)}
.tuner-strings{display:flex;flex-wrap:wrap;justify-content:center;gap:6px}
.tuner-string{min-width:52px;padding:6px 10px;border:1px solid var(--line);border-radius:10px;background:var(--surface,#fff);font-weight:700;color:var(--ink)}
.tuner-string.near{border-color:var(--danger)}
.tuner-string.good{border-color:var(--accent);background:var(--accent-soft)}
.metro-face{display:flex;align-items:center;justify-content:center;gap:20px;padding:2px 0}
.metro-bpm{display:grid;justify-items:center;min-width:3.6em}
.metro-bpm output{font:700 46px/1 var(--serif,serif);color:var(--ink);font-variant-numeric:tabular-nums}
.metro-bpm small{font-size:11.5px;letter-spacing:.08em;color:var(--muted)}
.metro-step{width:46px;height:46px;border:1px solid var(--line-strong,var(--line));border-radius:50%;background:var(--surface-2,#f3f5f3);color:var(--ink);font-size:24px;line-height:1}
.metro-slider{width:100%;accent-color:var(--accent,var(--green))}
.metro-dots{display:flex;justify-content:center;gap:10px;min-height:18px}
.metro-dots i{width:16px;height:16px;border:2px solid var(--line-strong,var(--line));border-radius:50%;transition:background .05s,border-color .05s}
.metro-dots i.accent{border-color:var(--accent,var(--green))}
.metro-dots i.on{border-color:var(--accent,var(--green));background:var(--accent,var(--green))}
.metro-go{min-width:7.5em}
.metro-go.on,.metro-go.on:hover:not(:disabled){border-color:var(--accent,var(--green));background:var(--accent,var(--green));color:var(--on-accent,#fff)}
/* The metronome's button shows its tempo while it clicks, and blinks on each beat. */
.tools-bar [data-tool=metronome]{position:relative}
.tools-bar [data-tool=metronome][data-bpm]::after{content:attr(data-bpm);position:absolute;top:-5px;right:-3px;min-width:22px;height:16px;padding:0 4px;border-radius:8px;background:var(--amber,#d9a521);color:var(--on-amber,#1d1a12);font-size:10px;font-weight:700;line-height:16px;text-align:center}
.tools-bar [data-tool=metronome].tick svg{animation:metro-tick .18s ease-out}
@keyframes metro-tick{from{transform:scale(1.25)}}
.wait-face{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;text-align:center}
.wait-face div{padding:8px 4px;border:1px solid var(--line);border-radius:10px}
.wait-face small{display:block;font-size:11.5px;color:var(--muted)}
.wait-face b{font-size:22px}
.wait-face.hit div:first-child{animation:wait-hit .5s}
.wait-face.miss div:nth-child(2){animation:wait-miss .5s}
@keyframes wait-hit{from{background:var(--accent-soft)}}
@keyframes wait-miss{from{background:var(--danger-soft)}}
.journal-head{display:flex;align-items:center;gap:16px}
.journal-ring{--pct:0;flex:none;display:grid;place-content:center;width:92px;height:92px;border-radius:50%;text-align:center;background:radial-gradient(closest-side,var(--surface,#fff) 76%,transparent 77%),conic-gradient(var(--green) calc(var(--pct) * 1%),#e3e9e5 0)}
.journal-ring b{font-size:20px}
.journal-ring small{font-size:10.5px;color:var(--muted)}
.journal-head dl{display:grid;gap:4px;margin:0}
.journal-head dl div{display:flex;gap:8px;font-size:13px}
.journal-head dt{min-width:4.5em;color:var(--muted)}
.journal-head dd{margin:0;font-weight:700}
.journal-week{display:grid;grid-template-columns:repeat(7,1fr);align-items:end;gap:6px;height:110px}
.journal-day{display:grid;grid-template-rows:1fr auto auto;height:100%;text-align:center;font-size:11px;color:var(--muted)}
.journal-day i{align-self:end;min-height:2px;border-radius:5px 5px 2px 2px;background:#b9d6c5}
.journal-day.today i{background:var(--green)}
.tool-panel-body h4{margin:4px 0 0;font-size:13.5px}
.journal-top{display:grid;gap:3px;margin:0;padding-left:20px;font-size:13.5px}
.journal-top small{margin-left:6px;color:var(--muted)}
.visual-panel{padding:4px 10px 6px;border-top:1px solid var(--line);background:var(--surface,#fff)}
.visual-bar{display:flex;align-items:center;gap:8px;font-size:13px}
.visual-note{flex:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:var(--muted)}
.visual-board svg{display:block;width:100%;max-height:150px}
.fingerboard-svg .fb-neck{fill:#3b2a1e}
.fingerboard-svg .fb-nut{fill:#e8dcc4}
.fingerboard-svg .fb-fret{stroke:#c9b48a;stroke-width:2}
.fingerboard-svg .fb-mark{stroke:#7d6548;stroke-width:1;stroke-dasharray:3 4}
.fingerboard-svg .fb-pos{fill:#8a8f8b;font-size:10px;text-anchor:middle}
.fingerboard-svg .fb-string{stroke:#e0d2b8}
.fingerboard-svg .fb-open{fill:#5d655f;font-size:12px;font-weight:700;text-anchor:end}
.fingerboard-svg .fb-note circle{fill:#f2c94c;stroke:#fff;stroke-width:2}
.fingerboard-svg .fb-note.open circle{fill:#fff;stroke:#f2c94c;stroke-width:3}
.fingerboard-svg .fb-note text{fill:#3b2a1e;font-size:10px;font-weight:700;text-anchor:middle}
.fingerboard-svg .fb-note .fb-finger{fill:#ffe9a8;font-size:11px}
@media(max-width:560px){.tool-panel{left:8px;right:8px;bottom:calc(var(--reader-bottom-height,0px) + 8px);width:auto}.tools-bar button{min-height:32px;padding:3px 10px 3px 7px;font-size:12px}.tool-slider{grid-template-columns:6.5em 1fr 3.4em}}
@media print{.tools-bar,.ink-bar,.bars-hint,.tool-panel,.visual-panel{display:none!important}}
/* The menu's long label gives way to a short one on a phone, so no tile wraps to three lines. */
.main-menu .menu-short{display:none}
@media(max-width:560px){.main-menu .menu-long{display:none}.main-menu .menu-short{display:inline}}
/* 운지 보기 → 코드: the song's chords as chord boxes in a sideways row; tap one for its next shape. */
.visual-mode{display:inline-flex;gap:2px;padding:2px;border:1px solid var(--line);border-radius:999px}
.visual-mode button{min-height:28px;padding:2px 11px;border:0;border-radius:999px;background:transparent;font-size:12.5px;font-weight:600;color:var(--muted)}
.visual-mode button[aria-pressed=true]{background:var(--green);color:var(--on-accent)}
.chord-row{display:flex;gap:8px;overflow-x:auto;padding:6px 2px 4px;scroll-snap-type:x proximity;scrollbar-width:thin}
.chord-card{flex:none;display:flex;flex-direction:column;align-items:center;width:108px;padding:4px 4px 2px;border:1px solid var(--line);border-radius:10px;background:var(--paper,#fff);scroll-snap-align:center;transition:border-color .15s,box-shadow .15s}
.chord-card.now{border-color:var(--green);box-shadow:0 0 0 2px var(--green-soft,#dcebe1)}
.chord-next,.chord-next:hover,.chord-next:active{min-height:0;padding:0;border:0;background:transparent;box-shadow:none;cursor:pointer}
.chord-next:focus-visible{outline:2px solid var(--green);outline-offset:2px;border-radius:6px}
.visual-board .chord-card svg{display:block;width:98px;max-height:none}
.chord-box .cb-name{font-size:14px;font-weight:700;fill:var(--ink)}
.chord-box .cb-fret,.chord-box .cb-string{stroke:var(--ink);stroke-width:1;opacity:.55}
.chord-box .cb-nut,.chord-box .cb-dot,.chord-box .cb-barre{fill:var(--ink)}
.chord-box .cb-finger{font-size:9px;font-weight:700;fill:var(--paper,#fff)}
.chord-box .cb-mark{font-size:10px;fill:var(--ink)}
.chord-box .cb-base{font-size:10px;fill:var(--muted)}
.chord-box .cb-strings{font-size:7.5px;letter-spacing:.5px;fill:var(--faint)}
.chord-sound{font-size:11px;color:var(--muted)}
.chord-ver{display:flex;align-items:center;gap:2px;font-size:11.5px;color:var(--muted)}
.chord-ver button{width:28px;min-height:26px;padding:0;border:0;background:transparent;font-size:17px;line-height:1;color:var(--ink)}
.chord-none{padding:28px 6px;font-size:15px}
.chord-empty{margin:10px 4px;font-size:13px;color:var(--muted)}
/* 반복: the button beside play, the 반복할 곳 sheet, the shaded bars with their handles, the long-press bar menu */
.repeat-toggle{display:inline-flex;align-items:center;gap:5px;min-height:34px;max-width:210px;padding:4px 11px;border:1px solid var(--line);border-radius:999px;background:var(--surface,#fff);color:var(--ink);font-size:13px;font-weight:600;white-space:nowrap;flex:0 1 auto;min-width:0}
.repeat-toggle svg{width:17px;height:17px;flex:none;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.repeat-toggle span{overflow:hidden;text-overflow:ellipsis}
.repeat-toggle.on{border-color:var(--green);background:var(--green-soft,#e3efe7);color:var(--green)}
.repeat-off{flex:none;width:28px;height:28px;min-height:28px;padding:0;border:0;border-radius:50%;background:transparent;color:var(--muted);font-size:13px}
.repeat-sheet{position:fixed;z-index:70;width:min(400px,calc(100vw - 16px));max-height:calc(100dvh - 120px);overflow:auto;padding:12px 14px 6px;border:1px solid var(--line);border-radius:16px;background:var(--surface,#fff);box-shadow:0 16px 40px rgb(0 0 0/13%)}
.repeat-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px;font-size:15px}
.repeat-head button{width:34px;min-height:34px;padding:0}
.repeat-chips{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:8px}
.repeat-chip{min-height:40px;max-width:100%;padding:6px 15px;border:1px solid var(--line);border-radius:999px;background:var(--paper,#fff);font-size:14px;font-weight:600;color:var(--ink);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.repeat-chip.on{border-color:var(--green);background:var(--green);color:var(--on-accent)}
.repeat-row{display:flex;align-items:center;flex-wrap:wrap;gap:8px;padding:10px 0;border-top:1px solid var(--line)}
.repeat-row>.button{min-height:42px;padding:8px 14px}
#repeat-a.on{border-color:var(--green);background:var(--green-soft,#e3efe7);color:var(--green)}
.repeat-hint{flex:1 1 160px;font-size:12.5px;color:var(--muted)}
.repeat-options{display:grid;gap:8px}
.repeat-options .check-label{min-height:36px}
.loop-shades{position:absolute;inset:0;z-index:2;pointer-events:none}
.loop-shade{position:absolute;border-radius:8px;background:color-mix(in srgb,var(--green) 11%,transparent);box-shadow:inset 0 0 0 2px color-mix(in srgb,var(--green) 50%,transparent)}
.loop-handle{position:absolute;width:26px;min-height:0;margin-left:-13px;padding:0;border:0;border-radius:0;background:transparent;pointer-events:auto;touch-action:none;cursor:ew-resize}
/* A thin line on the bar line (so the words beside it stay readable) with a round grip on top. */
.loop-handle::before{content:"";position:absolute;left:12px;top:0;bottom:0;width:3px;border-radius:2px;background:var(--green)}
.loop-handle::after{content:"";position:absolute;left:5px;top:-10px;width:17px;height:17px;border-radius:50%;background:var(--green);box-shadow:0 1px 4px rgb(0 0 0/20%)}
.bar-menu{position:fixed;z-index:75;display:grid;min-width:190px;padding:6px;border:1px solid var(--line);border-radius:12px;background:var(--surface,#fff);box-shadow:0 12px 32px rgb(0 0 0/13%)}
.bar-menu button{min-height:44px;padding:8px 14px;border:0;border-radius:8px;background:transparent;color:var(--ink);font-size:14.5px;text-align:left}
.bar-menu button:hover,.bar-menu button:focus-visible{background:var(--green-soft,#e3efe7)}
#notation{-webkit-touch-callout:none}
/* Between phone and wide screens the playback row is tight: the timeline may narrow, and while a repeat runs its pill stands in for the clock. */
@media(min-width:561px) and (max-width:1320px){.timeline{min-width:100px}.repeat-toggle{max-width:130px}body.repeating .playback-status{display:none}}
@media(max-width:380px){body.phone-controls .timeline{min-width:30px}}
@media(max-width:560px){
 .repeat-toggle{position:relative;width:36px;height:36px;padding:0;justify-content:center}.repeat-toggle span{display:none}
 .repeat-toggle.on{background:var(--green);border-color:var(--green);color:var(--on-accent)}
 .repeat-toggle[data-pass]:not([data-pass=""])::after{content:attr(data-pass);position:absolute;top:-5px;right:-5px;min-width:17px;height:17px;padding:0 4px;border-radius:9px;background:var(--amber);color:var(--on-amber);font-size:10.5px;font-weight:700;line-height:17px}
 .repeat-off{display:none}
 .repeat-sheet{left:0;right:0;top:auto;bottom:0;width:auto;max-height:80dvh;border-radius:18px 18px 0 0;padding-bottom:calc(10px + env(safe-area-inset-bottom))}
}
/* The accompaniment menu in parts (반주 · 연습 · 다른 곳에서 열기). */
.menu-heading{margin:4px 0 -4px;padding-top:10px;border-top:1px solid var(--line);font-size:12px;font-weight:700;color:var(--muted)}
.menu-heading+.practice-tools{border-top:0;padding-top:0;margin-top:0}
/* On a phone the practice tools sit in a grid, icon over name, with nothing to scroll (reader-sound.css counts the columns). */
@media(max-width:560px){
 .tools-bar{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;overflow:visible}
 .tools-bar button{flex-direction:column;justify-content:center;gap:2px;min-height:50px;padding:5px 2px;border-radius:12px;font-size:11px;line-height:1.2;white-space:normal;text-align:center;word-break:keep-all}
 .tools-bar svg{width:19px;height:19px}
}
/* The first paint. html.booting (index.html, before anything is drawn) lasts until the app draws the list:
   the server's copy of the list, written for search engines in another order and layout, stays out of sight
   behind a quiet spinner, so the page doesn't show one list and then flick to another. The intro is in place
   from the start (html.intro-closed when it was closed), and the chips come drawn by the server. */
html.booting #score-list>*,html.booting #library-view .pagination{visibility:hidden}
html.booting #score-list{position:relative}
html.booting #score-list::after{content:'';position:absolute;left:50%;top:50%;width:26px;height:26px;margin:-13px 0 0 -13px;border:3px solid var(--line,#dfe5e0);border-top-color:var(--accent);border-radius:50%;animation:boot-spin .8s linear infinite}
@keyframes boot-spin{to{transform:rotate(360deg)}}
html.intro-closed #home-intro{display:none}
#personal-library>*{animation:boot-fade .25s ease-out}
@keyframes boot-fade{from{opacity:0}}
@media(prefers-reduced-motion:reduce){#personal-library>*{animation:none}html.booting #score-list::after{animation-duration:2.4s}}
.score-picture{display:block;width:100%;height:auto;margin:0 auto 12px;background:#fff}
.score-picture:last-child{margin-bottom:0}
