@font-face{font-family:BookRoman;src:url('fonts/BookRoman.otf')}*{box-sizing:border-box}body{margin:0;background:#f5f7fb;color:#15253b;font:16px/1.55 system-ui,-apple-system,'Segoe UI',sans-serif}main{max-width:1340px;margin:auto;padding:24px 30px 45px}button,input,select{font:inherit}button,.file-button{border:1px solid #ccd6e2;background:white;border-radius:9px;padding:10px 15px;color:#1a304b;cursor:pointer;min-height:44px;font-size:14px;font-weight:600;transition:background .15s}button:hover,.file-button:hover{background:#eaf2fc}button:disabled{opacity:.45;cursor:default}button:focus-visible,select:focus-visible,input:focus-visible,summary:focus-visible{outline:3px solid #76adff;outline-offset:2px}input,select{border:1px solid #bac8d9;padding:10px;border-radius:8px;background:#fff;color:#182b43;max-width:100%}input[type=checkbox]{accent-color:#005ac8;width:17px;height:17px;flex-shrink:0}input[type=number]{width:70px}a{color:#005ac8}h1,h2,h3,p{margin-top:0}h1{font-size:38px;line-height:1.2;letter-spacing:-1px;margin:8px 0}h2{font-size:20px;line-height:1.3;margin:0 0 8px}h3{font-size:17px}.site-brand{text-align:center;border-bottom:1px solid #dce3ee;padding-bottom:18px;display:flex;align-items:center;flex-direction:column;gap:8px}.brand-home{color:#005ac8;font-size:clamp(27px,5.5vw,44px);font-weight:850;letter-spacing:.045em;text-decoration:none}.home-link{font-size:13px;border:1px solid #d5e3f5;border-radius:25px;padding:7px 15px;text-decoration:none}.heading{display:flex;justify-content:space-between;align-items:center;margin:30px 0 15px}.heading p{margin:0;color:#465b74;font-size:19px}.eyebrow{font-size:11px;letter-spacing:1.8px;font-weight:750;color:#526b88}.badge{font-size:12px;border-radius:30px;background:#e7effb;color:#005ac8;padding:6px 12px;white-space:nowrap}.intro{max-width:920px;font-size:17px;line-height:1.7;margin:0 0 25px}.setup{display:flex;align-items:end;gap:15px;background:#eaf0f8;border:1px solid #dce5f0;padding:20px;border-radius:14px 14px 0 0}.setup label{display:flex;flex-direction:column;gap:5px;font-size:13px;font-weight:650}.setup .wide{flex:1}.setup select{min-width:110px}.player{display:flex;align-items:center;gap:12px;flex-wrap:wrap;background:white;border:1px solid #dce5f0;border-top:0;padding:17px 20px;border-radius:0 0 14px 14px;margin-bottom:24px}.primary{background:#005ac8;color:white;border-color:#005ac8;min-width:112px}.primary:hover{background:#004ba7}.outline{color:#005ac8;border-color:#86b0e9;background:#f9fcff}.player>label{font-size:12px;font-weight:600;display:flex;flex-direction:column;gap:2px}.tempo>span{display:flex;align-items:center;gap:5px}.toggles{display:flex;align-items:center;gap:7px 15px;flex:1;flex-wrap:wrap}.toggles label,.view-controls label{display:flex;gap:5px;align-items:center;font-size:13px;white-space:nowrap}#play-status{width:100%;font-size:12px;color:#435a74;min-height:18px}.workspace{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:23px;align-items:start}.sheet{min-width:0;background:#fff;border:1px solid #d8e1ed;border-radius:14px;overflow:hidden}.sheet-head{display:flex;justify-content:space-between;align-items:center;padding:23px 23px 15px;gap:12px}.sheet-head h2{font-size:22px;margin:7px 0 0}.view-controls{display:flex;gap:14px;flex-wrap:wrap;padding:0 23px 16px;border-bottom:1px solid #edf0f5}#score{padding:8px 20px 16px}.bar{border:1px solid transparent;border-radius:8px;margin-top:9px;min-width:0;position:relative}.bar.active-bar{border-color:#b5cee9}.bar-label{display:flex;justify-content:space-between;color:#5e728a;font-size:11px;padding:6px 9px}.bar-scroll{overflow-x:auto;scrollbar-width:thin;scroll-padding:10px}.bar svg{display:block;min-width:100%;height:auto;max-height:275px}.bar.editable .event{cursor:pointer}.event:hover .hit{fill:#eff6ff}.event.playing .hit{fill:#cce4ff}.event.playing{color:#005ac8}.event:focus{outline:none}.event:focus .hit{stroke:#005ac8;stroke-width:1}.sheet-actions{display:flex;gap:7px;flex-wrap:wrap;border-top:1px solid #edf0f5;padding:15px 20px}.sheet-actions button{font-size:12px;padding:7px 11px;min-height:38px}#validation{padding:0 23px 12px;font-size:13px;color:#287045}#validation.bad{color:#a03c12}.catalog{background:#edf2f9;padding:20px;border:1px solid #dce4ef;border-radius:14px}.catalog-head{display:flex;justify-content:space-between;align-items:center}.catalog-head span{font-size:12px;color:#536b86}.small{font-size:13px;color:#496078}.pattern{display:block;width:100%;text-align:left;margin:10px 0;background:white;padding:14px}.pattern.active{border:2px solid #005ac8;background:#f6faff;padding:13px}.pattern strong{display:block;font-size:14px;line-height:1.45}.pattern small{display:block;color:#596d84;font-size:11px;margin-top:6px;font-weight:400}.pattern .mini{font-family:'Times New Roman',BookRoman,serif;font-size:20px;letter-spacing:2px;margin-top:5px;color:#1b2a3c}.source-panel{font-size:12px;margin-top:18px;border-top:1px solid #cdd9e8;padding-top:14px}.source-panel p{margin:8px 0}.source-panel a{display:block;margin:6px 0;line-height:1.45}.source-panel button{width:100%;font-size:12px}.editor-heading{display:flex;justify-content:space-between;gap:15px;flex-wrap:wrap;font-size:13px;margin-bottom:14px}.editor-heading span{color:#526b86}#editor{background:#f1f6fd;border-top:1px solid #d9e5f5;padding:20px}.editor-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.editor-grid label{font-size:12px;display:flex;flex-direction:column;gap:5px}.editor-grid select{width:100%;font-size:12px}.edit-buttons{display:flex;flex-wrap:wrap;gap:7px;margin-top:14px}.edit-buttons button{font-size:12px;padding:8px 11px}.edit-buttons button.on{background:#005ac8;color:white}.hint{font-size:12px;color:#48627e;margin:13px 0 0}.saved-section{margin-top:28px;border:1px solid #dce4ef;padding:22px;border-radius:14px;background:white}.save-actions{display:flex;gap:10px;flex-wrap:wrap}.file-button{display:inline-flex;align-items:center}.file-button input{display:none}.guide{background:white;border:1px solid #dce4ef;border-radius:14px;margin:20px 0;padding:18px 22px}.guide summary{cursor:pointer;font-weight:650}.guide-grid{display:grid;grid-template-columns:1fr 1fr;gap:30px;padding-top:20px}.guide p{font-size:14px}footer{text-align:center;border-top:1px solid #dce3ee;margin-top:30px;padding-top:22px;font-size:13px;color:#4d637d}footer .brand-home{font-size:28px}footer nav{display:flex;justify-content:center;gap:20px;flex-wrap:wrap;margin:15px}footer details{max-width:860px;margin:20px auto 0;text-align:left}footer summary{cursor:pointer;text-align:center}#all-sources{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:15px}#all-sources p{font-size:12px}#toast{position:fixed;bottom:25px;left:50%;transform:translateX(-50%);max-width:90%;padding:12px 22px;border-radius:12px;background:#18375a;color:white;box-shadow:0 4px 24px #14345430;z-index:30;display:none;font-size:14px}#toast.visible{display:block}[hidden]{display:none!important}@media(max-width:1000px){.workspace{grid-template-columns:minmax(0,1fr) 255px}.editor-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.setup{flex-wrap:wrap}.setup .wide{min-width:230px}.player{gap:10px}.toggles{flex-basis:100%}}@media(max-width:720px){main{padding:16px 12px 30px}.heading{margin-top:24px;gap:10px}h1{font-size:32px}.heading p{font-size:16px}.intro{font-size:15px}.workspace{display:flex;flex-direction:column}.sheet,.catalog{width:100%}.catalog #patterns{display:grid;grid-template-columns:1fr 1fr;gap:8px}.pattern{margin:0}.catalog-head{margin-bottom:6px}.setup{padding:15px;gap:10px}.setup label{flex:1}.setup .wide{flex-basis:100%;min-width:0}.setup #new{width:100%}.sheet-head{padding:17px}.sheet-head h2{font-size:18px}.sheet-head>button{font-size:12px;white-space:nowrap}.view-controls{padding:0 15px 12px;gap:8px}#score{padding:6px 7px}.bar svg{min-width:550px}.bar-scroll{overflow-x:auto}.guide-grid,#all-sources{grid-template-columns:1fr}.save-actions>*{flex:1}.save-actions select{flex-basis:100%}.bar-label{font-size:12px}#editor{padding:14px}}@media print{body{background:white;color:black}main{max-width:none;padding:0}.site-brand,.heading,.intro,.setup,.player,.catalog,.view-controls,.sheet-actions,#editor,.saved-section,.guide,footer,#toast,.sheet-head button,#validation{display:none!important}.workspace{display:block}.sheet{border:0}.sheet-head{padding:10px 0}.sheet-head .eyebrow{display:none}#score{padding:0}.bar{border:0!important;break-inside:avoid}.bar svg{max-width:100%;min-width:0;width:100%;max-height:none}.hit{fill:transparent!important}.bar-label{color:black}.bar-scroll{overflow:visible}}

.tempo #tempo-slider{width:145px;min-height:20px;padding:0;accent-color:var(--blue,#005ac8)}.apply-label{display:grid;gap:6px;font-size:12px;color:#536277;margin:14px 0}.apply-label select{width:100%}
#notation-dialog{width:min(1120px,96vw);max-height:94dvh;padding:0;border:1px solid #b8cce5;border-radius:18px;color:#15253b;box-shadow:0 24px 100px #102d5355;overflow:auto;background:#f1f6fd}#notation-dialog::backdrop{background:#10253f99;backdrop-filter:blur(3px)}.notation-top{position:sticky;top:0;z-index:4;background:#fff;display:flex;align-items:center;justify-content:space-between;gap:20px;padding:18px 24px;border-bottom:1px solid #d5e2f1}.notation-top h2{font-size:24px;margin:3px 0 0}.notation-top button{background:#005ac8;color:#fff;min-width:100px}#editor{border:0;padding:20px 24px}.notation-nav{display:flex;justify-content:space-between;gap:12px;align-items:center;margin-bottom:14px}.notation-nav>div{display:flex;gap:8px}#editor-score{background:#fff;border:1px solid #ccdbed;border-radius:10px}#editor-score svg{display:block;margin:auto;min-width:550px;max-height:260px}#editor-score .event{cursor:pointer}.edit-step{margin-top:16px;background:#fff;border:1px solid #d8e3f0;padding:16px;border-radius:12px}.edit-step h3{font-size:15px;margin:0 0 12px}.grid-setting{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap;font-size:13px;color:#3a5470}.grid-setting label{display:flex;align-items:center;gap:8px}#pulse-grid{display:flex;flex-wrap:wrap;gap:6px;margin-top:14px}#pulse-grid button{min-width:54px;font-weight:500;padding:9px;background:#f5f8fc}#pulse-grid .strong-pulse{font-weight:800;border-color:#80a6d3;background:#e9f1fc}#editor button.on{background:#005ac8;color:#fff;border-color:#005ac8}#selection{margin:12px 0 0;font-size:13px;color:#0053b7;font-weight:650}.length-buttons{display:grid;grid-template-columns:repeat(6,1fr);gap:8px}.length-buttons button{padding:9px 5px}.length-buttons strong{display:block;font-size:22px}.length-buttons span{display:block;font-size:11px;font-weight:500}#editor .editor-grid{grid-template-columns:1fr 1fr;gap:0 16px}#editor .edit-step select,#editor .edit-step input{width:100%;font-size:15px}.direction-buttons{display:flex;flex-wrap:wrap;gap:7px}.direction-buttons button{flex:1;padding:10px}.edit-step #auto-syllable{margin-top:8px;font-size:12px}.advanced-edit{margin:20px 0}.advanced-edit summary{cursor:pointer;font-size:14px}.notation-bottom{display:flex;align-items:center;gap:9px;flex-wrap:wrap;padding-top:16px;border-top:1px solid #d2dfee}#editor-status{flex:1;color:#287045;font-size:14px}#editor-play{background:#005ac8;color:#fff}#toast{z-index:100}body:has(#notation-dialog[open]){overflow:hidden}@media(max-width:600px){#notation-dialog{width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;border-radius:0;border:0;margin:0}.notation-top{padding:12px 14px}#editor{padding:12px}#editor .editor-grid{grid-template-columns:1fr}.length-buttons{grid-template-columns:repeat(3,1fr)}.edit-step{padding:12px}.notation-nav{flex-wrap:wrap}.notation-nav button{font-size:12px}.notation-bottom{position:sticky;bottom:-12px;background:#f1f6fd;padding:12px 0}#editor-status{flex-basis:100%}}@media print{#notation-dialog{display:none!important}}

/* Compact editor: controls and score stay together in one viewport. */
#notation-dialog{width:min(1180px,98vw);height:min(710px,96dvh);max-height:96dvh;overflow:hidden;display:none;flex-direction:column}
#notation-dialog[open]{display:flex}.notation-top{position:static;flex-shrink:0;padding:10px 18px;min-height:58px}.notation-top h2{font-size:20px}.notation-top .eyebrow{font-size:9px}.notation-top button{min-height:36px;padding:6px 14px}
#editor{position:relative;min-height:0;flex:1;display:flex;flex-direction:column;gap:9px;padding:10px 16px;overflow:hidden}.notation-nav{margin:0;flex-shrink:0;font-size:13px}.notation-nav select,.notation-nav button{min-height:34px;padding:5px 10px;font-size:12px}.editor-controls{flex-shrink:0}.position-length{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(0,1fr);gap:10px}
#editor .edit-step{margin:0;padding:10px;border-radius:8px;min-width:0}#editor .edit-step h3{font-size:12px;margin:0 0 7px}#editor .hint{display:none}.grid-setting>span{display:none}.grid-setting{font-size:11px}.grid-setting label{gap:5px}#editor .grid-setting select{width:auto;font-size:11px;padding:3px 6px;min-height:27px}#pulse-grid{margin:7px 0 0;gap:4px;max-height:74px;overflow-y:auto}#pulse-grid button{min-width:36px;min-height:30px;font-size:12px;padding:4px 7px}#selection{font-size:11px;margin-top:5px}
.length-buttons{display:flex;gap:5px;flex-wrap:wrap}.length-buttons button{flex:1;min-width:37px;min-height:37px;padding:5px 7px}.length-buttons strong{font-size:16px}.length-buttons span{display:none}
#editor .editor-grid{grid-template-columns:1.25fr .85fr 1.15fr 1.2fr;gap:10px;margin-top:9px}#editor .edit-step input,#editor .edit-step select{font-size:12px;padding:6px 7px;min-height:34px}.direction-buttons{gap:4px}.direction-buttons button{font-size:12px;min-height:34px;padding:5px;white-space:nowrap}.direction-buttons [data-direction=auto]{flex-basis:100%;min-height:27px;font-size:11px}#tie{width:100%;font-size:11px;min-height:34px;padding:6px}#editor #auto-syllable{margin-top:4px;font-size:10px;padding:3px 7px;min-height:26px}
.advanced-edit{margin:0;flex-shrink:0;font-size:11px}.advanced-edit summary{font-size:11px}.advanced-edit[open] .edit-buttons{position:absolute;z-index:6;left:16px;right:16px;background:#fff;border:1px solid #b8cce5;padding:12px;border-radius:9px;box-shadow:0 8px 24px #15345430;margin-top:5px;max-height:150px;overflow:auto}
#editor-score{flex:1;min-height:110px;display:flex;align-items:center;overflow:auto}#editor-score svg{flex-shrink:0;min-width:0;width:auto;max-width:100%;height:100%;max-height:246px;margin:auto}.notation-bottom{position:static;margin:0;padding-top:7px;flex-shrink:0;gap:7px}#editor-status{font-size:12px}.notation-bottom button{min-height:34px;padding:5px 12px;font-size:12px}
@media(max-width:720px){#notation-dialog{width:100vw;height:100dvh;max-height:100dvh;border-radius:0;margin:0;max-width:100vw}.notation-top{padding:8px 12px;min-height:48px}.notation-top .eyebrow{display:none}.notation-top h2{font-size:18px}#editor{padding:8px;gap:7px}.position-length{grid-template-columns:1fr}.position-length .edit-step{padding:7px}#editor .editor-grid{grid-template-columns:1fr 1fr;gap:6px;margin-top:6px}#editor .edit-step h3{margin-bottom:5px}.length-buttons{flex-wrap:nowrap}.length-buttons button{min-height:29px}.length-buttons strong{font-size:14px}.direction-buttons [data-direction=auto]{flex-basis:auto}#pulse-grid{max-height:64px}#pulse-grid button{min-width:32px;min-height:27px;padding:3px 5px}.grid-setting{position:absolute;right:17px;margin-top:-24px}.grid-setting label{font-size:0}#selection{margin-top:4px}#editor-score{min-height:90px}#editor-status{flex-basis:auto;font-size:11px}.notation-nav{flex-wrap:nowrap;gap:5px}.notation-nav>div{gap:4px}.notation-nav button{padding:4px 7px;font-size:11px}.advanced-edit[open] .edit-buttons{left:8px;right:8px}}
@media(max-height:650px) and (min-width:721px){#notation-dialog{height:98dvh;max-height:98dvh}.notation-top{min-height:40px;padding:5px 14px}.notation-top .eyebrow{display:none}.notation-top h2{font-size:18px}#editor{gap:5px;padding:6px 12px}#editor .edit-step{padding:6px}#editor .editor-grid{margin-top:5px;gap:6px}.direction-buttons [data-direction=auto]{flex-basis:auto}#editor-score{min-height:80px}#pulse-grid{max-height:58px}#editor #auto-syllable{min-height:22px}.notation-nav select,.notation-nav button{min-height:28px}.notation-bottom{padding-top:4px}}

.notation-bottom .editor-tempo-label,.notation-bottom .editor-chord-label{display:flex;align-items:center;gap:5px;font-size:12px;white-space:nowrap}.notation-bottom input[type=number]{width:60px;min-height:33px;padding:5px}.notation-bottom select{min-height:33px;padding:5px 8px;font-size:13px}#editor-tempo-slider{width:105px;min-width:65px;padding:0;accent-color:#005ac8}#editor-tempo-unit{font-size:11px}#editor-status{margin-left:auto;flex:1;text-align:right}#editor-play{white-space:nowrap}@media(max-width:850px){#editor-tempo-slider{width:75px}#editor-status{display:none}.notation-bottom{justify-content:space-between}}@media(max-width:480px){.notation-bottom{gap:5px}#editor-tempo-slider{flex:1;width:60px}.notation-bottom .editor-chord-label{margin-left:auto}#editor-play{flex:1}.notation-bottom #editor-stop{min-width:80px}}
/* Match beat-position and note-length controls. */
.position-length{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
#editor .position-length>.edit-step{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:28px auto 18px;align-content:start;gap:6px 8px;padding:10px}
#editor .position-length h3{grid-column:1;grid-row:1;align-self:center;font-size:13px;margin:0;white-space:nowrap}
.position-length .grid-setting{grid-column:2;grid-row:1;position:static;margin:0;align-self:center;font-size:12px}.position-length .grid-setting label{font-size:12px}
#pulse-grid,.position-length .length-buttons{grid-column:1 / -1;grid-row:2;display:flex;align-items:start;flex-wrap:wrap;gap:6px;margin:0;min-height:36px}
#pulse-grid button,.position-length .length-buttons button{flex:0 0 auto;min-width:42px;min-height:36px;font-size:14px;line-height:20px;padding:7px 9px;font-weight:600;border-radius:7px}
.position-length .length-buttons strong{font-size:14px;font-weight:600;line-height:20px}
#selection{grid-column:1 / -1;grid-row:3;font-size:11px;margin:0;align-self:center}
@media(max-width:720px){.position-length{grid-template-columns:1fr}#editor .position-length>.edit-step{padding:6px 8px;grid-template-rows:24px auto auto;gap:4px 8px}#pulse-grid button,.position-length .length-buttons button{min-width:38px;min-height:30px;padding:4px 7px}#pulse-grid,.position-length .length-buttons{min-height:30px;gap:4px}#editor .position-length h3{font-size:12px}}

.position-length .length-buttons button{display:inline-flex;align-items:center;justify-content:center;height:36px;padding:1px 6px;min-width:42px}.length-buttons .duration-icon{display:block;width:32px;height:32px;pointer-events:none}@media(max-width:720px){.position-length .length-buttons button{height:32px;min-height:32px;min-width:38px;padding:0 4px}.length-buttons .duration-icon{height:30px;width:30px}}

/* Viewing stays read-only; composition and automatic saving live in image mode. */
#bar-total{display:flex;align-items:center;min-height:42px;padding:8px 10px;background:#f1f5fb;border-radius:6px;color:#334761}#title[readonly]{background:#f1f5fb;border-color:transparent;cursor:default}
.editor-header-actions{display:flex;align-items:center;gap:8px}.notation-nav .editor-name{display:flex;flex:1;min-width:0;align-items:center;gap:7px}.editor-name input{width:100%;min-width:60px;max-width:360px;padding:5px 8px;min-height:32px;font-size:13px}.notation-nav>div{display:flex}#autosave-status{font-size:11px;color:#426353;margin-top:-3px}.pattern .mini{white-space:pre-line;line-height:1.45}.advanced-edit label{display:flex;align-items:center;gap:7px}.advanced-edit select{padding:5px;min-height:30px}#undo,#redo{display:none}
@media(max-width:720px){.notation-nav{flex-wrap:wrap}.notation-nav .editor-name{flex-basis:100%}.editor-name input{max-width:none}.editor-header-actions button{font-size:12px;padding:5px 8px}.notation-top h2{font-size:17px}#autosave-status{font-size:10px}}

.catalog-tabs{display:flex;gap:6px;margin:10px 0}.catalog-tabs button{flex:1;min-height:34px;padding:5px 10px}.catalog-tabs [aria-pressed=true]{background:#005ac8;color:white;border-color:#005ac8}.catalog-search-label{display:block;font-size:12px;font-weight:650;margin:12px 0 5px}.catalog-search{display:flex;gap:5px}.catalog-search input{width:100%;min-width:0;font-size:13px;padding:9px}.catalog-search button{min-height:36px;padding:3px 10px}#search-status{margin:7px 0;font-size:11px}#song-results{max-height:520px;overflow-y:auto;scrollbar-width:thin}.song-result{border:1px solid #cedbeb;border-radius:9px;padding:12px;margin:8px 0;background:white}.song-result h3{font-size:15px;margin:0}.song-result p{font-size:12px;margin:3px 0 8px}.song-result button{display:block;width:100%;text-align:left;font-size:12px;margin-top:5px;padding:6px 9px;min-height:34px}.song-result button.active{border-color:#005ac8;background:#e9f2ff}.pattern .song-names{color:#005ac8;font-size:12px;letter-spacing:0;font-family:inherit}.song-context{padding:12px 23px;border-top:1px solid #e2eaf3;background:#f8fbff}.song-context:empty{display:none}.song-context h3{font-size:14px;margin:0 0 6px}.song-context details{margin:7px 0;font-size:13px}.song-context summary{cursor:pointer;font-weight:650}.song-context p{font-size:12px;margin:7px 0}.song-context a{margin-right:12px;font-size:12px}.song-context .song-basis{display:block;color:#516b83;font-size:11px;font-weight:500}.volume-control>span{display:flex;align-items:center;gap:6px}.volume-control input{width:100px;min-width:60px;padding:0;accent-color:#005ac8}.volume-control output{font-size:11px;min-width:30px}.stroke-preview{display:flex;gap:5px}.stroke-preview button{font-size:12px;min-height:34px;padding:6px 9px}#editor #mute{width:100%;min-height:30px;padding:4px 5px;font-size:11px;margin-top:5px}#editor #mute.on{background:#005ac8;color:white;border-color:#005ac8}.notation-bottom .editor-volume-label{display:flex;gap:5px;align-items:center;font-size:12px}#editor-volume{width:68px;padding:0;accent-color:#005ac8}@media(max-width:720px){#song-results{max-height:440px}.song-context{padding:10px 15px}.notation-bottom .editor-volume-label{font-size:11px}#editor-volume{width:65px}}@media print{.song-context{display:none}}

.song-result .song-basis{display:block;font-size:10px;font-weight:400;color:#4a6581;margin-top:3px}

#song-select{display:block;width:100%;min-width:0;font:inherit;font-size:14px;margin:6px 0 12px}#song-results{max-height:none;overflow:visible}#song-versions .song-result{margin-bottom:0}

/* One visible work surface: pulse map, controls, score, playback. */
#editor .editor-controls{display:grid;grid-template-columns:1.15fr 1.15fr .95fr 1fr 1.15fr;gap:8px}
#editor .position-length,#editor .editor-grid{display:contents}
#editor .position-length>.edit-step{display:block;padding:9px;grid-template:none}
#editor .position-length>.edit-step:first-child{grid-column:1/-1}
#editor .edit-step{padding:9px;align-content:start}
#editor .edit-step h3,#editor .position-length h3{font-size:13px;line-height:1.3;white-space:normal;margin:0 0 7px}
#editor .position-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:5px}
#editor .position-heading h3{margin:0}
#editor .grid-setting{position:static;display:flex;flex-wrap:nowrap;gap:6px;margin:0;font-size:12px}
#editor .grid-setting>span{display:inline}
#grid-note-values{display:flex;gap:4px}
#grid-note-values button{height:32px;min-height:32px;padding:0 6px;border-radius:6px}
#grid-note-values svg{width:28px;height:28px;display:block}
#pulse-grid{display:grid;grid-template-columns:repeat(var(--pulses),minmax(0,1fr));gap:8px;margin:0;max-height:none;min-height:0;overflow:visible}
.pulse-group{min-width:0;border-left:2px solid #bacfe8;padding-left:5px}
.pulse-heading{display:flex;align-items:center;gap:3px;font-size:12px;font-weight:700;line-height:1}
.pulse-heading svg{width:23px;height:23px}
.pulse-notes{display:flex;align-items:stretch;gap:3px;min-height:36px}
#pulse-grid button{position:relative;flex:1 1 0;min-width:0;width:0;min-height:36px;height:36px;padding:0;border-radius:5px;display:flex;justify-content:center;align-items:center}
#pulse-grid button svg{width:30px;height:32px;max-width:100%;pointer-events:none}
#pulse-grid .existing-note{color:#173d68;background:#eef4fc;border-color:#a8c1df}
#pulse-grid .empty-position{color:#708399;background:#fff;border-style:dashed}
#pulse-grid button.on{color:#fff;background:#005ac8;border:1px solid #005ac8}
.triplet-marker{position:absolute;right:1px;top:-3px;font-size:10px;font-weight:700}
#selection{font-size:12px;line-height:1.3;margin:5px 0 0;min-height:16px}
#editor .position-length .length-buttons{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;min-height:0}
#editor .length-buttons button{width:100%;min-width:0;height:32px;min-height:32px;padding:0}
#editor .hint{display:block;font-size:11px;line-height:1.35;margin:6px 0 0}
#editor #syllable-hint{font-size:11px}
#editor .edit-step select,#editor .edit-step input{font-size:12px}
#editor-score{overflow:hidden;min-height:90px}
#editor-score svg{width:100%;height:100%;max-height:246px;flex-shrink:1}
.rhythm-learning{margin:12px 20px 0;padding:9px 12px;border:1px solid #cfdfed;border-radius:8px;background:#f2f7fc;font-size:13px}
.rhythm-learning summary{cursor:pointer;font-weight:650}.rhythm-learning p{margin:8px 0}.rhythm-learning a{font-size:12px;margin-right:10px}.rhythm-learning h4{margin:10px 0 4px;font-size:13px}
@media(max-width:720px){#editor .editor-controls{grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}#editor .edit-step,#editor .position-length>.edit-step{padding:6px}#editor .edit-step h3,#editor .position-length h3{font-size:12px;margin-bottom:5px}#editor .hint{font-size:10px;margin-top:3px}#editor #syllable-hint{font-size:10px}#editor .position-length .length-buttons{grid-template-columns:repeat(3,minmax(0,1fr))}#pulse-grid{gap:4px}.pulse-group{padding-left:3px}.pulse-heading{font-size:10px}.pulse-heading svg{width:18px;height:20px}#pulse-grid button{height:30px;min-height:30px}.pulse-notes{min-height:30px;gap:1px}#pulse-grid button svg{height:27px}#selection{font-size:10px}#editor .grid-setting>span{display:none}#editor .direction-buttons [data-direction=auto]{flex-basis:100%}#editor .notation-nav .editor-name{flex-basis:auto}#editor .notation-nav{flex-wrap:nowrap}#editor .notation-nav>div button{font-size:0;width:28px;padding:0}#editor-undo::first-letter,#editor-redo::first-letter{font-size:18px}#editor .editor-name{font-size:0}#editor .editor-name input{min-width:20px}#editor .notation-bottom{gap:4px}#editor-play{font-size:11px}#editor .hint{max-width:25ch}}
@media(max-height:650px){#editor{gap:4px}#editor .edit-step,#editor .position-length>.edit-step{padding:5px}#editor .hint{line-height:1.2;margin-top:3px}#editor .edit-step h3{margin-bottom:4px}#editor-score{min-height:55px}.pulse-heading{line-height:1}#autosave-status{font-size:10px}}
/* Preserve access on unusually short screens rather than clipping controls. */
@media(max-height:480px){#editor{overflow-y:auto}#editor-score{flex:0 0 100px}}
@media print{.rhythm-learning{display:none}}
#editor{gap:6px}#editor .position-help{font-size:11px;color:#526b83;line-height:1.2;margin:4px 0 0}#editor .position-heading{margin-bottom:2px}#editor .direction-buttons{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}#editor .direction-buttons button{min-height:28px;padding:3px;font-size:11px}#editor .direction-buttons [data-direction=auto]{grid-column:1/-1;min-height:24px}#editor #mute{min-height:26px;padding:3px;font-size:10px}#editor-score{min-height:60px}#notation-dialog{height:min(760px,98dvh);max-height:98dvh}@media(max-width:720px){#notation-dialog{height:100dvh;max-height:100dvh}#editor{gap:4px}#editor .position-help{font-size:10px}}
@media(max-width:720px) and (max-height:760px){#editor .hint{display:none}#editor .editor-grid>.edit-step:last-child{display:grid;grid-template-columns:1fr 1fr;gap:4px}#editor .editor-grid>.edit-step:last-child h3{grid-column:1/-1}#editor .editor-grid>.edit-step:last-child #auto-syllable{margin:0;font-size:9px}#editor .editor-grid>.edit-step:last-child input{min-width:0}#editor .notation-bottom .editor-volume-label{font-size:0}#editor .notation-bottom #editor-volume{width:50px}.notation-top{min-height:42px}#editor .position-help{margin-top:2px}#editor #autosave-status{font-size:9px}}
/* Familiar counting anchors the note-position choice. */
#pulse-grid button{flex-direction:column;gap:0;height:44px;min-height:44px}
#pulse-grid .position-count{display:block;font:650 12px/14px system-ui,sans-serif;min-height:14px}
#pulse-grid button svg{height:27px;width:27px}
@media(max-width:720px){#pulse-grid button{height:38px;min-height:38px}#pulse-grid .position-count{font-size:10px;line-height:12px;min-height:12px}#pulse-grid button svg{height:24px;width:24px}}
