/* Full-viewport application surfaces. No page header, footer or section grid. */
.design-lab{position:fixed;inset:0;overflow:hidden;font:16px/1.35 system-ui,-apple-system,"Noto Sans TC",sans-serif;color:#e7eae8;background:#090b0e}
.design-lab #lab-mount{position:absolute;inset:0}
.design-lab .lab-boot{z-index:100;background:#090b0e;letter-spacing:.12em}
.design-lab [data-immersive-worlds].workbench{position:absolute;inset:0;max-width:none;width:100%;height:100%;height:100dvh;margin:0;padding:0;border:0;border-radius:0;overflow:hidden;background:#090b0e;display:block;isolation:isolate}
[data-immersive-worlds] .stage-column,[data-immersive-worlds].focus-mode .stage-column{position:absolute;inset:0!important;width:100%;height:100%;border:0;border-radius:0}
[data-immersive-worlds] #canvas-shell,[data-immersive-worlds] #stage{position:absolute;inset:0;width:100%;height:100%;display:block;border:0;outline-offset:-5px;touch-action:none}
[data-immersive-worlds] #engine-bank{display:none!important}
.world-ui{position:absolute;inset:0;z-index:4;pointer-events:none;color:var(--world-ink);font-size:16px}
.world-ui>*,.world-ui button,.world-ui input,.world-ui [role=slider]{pointer-events:auto}
.world-ui button,.world-chrome button{font:inherit;letter-spacing:inherit;color:inherit;background:none;border:0;border-radius:0;padding:8px;min-width:44px;min-height:44px;cursor:pointer;box-shadow:none;line-height:1.2}
.world-ui button:hover{color:#fff;background:#ffffff0b}
.world-ui button[aria-pressed=true]{color:#fff;text-shadow:0 0 16px #ffffff28}
.world-ui button[aria-pressed=true]:after{content:"";display:block;width:4px;height:4px;margin:3px auto 0;background:currentColor;border-radius:50%}
.world-ui small{font-size:12px;color:#b0b7b5;letter-spacing:.08em}
.world-ui [role=slider]{touch-action:none;user-select:none;cursor:ew-resize}
.design-lab :is(button,input,select,[role=slider]):focus-visible{outline:2px solid #eef4ef;outline-offset:4px}
.world-ui input[type=range]{height:44px;min-width:0;margin:0;accent-color:#d6dfd9;background:none}
.world-ui input[type=range]::-webkit-slider-thumb{cursor:grab}
.world-chrome{position:absolute;right:max(18px,env(safe-area-inset-right));top:max(16px,env(safe-area-inset-top));z-index:10;display:flex;align-items:center;gap:2px;color:#e4e8e7}
.world-chrome button{font:14px ui-monospace,Consolas,monospace;background:#0d1010a6}
#world-switch{display:flex;align-items:center;gap:14px;padding:10px 14px}
#world-switch b{font-weight:400}
#world-switch span{font-size:22px}
#world-overlay{position:absolute;inset:0;z-index:2;width:100%;height:100%;pointer-events:none}
[data-world=mirror] #world-overlay{clip-path:circle(var(--lens-r) at var(--lens-x) var(--lens-y))}
[data-immersive-worlds] #status{position:absolute;z-index:18;top:74px;bottom:auto;left:50%;right:auto;transform:translateX(-50%);max-width:calc(100% - 48px);width:max-content;font-size:14px;padding:10px 16px;color:#e7edeb;background:#13191b;border:1px solid #53605a;border-radius:0;opacity:0;pointer-events:none}
[data-immersive-worlds] #status:is(.error,.busy){opacity:1}
/* The status line stays hidden at rest, so each room says beside its own count when chosen components are too small to see. */
.world-ui .faint-note{position:absolute;width:max-content;max-width:calc(100vw - 32px);font-size:12px;line-height:1.35;letter-spacing:.04em;color:#b0b7b5;white-space:nowrap;word-break:keep-all;pointer-events:none}
[data-immersive-worlds] #component-details{z-index:15;bottom:24px;left:50%;right:auto;transform:translateX(-50%);max-width:calc(100% - 32px);background:#101617f2;border:1px solid #677572;color:#eef0ee;box-shadow:none}
/* 01 — void: typography is the control surface, no control containers. */
.void-glyphs{position:absolute;left:18px;top:50%;transform:translateY(-50%);display:flex;flex-direction:column;gap:1px}
.void-glyphs button{width:52px;height:52px;font-size:27px;display:grid;grid-template-columns:1fr 10px;align-items:center;padding:4px}
.void-glyphs small{font-size:10px;color:#788181}
.void-mark{position:absolute;right:28px;top:31%;font-family:serif;font-size:24px;line-height:1.6;letter-spacing:.2em;color:#88918f;pointer-events:none}
.void-number{position:absolute;bottom:20px;left:10%;width:250px}
.world-ui .void-exact{position:absolute;left:0;bottom:-12px;transform:translateX(-100%);font-size:22px}
.void-number .faint-note{left:0;bottom:100%}
.number-scrub{display:flex;gap:16px;align-items:baseline}
.number-scrub output{font-size:clamp(65px,8vw,120px);font-weight:300;letter-spacing:-.07em;line-height:1.1;font-variant-numeric:tabular-nums}
.number-scrub span{font-size:14px;color:#b0b7b2;white-space:nowrap}
.void-movement{position:absolute;right:180px;bottom:28px;display:flex;align-items:end;gap:28px}
.void-movement>button{font-size:17px}
.speed-scrub{display:flex;flex-direction:column;min-width:70px;min-height:52px;justify-content:center}
.speed-scrub output{font:25px ui-monospace,monospace}
.speed-scrub span{font-size:12px;color:#a1aaa4}
.void-play{position:absolute;right:24px;bottom:25px;display:flex;gap:4px}
.void-play [data-play]{width:52px;height:52px;font-size:28px}
/* 02 — orbit: radial selection and a real angular control. */
.orbital-lines{position:absolute;left:50%;top:43%;width:min(68vw,68vh);aspect-ratio:1;border:1px solid #89919a30;border-radius:50%;transform:translate(-50%,-50%);pointer-events:none}
.orbital-lines:before,.orbital-lines:after{content:"";position:absolute;inset:8%;border:1px dashed #89919a25;border-radius:50%}
.orbital-lines:after{inset:24%}
.star-select{position:absolute;inset:0;pointer-events:none}
.star-select .star-key{position:absolute;left:var(--x);top:var(--y);transform:translate(-50%,-50%);font-size:32px;width:64px;height:64px;border-radius:50%;background:#10131b}
.star-key[aria-pressed=true]{outline:1px solid #c2c8d0}
.orbit-axis{position:absolute;left:50%;top:82%;transform:translateX(-50%)}
.orbit-axis button{font-size:20px;letter-spacing:.08em}
.orbit-dial{position:absolute;right:30px;bottom:24px;width:156px;height:156px;border:1px solid #a0a9b2;border-radius:50%;display:flex;align-items:center;justify-content:center;flex-direction:column;background:repeating-conic-gradient(from -135deg,#758190 0deg 1deg,transparent 1deg 9deg);box-shadow:inset 0 0 0 9px #10131b,inset 0 0 0 27px #10131b}
.orbit-dial output{font:54px ui-monospace,monospace;z-index:1;line-height:1.1}
.orbit-dial i{position:absolute;inset:16px;transform:rotate(var(--angle));border-radius:50%;pointer-events:none}
.orbit-dial i:after{content:"";position:absolute;top:0;left:calc(50% - 2px);width:4px;height:22px;background:#f1f2f2}
.orbit-dial .faint-note{right:0;bottom:calc(100% + 10px);text-align:right}
.orbit-pulse{position:absolute;left:50%;bottom:25px;transform:translateX(-50%)}
.orbit-pulse button{width:64px;height:64px;border-radius:50%;border:1px solid #59677b;font-size:27px}
.orbit-rate{position:absolute;left:24px;bottom:36px;width:160px;display:flex;gap:8px;align-items:center}
.orbit-rate input{width:120px}
/* 03 — machine: detented bank, rocker and physical faders. */
[data-world=synth]{font-family:ui-monospace,Consolas,monospace}
.machine-stamp{position:absolute;left:24px;top:20px;font-size:17px;line-height:1.1;letter-spacing:.1em;pointer-events:none}
.machine-stamp span{display:block;margin-top:10px;font:12px system-ui;color:#aeb1a5}
.machine-keys{position:absolute;left:230px;top:18px;display:flex;gap:4px}
.machine-keys button{width:47px;height:54px;border:1px solid #52574d;background:linear-gradient(#34392f,#20251e);box-shadow:0 3px #060806;font-size:22px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px}
.machine-keys button[aria-pressed=true]{background:#aeb7a0;color:#10170e;box-shadow:0 1px #020501;transform:translateY(2px)}
.machine-keys button[aria-pressed=true]:after{display:none}
.machine-console{position:absolute;bottom:0;left:0;right:130px;height:164px;padding:18px 24px;display:grid;grid-template-columns:1fr auto 90px 76px;gap:20px;align-items:center;background:linear-gradient(#31372bfa,#1d2418fa);border-top:3px solid #505844}
.machine-basis{display:grid;grid-template-columns:repeat(4,48px);gap:6px}
.machine-basis button{border:1px solid #566349;box-shadow:inset 0 -5px #0e140b55;font-size:23px;background:#171f11}
.detent-keys{position:relative;display:flex;gap:6px;align-items:center}
.detent-keys .faint-note{left:0;bottom:calc(100% + 6px)}
.detent-keys button{height:92px;min-width:58px;display:flex;flex-direction:column;justify-content:space-between;align-items:center;border:1px solid #798371;background:#c7cbbb;color:#22281e;padding:12px 6px;box-shadow:0 5px #080c06}
.detent-keys button small{color:#414c35;font-size:12px}
.detent-keys button[aria-pressed=true]{transform:translateY(4px);box-shadow:0 1px #080c06;background:#859271;color:#080d06}
.detent-keys button[aria-pressed=true]:after{display:none}
.machine-meter{align-self:center;text-align:center;border-bottom:3px solid #7c8a6b;padding-bottom:8px}
.machine-meter output{font-size:50px;display:block;line-height:1.2}
.machine-meter small{font-size:10px}
.machine-console .machine-rocker{height:78px;background:#171f11;box-shadow:inset 0 0 0 2px #728466,inset 0 -16px #081105;font-size:30px}
.machine-faders{position:absolute;right:0;top:85px;bottom:0;width:130px;display:flex;justify-content:center;gap:9px;padding:20px 10px 75px;background:#272e21ee;border-left:3px solid #536144}
.machine-faders label{display:flex;flex-direction:column;align-items:center;gap:10px;font-size:13px}
.world-ui .vertical-fader{writing-mode:vertical-lr;direction:rtl;width:44px;height:min(45vh,370px)}
.machine-faders>button{position:absolute;bottom:18px;font-size:12px;left:0;right:0}
/* 04 — measured components, rather than a spatial target comparison. */
.section-mark{position:absolute;left:24px;top:22px;display:flex;flex-direction:column;font-size:24px;font-weight:300}
.section-mark small{font:11px ui-monospace,monospace;letter-spacing:.16em;margin-top:5px}
.section-select{position:absolute;left:24px;top:103px;display:flex;gap:4px}
.section-select button{border-bottom:1px solid #7f8d95;font-size:14px}
.section-rank{position:absolute;left:0;right:0;bottom:0;height:245px;pointer-events:none}
.section-readout{position:absolute;left:24px;top:-35px;display:flex;align-items:baseline;gap:12px;pointer-events:none}
.section-readout output{font:64px ui-monospace,monospace}
.section-readout small{margin-left:12px}
.section-readout .faint-note{left:0;bottom:100%;margin:0}
.rank-pick{position:absolute;left:24px;right:24px;top:42px;bottom:82px;border-bottom:1px solid #647278;background:linear-gradient(transparent 98%,#52636a 98%);pointer-events:auto}
.rank-pick i{position:absolute;left:var(--cut);top:0;bottom:0;width:16px;transform:translateX(-50%);background:#fff1;border-inline:1px solid #ebf1f3}
.rank-pick i:before{content:"▼";position:absolute;top:-21px;left:0;color:#f1f3f4;font-size:16px}
.rank-pick span{position:absolute;bottom:-25px;font:12px ui-monospace,monospace}
.rank-pick span:last-child{right:0}
.section-transport{position:absolute;bottom:16px;right:24px;display:flex;gap:16px;align-items:center}
.section-transport input{width:160px}
.section-transport [data-play]{font-size:26px}
/* 05 — a genuine phase timeline, with separate component keyframes. */
.editor-title{position:absolute;left:24px;top:22px;display:flex;gap:18px;align-items:baseline}
.editor-title span{font-size:24px;font-weight:300}
.clip-source{position:absolute;left:22px;top:84px;display:flex;gap:4px}
.clip-source button{background:#29272b;border-left:3px solid #9b9797;font-size:14px}
.edit-timeline{position:absolute;bottom:0;left:0;right:0;min-height:230px;padding:12px 24px 20px;background:#1a181ef2;border-top:1px solid #4d454f;font:14px ui-monospace,monospace}
.edit-transport{display:flex;align-items:center;gap:3px}
.edit-transport [data-play]{font-size:22px}
.edit-transport output{margin-left:15px;color:#c9c0c7}
.time-ruler{position:relative;height:59px;display:flex;justify-content:space-between;padding-top:4px;background:repeating-linear-gradient(90deg,#827783 0 1px,transparent 1px 5%);background-size:100% 7px;background-repeat:no-repeat;background-position:bottom}
.time-ruler span{font-size:11px;color:#bab0bd;pointer-events:none}
.time-cursor{position:absolute;left:var(--phase);top:0;bottom:-94px;width:1px;background:#eee8dc;pointer-events:none;z-index:2}
.world-ui .time-input{position:absolute;inset:11px 0 0;width:100%;height:44px;opacity:.72;z-index:3}
.edit-track{display:flex;align-items:center;gap:12px;height:45px;border-top:1px solid #49404c}
.edit-track>span{font-size:12px;width:50px;color:#b6a8ba}
.edit-track .keyframe{display:flex;align-items:center;gap:10px;min-width:56px;color:#897691}
.keyframe b{font-size:13px;font-weight:400;color:#d4cdd7}
.keyframe[aria-pressed=true]{color:#f4eee9!important}
.keyframe[aria-pressed=true]:after{display:none}
.edit-track output{margin-left:auto;font-size:16px}
.edit-track .speed-track{width:min(450px,70%);height:42px}
.edit-timeline .faint-note{right:24px;bottom:calc(100% + 8px)}
/* 06 — signal graph. The output connection genuinely changes the recipe. */
[data-world=patch] #stage{background:none}
.ui-patch:before{content:"";position:absolute;inset:0;background-image:radial-gradient(#596e603e 1px,transparent 1px);background-size:20px 20px;pointer-events:none}
#patch-wires{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;overflow:visible}
#patch-wires path{fill:none;stroke:#94ad87;stroke-width:2;vector-effect:non-scaling-stroke}
.circuit-open #patch-wires [data-wire="2"]{stroke:#a28770;stroke-dasharray:8 7}
.circuit-node{position:absolute;transform:translate(var(--node-x,0px),var(--node-y,0px));width:240px;background:#132019f2;border-left:3px solid #728b67;padding:3px 12px 12px;box-shadow:8px 8px 0 #0002}
.circuit-node:after{content:"";position:absolute;right:-7px;top:50%;width:12px;height:12px;border:2px solid #b3c8a7;border-radius:50%;background:#0c140f}
.circuit-node [data-drag-node]{width:100%;padding:3px;text-align:left;font:11px ui-monospace,monospace;letter-spacing:.1em;border-bottom:1px solid #455a44;cursor:move;touch-action:none}
.source-node{left:24px;top:17%}
.source-node [data-action=chooseTarget]{font-size:26px;text-align:left;min-height:67px}
.motion-node{left:54px;top:40%;width:325px}
.patch-jacks{display:flex;flex-wrap:wrap;gap:1px;padding-top:8px}
.patch-jacks button{width:40px;font-size:26px;border:1px solid transparent}
.patch-jacks button[aria-pressed=true]{border:1px solid #a6bb9d;background:#243723}
.patch-jacks button[aria-pressed=true]:after{display:none}
.sum-node{left:24px;top:67%;width:280px}
.sum-node [data-action=circuit]{display:flex;align-items:center;gap:10px;font-size:16px}
[data-circuit-lamp]{width:9px;height:9px;border-radius:50%;background:#a8bd90;box-shadow:0 0 8px #a8bd9040}
.circuit-open [data-circuit-lamp]{background:#aa866b;box-shadow:none}
.patch-ladder{display:flex;gap:1px;border-top:1px solid #4f6749}
.patch-ladder button{flex:1;font:18px ui-monospace,monospace;padding:5px}
.sum-node .faint-note{left:0;top:calc(100% + 8px)}
.circuit-output{position:absolute;right:30px;bottom:24px;display:flex;align-items:center;gap:20px;font:12px ui-monospace,monospace}
.circuit-output [data-play]{font-size:30px;border:2px solid #7e9177;border-radius:50%;width:58px;height:58px}
.circuit-tempo{position:absolute;right:160px;bottom:30px;display:flex;gap:12px;align-items:center;font:12px ui-monospace,monospace}
.circuit-tempo input{width:170px}
/* 07 — gallery is a camera gesture space, not a print in a page. */
.gallery-name{position:absolute;left:30px;top:25px;display:flex;flex-direction:column;gap:5px;pointer-events:none}
.gallery-name>span{font:28px "Noto Serif TC",Georgia,serif;font-weight:300;letter-spacing:.1em}
.gallery-name small{font-size:12px;color:#a79e98}
.gallery-name .faint-note{position:static}
.world-ui .gallery-previous,.world-ui .gallery-next{position:absolute;top:43%;font-family:serif;font-size:48px;font-weight:200;width:72px;height:90px;color:#b4aaa2}
.gallery-previous{left:12px}.gallery-next{right:12px}
.gallery-horizon{position:absolute;left:50%;bottom:93px;transform:translateX(-50%);display:flex;gap:32px;white-space:nowrap;pointer-events:none}
.gallery-horizon span{font-size:12px;letter-spacing:.08em;color:#a69c94}
.gallery-action{position:absolute;bottom:24px;left:50%;transform:translateX(-50%);display:flex;gap:9px;align-items:center;white-space:nowrap}
.gallery-action button{font-size:14px;color:#b7aea5}
.gallery-action [data-play]{font-size:24px;color:#eee9e2;width:55px;height:55px;border:1px solid #7b736d;border-radius:50%}
.gallery-rate{position:absolute;left:30px;bottom:26px;width:120px;opacity:.65}
.gallery-rate input{width:120px}
/* 08 — cursor-invoked command disc, no floating form windows. */
.command-caption{position:absolute;left:26px;top:26px;display:flex;flex-direction:column;gap:8px}
.command-caption b{font-size:20px;font-weight:400}
.command-caption span{font:11px ui-monospace,monospace;color:#b0a3b3}
.world-ui .pie-trigger{position:absolute;left:28px;top:104px;font-size:40px;width:66px;height:66px;border:1px solid #6e6472;border-radius:50%}
.command-pie{position:absolute;left:var(--pie-x);top:var(--pie-y);transform:translate(-50%,-50%);width:var(--pie-size,min(330px,calc(100vw - 24px)));aspect-ratio:1;border-radius:50%;background:conic-gradient(from -30deg,#29242df5 0 59deg,#4b414a 59deg 60deg,#29242df5 60deg 119deg,#4b414a 119deg 120deg,#29242df5 120deg 179deg,#4b414a 179deg 180deg,#29242df5 180deg 239deg,#4b414a 239deg 240deg,#29242df5 240deg 299deg,#4b414a 299deg 300deg,#29242df5 300deg 359deg,#4b414a 359deg);border:1px solid #8e7f90;z-index:8}
.pie-command{position:absolute;left:var(--x);top:var(--y);transform:translate(-50%,-50%);font-size:16px;width:70px;height:60px}
.pie-centre{position:absolute;inset:36%;border-radius:50%;background:#141018;display:flex;justify-content:center;align-items:center;flex-direction:column;border:1px solid #7e6d7b;pointer-events:none}
.pie-centre output{font:29px ui-monospace,monospace;line-height:1.1}
.pie-centre small{font-size:10px}
.pie-counts{position:absolute;left:50%;top:calc(100% + 14px);transform:translateX(-50%);display:flex;background:#231b28;border:1px solid #6c5873}
.pie-counts button{width:50px;font:18px ui-monospace,monospace}
.command-transport{position:absolute;left:24px;bottom:24px;display:flex;align-items:center;gap:8px}
.command-transport [data-play]{font-size:26px;width:56px;height:56px;border-bottom:2px solid #bb9bad}
.command-transport>span{font:12px ui-monospace,monospace;margin-left:10px;color:#b7a4b5}
.command-transport .faint-note{left:0;bottom:calc(100% + 6px)}
.command-speed{position:absolute;right:26px;bottom:27px;width:180px}
.command-speed input{width:180px}
/* 09 — one coherent world coordinate system, viewed through a movable lens. */
.lens-header{position:absolute;left:24px;top:28px;display:flex;gap:13px;font-size:15px;letter-spacing:.08em;color:#b2c2bd;pointer-events:none}
.lens-header b{font-weight:300;color:#6b827a}
.lens-handle{position:absolute;left:var(--lens-x);top:var(--lens-y);transform:translate(-50%,-50%);width:calc(var(--lens-r) * 2);height:calc(var(--lens-r) * 2);border:2px solid #b9cbc2;border-radius:50%;touch-action:none;box-shadow:0 0 0 7px #0c141460;cursor:move!important}
.lens-handle span{position:absolute;bottom:-17px;left:calc(50% - 22px);width:44px;height:44px;display:grid;place-items:center;background:#b1c3b8;color:#111a15;border-radius:50%;font-size:25px}
.lens-radius{position:absolute;right:26px;bottom:101px;width:180px}
.lens-radius input{width:180px}
.lens-dots{position:absolute;left:26px;bottom:106px;display:flex;gap:10px;align-items:baseline}
.lens-dots button{display:flex;flex-direction:column;align-items:center;gap:7px;font:15px ui-monospace,monospace}
.lens-dots i{width:10px;height:10px;border:1px solid #8baca0;border-radius:50%}
.lens-dots button:nth-child(2) i{width:14px;height:14px}.lens-dots button:nth-child(3) i{width:20px;height:20px}.lens-dots button:nth-child(4) i{width:28px;height:28px}.lens-dots button:nth-child(5) i{width:36px;height:36px}
.lens-dots [aria-pressed=true] i{background:#b7cbc0}
.lens-dots [aria-pressed=true]:after{display:none}
.lens-dots .faint-note{left:0;bottom:calc(100% + 6px)}
.lens-controls{position:absolute;left:26px;right:26px;bottom:25px;display:flex;align-items:center;gap:12px}
.lens-controls [data-play]{margin-left:auto;font-size:28px;width:55px}
.lens-controls input{width:140px}
/* 10 — touch: XY pad with explicit/automatic axis lock, not a mobile page. */
.touch-shapes{position:absolute;top:21px;left:16px;right:235px;display:flex;overflow:auto;scrollbar-width:none;overscroll-behavior:contain;gap:3px}
.touch-shapes button{flex:none;width:55px;height:55px;font-size:28px;border-radius:50%;display:grid;place-items:center}
.touch-shapes small{display:none}
.touch-shapes [aria-pressed=true]{background:#51425a}
.touch-shapes [aria-pressed=true]:after{display:none}
.touch-basis{position:absolute;left:24px;bottom:110px;display:flex;gap:4px;align-items:center}
.touch-basis span{min-width:80px;text-align:center;font-size:17px}
.touch-basis button{font-size:30px;border-radius:50%;background:#302438}
.touch-readout{position:absolute;left:34px;bottom:190px;display:grid;grid-template-columns:auto auto;gap:3px 14px;align-items:baseline;pointer-events:none}
.touch-readout b{font-size:72px;line-height:1.1;font-weight:400;letter-spacing:-.04em}
.touch-readout span{font-size:13px;color:#c1b2c9}
.touch-readout output{font:28px ui-monospace,monospace;grid-column:1}
.touch-readout small{font-size:12px}
.touch-readout .faint-note{left:0;bottom:100%}
.touch-pad{position:absolute;right:30px;bottom:90px;width:230px;height:230px;background:linear-gradient(90deg,transparent 49.5%,#94809c30 49.5% 50.5%,transparent 50.5%),linear-gradient(transparent 49.5%,#94809c30 49.5% 50.5%,transparent 50.5%),#251d2a;border:1px solid #7e6687;border-radius:38px;cursor:crosshair!important}
.touch-pad i{position:absolute;left:clamp(10px,var(--pad-x),calc(100% - 10px));top:clamp(10px,var(--pad-y),calc(100% - 10px));transform:translate(-50%,-50%);width:23px;height:23px;border:2px solid #e4d3eb;border-radius:50%;background:#9882a1;pointer-events:none}
.touch-pad>span{position:absolute;bottom:9px;left:16px;font-size:12px;color:#b09abd;pointer-events:none}
.touch-pad>small{position:absolute;top:13px;right:12px;font-size:12px;color:#b09abd;pointer-events:none}
.touch-lock{position:absolute;right:30px;bottom:30px;width:230px;text-align:center}
.touch-lock button{border-radius:24px;background:#33253b;width:100%;font-size:14px}
.touch-play{position:absolute;left:24px;bottom:28px;display:flex;gap:4px}
.touch-play [data-play]{border-radius:50%;width:60px;height:60px;font-size:28px;background:#594160}
/* Native dialogs remain inside the fullscreen element and manage focus. */
.design-lab dialog{position:fixed;border:1px solid #68706a;color:#edf0ec;background:#131716;padding:24px;max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);box-sizing:border-box;border-radius:0;font:16px/1.4 system-ui;overscroll-behavior:contain}
.design-lab dialog::backdrop{background:#050708d9}
.design-lab dialog button{min-width:44px;min-height:44px;font:inherit;background:transparent;color:#eceeeb;border:1px solid #59665d;padding:8px 14px;border-radius:0}
.design-lab dialog button:hover{background:#ffffff12}
.design-lab dialog input{font:inherit;accent-color:#c9d6cd;min-height:44px;max-width:100%;background:#111513;color:#eff1ee;border:1px solid #4d5d51;padding:5px}
.design-lab dialog form{display:flex;align-items:center;justify-content:space-between;gap:20px}
.design-lab dialog form>button:first-of-type{margin-left:auto}
#world-dialog{inset:0;margin:0;width:100%;height:100%;height:100dvh;max-width:none;max-height:none;border:0;background:#0c0e10;padding:24px;overflow:auto}
.world-dialog-heading{display:flex;align-items:center;justify-content:space-between;gap:20px}
.world-dialog-heading h2{font-size:22px;font-weight:400;letter-spacing:.08em;margin:0}
.world-dialog-heading button{border:0;font-size:28px}
#world-gallery-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:14px;margin-top:28px}
#world-gallery-grid>button{padding:16px;text-align:left;background:#121619;border:1px solid #3f4b4e;display:flex;flex-direction:column;gap:14px;overflow:hidden}
#world-gallery-grid>button[aria-pressed=true]{border-color:#e3e9e6;background:#24312d}
#world-gallery-grid svg{display:block;width:100%;height:min(24vh,190px);color:#d4ddda;background:#0b0e10}
#world-gallery-grid b{display:block;font-size:17px;font-weight:500}
#world-gallery-grid small{display:block;margin-top:5px;font-size:12px;color:#bac5bf;line-height:1.4}
.world-dialog-foot{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-top:26px;font-size:13px;color:#9eaaa4}
.world-dialog-foot a{color:#d2dcd7;min-height:44px;display:flex;align-items:center}
#choice-dialog{inset:0;margin:0;width:100%;height:100dvh;max-width:none;max-height:none;border:0;background:#0e1213f5;padding:24px}
.choice-grid{height:calc(100% - 58px);display:grid;grid-template-columns:repeat(3,1fr);gap:1px}
.choice-grid button{border:0;background:none;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:6px;color:#d4ddda}
.choice-grid b{font:clamp(55px,9vw,115px) Georgia,serif;font-weight:300}
.choice-grid span{font-size:15px}
[data-world=gallery] .choice-grid{display:flex;overflow-x:auto;scroll-snap-type:x mandatory;gap:20px}
[data-world=gallery] .choice-grid button{flex:0 0 min(65vw,700px);scroll-snap-align:center;border-inline:1px solid #5c5550}
[data-world=gallery] .choice-grid b{font-size:clamp(150px,35vw,380px);color:#e2d6c7}
[data-world=synth] .choice-grid{grid-template-columns:repeat(5,1fr);gap:12px}
[data-world=synth] .choice-grid button{border:1px solid #6e7a64;background:#283322;box-shadow:inset 0 -8px #10190c}
[data-world=orbit] .choice-grid{max-width:850px;margin:auto;border-radius:50%;background:radial-gradient(transparent 49%,#4f5c6830 50%,transparent 51%)}
#options-dialog{width:min(630px,calc(100vw - 24px));padding:24px}
.option-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px 24px;margin:24px 0}
.option-fields label{display:flex;flex-direction:column;gap:7px;font-size:14px;color:#b9c8c0}
.option-fields input[type=number]{width:100%;font:24px ui-monospace,monospace}
.option-fields input[type=range]{width:100%}
.option-fields input[type=color]{width:100%;height:44px;padding:0}
.option-layers{display:flex;flex-wrap:wrap;gap:4px 20px;border-block:1px solid #526055;padding:8px 0}
.option-layers label{display:flex;align-items:center;gap:8px;font-size:14px;min-height:44px}
.option-layers input{width:21px;height:21px;min-height:0}
.option-actions{display:flex;flex-wrap:wrap;gap:7px;margin-top:20px}
[data-world=orbit] #options-dialog{width:min(750px,95vw);border-radius:28px;padding:28px;background:#151c29}
[data-world=synth] #options-dialog{inset:auto 0 0;margin:0;width:100%;max-width:none;border:0;border-top:4px solid #637559;background:#272f23}
[data-world=synth] .option-fields{grid-template-columns:repeat(4,1fr)}
[data-world=atlas] #options-dialog{inset:0 auto 0 0;margin:0;width:330px;height:100dvh;max-height:none;border:0;border-right:1px solid #667d87;background:#111d24}
[data-world=atlas] .option-fields{grid-template-columns:1fr}
[data-world=timeline] #options-dialog{inset:auto 0 0;margin:0;width:100%;max-width:none;background:#27202b;border:0;border-top:1px solid #766b7a}
[data-world=timeline] .option-fields{grid-template-columns:repeat(4,1fr)}
[data-world=patch] #options-dialog{inset:82px auto auto 26px;margin:0;width:340px;max-height:calc(100dvh - 94px);border-left:6px solid #839b76;background:#15271a;box-shadow:12px 12px #0005}
[data-world=patch] .option-fields{gap:8px 16px}
[data-world=gallery] #options-dialog{width:90vw;border:0;background:#12100ee8;padding:38px 8vw}
[data-world=gallery] .option-fields{grid-template-columns:repeat(3,1fr);gap:30px 60px}
[data-world=gallery] .option-fields label{font-family:serif;font-size:19px}
[data-world=desk] #options-dialog{width:550px;border-radius:60px;background:#291e2d;padding:35px 40px}
[data-world=mirror] #options-dialog{inset:0 0 0 auto;margin:0;width:340px;height:100dvh;max-height:none;border:0;border-left:1px solid #648577;background:#11211d}
[data-world=mirror] .option-fields{grid-template-columns:1fr}
[data-world=palm] #options-dialog{inset:auto 0 0;margin:0;width:100%;max-width:none;border-radius:36px 36px 0 0;background:#281b2f;border:0;max-height:82dvh}
#number-dialog form{flex-wrap:wrap}
#number-dialog label{display:flex;flex-direction:column;gap:14px}
#number-dialog input{width:160px;font:50px ui-monospace,monospace}
#photo-dialog{width:min(720px,95vw)}
#photo-dialog #photo-panel{display:flex;flex-direction:column;gap:16px}
#photo-dialog #photo-preview{width:100%;height:min(45dvh,350px);object-fit:contain}
#photo-dialog .photo-done{width:100%;margin-top:20px}
[data-immersive-worlds] #drawing-dialog{inset:0;margin:0;width:100%;height:100dvh;max-width:none;max-height:none;border:0;padding:20px;background:#101618;overflow:auto}
[data-immersive-worlds] #drawing-dialog .eyebrow{display:none}
[data-immersive-worlds] #drawing-dialog h2{font-size:23px;margin:0;font-weight:400}
[data-immersive-worlds] #drawing-dialog #editor{width:100%;height:clamp(240px,52dvh,700px);border:1px solid #52685e}
[data-immersive-worlds] #help-dialog{width:min(950px,95vw);max-height:90dvh;overflow:auto;background:#101919}
@media(max-width:1100px){
  .machine-keys{left:165px;right:252px;gap:1px;overflow-x:auto;scrollbar-width:none}.machine-keys button{flex:none;width:44px}.machine-stamp{font-size:13px;left:18px}
  .machine-console{gap:12px;grid-template-columns:150px 1fr 68px 54px;padding:14px}
  .machine-basis{grid-template-columns:repeat(3,44px);gap:3px}.detent-keys{gap:3px}.detent-keys button{min-width:44px;height:80px;font-size:18px}
  .machine-meter output{font-size:36px}.machine-meter small{font-size:8px}
  .motion-node{left:35px;width:272px}.source-node{width:205px}.sum-node{width:245px}
  #world-gallery-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
}
@media(max-width:760px){
  .world-chrome{right:10px;top:max(10px,env(safe-area-inset-top));gap:0}
  .world-chrome button{font-size:12px;min-width:44px;padding:7px}
  #world-switch{padding:8px;gap:5px}#world-switch b{font-size:11px}#world-switch span{font-size:19px}
  .void-glyphs{left:8px;top:45%}.void-glyphs button{width:44px;height:44px;font-size:25px}
  .void-mark{right:18px;font-size:19px;top:27%}
  .void-number{left:20px;bottom:91px;width:190px}.number-scrub output{font-size:80px}.number-scrub{gap:12px}.number-scrub span{font-size:12px}
  .world-ui .void-exact{left:auto;right:0;transform:translateX(100%)}
  .void-number .faint-note{left:40px}
  .void-movement{left:14px;right:auto;bottom:22px;gap:14px}.void-movement>button{font-size:14px}
  .void-play{right:10px;bottom:20px;gap:0}.void-play button{width:44px;padding:4px}.void-play [data-play]{width:44px}
  .speed-scrub output{font-size:22px}.speed-scrub span{font-size:10px}
  .star-select .star-key{width:48px;height:48px;font-size:29px}
  .orbital-lines{width:80vw}.orbit-dial{right:14px;bottom:20px;width:118px;height:118px}.orbit-dial output{font-size:40px}
  .orbit-dial .faint-note{max-width:100%;white-space:normal}
  .orbit-pulse{left:43%;bottom:32px}.orbit-pulse button{width:50px;height:50px}
  .orbit-rate{left:12px;bottom:30px;width:95px;flex-direction:column;gap:0}.orbit-rate input{width:90px}
  .orbit-axis{top:auto;bottom:142px}.orbit-axis button{font-size:16px}
  .machine-stamp{left:14px;top:14px;font-size:10px}.machine-stamp span{font-size:10px;margin-top:6px}
  .machine-keys{left:12px;right:12px;top:84px;overflow-x:auto;padding-bottom:5px;scrollbar-width:none}
  .machine-keys button{flex:none;width:44px;height:51px;font-size:22px}
  .machine-faders{top:auto;bottom:135px;width:106px;height:238px;padding:12px 3px;background:#2a3122e8}
  .world-ui .vertical-fader{height:145px}.machine-faders label{font-size:11px;gap:1px}.machine-faders>button{bottom:0;font-size:10px;padding:5px}
  .machine-console{right:0;height:135px;padding:8px;grid-template-columns:100px 1fr 53px;gap:8px;grid-template-rows:1fr}
  .machine-basis{grid-template-columns:repeat(2,44px);gap:1px;max-height:116px;overflow:auto}.machine-basis button{min-height:44px;font-size:22px}
  .detent-keys{position:static;flex-wrap:wrap;justify-content:center;gap:3px}.detent-keys .faint-note{left:8px;bottom:calc(100% + 8px)}.detent-keys button{height:51px;min-width:44px;padding:5px;font-size:17px;justify-content:center;gap:2px}.detent-keys button small{font-size:9px}
  .machine-meter{display:none}.machine-console .machine-rocker{width:50px;height:80px;font-size:27px}
  .section-mark{left:15px;top:18px;font-size:21px}.section-mark small{font-size:9px}
  .section-select{left:12px;top:75px}.section-select button{font-size:12px;padding:6px}
  .section-rank{height:222px}.section-readout{left:14px;top:-35px;gap:7px}.section-readout output{font-size:54px}.section-readout span{font-size:12px}.section-readout small{font-size:10px;max-width:120px}
  .rank-pick{left:24px;right:24px;top:20px}.section-transport{right:14px;gap:6px}.section-transport input{width:120px}
  .editor-title{left:14px;top:20px;gap:8px}.editor-title span{font-size:20px}.editor-title small{font-size:9px}
  .clip-source{left:12px;top:74px}.clip-source button{font-size:12px}
  .edit-timeline{padding:8px 12px 15px;min-height:224px}.edit-track{gap:1px}.edit-track>span{width:37px;font-size:10px}.edit-track .keyframe{min-width:46px;gap:3px;padding:4px}.keyframe b{font-size:12px}
  .edit-track output{font-size:13px}.time-ruler{height:52px}
  .source-node{left:12px;top:12%;width:140px;padding:0 6px 4px}.source-node [data-action=chooseTarget]{font-size:18px;min-height:53px}
  .motion-node{left:12px;top:37%;width:150px;padding:0 6px 6px}.patch-jacks{gap:0;padding-top:3px}.patch-jacks button{min-width:44px;width:44px;height:44px;padding:2px;font-size:24px}
  .sum-node{left:12px;top:67%;width:238px;padding:0 6px 6px}.sum-node [data-action=circuit]{font-size:13px;gap:6px}
  .circuit-node [data-drag-node]{font-size:11px;letter-spacing:0;min-height:44px}.patch-ladder button{min-width:44px;min-height:44px;font-size:14px;padding:2px}
  .circuit-output{right:14px;bottom:20px;gap:7px}.circuit-output [data-play]{width:50px;height:50px}
  .circuit-tempo{left:14px;right:auto;bottom:23px;gap:6px}.circuit-tempo input{width:125px}.circuit-tempo output{font-size:11px}
  .gallery-name{left:18px;top:22px}.gallery-name>span{font-size:22px}.gallery-name small{font-size:10px}
  .world-ui .gallery-previous,.world-ui .gallery-next{width:44px;height:70px;font-size:34px}.gallery-previous{left:2px}.gallery-next{right:2px}
  .gallery-horizon{bottom:130px;flex-direction:column;align-items:center;gap:8px}.gallery-horizon span{font-size:11px}
  .gallery-action{bottom:24px;gap:2px;width:calc(100% - 24px);justify-content:center}.gallery-action button{font-size:12px;padding:5px;min-width:44px}.gallery-action [data-play]{width:48px;height:48px;flex:none}
  .gallery-rate{left:50%;transform:translateX(-50%);bottom:77px;width:135px}.gallery-rate input{width:135px}
  .command-caption{left:18px;top:20px;gap:7px}.command-caption b{font-size:18px}.command-caption span{font-size:10px}
  .world-ui .pie-trigger{left:18px;top:92px;width:55px;height:55px;font-size:31px}
  .command-transport{left:12px;bottom:17px;gap:1px}.command-transport>span{font-size:10px;margin-left:0;max-width:100px}.command-transport .faint-note{max-width:210px;white-space:normal}
  .command-speed{right:16px;bottom:76px;width:110px}.command-speed input{width:110px}
  .lens-header{left:14px;top:20px;font-size:11px;gap:7px;max-width:140px;flex-wrap:wrap}
  .lens-dots{left:12px;bottom:131px;gap:2px}.lens-dots button{font-size:12px;padding:4px;min-width:44px}.lens-dots button:nth-child(5) i{width:28px;height:28px}
  .lens-radius{right:14px;bottom:86px;width:120px}.lens-radius input{width:120px}
  .lens-controls{left:10px;right:10px;bottom:20px;gap:2px}.lens-controls button{font-size:12px;padding:6px}.lens-controls [data-play]{font-size:24px;width:44px}.lens-controls input{width:85px}
  .touch-shapes{top:80px;left:12px;right:12px;gap:2px}.touch-shapes button{width:51px;height:51px}
  .touch-pad{right:18px;bottom:118px;width:167px;height:167px;border-radius:28px}
  .touch-readout{left:22px;bottom:202px;gap:5px 4px}.touch-readout b{font-size:63px}.touch-readout span{font-size:11px}.touch-readout output{font-size:23px}.touch-readout small{font-size:10px}
  .touch-basis{left:17px;bottom:128px;gap:0}.touch-basis span{font-size:13px;min-width:64px}.touch-basis button{font-size:25px;width:44px;min-width:44px;padding:4px}
  .touch-lock{right:18px;bottom:60px;width:167px}.touch-lock button{font-size:12px}
  .touch-play{left:18px;bottom:54px;gap:2px}.touch-play [data-play]{width:53px;height:53px;font-size:25px}.touch-play button{min-width:44px;padding:4px}
  #world-dialog{padding:16px}.world-dialog-heading h2{font-size:18px}
  #world-gallery-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:16px}
  #world-gallery-grid>button{padding:10px;gap:9px}#world-gallery-grid svg{height:130px}#world-gallery-grid b{font-size:15px}#world-gallery-grid small{font-size:11px}
  .world-dialog-foot{font-size:11px;gap:10px}.world-dialog-foot>span{max-width:160px}
  .choice-grid{grid-template-columns:repeat(3,1fr);gap:0}.choice-grid b{font-size:68px}.choice-grid span{font-size:12px}
  [data-world=synth] .choice-grid{grid-template-columns:repeat(3,1fr);gap:7px}
  .option-fields{gap:14px}.option-fields label{font-size:13px}.option-fields input[type=number]{font-size:22px}
  [data-world=orbit] #options-dialog{border-radius:40px;padding:25px 20px;width:calc(100vw - 20px)}
  [data-world=synth] .option-fields,[data-world=timeline] .option-fields{grid-template-columns:repeat(2,1fr)}
  [data-world=patch] #options-dialog{inset:70px 12px 12px;margin:0;width:auto;max-height:calc(100dvh - 82px);padding:20px}
  [data-world=gallery] #options-dialog{padding:24px 18px;width:95vw}.option-fields,[data-world=gallery] .option-fields{grid-template-columns:repeat(2,1fr);gap:15px}
  [data-world=gallery] .option-fields label{font-size:16px}
  [data-world=desk] #options-dialog{padding:24px 22px;border-radius:35px}
  [data-world=atlas] #options-dialog,[data-world=mirror] #options-dialog{width:min(330px,94vw)}
  [data-immersive-worlds] #drawing-dialog{padding:12px}[data-immersive-worlds] #drawing-dialog h2{font-size:19px}
}
@media(max-width:760px) and (max-height:700px){
  .orbit-dial .faint-note{top:calc(100% + 2px);bottom:auto;max-width:none;white-space:nowrap}
  .sum-node .faint-note{top:auto;bottom:0;left:calc(100% + 12px);max-width:calc(100vw - 100% - 36px);white-space:normal}
  /* 12 個形狀鍵要 540px 高，數字讓到鍵列右邊，不再壓住最後兩顆。 */
  .void-number{left:64px}.void-number .faint-note{left:0}
}
@media(max-width:760px) and (max-height:700px) and (orientation:portrait){
  /* 星鍵環圓心留在 43% 高（與軌道線同心），半徑收到最下面那顆停在「圓周運動」上方 8px：
     底鍵中心 = h − 218、鍵位 = top + (43% ± 33%)·環高，解出 top 與 bottom。橫式時環高會變負，所以只限直式。 */
  .star-select{top:calc(284px - 31.27%);bottom:calc(377px - 41.46%)}
}
@media(max-height:580px) and (min-width:761px){
  .orbit-dial .faint-note{right:calc(100% + 12px);bottom:0;max-width:calc(50vw - 204px);white-space:normal;text-align:right}
  .machine-console{height:130px}.detent-keys button{height:70px}.world-ui .vertical-fader{height:170px}
  .edit-timeline{min-height:180px;padding-block:4px}.edit-track{height:44px}.time-ruler{height:42px}
  .star-select .star-key{width:48px;height:48px}.orbit-dial{width:118px;height:118px}
  /* 星鍵環壓扁到播放鈕上方；「圓周運動」移到播放鈕左邊同一列。 */
  .star-select{inset:30px 0 44px}.orbit-axis{top:auto;bottom:35px;left:calc(50% - 44px);transform:translateX(-100%)}
  /* 12 個形狀鍵排成兩欄六列，數字往右讓出 ⌨ 的位置。 */
  .void-glyphs{display:grid;grid-auto-flow:column;grid-template-rows:repeat(6,auto)}.void-glyphs button{width:44px;height:44px;font-size:25px}
  .void-number{left:170px;width:190px}
  /* 選取列移到標題右邊，讓出成分數讀數的位置；視窗再矮時剖面跟著縮，讀數不往上撞標題。 */
  .section-select{left:190px;top:22px}.section-rank{height:min(245px,calc(100% - 145px))}
  /* 三個節點用手機尺寸：目標與運動並排、合成在下，整組留在圖形左邊。 */
  .source-node{left:12px;top:48px;width:140px;padding:0 6px 4px}.source-node [data-action=chooseTarget]{font-size:18px;min-height:53px}
  .motion-node{left:162px;top:48px;width:192px;padding:0 6px 6px}.patch-jacks{gap:0;padding-top:3px}.patch-jacks button{min-width:44px;width:44px;height:44px;padding:2px;font-size:24px}
  .sum-node{left:12px;top:197px;width:238px;padding:0 6px 6px}.sum-node [data-action=circuit]{font-size:13px;gap:6px}
  .circuit-node [data-drag-node]{font-size:11px;letter-spacing:0;min-height:44px}.patch-ladder button{min-width:44px;min-height:44px;font-size:14px;padding:2px}
  .touch-pad{width:170px;height:170px}.touch-lock{width:170px}.touch-readout{bottom:164px}.touch-readout b{font-size:56px}
}
/* 1100px 以下運動鍵是三欄，七顆排成三列會超出 130px 高的控制台；改四欄兩列。 */
@media(max-height:580px) and (min-width:761px) and (max-width:1100px){
  .machine-console{grid-template-columns:185px 1fr 68px 54px}.machine-basis{grid-template-columns:repeat(4,44px)}
}
@media(prefers-reduced-motion:reduce){.design-lab *{scroll-behavior:auto!important;animation:none!important;transition:none!important}}
