:root{color-scheme:light;--paper:#fcf7f7;--ink:#293d40;--muted:#566c70;--line:#dce8e8;--aqua:#b7ded9;--rose:#f2b7c9;--accent:#d76e91;--row:24px;--key:70px;--step-min:24px;font-family:"Microsoft YaHei","PingFang SC","Noto Sans CJK SC",system-ui,sans-serif}
*,*::before,*::after{box-sizing:border-box}
body{margin:0;color:var(--ink);background:radial-gradient(ellipse at 73% 2%,#ecf8f6 0,transparent 49%),var(--paper)}
button,input{font:inherit}
button{cursor:pointer}
button:disabled{cursor:default}
button:focus-visible,input:focus-visible,[tabindex]:focus-visible{outline:2px solid #b75078;outline-offset:3px}
button svg,.stage-tip svg,.site-footer svg,.studio-icon svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;flex:none}
.definitions,.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.wrap{width:min(1328px,calc(100% - 96px));margin-inline:auto}
.masthead{border-bottom:1px solid #e3e9e9;background:#fffafbe0}
.mast-inner,.mast-actions,.brand,.quiet{display:flex;align-items:center}
.mast-inner{min-height:61px;justify-content:space-between}
.brand{gap:10px;font-size:15px;font-weight:750;line-height:1.08;letter-spacing:.10em}
.brand small{display:block;font:650 8px/1.3 system-ui,sans-serif;letter-spacing:.17em;color:var(--muted);margin-top:4px}
.mast-actions{gap:12px}
.quiet{border:1px solid transparent;background:none;color:#3e5d60;gap:6px;padding:7px 10px;border-radius:7px;font-size:13px}
.quiet:hover,.quiet[aria-pressed=true]{border-color:var(--line);background:#e8f5f3}
.intro{display:flex;justify-content:space-between;align-items:flex-end;gap:24px;padding:28px 0 21px}
.eyebrow{display:flex;align-items:center;gap:9px;color:#436c70;font-size:10px;letter-spacing:.16em;font-weight:750}
.eyebrow span{width:19px;height:1px;background:#83babb}
.eyebrow i,.stage-bottom i,.grid-spec i,.site-footer span{display:inline-block;width:4px;height:4px;border-radius:50%;background:currentColor;vertical-align:middle;opacity:.62}
h1{font-family:"Songti SC","STSong","SimSun",serif;font-size:clamp(40px,4.1vw,65px);line-height:1.15;letter-spacing:.035em;margin:8px 0 0;font-weight:800}
h1 span{color:var(--accent)}
.intro p{font-size:15px;text-align:right;line-height:1.9;margin:0 0 3px;font-weight:650;color:#3d5c5e}
.intro p span{font-size:13px;font-weight:400;color:var(--muted)}
.stage{height:clamp(380px,37vw,500px);border-radius:20px;position:relative;isolation:isolate;overflow:hidden;container-type:inline-size;background:#a9cfce url(wetland.svg) center/100% 100% no-repeat;box-shadow:0 10px 25px #627c8630}
.stage::before{content:"";position:absolute;inset:0;border-radius:inherit;border:1px solid #6e9b9e46;pointer-events:none;z-index:2}
.stage-top,.stage-bottom{position:absolute;left:20px;right:20px;display:flex;justify-content:space-between;align-items:center;color:#2c5053;pointer-events:none;z-index:3}
.stage-top{top:15px}
.stage-label,.stage-tip{display:flex;align-items:center;gap:7px;background:#f1faf8e8;border:1px solid #ffffffb8;border-radius:7px;padding:6px 9px;line-height:1.2;font-size:11px;letter-spacing:.06em}
.stage-dot{width:7px;height:7px;border-radius:50%;background:#df86a4;box-shadow:0 0 8px #f2bad19a}
.stage-tip svg{width:14px;height:14px}
.stage-bottom{bottom:11px;font-size:10px;letter-spacing:.1em;color:#315052}
.stage-bottom i{margin:0 4px}
.choir{position:absolute;inset:0;--bird-height:clamp(118px,16.7cqw,209px);--flock-width:min(765px,max(72%,calc(var(--bird-height) * 3.85)));--bird-label-height:16px}
.flock{display:grid;align-items:end;position:absolute;left:50%;transform:translateX(-50%)}
.rear{bottom:49.5%;width:calc(var(--flock-width) * 10 / 11);grid-template-columns:repeat(10,minmax(0,1fr))}
/* Keep the rear bank centered on the foot line as the stage and flock resize. */
.rear::before{content:"";position:absolute;inset-inline:-8%;bottom:var(--bird-label-height);height:clamp(32px,5.3cqw,65px);transform:translateY(50%);background:url(rear-island.svg) center/100% 100% no-repeat;pointer-events:none;z-index:-1}
.front{bottom:9.5%;width:var(--flock-width);grid-template-columns:repeat(11,minmax(0,1fr))}
.bird{display:grid;grid-template-rows:minmax(0,1fr) auto;align-items:end;justify-items:center;margin:0;padding:0;height:var(--bird-height);min-width:0;position:relative;border:0;background:transparent;color:#2e5052;touch-action:none;user-select:none;-webkit-tap-highlight-color:transparent}
.rear .bird{height:calc(var(--bird-height) * .91)}
.bird svg{display:block;height:100%;width:100%;min-height:0;overflow:visible;filter:drop-shadow(0 2px 2px #486d7294);pointer-events:none}
.bird-label{z-index:1;background:#eaf7f5f0;border:1px solid #8bb9bbb5;border-radius:4px;min-width:29px;font:600 10px/calc(var(--bird-label-height) - 2px) ui-monospace,Consolas,monospace;padding:0 3px;letter-spacing:.025em;transition:background .14s,color .14s}
.bird:hover .bird-label,.bird:focus-visible .bird-label{background:#fff7f9;color:#365d62}
.bird.is-singing .bird-label{background:#f8c4d5;color:#4a2c3d;border-color:#f8c4d5}
.bird::before{content:"";position:absolute;bottom:var(--bird-label-height);left:0;right:0;margin:auto;width:87%;height:7%;border:1.5px solid transparent;border-radius:50%;transition:transform .18s,opacity .18s;pointer-events:none;opacity:0}
.bird.is-singing::before{border-color:#fff0f5;opacity:.7;transform:scale(1.1)}
.face,.neck,.jaw{transition:transform .18s ease-out,opacity .12s ease-out;transform-box:view-box}
.neck{transform-origin:0 294px}
.jaw{transform-origin:57% 15%;opacity:0;transform:scaleY(.78)}
.bird.is-singing .face{transform:translateY(-82px)}
.bird.is-singing .neck{transform:scaleY(1.92)}
.bird.is-singing .jaw{opacity:1;transform:scaleY(1)}
.bird-note{position:absolute;top:-3%;left:68%;font:bold 18px/1 Georgia,serif;color:#fff3f7;opacity:0;transform:translateY(4px);pointer-events:none}
.bird.is-singing .bird-note{animation:sing .85s ease-out both}
@keyframes sing{0%{opacity:0;transform:translateY(4px)}20%,65%{opacity:1}100%{opacity:0;transform:translateY(-13px)}}
.studio{padding-top:26px}
.studio-heading,.studio-name,.studio-actions,.action,.toolbar,.transport,.edit-tools,.tempo,.play,.square{display:flex;align-items:center}
.studio-heading{justify-content:space-between;gap:14px;margin-bottom:13px}
.studio-name{gap:11px}
.studio-icon{width:42px;height:42px;border-radius:11px;background:#dff0ee;color:#3c6a6b;display:grid;place-items:center;flex:none}
.studio-icon svg{width:20px;height:20px}
h2{font-size:23px;line-height:1.2;margin:0 0 4px;letter-spacing:.04em}
.studio-name p{font-size:12px;color:var(--muted);margin:0}
.studio-actions{gap:8px;flex-shrink:0}
.action,.square,.play{justify-content:center;border-radius:7px;gap:6px;white-space:nowrap}
.action{background:#fffafd;border:1px solid #dce8e8;padding:7px 10px;color:#415d60;font-size:12px;min-height:33px}
.action svg{width:15px;height:15px}
.action:hover:not(:disabled),.square:hover:not(:disabled){background:#e5f3f1;border-color:#bcd9d8}
.action:disabled,.square:disabled{opacity:.42}
.score{border:1px solid #d2e2e2;background:#fffdfd;border-radius:13px;overflow:hidden;box-shadow:0 7px 18px #72949721}
.toolbar{min-height:55px;padding:8px 11px;gap:12px;border-bottom:1px solid #d8e9e7;background:#fcfafa}
.transport,.edit-tools{gap:6px}
.edit-tools{margin-left:auto}
.play{min-height:36px;padding:6px 13px;color:#27494c;background:var(--aqua);border:1px solid #98c8c5;font-weight:700;font-size:13px}
.play:hover{background:#a4d2cc}
.play svg{width:17px;height:17px}
.square{width:35px;height:35px;background:#fffcfd;color:#415f62;border:1px solid #d9e9e7;padding:0}
.loop[aria-pressed=true]{background:#def1ee;color:#305c60;border-color:#b2d6d2}
.tempo{border-radius:7px;border:1px solid #d9e9e7;padding:4px 8px;min-height:35px;gap:4px;color:#4f6166;background:#fffafb}
.tempo input{width:44px;min-width:0;appearance:textfield;border:0;background:none;padding:0;text-align:center;font:700 14px/1.5 ui-monospace,Consolas,monospace;color:#354f52}
.tempo input::-webkit-inner-spin-button,.tempo input::-webkit-outer-spin-button{appearance:none;margin:0}
.tempo span,.grid-spec{font-size:10px;font-weight:750;letter-spacing:.07em;color:#526a6e}
.grid-spec i{margin-inline:4px}
.viewport{overflow-x:auto;scrollbar-color:#9ebfc0 #eff7f7;scrollbar-width:thin}
.board{min-width:calc(var(--step-min) * 32 + var(--key))}
.ruler,.piano{display:grid;grid-template-columns:var(--key) minmax(0,1fr)}
.ruler{min-height:29px;font:700 11px/1 ui-monospace,Consolas,monospace;color:#456267;background:#edf7f6;border-bottom:1px solid #d2e5e4}
.key-heading,.keys{position:sticky;left:0;z-index:5}
.key-heading{display:flex;align-items:center;justify-content:center;background:#e3f1ef;letter-spacing:.14em;border-right:1px solid #b5d3d3}
.measures{display:grid;grid-template-columns:repeat(32,minmax(0,1fr));align-items:stretch}
.tick{display:flex;align-items:center;justify-content:flex-start;padding-left:6px}
.tick.measure{color:#386066;font-size:12px;border-left:1px solid #a2c3c5;background:#d9f1ee8f}
.key{color:#405c62;display:flex;align-items:center;justify-content:space-between;height:var(--row);width:100%;padding:0 0 0 10px;border:0;border-right:1px solid #b5d3d3;border-bottom:1px solid #dbebea;background:#f7fbfb;font:700 11px/1 ui-monospace,Consolas,monospace;text-align:left;touch-action:none}
.key::after{content:"";height:100%;width:17px;background:#fffdfd;border-left:1px solid #d7e8e7}
.key.black{background:#e2eeef}.key.black::after{background:#778e97;border-color:#778e97}
.key:hover,.key.on{background:#fae3eb;color:#523543}.key.on::after{background:#e8a9bf;border-color:#cf90a9}
.grid{position:relative;height:calc(var(--row) * 21);isolation:isolate;outline-offset:-2px!important;touch-action:pan-x pan-y;user-select:none;--cell:calc(100% / 32);--unit:calc(var(--cell) / 2)}
.lane{position:absolute;inset-inline:0;height:var(--row);border-bottom:1px solid #3c65701b;background:#f8fcfc;pointer-events:none}
.lane:nth-child(even){background:#f0f8f7}.lane.black{background:#e8f3f3}.lane.octave{border-bottom:1px solid #8fb7bb8a}
.grid::before{
  content:"";position:absolute;inset:0;pointer-events:none;z-index:1;
  background:
    repeating-linear-gradient(90deg,#67879065 0 1px,transparent 1px calc(var(--cell) * 8)),
    repeating-linear-gradient(90deg,#5d838a37 0 1px,transparent 1px var(--cell)),
    repeating-linear-gradient(90deg,transparent 0 var(--unit),#5d838a20 var(--unit) calc(var(--unit) + 1px),transparent calc(var(--unit) + 1px) var(--cell)),
    linear-gradient(90deg,#cee8e84e 50%,transparent 50%) 0 0/50% 100%;
}
.notes{position:absolute;inset:0;z-index:2;pointer-events:none}
.note{position:absolute;top:calc(var(--r) * var(--row) + 3px);left:calc(var(--s) * var(--unit) + 1px);width:calc(var(--d) * var(--unit) - 2px);height:calc(var(--row) - 6px);padding:0 8px 0 3px;margin:0;background:var(--rose);color:#4a2f3e;border:1px solid #cd8aa3;border-radius:4px;white-space:nowrap;overflow:hidden;text-overflow:clip;font:650 9px/1 ui-monospace,Consolas,monospace;text-align:left;pointer-events:auto;cursor:grab;touch-action:none}
.note.short{padding:0}
.note.short .note-label{display:none}
.note:hover,.note.selected{background:#ffc9dd;border-color:#a25b7b}.note.selected{box-shadow:0 0 0 1px #a25b7b,0 0 0 2px #fff8fc;z-index:2}
.note.sounding{background:#f9d0df;box-shadow:0 0 0 1px #609b9f}
.grip{position:absolute;right:0;top:0;bottom:0;width:min(8px,40%);cursor:ew-resize;background:#fff9fd66}
.grip::after{content:"";position:absolute;top:4px;bottom:4px;right:50%;width:1px;background:#9d5d7880}
.note:active{cursor:grabbing}.note:active .grip{cursor:ew-resize}
.cursor{position:absolute;z-index:1;border:2px solid #4d8e93;pointer-events:none;width:var(--unit);height:var(--row);left:calc(var(--s)*var(--unit));top:calc(var(--r)*var(--row))}
.playhead{position:absolute;z-index:3;top:0;bottom:0;width:2px;background:#4e8b91;box-shadow:0 0 0 1px #e5f6f56b;pointer-events:none}
.score-footer{height:34px;display:grid;grid-template-columns:1fr auto 1fr;align-items:center;padding:0 12px;border-top:1px solid #d9e8e8;color:#52686c;font-size:11px}
.position,.note-count{font:650 11px/1 ui-monospace,Consolas,monospace}
.note-count{text-align:right}
.site-footer{display:flex;align-items:center;justify-content:center;gap:9px;margin:0;padding:22px 0 24px;color:#5d7377;font-size:10px;letter-spacing:.09em}
.site-footer svg{width:13px;height:13px}
dialog{width:min(465px,calc(100% - 28px));border:1px solid #dce8e8;border-radius:18px;background:#fff9fb;color:var(--ink);padding:20px 24px 24px;box-shadow:0 20px 90px #506e7544}
dialog::backdrop{background:#54767b82}
.preset-heading{display:flex;justify-content:space-between;align-items:center;gap:16px}
.preset-heading h2{margin:0}
.preset-heading .square{font-size:23px}
#presets-hint{margin:8px 0 14px;color:var(--muted);font-size:13px;line-height:1.6}
#presets[open]{display:flex;flex-direction:column;max-block-size:min(660px,calc(100% - 32px))}
.preset-options{display:grid;gap:7px;min-height:0;overflow-y:auto;scrollbar-width:thin;padding:1px 5px 4px}
.preset-option{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:3px 12px;align-items:center;width:100%;padding:9px 12px;border:1px solid #dce8e8;border-radius:9px;background:#f7fbfb;color:var(--ink);text-align:left}
.preset-option:hover,.preset-option:focus-visible{border-color:#afd0cc;background:#eaf6f4}
.preset-option strong{grid-column:1;font-size:14px}
.preset-option span{grid-column:1;color:var(--muted);font-size:12px;line-height:1.5}
.preset-option::after{content:"";grid-area:1/2/span 2;width:7px;height:7px;border-top:1.5px solid #54767b;border-right:1.5px solid #54767b;transform:rotate(45deg);margin-right:3px}
.guide-top{display:flex;justify-content:space-between;margin-bottom:12px}.guide-top .square{font-size:23px}
dialog ul{margin:12px 0 17px;padding-left:18px;color:#51666a;font-size:14px;line-height:1.7}dialog li+li{margin-top:7px}
@media(max-width:850px){.wrap{width:calc(100% - 44px)}.choir{--flock-width:84%}.stage{background-size:auto 100%}.intro{padding-top:24px}}
@media(max-width:570px){:root{--row:28px;--key:54px}.wrap{width:calc(100% - 24px)}.mast-inner{min-height:54px}.mast-actions{gap:2px}.quiet{padding-inline:6px}.intro{display:block;padding:22px 2px 14px}.intro h1{font-size:43px}.intro p{text-align:left;font-size:13px;line-height:1.55;margin:7px 0 0}.intro p span{font-size:12px}.stage{height:283px;border-radius:14px}.stage-top,.stage-bottom{left:9px;right:9px}.stage-top{top:9px}.stage-bottom{bottom:8px;font-size:9px}.stage-label,.stage-tip{font-size:10px;padding:5px 6px}.choir{--bird-height:clamp(96px,24cqw,112px);--flock-width:96%;--bird-label-height:14px}.rear{bottom:50.5%}.front{bottom:12%}.bird-label{min-width:0;font-size:8px;padding:0 2px}.bird svg{width:100%;height:100%}.studio{padding-top:19px}.studio-heading{align-items:flex-end;gap:6px}.studio-name{gap:6px}.studio-icon{width:30px;height:34px}.studio-icon svg{width:16px}.studio-name h2{font-size:19px}.studio-name p{font-size:10px;line-height:1.4}.studio-actions{gap:4px}.action{font-size:10px;padding:5px 5px;gap:3px}.action svg{width:12px;height:12px}.toolbar{gap:7px;padding:7px}.transport,.edit-tools{gap:4px}.square{width:31px;height:34px}.tempo{padding:4px;gap:1px}.tempo input{width:35px}.play{padding-inline:8px}.grid-spec,.editor-tip{display:none}.score-footer{grid-template-columns:1fr 1fr}.key{padding-left:6px}.key::after{width:12px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.001ms!important;transition-duration:.001ms!important}}
