/* The workshop is deliberately scoped to the performance space. */
body.space-stage .stage-control-layer section.stage-editor{padding:14px!important}
body.space-stage .stage-control-layer section.stage-editor>.stage-backgrounds,body.space-stage .stage-control-layer section.stage-editor>.stage-ink-modes{margin-top:0!important}
body.space-stage .stage-control-layer section.stage-editor>.stage-backgrounds,body.space-stage .stage-control-layer section.stage-editor>.stage-ink-palette{margin-bottom:0!important}
body.space-stage.stage-editing-text .stage-control-layer section.stage-editor{bottom:122px!important}
body.space-stage .stage-control-layer section.stage-editor .stage-text-line-editors>.stage-text-line-editor:first-child>label{margin-top:0!important}
body.space-stage .stage-control-layer .stage-editor .stage-backgrounds{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:8px}
body.space-stage .stage-control-layer .stage-editor .stage-backgrounds button{min-width:0;white-space:nowrap;min-height:44px;padding:8px 6px;font-size:16px;font-weight:600;letter-spacing:.08em;text-align:center;border:1px solid #e9dcb83b;border-radius:12px;background:#ffffff10}
body.space-stage .stage-control-layer .stage-editor .stage-backgrounds button[aria-pressed=true]{background:#e6dfc4;color:#263c30;border-color:#e6dfc4}
body.space-stage.stage-handwriting .stage-control-layer .stage-editor{width:252px!important;padding:12px!important}
body.space-stage.stage-handwriting .stage-control-layer .stage-editor .stage-ink-modes{display:flex;flex-wrap:nowrap;gap:4px}
body.space-stage.stage-handwriting .stage-control-layer .stage-editor .stage-ink-modes button{flex:1 0 auto;white-space:nowrap;padding:6px 7px;min-height:40px;font-size:14px}
body.space-stage.stage-handwriting .stage-control-layer .stage-editor .stage-ink-palette{margin-bottom:0}
body.space-stage:not(.stage-editing-text) .stage-control-layer .stage-editor{left:var(--stage-panel-left,50%)!important;right:auto!important;bottom:var(--stage-panel-bottom,108px)!important;transform:translateX(-50%)!important;max-height:min(50vh,370px)!important}
body.space-stage.stage-editing-text .stage-control-layer .stage-editor{width:320px!important;max-height:min(40vh,340px)!important;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding:12px!important}
body.space-stage.stage-editing-text .stage-control-layer .stage-editor .stage-title-letter-editor{padding:6px;margin-top:6px}
body.space-stage .stage-ink-canvas[hidden]{display:none!important}
.stage-eraser-preview{display:none;position:fixed;box-sizing:border-box;transform:translate(-50%,-50%);border:2px solid #fff4d3;border-radius:50%;background:#fff4d310;box-shadow:0 0 0 1px #16392ce6,0 1px 7px #15352877;pointer-events:none!important;z-index:2147483001}
body.space-stage.stage-handwriting .stage-eraser-preview:not([hidden]){display:block}
body.space-stage.stage-handwriting .stage-ink-surface.is-eraser{cursor:none}
body.space-stage .stage-control-layer .stage-editor p{display:none!important}
body.space-stage .stage-control-layer .stage-editor{width:272px!important;padding:12px 14px!important;border-radius:16px!important}
body.space-stage.stage-editing-text .stage-control-layer .stage-editor{width:344px!important;max-width:calc(100vw - 24px);left:auto!important;right:12px!important}
body.space-stage .stage-control-layer .stage-editor h3{font-size:19px!important;margin:0 0 8px!important}
body.space-stage .stage-control-layer .stage-editor label{margin:7px 0 4px!important;font-size:14px!important}
body.space-stage .stage-control-layer .stage-editor .stage-text-line-editor{padding:0 0 10px;margin-bottom:8px}
body.space-stage .stage-control-layer .stage-editor .stage-title-letter-editor{padding:8px;margin-top:8px}
body.space-stage .stage-control-layer .stage-editor .stage-title-letter-buttons{gap:5px}
body.space-stage .stage-control-layer .stage-editor input[type=text]{padding:6px 9px;font-size:17px}
body.space-stage .stage-control-layer .stage-editor .stage-size-numeric{margin:2px 0 6px}
.stage-control-layer{display:none;position:fixed;inset:0;z-index:2147483101;pointer-events:none;isolation:isolate}
body.space-stage .stage-control-layer{display:block}
body.space-stage .stage-control-layer .stage-tools,body.space-stage .stage-control-layer .stage-tools-toggle,body.space-stage .stage-control-layer .stage-editor{pointer-events:auto;touch-action:manipulation}
body.space-stage .stage-control-layer .stage-editor{touch-action:pan-y}
body.space-stage .stage-control-layer input[type=range]{touch-action:pan-x}
body.space-stage .stage-control-layer .stage-editor{left:auto;right:22px;transform:none;width:310px;max-width:calc(100vw - 28px);max-height:min(55vh,470px);padding:16px 18px;border:1px solid #f5eed544;border-radius:19px;background:linear-gradient(135deg,#47675568,#18382b80);backdrop-filter:blur(18px) saturate(115%);-webkit-backdrop-filter:blur(18px) saturate(115%);box-shadow:0 12px 38px #081f2338,inset 0 1px 0 #fff8df18;scrollbar-width:thin;scrollbar-color:#e8dfc477 transparent}
body.space-stage.stage-editing-text .stage-control-layer .stage-editor{width:400px;max-height:min(62vh,620px)}
body.space-stage .stage-control-layer .stage-editor h3{font-size:21px;line-height:1.5}
body.space-stage .stage-control-layer .stage-editor label{font-size:15px;margin:10px 0 5px}
body.space-stage .stage-control-layer .stage-editor button{font-size:15px;min-height:40px;padding:6px 12px}
body.space-stage .stage-control-layer .stage-editor p{font-size:13px;line-height:1.65;margin:12px 0 0;color:#e0e6d7}
body.space-stage .stage-control-layer .stage-editor input[type=range]{height:28px;margin:4px 0}
body.space-stage .stage-control-layer .stage-editor .stage-ink-modes{gap:6px;margin-top:12px}
body.space-stage .stage-control-layer .stage-editor .stage-ink-palette{gap:3px;margin:8px 0 12px}
body.space-stage .stage-control-layer .stage-editor .stage-ink-swatch{min-height:56px;padding:6px 2px}
body.space-stage .stage-control-layer .stage-editor .stage-ink-swatch-dot{width:22px;height:22px}
body.space-stage .stage-control-layer .stage-editor .stage-backgrounds{gap:8px;margin-top:10px}
@media(max-width:650px){body.space-stage .stage-control-layer .stage-editor{left:auto;right:12px;width:290px;max-height:44vh}body.space-stage.stage-editing-text .stage-control-layer .stage-editor{left:12px;right:12px;width:auto;max-height:46vh}}
.stage-ink-palette{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:6px;margin:10px 0 18px}
.stage-editor .stage-ink-swatch{display:flex;flex-direction:column;align-items:center;gap:6px;min-width:0;min-height:66px;padding:8px 3px;border:1px solid transparent;border-radius:12px;background:transparent;color:#f4ead3}
.stage-ink-swatch-dot{display:block;width:25px;height:25px;border-radius:50%;border:1px solid #ffffff88;box-shadow:0 2px 6px #10241d55}
.stage-ink-swatch small{font-size:12px;white-space:nowrap}
.stage-editor .stage-ink-swatch[aria-pressed=true]{border-color:#f2dfab;background:#f2dfab20;box-shadow:inset 0 0 0 1px #f2dfab44}
.stage-editor .stage-ink-swatch:focus-visible{outline:2px solid #fff0c7;outline-offset:2px}
.stage-size-numeric{display:flex;align-items:center;gap:9px;margin:4px 0 12px;font-size:13px;color:#dce1d0}
.stage-editor .stage-size-number{width:78px;min-height:40px;box-sizing:border-box;padding:6px 8px;border:1px solid #e7ddbd66;border-radius:8px;background:#f5efd414;color:#fff2d7;font-size:19px;text-align:center}
.stage-title-letter-editor{clear:both;padding:12px;margin-top:16px;background:#ffffff07;border:1px solid #eee0bc24;border-radius:12px}
.stage-title-letter-editor p{margin:0 0 12px!important}
.stage-title-letter-buttons{display:flex;flex-wrap:wrap;gap:7px}
.stage-editor .stage-title-letter-editor button{float:none;min-height:40px!important;font-size:15px!important}
.stage-title-letter-buttons button{display:flex;flex-direction:column;gap:3px;align-items:center;padding:7px 10px!important;border-radius:9px!important;min-width:49px}
.stage-title-letter-buttons b{font:22px var(--serif)}.stage-title-letter-buttons small{font-size:11px;color:inherit}
.stage-title-letter-buttons button[aria-pressed=true]{background:#eadcb8;color:#243b30;border-color:#eadcb8}
.stage-copy-line{display:block;min-height:1em;line-height:1.8}
.stage-text-line-editor{padding:4px 0 16px;border-bottom:1px solid #e8ddbd28;margin-bottom:10px}
.stage-text-line-editor input[type=range]{margin-bottom:0}.stage-line-size{font-size:14px;color:#d7dec9}.stage-text-line-editor button{float:right;font-size:13px!important;min-height:30px!important;padding:3px 10px!important}
.stage-ink-canvas{display:none;position:fixed;inset:0;width:100vw;height:100vh;pointer-events:none!important;z-index:2147483000}
body.space-stage .stage-ink-canvas{display:block}
.stage-ink-surface{display:none;position:fixed;inset:0;z-index:70;touch-action:none;cursor:crosshair}
body.space-stage.stage-handwriting .stage-ink-surface{display:block}
body.space-stage.stage-handwriting .stage-ink-surface.is-eraser{cursor:cell}
body.space-stage .stage-tools,body.space-stage .stage-tools-toggle{z-index:120}
body.space-stage .stage-editor{z-index:130}
.stage-ink-modes{display:flex;gap:8px;flex-wrap:wrap;margin-top:18px}
.stage-ink-modes button[aria-pressed=true]{background:#ecdfbd!important;color:#223c30!important}
.stage-editor input[type=color]{width:64px;height:40px;padding:3px;border:1px solid #ecdfbd55;border-radius:8px;background:transparent}
body.space-stage #playerDock .stage-close-score{right:0;top:-46px;min-height:40px;padding:6px 10px;border:0;border-radius:0;background:transparent;backdrop-filter:none;color:#fff1d5;text-shadow:0 1px 5px #152c24,0 0 12px #152c2477;font-size:16px}
body.space-stage #playerDock .stage-close-score[hidden]{display:none!important}
body.space-stage .stage-tools{bottom:38px!important;left:50%!important;right:auto!important;width:auto!important;max-width:calc(100vw - 24px)!important;transform:translateX(-50%)!important;justify-content:center!important}
body.space-stage .stage-tools-toggle{left:50%;right:auto!important;bottom:max(2px,env(safe-area-inset-bottom))!important;transform:translateX(-50%);width:100px;height:34px;min-height:34px;border:0;background:transparent;backdrop-filter:none;padding:10px}
body.space-stage .stage-tools-toggle span{display:block;width:9px;height:9px;border-radius:50%;background:#f0e3bdba;box-shadow:0 1px 8px #17382b88}
body.space-stage .stage-tools-toggle:hover span,body.space-stage .stage-tools-toggle:focus-visible span{background:#fff1ca;box-shadow:0 0 10px #f0e3bd55}
body.space-stage .stage-editor{bottom:108px!important}
body.space-stage #stageView .stage-intro h1,body.space-stage #stageView .stage-intro>p:last-of-type{white-space:pre-wrap;overflow-wrap:anywhere}
body.space-stage.stage-editing-text .stage-letter{cursor:pointer}
body.space-stage.stage-editing-text .stage-letter:hover{background:#e2cc9540;border-radius:4px}
body.space-stage.stage-editing-text .stage-letter-selected{outline:1px solid #f5d894;background:#e2cc9533;border-radius:4px}
body.space-stage.stage-editing-text .stage-editor{left:auto;right:24px;transform:none;width:min(400px,45vw)}
@media(max-width:650px){body.space-stage.stage-editing-text .stage-editor{right:10px;left:10px;width:auto;max-height:38vh}body.space-stage .stage-tools button{min-width:74px}}
.stage-orbit-empty{display:flex;height:100%;flex-direction:column;justify-content:center;align-items:center;gap:16px;text-align:center;padding:12px;box-sizing:border-box;color:#f0e4c9}
.stage-orbit-empty strong{font:24px/1.6 var(--serif);font-weight:400}.stage-orbit-empty span{font-size:16px;line-height:1.8;color:#cbd4c5}
body.space-stage #stageChooseSong[hidden]{display:none!important}
body.space-stage #stageView .stage-song{padding:24px}
body.space-stage #stageView .stage-song-label{font-size:clamp(18px,1.55vw,23px);margin-top:16px;padding-top:12px;letter-spacing:.04em}
body.space-stage #stageView .stage-search-suggestions.stage-word-globe{height:clamp(170px,25vh,225px);margin-bottom:14px}
body.space-stage .stage-online-search button{min-width:84px;padding:10px 16px;white-space:nowrap;font-size:18px;color:#f4e5c5;border-left:1px solid #f0e1bc30}
.stage-scope-dialog{position:fixed;inset:0;margin:auto;width:min(480px,calc(100vw - 36px));height:fit-content;max-height:min(calc(100dvh - 40px),calc(var(--stage-vv-height,100dvh) - 24px));box-sizing:border-box;overflow:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding:30px;border:1px solid #eee0bd50;border-radius:24px;background:linear-gradient(140deg,#31473deb,#192e28ed);color:#f5ead3;backdrop-filter:blur(26px);box-shadow:0 24px 90px #071c1766}
/* 键盘顶起后：贴在可见区域顶部，高度不超过可视高度，避免整块被挡 */
.stage-scope-dialog.stage-scope-keyboard{inset:auto;top:max(8px,var(--stage-vv-top,0px));left:50%;right:auto;bottom:auto;margin:0;transform:translateX(-50%);max-height:calc(var(--stage-vv-height,100dvh) - 16px);width:min(480px,calc(100vw - 24px))}
.stage-scope-dialog::backdrop{background:#0b201f60;backdrop-filter:blur(5px)}
.stage-scope-dialog h2{margin:0 40px 24px 0;font:28px/1.4 var(--serif);letter-spacing:.04em}
.stage-scope-close{position:absolute;right:15px;top:12px;min-width:44px;min-height:44px;border:0;background:transparent;color:#efe6d1;font:29px/1 sans-serif;cursor:pointer}
.stage-scope-dialog .stage-pick-search{margin-bottom:20px;font-size:18px}
.stage-scope-dialog .stage-pick-search::placeholder{color:#d0d4c6;opacity:1}
.stage-scope-choices{display:grid;gap:10px}
.stage-scope-choices button{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:66px;padding:14px 18px;text-align:left;border:1px solid #e6dbbb3b;border-radius:14px;background:#e8e5ca0b;color:#f5ead3;cursor:pointer}
.stage-scope-choices strong{font-size:21px;font-weight:500}.stage-scope-choices small{font-size:14px;color:#c9d2c2}
.stage-scope-choices button:hover,.stage-scope-choices button:focus-visible{background:#e5dfc321;border-color:#e7d4a2;outline:2px solid #e7d4a250;outline-offset:2px}
body.space-stage #stageView .stage-search-suggestions.stage-word-globe{display:block;position:relative;height:clamp(180px,28vh,260px);margin:0 0 18px;padding:0;overflow:hidden;touch-action:pan-y;cursor:grab;user-select:none}
body.space-stage #stageView .stage-search-suggestions.stage-word-globe:active{cursor:grabbing}
body.space-stage #stageView .stage-search-suggestions.stage-word-globe button.stage-orbit-word{position:absolute;display:block;width:max-content;max-width:65%;min-height:36px;margin:0;padding:5px 8px;grid-row:auto;border:0;border-radius:12px;background:transparent;font-size:20px;line-height:1.3;letter-spacing:.025em;color:#f4e8cd;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;transform-origin:center;text-shadow:0 2px 12px #10271ed9;transition:color .15s,background .15s;cursor:pointer}
body.space-stage #stageView .stage-search-suggestions.stage-word-globe button.stage-orbit-word:focus-visible{outline:2px solid #f6df9c;outline-offset:1px;background:#1c3b2de6;opacity:1!important;z-index:60!important}
body.space-stage #stageView .stage-search-suggestions.stage-word-globe button.stage-orbit-word:hover{background:#f2e5bc14;color:#fff8e9}
@media(max-height:560px) and (orientation:landscape){body.space-stage #stageView .stage-search-suggestions.stage-word-globe{height:125px;margin-bottom:8px}body.space-stage #stageView .stage-search-suggestions.stage-word-globe button.stage-orbit-word{font-size:17px}body.space-stage #stageView .stage-song-label{margin-top:12px;padding-top:10px;font-size:19px}}
body.space-stage #stageView .stage-search-suggestions{display:grid;grid-template-columns:1fr 1fr;align-items:center;gap:8px 20px;margin:0 0 26px;padding:8px 0}
body.space-stage #stageView .stage-search-suggestions button{border:0;border-radius:0;background:transparent;padding:8px 0;min-height:44px;text-align:left;font-family:var(--serif);font-weight:400;line-height:1.4;letter-spacing:.06em;text-shadow:0 2px 16px #142b2455;transition:color .2s}
body.space-stage #stageView .stage-search-suggestions button:nth-child(1){grid-row:1 / 3;font-size:clamp(34px,3.3vw,48px);color:#fff0cc}
body.space-stage #stageView .stage-search-suggestions button:nth-child(2){font-size:clamp(24px,2.1vw,31px);color:#e6d8b8}
body.space-stage #stageView .stage-search-suggestions button:nth-child(3){font-size:clamp(17px,1.5vw,22px);color:#d4ddca}
body.space-stage #stageView .stage-search-suggestions button:hover{color:#fff9ea}
body.space-stage #stageView .stage-song-label{display:block;margin:24px 0 0;padding-top:19px;border-top:1px solid #eee0bc26;font-family:var(--serif);font-size:clamp(21px,1.9vw,28px);line-height:1.65;letter-spacing:.07em;color:#f5e7c8}
body.space-stage #stageTitle[hidden]{display:none!important}
body.space-stage .stage-search-suggestions{display:flex;align-items:center;gap:9px;flex-wrap:wrap;margin:22px 0;color:#dbdfcc;font-size:15px}
body.space-stage .stage-search-suggestions button{min-height:40px;padding:7px 12px;border:1px solid #ecdfbd38;border-radius:20px;color:#f8ecd2;background:#f1e7cd0c;font-size:16px}
body.space-stage .stage-online-search{display:flex;flex:1;min-width:0;align-items:center;min-height:54px;border:1px solid #f0e1bc66;border-radius:14px;background:#162c2670;overflow:hidden}
body.space-stage .stage-online-search input{min-width:0;width:100%;flex:1;border:0;outline:none;background:transparent;padding:12px 14px;color:#fff2d7;font-size:19px}
body.space-stage .stage-online-search input::placeholder{color:#dedbc9;opacity:1}
body.space-stage .stage-online-search:focus-within{outline:2px solid #dfce9d;outline-offset:3px}
body.space-stage .stage-online-search button{display:grid;place-items:center;min-width:48px;min-height:52px;padding:10px;border:0;background:transparent;color:#f8ecd2}
body.space-stage .stage-online-search svg{width:23px;height:23px}
body.space-stage .stage-song-actions{flex-wrap:nowrap}
body.space-stage #stageChooseSong{flex:0 0 auto;min-height:54px;padding:10px 16px;font-size:18px}
.stage-close-score{display:none}
body.space-stage .stage-close-score{display:block;position:absolute;right:8px;top:8px;z-index:15;min-height:44px;padding:8px 14px;border:1px solid #f0e3c333;border-radius:22px;background:#20392ed9;color:#fff1d5;font-size:16px;backdrop-filter:blur(12px);cursor:pointer}
body.space-stage.stage-clean .stage-close-score{display:none!important}
body.space-stage #stageView{isolation:auto!important;z-index:auto!important}
body.space-stage .stage-tools{position:fixed;bottom:max(14px,env(safe-area-inset-bottom));left:50%;z-index:40;max-width:calc(100vw - 128px);box-sizing:border-box}
body.space-stage .stage-editor{position:fixed;bottom:calc(90px + env(safe-area-inset-bottom));z-index:60;max-height:calc(100dvh - 180px);box-sizing:border-box}
body.space-stage .stage-tools-toggle{position:fixed;right:max(18px,env(safe-area-inset-right));bottom:max(20px,env(safe-area-inset-bottom));display:grid;place-items:center;width:44px;height:44px;min-width:44px;min-height:44px;padding:10px;border:1px solid #eee3c640;border-radius:50%;color:#fff1d5;background:#19392ba6;backdrop-filter:blur(14px);z-index:41;cursor:pointer}
.stage-tools-toggle svg{width:22px;height:22px;transition:transform .2s}
body.space-stage.stage-tools-collapsed .stage-tools{display:none!important}
body.space-stage.stage-tools-collapsed .stage-tools-toggle svg{transform:rotate(180deg)}
body.space-stage.stage-clean .stage-tools-toggle{display:none!important}
@media(max-width:650px){body.space-stage .stage-tools{left:10px;right:65px;width:auto;max-width:none;transform:none;overflow-x:auto;justify-content:flex-start;scrollbar-width:thin}body.space-stage .stage-tools-toggle{right:10px}body.space-stage .stage-tools button{flex-shrink:0}}
body.space-stage .stage-atmosphere{
  z-index:0;
  overflow:hidden;
  background:#121816;
}
body.space-stage .app{position:relative;z-index:1}
body.space-stage .stage-art-motion{
  position:absolute;inset:-12%;
  transform-origin:center center;
  will-change:transform;
  z-index:0;
  /* 不依赖 data-stage-bg，进演奏厅就动 */
  animation:stageSlowZoom 22s ease-in-out infinite alternate !important;
}
body.space-stage .stage-art-layer{
  position:absolute;inset:0;
  background-image:linear-gradient(90deg,#0d1712c2,#0a1218a8 48%,#0b1018d0),var(--stage-art,url('stage-bg-bamboo-dusk-v1.png'));
  background-position:center;
  background-size:cover;
}
body.space-stage .stage-atmosphere:after{
  content:"";position:absolute;inset:0;
  background:radial-gradient(ellipse at 35% 20%,#ffe4a922,transparent 60%);
  pointer-events:none;z-index:2;
}
/* 月色：月光轻轻呼吸，不加水波、不加白块 */
body.space-stage[data-stage-bg=moon] .stage-atmosphere:after{
  background:radial-gradient(ellipse at 26% 16%,#ffe6b038,transparent 52%);
  animation:stageMoonBreath 9s ease-in-out infinite alternate !important;
}
/* 放大约 12%，并轻轻横移；22 秒一轮，比之前能看出来，又不至于抢 */
@keyframes stageSlowZoom{
  0%{transform:translate3d(-3%,0,0) scale(1)}
  100%{transform:translate3d(3.2%,0.6%,0) scale(1.12)}
}
@keyframes stageMoonBreath{
  0%{opacity:.55}
  100%{opacity:1}
}
@media(prefers-reduced-motion:reduce){
  body.space-stage .stage-art-motion{animation:stageSlowZoom 22s ease-in-out infinite alternate !important}
  body.space-stage[data-stage-bg=moon] .stage-atmosphere:after{animation:stageMoonBreath 9s ease-in-out infinite alternate !important}
}
body.space-stage #stageView{position:relative;display:block!important;min-height:0;padding:0;overflow:visible;isolation:isolate}
body:not(.space-stage) #stageView{display:none!important}
body.space-stage .stage-bottom{display:none}
body.space-stage #stageView .stage-intro{position:absolute;left:6%;top:23%;width:35%;margin:0;z-index:2;text-shadow:0 2px 24px #10231788}
body.space-stage .stage-intro .overline{font-size:16px;letter-spacing:.22em;color:#e6ead5}
body.space-stage .stage-intro h1{font-size:clamp(32px,4.1vw,64px);line-height:1.4;letter-spacing:.08em;margin:20px 0;color:#fff2d8;overflow-wrap:anywhere}
body.space-stage .stage-intro>p:last-of-type{font-size:clamp(18px,1.7vw,25px);line-height:2;color:#eee9d9;white-space:pre-line}
body.space-stage .stage-song{position:absolute;right:3%;top:18%;width:46%;max-width:480px;z-index:2;background:linear-gradient(135deg,#edf0dc18,#17241e99);border:1px solid #fff2d432;box-shadow:0 20px 70px #06120f25;backdrop-filter:blur(18px);border-radius:24px;padding:30px}
body.space-stage.has-score .stage-song{display:none}
body.space-stage #playerDock{position:fixed!important;flex:none!important;margin:0!important;min-height:0!important;max-width:none!important;z-index:6;overflow:visible!important;padding:0!important;transform:none!important}
body.space-stage #playerDock>.player-heading,body.space-stage #playerDock>.player-footnote{display:none!important}
body.space-stage #playerDock .score-container{position:relative;width:100%;height:100%!important;flex:none!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;overflow:hidden}
body.space-stage #scoreFrame{width:100%;height:100%;border:0;background:transparent}
body.space-stage #frameLoading{background:#203329cc;border-radius:20px;backdrop-filter:blur(14px);font-size:18px}
.stage-tools{position:absolute;bottom:8px;left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:8px;padding:8px;border:1px solid #fff0cd30;border-radius:50px;background:#172b25b3;backdrop-filter:blur(22px);box-shadow:0 10px 36px #00170d26;z-index:20;white-space:nowrap}
.stage-tools button,.stage-editor button,.stage-pick-tabs button{min-height:46px;padding:8px 17px;border:1px solid transparent;border-radius:24px;background:transparent;color:#f7edd8;font-size:17px}
.stage-tools button:hover,.stage-tools button[aria-pressed=true]{background:#e1d5b42b;border-color:#e1d5b44d}
.stage-tools button[aria-pressed=true]{background:#e6dfc4;color:#263c30}
.stage-tools svg{width:20px;height:20px;vertical-align:middle;margin-right:5px}
.stage-edit-shield,.stage-size-handle,.stage-move-handle{display:none}
body.space-stage.stage-arranging #playerDock{outline:1px dashed #f8e5b7aa;outline-offset:6px}
body.space-stage.stage-arranging .stage-edit-shield{display:block;position:absolute;inset:0;z-index:10;cursor:move;touch-action:none;background:#f9e6bc05}
body.space-stage.stage-arranging .stage-move-handle{display:block;position:absolute;left:12px;top:-28px;padding:4px 12px;border-radius:12px;font-size:13px;background:#203d32;color:#f5e9cd;z-index:12;pointer-events:none}
body.space-stage.stage-arranging .stage-size-handle{display:block;position:absolute;width:30px;height:30px;padding:0;border:2px solid #f1dfb4;background:#365f4e;border-radius:50%;z-index:13;touch-action:none}
.stage-size-handle[data-corner=nw]{left:-16px;top:-16px;cursor:nwse-resize}.stage-size-handle[data-corner=ne]{right:-16px;top:-16px;cursor:nesw-resize}.stage-size-handle[data-corner=sw]{left:-16px;bottom:-16px;cursor:nesw-resize}.stage-size-handle[data-corner=se]{right:-16px;bottom:-16px;cursor:nwse-resize}
body.space-stage.stage-arranging .stage-intro{outline:1px dashed #f8e5b788;outline-offset:14px;cursor:move;touch-action:none}
body.space-stage.stage-arranging .stage-intro:after{content:'拖动文字 · 拉四角调大小';position:absolute;top:-35px;left:0;font:13px sans-serif;color:#eee6d3;white-space:nowrap}
body.space-stage.stage-arranging .stage-text-size-handle,body.space-stage.stage-arranging .stage-intro .stage-size-handle{display:block!important;visibility:visible!important;opacity:1!important;z-index:30;width:34px;height:34px;border:3px solid #ffe7a8;background:#2f5a45;box-shadow:0 0 0 4px #0006}
body.space-stage #stageView .stage-intro{box-sizing:border-box}
.stage-editor{position:absolute;bottom:82px;left:50%;transform:translateX(-50%);width:min(440px,90vw);max-height:65vh;overflow:auto;border:1px solid #eee3c644;border-radius:20px;padding:22px;background:#1e342eea;backdrop-filter:blur(24px);z-index:25;box-shadow:0 20px 60px #001b1640;color:#f4ead3}
.stage-editor[hidden]{display:none!important}.stage-editor label{display:block;font-size:16px;margin:12px 0 7px}.stage-editor input[type=text],.stage-editor textarea{width:100%;box-sizing:border-box;background:#fdf8e510;border:1px solid #e7ddbd55;border-radius:10px;color:#fff4dc;font:18px/1.6 var(--serif);padding:9px 12px}.stage-editor textarea{min-height:95px;resize:vertical}.stage-editor input[type=range]{width:100%;accent-color:#e3c990}.stage-editor h3{margin:0;font:24px var(--serif)}.stage-editor .stage-editor-actions{display:flex;gap:8px;justify-content:flex-end;margin-top:14px}.stage-editor button{border-color:#e9dcb83b}.stage-editor p{font-size:14px;line-height:1.7;color:#cfcdbb}.stage-backgrounds{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;width:100%}.stage-backgrounds button{min-height:44px;padding:8px 6px;font-size:16px;font-weight:600;letter-spacing:.06em;text-align:center;border:1px solid #e9dcb83b;border-radius:12px;background:#ffffff12}.stage-backgrounds button[aria-pressed=true]{background:#e6dfc4;color:#263c30;border-color:#e6dfc4}
body.space-stage .stage-pick-tabs{display:flex;gap:6px;margin:0 0 18px}.stage-pick-tabs button{flex:1;padding:8px 6px;border:1px solid #f0e1bc33;font-size:17px}.stage-pick-tabs button[aria-pressed=true]{background:#ecdfc1;color:#243c30}
.stage-pick-search{display:block;width:100%;box-sizing:border-box;min-height:52px;margin-bottom:10px;border-radius:14px;border:1px solid #dfd6bb55;background:#ffffff0a;padding:10px 15px;color:inherit;font-size:19px}.stage-pick-note{font-size:14px;color:#d1ceb9;margin:10px 0 18px}.stage-pick-list .drawer-song b{font-size:22px}.stage-pick-list .drawer-song small{font-size:14px}.stage-pick-list .drawer-row{min-height:76px}.stage-pick-list .drawer-song{width:100%;text-align:left}
.stage-signature{display:none;position:absolute;left:6%;top:3%;width:200px;align-items:center;gap:12px;color:#f6edda;z-index:3}.stage-signature img{width:44px;height:52px}.stage-signature b{font:22px var(--serif)}.stage-signature small{display:block;font-size:12px;margin-top:6px}
body.space-stage.stage-clean #appHeader{visibility:hidden;pointer-events:none}body.space-stage.stage-clean .stage-tools,body.space-stage.stage-clean .stage-editor,body.space-stage.stage-clean .stage-song{display:none!important}body.space-stage.stage-clean .stage-signature{display:flex}
.stage-restore{position:fixed;top:16px;right:20px;z-index:90;padding:12px 18px;min-height:46px;border:1px solid #f0e4c744;border-radius:26px;background:#20362eda;color:#fff2d6;font-size:16px;backdrop-filter:blur(12px)}.stage-restore[hidden]{display:none!important}.stage-restore.is-asleep{opacity:0;pointer-events:none}
@media(max-width:650px){body.space-stage #stageView .stage-intro{left:6%;top:5%;width:86%}body.space-stage .stage-intro h1{font-size:32px;margin:9px 0}body.space-stage .stage-intro>p:last-of-type{font-size:17px;line-height:1.7}body.space-stage .stage-intro .overline{font-size:13px}body.space-stage .stage-song{width:90%;right:5%;top:40%;padding:22px;box-sizing:border-box}.stage-tools{width:calc(100% - 8px);justify-content:center;gap:2px;padding:6px}.stage-tools button{font-size:14px;padding:7px 9px;min-height:44px}.stage-tools svg{display:none}.stage-signature{top:0;left:auto;right:5%;width:auto}.stage-signature b{font-size:17px}.stage-signature img{width:32px;height:38px}}
@media(orientation:landscape) and (max-height:560px){body.space-stage .stage-intro h1{font-size:32px}body.space-stage .stage-intro>p:last-of-type{font-size:16px}.stage-tools{bottom:0;padding:4px}.stage-tools button{min-height:38px;font-size:14px}.stage-editor{bottom:58px}}

body.space-stage[data-stage-bg=rain] .stage-atmosphere:after{
  background:radial-gradient(ellipse at 70% 30%,#6f9cff18,transparent 58%);
}
body.space-stage[data-stage-bg=coast] .stage-atmosphere:after{
  background:radial-gradient(ellipse at 50% 18%,#7ec8ff14,transparent 55%);
}

/* stage-bg-labels-clean */
body.space-stage:not(.stage-editing-text):not(.stage-handwriting) .stage-control-layer .stage-editor:has(.stage-backgrounds){
  width: min(340px, calc(100vw - 24px)) !important;
}
body.space-stage .stage-control-layer .stage-editor .stage-backgrounds button{
  overflow: hidden;
  text-overflow: clip;
  line-height: 1.2;
}
