:root{--ink:#203c35;--green:#204c40;--muted:#77857d;--line:#e3e8e0;--paper:#fff;--bg:#f5f7f2;--red:#bc7764;--soft:#edf2e8}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font-family:Inter,'Segoe UI',Arial,sans-serif;font-size:14px}button,input,select,textarea{font:inherit}button,a,input,summary,select{touch-action:manipulation}button{cursor:pointer;color:inherit}button{border:0;background:none}button:disabled{opacity:.35;cursor:default}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible{outline:3px solid #d2ab5f;outline-offset:4px}a{color:inherit;text-decoration:none}[hidden]{display:none!important}.topbar{height:100px;border-bottom:1px solid var(--line);display:flex;align-items:center;gap:24px;padding:0 5.5%}.brand{display:flex;gap:12px;align-items:center;font-size:27px;letter-spacing:-1.1px;font-weight:750}.brand-icon{width:44px;height:46px;border-radius:13px;background:var(--ink);color:white;display:grid;place-items:center;font:32px Georgia}.brand-soft{font-weight:400;color:#69816e}.brand small{display:block;font-size:8px;letter-spacing:2.7px;margin-top:3px;color:#7b887d}.private-badge{margin-left:auto;font-size:11px;background:#eaf0e4;border:1px solid #dce5d5;border-radius:20px;padding:8px 12px;color:#5c745b;display:flex;gap:7px;align-items:center}.private-badge span{width:5px;height:5px;background:#708967;border-radius:50%}.text-button{font-size:12px;color:#66786c;padding:5px 0}.topbar .text-button{margin-left:8px}main{max-width:1450px;margin:0 auto;padding:42px 5.5% 0}.intro{display:flex;justify-content:space-between;gap:24px;align-items:center;margin-bottom:34px}.eyebrow{font-size:9px;letter-spacing:2.2px;color:#7e8b79;font-weight:700}h1{font-family:Georgia,'Times New Roman',serif;font-size:46px;font-weight:400;letter-spacing:-1.8px;line-height:1.12;margin:11px 0 12px}.intro p{color:var(--muted);font-size:13px;margin:0;line-height:1.7}.button{padding:13px 18px;border-radius:7px;font-size:12px;font-weight:600;display:inline-flex;gap:10px;align-items:center;justify-content:center;white-space:nowrap;transition:background .15s,transform .15s}.button:active{transform:translateY(1px)}.primary{background:var(--green);color:white;box-shadow:0 3px 6px #224c4010}.primary:hover{background:#183d32}.button span{font-size:18px;font-weight:400}.workspace-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px}.segmented{display:flex;gap:3px;background:#e9eee5;border:1px solid #e3e9de;padding:4px;border-radius:8px}.segmented button{padding:9px 16px;border-radius:5px;font-size:11px;color:#798673}.segmented .selected{background:white;box-shadow:0 2px 4px #28442f0b;color:#244735;font-weight:650}.autosave{font-size:10px;color:#8b9688;display:flex;align-items:center;gap:7px}.autosave span{color:#718467}.workspace{display:grid;grid-template-columns:minmax(0,1fr) 262px;gap:22px;align-items:start}.score-card{min-width:0;background:#fff;border:1px solid var(--line);border-radius:12px;box-shadow:0 7px 25px #263e3210;overflow:hidden}.score-top{padding:24px 27px 4px;display:flex;align-items:center;justify-content:space-between;gap:14px}.overline{font-size:8px;color:#8a9988;font-weight:700;letter-spacing:1.5px}h2{margin:7px 0;font-family:Georgia,'Times New Roman',serif;font-size:25px;font-weight:400;letter-spacing:-.5px}.score-meta{display:flex;align-items:center;gap:8px;font-size:9px;color:#7a897a;white-space:nowrap}.score-meta>span{border:1px solid #e7ebe2;padding:6px 8px;border-radius:4px}.score-meta b{font-weight:500}.icon-button{font-size:23px;width:34px;height:34px;display:inline-grid;place-items:center;border-radius:6px}.icon-button:hover{background:#eff3e9}.stage{position:relative;background:#fff}canvas{display:block;width:100%;height:auto;cursor:crosshair;aspect-ratio:2/1}.count-overlay{position:absolute;inset:0;background:#ffffffed;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px}.count-overlay span{font-size:11px;letter-spacing:3px;color:#73856e}.count-overlay strong{font:100px Georgia;color:var(--green)}.score-footer{display:flex;align-items:center;justify-content:space-between;padding:0 27px 17px}.legend{display:flex;gap:20px;font-size:9px;color:#7c897a}.legend>span{display:flex;align-items:center;gap:6px}i.main-dot,i.harmony-dot{display:inline-block;flex-shrink:0;width:7px;height:7px;border-radius:50%;background:var(--green)}i.harmony-dot{background:var(--red)}.page-navigation{display:flex;align-items:center;gap:8px;font-size:9px;color:#8c9787}.page-navigation button{font-size:20px;width:22px;height:23px}.transport{background:#f9faf6;border-top:1px solid #e9eee4;padding:18px 27px}.timeline{display:flex;align-items:center;gap:12px;color:#7f8c7c;font-variant-numeric:tabular-nums;font-size:9px}.timeline input{flex:1}.transport-bottom{margin-top:15px;display:flex;align-items:center;justify-content:space-between;gap:12px}.transport-actions{display:flex;align-items:center;gap:10px}.play-button{background:var(--green);color:white;padding:11px 22px;min-width:124px;border-radius:6px;display:flex;align-items:center;justify-content:center;gap:10px;font-size:11px;box-shadow:0 2px 4px #18412b20}.play-button:hover{background:#163e32}.transport-actions .icon-button{color:#809079;font-size:22px}.transport-actions .icon-button[aria-pressed=true]{color:var(--green);background:#e5eddf}.position{font-size:10px;color:#6d7f66;font-variant-numeric:tabular-nums}.position span{margin:0 5px}.keyboard-hint{font-size:9px;color:#9ba394}kbd{font:9px inherit;border:1px solid #dde3d7;border-radius:3px;padding:2px 4px;background:#fff;margin-right:3px}input[type=range]{appearance:none;-webkit-appearance:none;width:100%;height:3px;background:#dfe7d8;border-radius:5px;cursor:pointer;accent-color:var(--green);margin:13px 0}input[type=range]::-webkit-slider-thumb{appearance:none;-webkit-appearance:none;background:var(--green);width:11px;height:11px;border-radius:50%;border:2px solid white;box-shadow:0 0 0 1px #b6c4ad}input[type=range]::-moz-range-thumb{background:var(--green);width:8px;height:8px;border:2px solid white;border-radius:50%}.volume-harmony::-webkit-slider-thumb{background:var(--red)!important}.control-card{background:#fff;border:1px solid var(--line);border-radius:10px;padding:22px}.card-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:24px}h3{font-weight:650;font-size:12px;margin:0}.mini-icon{font-size:19px;color:#9aa590}.voice-control{margin-bottom:13px}.voice-control>div{display:flex;align-items:center;justify-content:space-between}.voice-label{font-size:10px;display:flex;align-items:center;gap:8px;color:#647561}.sound-toggle{font-size:9px;border-radius:4px;background:#ecf2e7;color:#63855e;padding:4px 7px}.sound-toggle[aria-pressed=false]{background:#f1f2ee;color:#9b9d94}.divider{height:1px;background:#edf0e9;margin:18px 0}.control-label{display:flex;align-items:center;justify-content:space-between;font-size:10px;color:#65765f}.tempo-value{display:flex;align-items:center;color:#9aa491;font-size:9px;gap:3px}.tempo-value input{width:44px;border:0;background:#f3f6ee;border-radius:4px;color:#35542f;padding:5px;text-align:center;font-weight:650;appearance:textfield}.tempo-value input::-webkit-inner-spin-button{appearance:none}.range-labels{display:flex;align-items:center;justify-content:space-between;font-size:8px;color:#9ba592}.range-labels button{font-size:8px}.toggle-row{position:relative;display:flex;align-items:center;justify-content:space-between;cursor:pointer;font-size:10px;color:#6d7e64;margin-top:18px}.toggle-row input{position:absolute;right:0;opacity:0;width:30px;height:20px}.switch{width:28px;height:16px;border-radius:12px;background:#e0e6da;transition:background .2s;pointer-events:none}.switch:after{content:'';display:block;width:12px;height:12px;transform:translate(2px,2px);background:white;box-shadow:0 1px 3px #0001;border-radius:50%;transition:transform .2s}.toggle-row input:checked+.switch{background:#4b7055}.toggle-row input:checked+.switch:after{transform:translate(14px,2px)}.toggle-row input:focus-visible+.switch{outline:3px solid #d2ab5f;outline-offset:3px}.tip-card{margin-top:17px;border:1px solid #e1e7d9;border-radius:10px;background:#eef2e7;padding:20px 22px}.tip-icon{display:block;font-size:22px;color:#8d9d6c;margin-bottom:14px}.tip-card h3{font-family:Georgia,'Times New Roman',serif;font-size:17px;font-weight:400;letter-spacing:-.25px}.tip-card p{font-size:10px;color:#839071;line-height:1.9;margin-bottom:18px}.tip-bottom{font-size:7px;font-weight:650;letter-spacing:1.3px;color:#96a280}.bottom-note{display:flex;align-items:center;gap:14px;margin:24px 0 38px;color:#8d9a85}.bottom-note>span{font-size:26px;color:#9aaa8a}.bottom-note p{font-size:10px}.bottom-note strong{font-weight:500;color:#7b8b71}.bottom-note button{margin-left:auto;font-size:10px}footer{display:flex;justify-content:space-between;gap:20px;align-items:center;border-top:1px solid var(--line);padding:21px 5.5%;font-size:9px;color:#9aa48e}footer>span:first-child{font-weight:600;letter-spacing:.3px}.footer-note{font-weight:400;color:#afb6a5;letter-spacing:0;margin-left:8px}.record-panel{margin-top:17px}.record-panel .card-heading{margin-bottom:12px}.record-panel p,.record-status{font-size:10px;line-height:1.7;color:#89937f}.record-dot{width:7px;height:7px;background:var(--red);border-radius:50%}.check-row{display:flex;gap:8px;align-items:center;font-size:10px;color:#6d7e64;margin:14px 0}.check-row input{accent-color:var(--green)}.record-button{width:100%;background:#aa6051;color:white;margin:9px 0}.record-button:hover{background:#955143}.recording .record-button{background:#944a43}.record-status{margin-top:5px}.download-item{display:block;border:1px solid #d7e0cf;border-radius:5px;background:#f0f5ea;padding:10px;font-size:11px;margin-top:10px;color:#375f3c}.recording .private-badge span{background:#c46e5d;animation:pulse 1s infinite}@keyframes pulse{50%{opacity:.25}}dialog{border:1px solid var(--line);border-radius:16px;padding:0;color:var(--ink);width:min(760px,calc(100% - 28px));max-height:92vh;box-shadow:0 25px 90px #153c342e}dialog::backdrop{background:#15362d70;backdrop-filter:blur(5px)}.dialog-header{padding:25px 28px 18px;border-bottom:1px solid var(--line);display:flex;justify-content:space-between;align-items:center;gap:15px;margin:0}.dialog-header h2{font-size:27px}.dialog-content{padding:22px 28px}.editor-meta{display:grid;grid-template-columns:1fr 80px 90px;gap:15px;margin-bottom:22px}.editor-meta label{font-size:11px;color:#7c8a74;display:flex;flex-direction:column;gap:8px}.editor-meta input,.editor-meta select{min-width:0;border:1px solid #dce3d5;background:#f9fbf5;border-radius:6px;padding:10px;color:var(--ink)}.input-heading{display:flex;justify-content:space-between;align-items:center;font-size:11px;color:#7d8a75;margin-bottom:9px}.upload-button{color:var(--green);cursor:pointer;padding:7px 10px;border:1px solid #dbe4d3;border-radius:5px;font-weight:600}textarea{width:100%;height:230px;resize:vertical;border:1px solid #dce3d5;border-radius:7px;padding:14px;background:#fbfcf8;color:#365440;font:11px/1.9 ui-monospace,SFMono-Regular,Consolas,monospace}details{font-size:11px;line-height:1.8;color:#7b8973;margin-top:15px}summary{cursor:pointer;color:#537048}details p{margin:10px 0}.error{font-size:12px;color:#ac4c3f;line-height:1.7;min-height:20px}.dialog-actions{display:flex;gap:10px;align-items:center;justify-content:flex-end;margin-top:14px}.dialog-actions>.text-button{margin-right:auto;font-size:11px}.subtle{background:#edf2e7;color:#688059}.toast{position:fixed;bottom:25px;left:50%;transform:translateX(-50%);max-width:90%;background:var(--ink);color:white;border-radius:8px;box-shadow:0 4px 30px #0002;padding:14px 20px;font-size:12px;z-index:20}.help-content{font-size:13px;line-height:1.9;color:#6d7d65}.help-content ol{padding-left:20px}.help-content li{padding-left:7px;margin-bottom:16px}.help-content b{color:#3c5b34}.help-tip{padding:16px;background:#f0f4e9;border-radius:8px;font-size:12px}.stage:fullscreen{display:flex;align-items:center;background:#fff}.stage:fullscreen canvas{width:100%;height:100%;object-fit:contain}.stage:fullscreen:after{content:'Esc để trở lại · Space để phát / tạm dừng';position:absolute;bottom:10px;left:50%;transform:translateX(-50%);font:11px Arial;color:#8c9984;pointer-events:none}
@media(min-width:1500px){main{padding-top:50px}}@media(max-width:1100px){.workspace{grid-template-columns:minmax(0,1fr) 230px;gap:15px}main{padding:32px 4% 0}.topbar{padding:0 4%}.control-card{padding:18px}.score-top{padding:20px 20px 4px}.score-footer,.transport{padding-left:20px;padding-right:20px}.keyboard-hint{display:none}.legend{gap:12px}.intro h1{font-size:40px}.score-meta{gap:4px}.score-meta>span{padding:5px}.score-top h2{font-size:23px}.overline{font-size:7px}}@media(max-width:800px){.workspace{grid-template-columns:1fr}aside{display:grid;grid-template-columns:1fr 1fr;gap:15px}.tip-card,.record-panel{margin:0}.control-card{padding:20px}.intro{margin-bottom:25px}.topbar{height:80px}.score-top{padding:20px 24px 5px}.score-footer{padding:0 24px 18px}.transport{padding:18px 24px}.intro p{font-size:12px}footer{flex-wrap:wrap}.overline{font-size:8px}}@media(max-width:520px){.topbar{gap:15px;padding:0 5%;height:75px}.brand{font-size:23px;gap:9px}.brand-icon{width:35px;height:38px;font-size:27px;border-radius:10px}.brand small{font-size:6px;letter-spacing:2px}.private-badge{font-size:8px;padding:6px 8px;gap:4px}.topbar>.text-button{display:none}main{padding:30px 4% 0}.intro{align-items:flex-start;gap:10px;flex-wrap:wrap}.intro h1{font-size:36px}.eyebrow{font-size:8px;letter-spacing:1.5px}.intro p{max-width:290px;font-size:11px}.intro .button{padding:10px 13px;font-size:10px;margin-top:8px}.workspace-heading{gap:5px}.segmented button{font-size:10px;padding:8px 10px}.autosave{font-size:7px;gap:4px}.score-top{padding:16px 15px 6px}.score-top h2{font-size:22px}.overline{font-size:6px;letter-spacing:1px}.score-meta{gap:3px;font-size:8px}.score-meta .icon-button{width:22px;font-size:20px}.score-footer{padding:7px 15px 14px}.legend{gap:10px;font-size:7px}.page-navigation{gap:2px;font-size:8px}.transport{padding:13px 15px}.transport-bottom{gap:7px}.transport-actions{gap:6px}.play-button{padding:10px 15px;min-width:105px}.position{font-size:8px}.transport-actions .icon-button{width:26px}aside{grid-template-columns:1fr 1fr;gap:10px}.control-card,.tip-card{padding:17px 14px}.voice-label{font-size:9px;gap:5px}.control-card h3{font-size:11px}.tip-card h3{font-size:16px}.tip-card p{font-size:10px}.tip-bottom{font-size:6px}.bottom-note{gap:10px;margin:20px 0 27px}.bottom-note p{font-size:9px;max-width:230px;line-height:1.8}.bottom-note button{font-size:8px;white-space:nowrap}footer{font-size:8px;padding:18px 5%;gap:10px}.dialog-header,.dialog-content{padding:20px}.editor-meta{grid-template-columns:1fr 60px 70px;gap:8px}.editor-meta input,.editor-meta select{padding:8px}.dialog-actions{flex-wrap:wrap;gap:8px}.dialog-actions>.text-button{width:100%;text-align:left}.dialog-actions .button{font-size:10px;padding:11px 13px}textarea{font-size:9px;height:220px}.help-content{font-size:12px}.check-row{font-size:9px;gap:4px}.record-panel p,.record-status{font-size:9px}.record-button{font-size:10px;padding:12px 7px}}
.camera-preview{position:absolute;bottom:2%;right:3%;width:17%;aspect-ratio:16/9;object-fit:cover;border-radius:8px;box-shadow:0 2px 12px #163e352b;border:2px solid white;pointer-events:none;z-index:2}
.song-picker-bar{display:flex;align-items:center;gap:12px;margin:-10px 0 25px;padding:14px 16px;background:#edf2e8;border:1px solid #e0e8d8;border-radius:9px}.song-picker-bar label{font-size:11px;font-weight:650;color:#73836b;white-space:nowrap}.song-picker-bar select{border:1px solid #d9e3d1;border-radius:6px;background:white;color:#345838;padding:10px 12px;font-size:11px;min-width:0;max-width:100%}#songPicker{flex:1}#sectionJump{flex:1}.song-credits{font-size:9px;color:#8b9783;margin:6px 0;line-height:1.6}.current-section{color:#7f956a;font-size:9px;margin:4px 0 0}.score-top{align-items:flex-start}.score-meta{padding-top:10px}.legend{flex-wrap:wrap;gap:12px}.song-resources{margin-top:20px;border:1px solid #e1e7db;background:#fff;border-radius:10px;padding:18px 22px;display:flex;align-items:center;gap:25px;justify-content:space-between}.song-resources h3{font-size:11px}.song-resources p{font-size:10px;color:#8a9780;line-height:1.8;max-width:650px;margin-bottom:0}.resource-links{display:flex;gap:8px;flex-wrap:wrap;flex-shrink:0}.resource-links a{padding:8px 10px;background:#eff4e8;color:#66804f;font-size:10px;border-radius:5px;border:1px solid #e1e9d7}.resource-links a:hover{background:#e3ecd9}.camera-preview{width:12%;bottom:1%;right:1%;aspect-ratio:16/9}
@media(max-width:1100px){.song-resources{align-items:flex-start;flex-direction:column;gap:12px}.song-picker-bar{flex-wrap:wrap}.song-picker-bar select{font-size:10px}}@media(max-width:520px){.song-picker-bar{gap:8px;padding:12px;margin-top:-5px}.song-picker-bar label{font-size:10px}#songPicker{flex-basis:80%}#sectionJump{flex-basis:100%}.score-top h2{font-size:20px}.song-credits{font-size:7px}.current-section{font-size:7px}.legend{font-size:7px;gap:9px}.song-resources{padding:15px}.resource-links a{font-size:9px}.voice-control{margin-bottom:16px}}
@font-face{font-family:'Song Song Title';src:url('assets/fonts/song-song-title.woff') format('woff');font-style:normal;font-weight:700;font-display:swap}#songTitle{font-family:'Song Song Title',Arial,sans-serif;font-weight:700;font-style:normal;font-synthesis:none;letter-spacing:0;line-height:1.35}
.instrument-icon{display:block;object-fit:contain;flex-shrink:0}.voice-label .instrument-icon{width:64px;height:64px}.legend .instrument-icon{width:36px;height:36px}.legend{align-items:center}.voice-control:has(.instrument-icon)>div{min-height:64px}@media(max-width:520px){.voice-label .instrument-icon{width:56px;height:56px}.voice-control:has(.instrument-icon)>div{min-height:56px}.legend .instrument-icon{width:30px;height:30px}}

.master-volume output{font-weight:750;font-size:13px;color:#234b37}.master-volume .control-label{font-weight:700}.master-volume .range-labels{margin-top:6px}

.body-guide h4{font:700 12px/1.4 Arial,sans-serif;color:#526847;margin:12px 0 5px}
.body-pattern{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;list-style:none;margin:0;padding:0}
.body-pattern li{display:grid;justify-items:center;gap:2px;border-radius:6px;background:#fafbf5;padding:3px 2px;color:#65765a;font:700 11px/1.3 Arial,sans-serif}
.body-pattern img{display:block;width:100%;height:auto;max-width:54px;aspect-ratio:1}
.body-pattern .pattern-measure-start{border-left:2px solid #a6b59a}
@font-face{font-family:'Song Song Notation';src:url('assets/fonts/song-song-notation.woff') format('woff');font-style:normal;font-weight:400;font-display:swap}
#scoreView{position:fixed;inset:0;margin:0;width:100%;height:100%;max-width:none;max-height:none;border:0;border-radius:0;background:#fff}
#scoreView .stage{width:100%;height:100%;display:flex;align-items:center;outline:none}
#scoreView canvas{width:100%;height:100%;object-fit:contain}
#scoreView form{position:absolute;top:12px;right:14px;z-index:1}
body:has(#scoreView[open]){overflow:hidden}
