#mapEditor{width:min(1380px,96vw);max-height:94dvh;padding:0;border-color:#6f5c87;overflow:auto}
.map-editor{--me-ink:#393345;--me-paper:#fffdf5;--me-muted:#b6afc2;color:#f4eefb;font:14px/1.45 "Segoe UI",Arial,sans-serif;min-width:0;background:#1b1825}
.map-editor *{box-sizing:border-box}.map-editor h2,.map-editor h3,.map-editor p{margin:0}.map-editor button,.map-editor input,.map-editor select{font:inherit}
.me-header{display:flex;justify-content:space-between;align-items:center;gap:20px;padding:22px 25px 15px;border-bottom:1px solid #ffffff13}.me-header h2{font:650 25px/1.2 "Trebuchet MS","Segoe UI",sans-serif;letter-spacing:-.7px}.me-eyebrow{color:#c6a6ff;font-size:10px;font-weight:700;letter-spacing:2px;margin-bottom:5px!important}
.me-button{display:inline-flex;justify-content:center;align-items:center;gap:6px;padding:8px 11px;min-height:36px;border:1px solid #51475f;border-radius:7px;background:#2b2537;color:#e6def0;cursor:pointer;white-space:nowrap}.me-button:hover:not(:disabled){background:#3a2f4b;border-color:#a486c6}.me-button:disabled{opacity:.4;cursor:default}.me-button.me-primary{background:#c6a6ff;color:#251638;border-color:#d9c4fa;font-weight:700}.me-button.me-primary:hover:not(:disabled){background:#d5bcff}.me-button.me-secondary{background:#24202e}.me-button.me-danger{color:#ffb2b3;border-color:#7b444d;background:#43242c}
.me-meta{display:grid;grid-template-columns:minmax(160px,2fr) minmax(130px,1.3fr) 86px 100px 100px;gap:12px;padding:15px 25px}.me-field{display:flex;flex-direction:column;gap:5px;min-width:0;color:#c5bdcf;font-size:11px;letter-spacing:.1px}.me-field input,.me-field select{width:100%;min-width:0;padding:8px 9px;border:1px solid #4a4058;border-radius:6px;color:#f7f2fc;background:#25202f;min-height:36px;font-size:13px}.me-field input:focus-visible,.me-field select:focus-visible,.me-button:focus-visible,.me-score:focus-visible{outline:2px solid #a5dafa;outline-offset:2px}.me-field option{background:#25202f;color:#f7f2fc}
.me-toolbar{display:flex;align-items:end;justify-content:space-between;gap:12px;padding:0 25px 14px;flex-wrap:wrap}.me-tools{display:flex;align-items:end;flex-wrap:wrap;gap:8px}.me-tools .me-field{min-width:130px}.me-navigation{display:flex;gap:10px;align-items:center;color:#bcb2cb;font-size:12px;white-space:nowrap}.me-navigation button{font-size:18px;padding:4px 11px}
.me-workspace{display:grid;grid-template-columns:minmax(0,1fr) 235px;gap:16px;padding:0 25px}.me-paper-wrap{align-self:start;min-width:0;background:var(--me-paper);border:1px solid #e6dcc6;border-radius:4px;box-shadow:0 9px 24px #0003;overflow:hidden;touch-action:pan-y}.me-score{display:block;width:100%;height:auto;color:var(--me-ink);cursor:crosshair;touch-action:none;user-select:none}.me-score text{font-family:"Segoe UI",Arial,sans-serif;fill:currentColor}.me-score.me-dragging{cursor:grabbing}.me-grid-line{stroke:#b7a7cc;stroke-width:.45;stroke-dasharray:2 5;opacity:.45}.me-grid-beat{stroke:#c7b9ab;stroke-width:.8;opacity:.65}.me-staff{stroke:#aca394;stroke-width:.9}.me-bar-line{stroke:#817665;stroke-width:1.2}.me-beat-label{font-size:10px;fill:#afa18b!important}.me-bar-label{font-size:13px;font-weight:600;fill:#84735e!important}.me-hand-label{font-size:9px;font-weight:600;letter-spacing:1.5px;fill:#9d8b72!important}.me-score .me-clef{font-family:"Segoe UI Symbol","Noto Music",serif;font-size:50px;fill:#6f624f}.me-score .me-clef-treble{font-size:65px}.me-note{color:#407e9e;cursor:grab}.me-note-left{color:#8564b6}.me-note-selected{color:#cf7b2b}.me-note-duration{stroke:currentColor;stroke-width:6;stroke-linecap:round;opacity:.22}.me-note-selected .me-note-duration{opacity:.48;stroke-width:9}.me-head{fill:currentColor;stroke:currentColor;stroke-width:1.3}.me-note-selected .me-head{stroke:#5a3317;stroke-width:2}.me-note-hit{fill:transparent;stroke:none;pointer-events:all}.me-stem,.me-ledger{stroke:currentColor;stroke-width:1.3}.me-score .me-accidental{font-size:23px;font-family:"Segoe UI Symbol",serif}.me-octave{font-size:10px;font-style:italic}.me-finger{font-size:10px;font-weight:700}
.me-inspector{min-width:0;background:#24202e;border:1px solid #42384f;border-radius:8px;padding:13px;display:grid;grid-template-columns:1fr 1fr;gap:10px;align-content:start}.me-inspector h3{grid-column:1/-1;color:#d8c4f5;font-size:14px;line-height:1.4}.me-inspector>.me-small,.me-inspector>.me-field:last-child,.me-object-actions{grid-column:1/-1}.me-object-actions{display:flex;flex-wrap:wrap;gap:6px}.me-object-actions button{font-size:11px;padding:6px 8px}.me-inspector select[size]{min-height:105px;font-size:11px;padding:3px}.me-inspector select[size] option{padding:5px 3px;white-space:normal}.me-small{font-size:11px;line-height:1.5;color:#aaa0b9}.me-inspector .me-field{font-size:10px}.me-inspector input,.me-inspector select{font-size:12px;padding:6px}
.me-audio{margin:16px 25px 0;border-top:1px solid #44394e;padding-top:12px}.me-audio summary{font-size:13px;color:#d2c4e2;cursor:pointer}.me-audio-body{display:grid;grid-template-columns:auto minmax(140px,1fr) 190px auto;gap:12px;align-items:center;padding-top:12px}.me-audio-body>.me-small{grid-column:1/-1}.me-file-button{position:relative;display:inline-flex;align-items:center;justify-content:center;overflow:hidden;border:1px solid #645078;border-radius:7px;padding:9px 11px;color:#e8d5ff;background:#34263f;font-size:12px;cursor:pointer}.me-file-button input{position:absolute;inset:0;width:100%;opacity:0;cursor:pointer}.me-file-button:focus-within{outline:2px solid #a5dafa;outline-offset:2px}.me-audio-info{font-size:12px;color:#b9afc9;overflow-wrap:anywhere}.me-audio-body>.me-button{font-size:11px}
.me-footer{display:flex;justify-content:space-between;align-items:center;gap:20px;padding:17px 25px 22px}.me-help{font-size:12px;color:#c5bace;max-width:690px}.me-status{font:11px/1.5 Consolas,monospace;color:#9d8bad;padding-top:5px}.me-actions{display:flex;gap:8px;flex-shrink:0}.me-actions .me-button{min-height:41px}.me-error{margin:14px 25px 0!important;padding:10px 12px;border-left:3px solid #f08d9c;border-radius:3px;background:#4a2533;color:#ffc5cd;font-size:13px}.me-error[hidden]{display:none}
.me-audio-preview{grid-column:1/-1;display:flex;align-items:center;gap:12px;flex-wrap:wrap}.me-audio-preview audio{height:36px;flex:1;min-width:200px;max-width:600px}.me-audio-preview button{font-size:12px}.me-drag-ghost{fill:#f5b95b;fill-opacity:.65;stroke:#70441b;stroke-width:2;stroke-dasharray:3 2;pointer-events:none}
@media(max-width:1000px){.me-workspace{grid-template-columns:minmax(0,1fr) 205px;gap:10px}.me-meta{grid-template-columns:minmax(140px,2fr) minmax(120px,1.2fr) 72px 82px 82px;gap:8px}.me-inspector{padding:10px;gap:8px}.me-header,.me-meta,.me-toolbar,.me-workspace,.me-footer{padding-left:16px;padding-right:16px}.me-audio{margin-left:16px;margin-right:16px}.me-actions{flex-direction:column}}
@media(max-width:740px){#mapEditor{width:98vw;max-height:96dvh}.me-header h2{font-size:21px}.me-meta{grid-template-columns:repeat(3,minmax(0,1fr))}.me-meta>.me-field:first-child{grid-column:1/3}.me-meta>.me-field:nth-child(2){grid-column:3}.me-workspace{grid-template-columns:1fr}.me-inspector{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.me-inspector>.me-field:last-child{display:none}.me-tools .me-field{min-width:105px;flex:1}.me-tools{width:100%}.me-navigation{margin-left:auto}.me-audio-body{grid-template-columns:1fr 1fr}.me-audio-info{grid-column:2}.me-footer{flex-direction:column;align-items:stretch;gap:12px}.me-actions{flex-direction:row}.me-actions button{flex:1}.me-paper-wrap{overflow-x:auto}.me-score{min-width:620px}.me-help{font-size:11px}}
@media(prefers-reduced-motion:reduce){.map-editor *{transition:none!important}}
.me-piano{margin:0 25px 16px;padding:12px 14px;border:1px solid #534263;border-radius:8px;background:#25202e}.me-piano>summary{cursor:pointer;color:#dbc7f5;font-weight:600;font-size:13px}.me-piano-body{display:grid;gap:10px;padding-top:12px}.me-cursor-label{font:12px/1.5 Consolas,monospace;color:#addcf2}.me-cursor-actions{display:flex;align-items:end;gap:7px;flex-wrap:wrap}.me-cursor-actions>.me-field{width:145px}.me-cursor-actions .me-button{font-size:12px}.me-insert-fields{display:grid;grid-template-columns:repeat(4,minmax(100px,1fr));gap:9px}.me-auto-advance{display:flex;align-items:center;gap:7px;min-height:36px;font-size:12px;color:#cbbfda}.me-auto-advance input{width:16px;height:16px;accent-color:#bd9ded}.me-capture-hint{font-size:12px;line-height:1.6;color:#c6b7d7}.me-insertion-cursor{stroke:#438fc0;stroke-width:2;stroke-dasharray:4 3;pointer-events:none}.me-piano [aria-pressed=true]{background:#385264;border-color:#8bbdd8;color:#e9f6ff}
@media(max-width:1000px){.me-piano{margin-left:16px;margin-right:16px}}
@media(max-width:740px){.me-insert-fields{grid-template-columns:repeat(2,minmax(0,1fr))}.me-piano{padding:10px}.me-cursor-actions .me-button{white-space:normal}.me-auto-advance{width:100%}}
.me-video{margin:16px 25px 0;border-top:1px solid #44394e;padding-top:12px}.me-video>summary{font-size:13px;color:#d2c4e2;cursor:pointer}.me-video-body{display:grid;grid-template-columns:minmax(140px,1fr) minmax(180px,2fr);gap:12px;align-items:center;padding-top:12px}.me-video-info{color:#b9afc9;font-size:12px;overflow-wrap:anywhere}.me-video-body>.me-small,.me-video-preview{grid-column:1/-1}.me-video-preview{display:flex;gap:12px;align-items:center;flex-wrap:wrap}.me-video-preview video{display:block;width:100%;max-width:480px;max-height:270px;background:#111018;border:1px solid #51475f;border-radius:6px}.me-video-preview video[hidden]{display:none}.me-video-body .me-auto-advance{line-height:1.5}
@media(max-width:1000px){.me-video{margin-left:16px;margin-right:16px}}
@media(max-width:740px){.me-video-body{grid-template-columns:minmax(0,1fr)}.me-video-body .me-button{white-space:normal}}
.me-study-source{max-width:72ch;margin-top:7px!important;color:#bfb0d2;font-size:12px;line-height:1.5}
.me-tool-pair,.me-duration-palette{display:flex;gap:3px;align-items:center}
.me-duration-palette{padding-inline:8px;border-inline:1px solid #ffffff27}
.me-tools .me-tool,.me-tools .me-duration{width:36px;height:42px;min-height:36px;padding:2px;color:#c9bed8;background:transparent;border-color:transparent}
.me-tools [aria-pressed="true"]{color:#fff;background:#383342;border-color:#afa4bb;box-shadow:0 0 6px #eee6ff23}
.me-tool-icon{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round}
.me-duration svg{display:block;width:29px;height:35px;overflow:visible}
.me-duration .me-tuplet,.me-score .me-tuplet{font:italic 11px Georgia,serif;fill:currentColor}
.me-flag{fill:currentColor;stroke:none}
.me-ghost{color:#237ba9;opacity:.54;pointer-events:none}
.me-score .me-erase-target{color:#b02e44}
.me-note-duration{opacity:0;pointer-events:none}
.me-note-selected .me-note-duration{opacity:.22}
.me-paper-wrap[data-tool="erase"] .me-score,.me-paper-wrap[data-tool="erase"] .me-note{cursor:pointer}
.me-score,.me-paper-wrap{touch-action:pan-x pan-y pinch-zoom}
.me-field[hidden]{display:none}
.me-shortcuts { margin:.25rem 0 .75rem; padding:0; border:0; color:var(--muted); font-size:.875rem; }
.me-shortcuts summary { width:fit-content; }
.me-shortcuts dl { display:grid; grid-template-columns:auto 1fr; align-items:baseline; gap:.4rem .8rem; }
.me-shortcuts dt,.me-shortcuts dd { margin:0; }
.me-piano{margin-top:16px;border:0;border-top:1px solid #ffffff25;background:transparent;border-radius:0}
.me-workspace{grid-template-columns:minmax(0,1fr)}
.me-inspector[hidden],.me-button[hidden]{display:none}
.me-inspector{display:grid;grid-template-columns:repeat(auto-fit,minmax(125px,1fr));align-items:end;background:none;border:0;border-top:1px solid #ffffff25;border-radius:0;padding:10px 0}
.me-inspector h3{align-self:center;font-size:15px}
.me-audio-body #mapRemoveAudio { align-self:end; justify-self:start; }
.me-audio-body #mapRemoveAudio,.me-audio-body #mapAudioOffset { box-sizing:border-box; height:2.5rem; }
.me-inspector .me-field:last-child{grid-column:1/-1}
.me-inspector select[size]{max-height:62px}
.me-note-details {grid-column:1/-1; margin:0; padding:0; border:0;}
.me-note-details summary {width:fit-content; padding:.5rem 0; color:var(--lav);}
.me-note-detail-fields {display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.65rem;}
@media(max-width:740px){.me-tool-pair,.me-duration-palette{flex:none}.me-duration-palette{padding-inline:5px}.me-tools .me-field{min-width:85px}.me-tools .me-tool,.me-tools .me-duration{width:34px}}
.me-score-transport { display:flex; align-items:center; gap:.8rem; padding:0 25px 10px; }
.me-score-transport .me-button { min-width:2.5rem; padding:.3rem .6rem; color:#eadbff; }
.me-seek-wrap { --me-thumb:14px; flex:1; min-width:0; height:32px; position:relative; }
.me-seek-wrap::before,.me-seek-wrap>svg { position:absolute; inset-inline:calc(var(--me-thumb)/2); pointer-events:none; }
.me-seek-wrap::before { content:''; top:calc(50% - 2px); height:4px; border-radius:4px; background:linear-gradient(to right,#c6a6ff var(--me-seek-progress,0%),#62566f var(--me-seek-progress,0%)); }
.me-seek-wrap>svg { top:calc(50% - 15px); width:calc(100% - var(--me-thumb)); height:12px; overflow:visible; fill:none; stroke-width:1.5px; }
.me-seek-notes { stroke:#eee6fc; }
.me-seek-chords { stroke:#c5a6ff; stroke-width:2px; }
#mapPreviewSeek { appearance:none; position:absolute; inset:0; width:100%; height:100%; min-width:0; margin:0; padding:0; border:0; background:transparent; cursor:pointer; }
#mapPreviewSeek::-webkit-slider-runnable-track { height:4px; background:transparent; }
#mapPreviewSeek::-webkit-slider-thumb { appearance:none; width:var(--me-thumb); height:var(--me-thumb); margin-top:calc((4px - var(--me-thumb))/2); background:#c6a6ff; border-radius:50%; }
#mapPreviewSeek::-moz-range-track { height:4px; background:transparent; }
#mapPreviewSeek::-moz-range-thumb { width:var(--me-thumb); height:var(--me-thumb); border:0; background:#c6a6ff; border-radius:50%; }
#mapPreviewSeek:focus-visible { outline:2px solid var(--lav,#c6a6ff); outline-offset:1px; border-radius:4px; }
.me-score-transport output { color:#d2cbdc; font:12px var(--mono,monospace); font-variant-numeric:tabular-nums; }
.me-score .me-preview-caret { stroke:#2686c9; stroke-width:2.5; pointer-events:none; }
.me-score .me-note.me-sounding { color:#14735a; }
.me-score .me-sounding .me-note-duration { stroke:currentColor; opacity:.55; }
@media(max-width:640px){.me-score-transport{padding-inline:12px;gap:.5rem}}
#mapExitPrompt {
  width:min(26rem,calc(100% - 2rem)); max-height:90dvh; margin:auto; box-sizing:border-box;
  color:var(--text,#f7f3ff); background:var(--surface,#211c2e); padding:clamp(1.15rem,3.5vw,2rem);
  border:1px solid var(--line,#574b69); border-radius:12px; box-shadow:0 16px 60px #0008;
}
#mapExitPrompt::backdrop { background:#0b0814ad; }
#mapExitPrompt h2 { margin:0 0 1rem; font-size:1.65rem; }
.me-exit-actions {display:grid; gap:.45rem;}
.me-exit-actions .me-button {padding:.7rem .9rem; text-align:left;}
.me-exit-actions .me-exit-discard {color:var(--pink,#ffb4bc); background:transparent; border-color:transparent;}

.me-song-meta {grid-template-columns:1.25fr 1fr 1fr 1fr auto; align-items:end; padding-bottom:10px;}
.me-arrangement-meta {grid-template-columns:minmax(160px,26rem) 86px 100px 100px auto; justify-content:start; align-items:end; padding-block:0;}
.me-arrangement-meta .me-button[hidden] {display:none;}
.map-editor>.me-status {padding:8px 25px 12px; color:#c6b9d7;}
.me-footer {justify-content:space-between;}
.me-publication-state {display:grid; gap:3px; color:#e4daef; font-size:.86rem;}
.me-publication-state small {color:#bcb4c6;}
#mapEditorPublish {border-color:#9276b0;}
@media(max-width:1000px) {
  .me-song-meta {grid-template-columns:repeat(3,minmax(0,1fr));}
  .me-song-meta .me-button {justify-self:start;}
  .map-editor>.me-status {padding-inline:16px;}
}
@media(max-width:740px) {
  .me-song-meta,.me-arrangement-meta {grid-template-columns:repeat(2,minmax(0,1fr));}
  .me-meta>.me-field:first-child,.me-meta>.me-field:nth-child(2) {grid-column:auto;}
  .me-song-meta>.me-field:first-child {grid-column:1/-1;}
  .me-song-meta .me-button {justify-self:stretch; white-space:normal;}
  .me-arrangement-meta .me-button {grid-column:1/-1;}
  .me-actions {display:flex;flex-wrap:wrap;}
  .me-actions .me-button {white-space:normal;}
}
