/* Sound and light as a working surface, with obvious control over every layer. */
.deck-tab{font-size:11px}
.layer-strip-heading{display:flex!important;align-items:center;gap:10px;min-height:44px;margin-bottom:7px}
.layer-strip-heading .board-kicker{font-size:9px}
.board-layer-count{font-size:10px;color:var(--muted)}
.layer-strip-heading #clearBoard{margin-left:auto;font-size:11px;min-height:44px;color:var(--secondary)}
#clearBoard svg{width:14px;height:14px}
.board-layers{display:grid;grid-template-columns:repeat(auto-fit,minmax(166px,1fr));gap:8px}
.board-layer{display:flex;align-items:stretch;gap:0;padding:0;min-height:62px;border-radius:13px;min-width:0}
.board-layer-open{display:flex;align-items:center;gap:10px;flex:1;min-width:0;border:0;background:none;text-align:left;padding:12px;color:var(--text);cursor:pointer;border-radius:12px 0 0 12px}
.board-layer-open>span:last-child{display:grid;gap:5px;min-width:0}
.board-layer-open strong{font-size:11px;font-weight:550}
.board-layer-open small{font-size:10px;max-width:140px;line-height:1.3;color:var(--muted);overflow:hidden;text-overflow:ellipsis}
.board-layer .layer-dot{width:5px;height:5px;flex-shrink:0;border-radius:50%;background:var(--muted);opacity:.4}
.board-layer[data-active=true] .layer-dot{background:var(--accent);opacity:1;box-shadow:0 0 10px #b5a1ff55}
.board-layer-toggle{border:0;border-left:1px solid var(--line);background:transparent;align-self:stretch;min-width:44px;padding:10px;color:var(--muted);cursor:pointer;border-radius:0 12px 12px 0}
.board-layer-toggle svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.6}
.board-layer-toggle[aria-checked=true]{color:var(--accent);background:#b4a2ed07}
.board-layer-open:hover,.board-layer-toggle:hover{background:#b4a2ed12}
.stage.touching .stage-top,.stage.touching .stage-bottom{opacity:0;pointer-events:none}
.stage[data-interactive=true] canvas{cursor:crosshair}
.stage canvas:focus-visible{outline-offset:-5px;border-radius:inherit}
.board-welcome .welcome-soundscape{display:inline-flex;margin-right:20px;min-height:40px;font-size:11px}
.board-welcome h2{font-size:37px}
.touch-intro{font-size:12px;line-height:1.8;color:var(--secondary);margin:0 0 20px}
.touch-world-choices{display:grid;gap:8px;margin-bottom:22px}
.touch-world-choice{display:flex;align-items:center;gap:13px;padding:10px 12px;background:var(--board-raised);border:1px solid var(--line);color:var(--text);text-align:left;border-radius:13px;cursor:pointer;min-height:76px}
.touch-world-choice>span:last-child{display:grid;gap:6px}
.touch-world-choice strong{font-size:12px;font-weight:550}
.touch-world-choice small{font-size:10px;color:var(--muted)}
.touch-world-choice[aria-pressed=true]{border-color:#bc9fff80;background:#b79fe90e;box-shadow:inset 0 0 20px #b79fe906}
.world-art{position:relative;display:block;width:51px;height:51px;flex-shrink:0;background:radial-gradient(ellipse,#44316b66,#0a0b1800 75%);overflow:hidden}
.world-art:before,.world-art:after{content:'';position:absolute;inset:6px;border:1px solid var(--world-a);border-radius:50%;transform:rotate(-28deg) scaleY(.45);box-shadow:0 0 9px #a6caff22,0 5px 0 -1px var(--world-b),0 -5px 0 -1px var(--world-b)}
.world-art:after{transform:rotate(35deg) scaleY(.45);border-color:var(--world-b)}
[data-world=orbit] .world-art:before{inset:7px 10px 7px 0;transform:rotate(-28deg) scaleY(.7)}
[data-world=orbit] .world-art:after{inset:7px 0 7px 10px;transform:rotate(38deg) scaleY(.7)}
[data-world=prism] .world-art:before{border-radius:0;transform:rotate(22deg) scale(.7);box-shadow:4px 5px 0 -1px var(--world-b)}
[data-world=prism] .world-art:after{border-radius:0;transform:rotate(62deg) scale(.62);box-shadow:none}
.touch-play-controls{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:18px}
.touch-play-controls label{display:grid;gap:8px;font-size:10px;color:var(--muted)}
.touch-play-controls select{min-width:0;width:100%;min-height:44px;padding:9px 10px;color:var(--text);background:var(--board-raised);border:1px solid var(--line);border-radius:10px;font-size:12px}
.touch-layers{display:grid;gap:9px}
.touch-layer-control{border:1px solid var(--line);background:var(--board-raised);border-radius:14px;padding:14px}
.touch-layer-heading{display:flex;align-items:center;gap:11px;margin-bottom:12px}
.touch-layer-heading>div{display:grid;gap:5px;flex:1}
.touch-layer-heading strong{font-size:12px;font-weight:550}
.touch-layer-heading small{font-size:9px;color:var(--muted)}
.touch-layer-mark{width:21px;height:21px;border:1px solid #8bdff1;border-radius:50%;transform:scaleY(.5) rotate(25deg);box-shadow:0 0 14px #8bdff114}
.touch-layer-mark.mark-b{border-color:#d7a4ff;transform:scaleY(.5) rotate(-25deg)}
.touch-layer-mark.mark-forms{border-color:#d3c4f1;border-radius:2px;transform:rotate(35deg) scale(.65)}
.switch-control{position:relative;width:44px;min-height:44px;display:flex;align-items:center;justify-content:center;cursor:pointer}
.switch-control input{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}
.switch-control span{width:32px;height:18px;border-radius:20px;background:#89829940;pointer-events:none;box-shadow:inset 0 1px 2px #0002}
.switch-control span:after{content:'';display:block;margin:3px;width:12px;height:12px;border-radius:50%;background:var(--muted);transition:transform .18s}
.switch-control input:checked+span{background:#a58cdd55}
.switch-control input:checked+span:after{background:var(--accent);transform:translateX(14px)}
.switch-control input:focus-visible+span{outline:2px solid var(--accent);outline-offset:5px}
.touch-range{display:flex;align-items:center;gap:14px;font-size:10px;color:var(--muted)}
.touch-range input{min-width:0;flex:1;height:25px}
.touch-speed{margin-top:8px;color:var(--muted);font-size:10px}
.touch-speed summary{cursor:pointer;min-height:32px;display:flex;align-items:center}
.touch-speed summary:after{content:'+';margin-left:auto}
.touch-speed[open] summary:after{content:'−'}
.touch-speed label{display:grid;gap:6px}
.touch-speed input{width:100%;height:30px}
.touch-footer{display:flex;justify-content:space-between;gap:8px;margin-top:12px}
.touch-footer .text-button{font-size:10px;min-height:44px}
#panel-touch>.tool-section{margin-top:20px}
#panel-touch>.tool-section>label{display:grid;gap:9px;margin:18px 0;font-size:12px;color:var(--secondary)}
.ambience-heading{margin-bottom:12px}
.ambience-heading p{font-size:11px;line-height:1.7;color:var(--muted);margin:8px 0 0}
.ambience-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.ambience-grid>button{border:1px solid var(--line);border-radius:14px;padding:0 0 13px;background:var(--board-raised);color:var(--text);text-align:left;overflow:hidden;cursor:pointer;display:grid;gap:7px}
.ambience-grid>button:hover{border-color:#b5a1e377;background:#b5a1e30b}
.ambience-grid strong{font-size:12px;font-weight:550;padding:0 12px}
.ambience-grid small{font-size:9px;line-height:1.5;color:var(--muted);padding:0 12px}
.ambience-art{height:60px;position:relative;overflow:hidden;display:block;background:#111626;margin-bottom:4px}
.rain-art{background:repeating-linear-gradient(108deg,transparent 0 13px,#8baac447 13px 14px,transparent 14px 29px),linear-gradient(130deg,#0e2030,#253244)}
.ocean-art{background:repeating-radial-gradient(ellipse at 45% 130%,transparent 0 13px,#8bcbdc50 14px 15px,transparent 16px 22px),linear-gradient(135deg,#0d2028,#29444d)}
.fire-art{background:radial-gradient(ellipse at 22% 100%,#e59a6e99,transparent 43%),radial-gradient(ellipse at 70% 130%,#a94b39aa,transparent 60%),#20141d}
.fire-art:after{content:'';position:absolute;width:2px;height:2px;background:#ffd8a1;left:30%;top:58%;box-shadow:22px -10px #eaa772,45px 10px #ffd2a1,70px -20px #eaae74,10px -25px #f3b789}
.night-art{background:radial-gradient(circle at 74% 28%,#c9dfd0 0 5px,transparent 6px),radial-gradient(ellipse at 40% 130%,#244b4777,transparent 70%),#111c27}
.sound-origin{font-size:10px;line-height:1.7;color:var(--muted);margin:13px 0 24px}
.sound-mixer-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:15px}
.sound-mixer-heading h3{font-size:12px;font-weight:500}
.sound-mixer-heading .text-button{font-size:10px;min-height:44px}
#soundRows .sound-layer[data-on=false]{display:none}
#soundRows.show-all-sounds .sound-layer[data-on=false]{display:block}
.sound-mixer-empty{font-size:12px;line-height:1.8;color:var(--muted);padding:4px 0 12px}
body[data-theme=light] .ambience-art{filter:saturate(.75) brightness(1.2)}
body[data-theme=light] .touch-world-choice[aria-pressed=true]{border-color:#7956b680;background:#7956b60a}
body[data-theme=light] .world-art{background:radial-gradient(ellipse,#44316b22,transparent 75%)}
body[data-theme=light] .touch-world-choice{--world-a:#527d99;--world-b:#9a64ac}
@media(max-width:550px){
 .deck-tab{font-size:11px;min-height:60px}.touch-intro{font-size:12px}.deck-panel{padding:20px}
 .board-layers{grid-template-columns:repeat(2,minmax(0,1fr))}.board-layer{min-height:61px}.board-layer-open{padding:9px;gap:7px}.board-layer-open strong{font-size:11px}.board-layer-open small{font-size:9px;max-width:100px}.board-layer-toggle{min-width:44px;padding:11px}
 .layer-strip-heading .board-kicker{font-size:8px}.layer-strip-heading #clearBoard{font-size:11px}.board-layer-count{font-size:10px}
 .board-welcome h2{font-size:31px}.board-welcome .welcome-soundscape{font-size:11px;margin-right:12px}.board-welcome p{font-size:12px;line-height:1.7}.welcome-actions .button{font-size:12px;min-height:44px}
 body[data-module=touch] #stage{height:clamp(250px,44dvh,450px)}
 .touch-play-controls select{font-size:16px}.touch-world-choice strong{font-size:13px}.touch-world-choice small{font-size:11px}.touch-layer-heading strong{font-size:13px}.touch-range{font-size:11px}.touch-speed{font-size:11px}.touch-footer .text-button{font-size:11px}
 .ambience-grid strong{font-size:13px}.ambience-grid small{font-size:10px}
}
@media(orientation:landscape) and (max-height:600px) and (max-width:1200px){.layer-strip-heading{margin:0;min-height:32px}.layer-strip-heading .board-kicker,.board-layer-count{display:none}.layer-strip-heading #clearBoard{min-height:32px}.board-layers{grid-template-columns:repeat(3,minmax(0,1fr))}.board-layer{min-height:50px}.board-layer-open{padding:6px}.board-layer-open small{font-size:8px}.board-layer-open strong{font-size:10px}.board-layer-toggle{min-width:44px;padding:8px}.board-welcome h2{font-size:25px}}
@media(prefers-reduced-motion:reduce){.switch-control span:after{transition:none}}

.board-module-mute{display:flex;gap:12px;align-items:center;padding:10px 18px;border-bottom:1px solid var(--line);background:#b49ce710}.board-module-mute p{flex:1;font-size:11px;line-height:1.6;margin:0;color:var(--secondary)}.board-module-mute .text-button{font-size:11px;color:var(--accent);min-height:44px}.board-module-mute[hidden]{display:none}

.stage:not([data-interactive=true]) #touchQuickBtn{display:none}.touch-quick-dialog{width:390px;max-width:calc(100vw - 30px);max-height:calc(100dvh - 32px);padding:25px;overflow:auto;border:1px solid var(--line);border-radius:22px;background:var(--dialog);color:var(--dialog-text);box-shadow:0 28px 110px #0008}.quick-touch-heading{display:flex;gap:15px;align-items:center;margin-bottom:22px}.quick-touch-heading>div{flex:1}.quick-touch-heading h2{margin:9px 0 0}.quick-worlds{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-bottom:20px}.quick-worlds button{background:var(--board-raised);border:1px solid var(--line);color:var(--text);min-height:46px;border-radius:12px;cursor:pointer;font-size:12px}.quick-worlds button[aria-pressed=true]{background:#bda1ee1a;border-color:#bda1ee80;color:var(--accent)}.quick-layers{display:grid;gap:0;border-top:1px solid var(--line);border-bottom:1px solid var(--line);padding:6px 0}.quick-layer{display:flex;align-items:center;justify-content:space-between;min-height:46px;font-size:12px}.quick-touch-footer{display:flex;gap:10px;align-items:center;margin-top:19px;flex-wrap:wrap}.quick-touch-footer .text-button{font-size:11px;min-height:44px}.quick-touch-footer .primary{margin-left:auto;min-height:44px;min-width:72px}body[data-theme=light] .touch-quick-dialog{background:#faf9fff7}.touch-quick-dialog .icon-button{background:transparent;color:var(--dialog-text)}

body dialog.touch-quick-dialog .quick-touch-footer .primary{background:var(--accent);color:#241638}body[data-theme=light] dialog.touch-quick-dialog .quick-touch-footer .primary{color:#fff}

/* Four destinations; Touch and artist controls share Visuals. */
.deck-navigation{grid-template-columns:repeat(4,minmax(0,1fr))}
.module-index{display:none}
.touch-world-choices{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:0 0 20px}
.touch-world-choice{display:flex;flex-direction:column;justify-content:center;gap:4px;padding:9px 5px;min-height:85px;text-align:center}
.touch-world-choice .world-art{width:43px;height:43px}.touch-world-choice strong{font-size:11px}
.touch-intro{font-size:12px;line-height:1.7;margin-bottom:16px}
.world-ranges{display:grid;gap:9px;margin-bottom:16px}
.world-range{display:grid;grid-template-columns:1fr auto;align-items:center;gap:4px;font-size:12px;color:var(--secondary);min-height:49px}
.world-range output{font-size:11px;color:var(--muted);font-variant-numeric:tabular-nums}
.world-range input{grid-column:1/-1;width:100%;min-width:0;height:26px;margin:0;touch-action:pan-y}
.world-range input::-webkit-slider-thumb{width:16px;height:16px}.world-range input::-moz-range-thumb{width:16px;height:16px}
#panel-touch>.touch-footer{margin-top:0}#panel-touch .tool-section{margin:0;border-bottom:1px solid var(--line)}
#panel-touch .tool-section>summary,#visualLibraryDetails>summary{font-size:12px;min-height:44px;display:flex;align-items:center;cursor:pointer;color:var(--secondary)}
#panel-touch .tool-section>summary:after,#visualLibraryDetails>summary:after{content:'+';margin-left:auto}
#panel-touch .tool-section[open]>summary:after,#visualLibraryDetails[open]>summary:after{content:'−'}
#panel-touch .touch-layers{margin-bottom:16px}.touch-footer{margin:0;justify-content:space-between}
#visualLibraryDetails .module-library{margin:10px 0 0;max-height:none}
body .stage-top,body .stage-bottom{pointer-events:none}
.stage-top button,.stage-bottom button{pointer-events:auto}
.stage[data-interactive=true] canvas{user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;cursor:crosshair}
body:not(.is-immersed) #fullscreenBtn,body:not(.is-immersed) .stage .scene-nav{display:none}
body.is-immersed .stage #fullscreenBtn,body.is-immersed .stage .scene-nav{display:flex}
body[data-module=music] .mini-transport{display:none}
#boardStopAll,#hideUiBtn{display:none!important}
body[data-module=visuals] .creative-deck{scroll-margin-top:12px}
@media(max-width:550px){.deck-tab{font-size:12px;min-height:54px}.deck-tab svg{width:17px;height:17px}body[data-module=visuals] #stage{height:clamp(265px,44dvh,450px)}.touch-world-choice{min-height:72px}.touch-world-choice .world-art{width:35px;height:35px}.world-range{font-size:13px}.world-range output{font-size:12px}}

.pattern-pickers{margin-bottom:7px}.pattern-pickers label{font-size:11px}.pattern-pickers select{font-size:12px}
#panel-touch .pattern-detail{margin-bottom:17px}.pattern-detail .world-range{margin:8px 0}
.pattern-detail .path-guide-switch{display:flex;align-items:center;gap:9px;min-height:44px;font-size:12px;color:var(--secondary);margin:8px 0}
.path-guide-switch input{width:18px;height:18px;accent-color:var(--accent)}
.touch-force-hint{font-size:10px;line-height:1.7;color:var(--muted);margin:5px 0 12px}
.touch-quick-dialog .pattern-detail{border-bottom:1px solid var(--line);margin-bottom:16px}.touch-quick-dialog .pattern-detail>summary{min-height:44px;font-size:12px;cursor:pointer}
@media(max-width:550px){.pattern-pickers select{font-size:16px}.touch-force-hint{font-size:11px}.pattern-pickers label{font-size:12px}}
