/* Shared scene controls: one flow layout, no independently overlapping layers. */
.pattern-mascot-dock{position:fixed;z-index:18;right:22px;bottom:272px;display:flex;flex-direction:column;align-items:center;gap:8px;width:170px}
.pattern-mascot-dock[hidden],body.clean-screen .pattern-mascot-dock{display:none!important}
#patternMascotPortrait{padding:0;border:0;background:none;cursor:pointer;filter:drop-shadow(0 7px 5px #381d0755)}
#patternMascotPortrait img{display:block;width:155px;height:min(23vh,200px);object-fit:contain}
#patternMascotSlot .hotspot,#patternMascotSlot .hotspot:hover,#patternMascotSlot .hotspot:focus-visible{position:static;transform:none;box-shadow:0 3px 12px #0003;font-size:13px;padding:6px 11px 6px 7px}
#patternMascotSlot .dot{width:23px;height:23px}
@media(max-width:900px){.pattern-mascot-dock{right:12px;bottom:251px;width:140px}#patternMascotPortrait img{width:130px;height:min(22vh,170px)}}
@media(max-height:600px){.pattern-mascot-dock{bottom:246px;width:122px}#patternMascotPortrait img{height:95px;width:95px}}
.pattern-tools{position:fixed;z-index:18;top:100px;left:50%;transform:translateX(-50%);display:flex;flex-wrap:wrap;justify-content:center;gap:8px;width:max-content;max-width:calc(100vw - 36px);padding:9px 12px;border:1px solid #e1b57488;border-radius:16px;background:#2c160edd}
.pattern-tools[hidden],body.clean-screen .pattern-tools{display:none!important}
#patternTools .hotspot,#patternTools .hotspot:hover,#patternTools .hotspot:focus-visible{position:static;transform:none;box-shadow:none;padding:6px 10px 6px 6px;font-size:13px}
#patternTools .dot{width:23px;height:23px}.pattern-scene .drag-hint{display:none}
.motion-trace{stroke-dasharray:1;animation:drawMotif 4.5s ease-in-out infinite}
@keyframes drawMotif{0%{stroke-dashoffset:1}65%,100%{stroke-dashoffset:0}}
#detailPanel[data-panel="motion"] .panel-body{padding-top:10px}#detailPanel[data-panel="motion"] .panel-body>p:first-child{font-size:14px;margin-bottom:8px}
#detailPanel[data-panel="motion"] .motion-stage svg{display:block;max-height:25vh;min-height:105px}
.speech-tools{display:flex;gap:8px;flex-wrap:wrap;margin:6px 0}.speech-tools button{padding:6px 10px;font-size:13px}
.speech-help{font-size:13px;line-height:1.65;padding:10px 12px;background:#fff4d7;border:1px solid #dec38c;border-radius:12px;margin:8px 0}
.speech-help[hidden]{display:none}.speech-help p{margin:6px 0!important}.speech-help select{width:100%;padding:6px;border:1px solid #cdb585;border-radius:6px;background:#fffaf0;color:#442a1c}
.speech-meter{display:flex;align-items:center;gap:8px;margin:8px 0}.speech-meter meter{flex:1;min-width:60px;height:16px}.speech-meter span{min-width:7em;font-size:12px}.voice-hint{overflow-wrap:anywhere}
.speech-meter[hidden]{display:none}
.speech-help summary{cursor:pointer;font-weight:600;line-height:1.6}
.local-recording{margin:8px 0;padding:10px;background:#fff5dd;border:1px solid #dec38c;border-radius:12px;min-width:0}
.local-recording[hidden]{display:none}.local-recording audio{display:block;width:100%;height:42px}.local-recording small{display:block;line-height:1.6;color:#785c3f}
.local-recording a{display:inline-flex;align-items:center;text-decoration:none}.local-record{min-height:44px}.local-record[aria-pressed="true"]{background:#8d291f;color:#fff1cf}
@media(pointer:coarse){.speech-tools button,.speech-tools a{min-height:42px}.speech-tools{gap:8px}}
@media(max-width:900px){.pattern-tools{top:78px;gap:6px;padding:7px;width:calc(100vw - 24px)}#patternTools .hotspot{font-size:12px}}
@media(max-width:560px){.pattern-tools{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));top:76px}#patternTools .hotspot{white-space:normal;justify-content:center;padding:5px;font-size:11px;gap:4px}#patternTools .dot{width:18px;height:18px;flex-shrink:0}.pattern-scene .lantern-name{font-size:10px;padding:2px 5px}}
@media(prefers-reduced-motion:reduce){.motion-trace{animation:none;stroke-dashoffset:0}}
.scene-tools{position:fixed;z-index:18;right:20px;bottom:110px;display:flex;flex-direction:column;align-items:flex-end;gap:12px;max-width:240px;pointer-events:none}
.scene-tools>*{pointer-events:auto;max-width:100%}
.scene-tools .view-tools{position:static;display:flex;flex-wrap:wrap;justify-content:flex-end;gap:7px;right:auto;bottom:auto}
.scene-tools .view-tools button{min-height:38px;padding:7px 11px}
.scene-next:empty{display:none}
#sceneNext .hotspot.go,#sceneNext .hotspot.go:hover,#sceneNext .hotspot.go:focus-visible{position:static;left:auto;top:auto;transform:none;margin:0;box-shadow:0 4px 14px #180a0340;padding:8px 13px 8px 8px;white-space:normal;text-align:left}
#modelControlSlot .lantern-controls{position:static;display:flex;flex-direction:column;align-items:flex-end;gap:5px;right:auto;bottom:auto;max-width:100%}
#modelControlSlot .lantern-controls span{display:none}
#modelControlSlot .lantern-toggle{padding:8px 14px;min-height:38px;box-shadow:0 4px 12px #0002}
body.clean-screen .scene-tools{display:none!important}
.workshop-scene .workshop-dock{left:20px;bottom:110px;transform:none;width:max-content;max-width:calc(100vw - 292px);overflow-x:auto;justify-content:flex-start}
.festival-scene #festivalStandNav{left:20px;bottom:110px;transform:none;max-width:calc(100vw - 292px);overflow-x:auto}
#workshopMascot{filter:drop-shadow(0 7px 5px #381d0738)}
#workshopMascot img{object-position:center bottom}
.hotspot[data-key="agent"]{font-size:13px;box-shadow:0 3px 10px #0003;padding:6px 11px 6px 7px}
.hotspot[data-key="agent"] .dot{width:23px;height:23px}
.lantern-detail-controls{padding:0 9px;box-sizing:border-box;flex-wrap:wrap;row-gap:5px}
.lantern-detail-controls span{line-height:1.5;text-align:center}
@media(max-width:900px){
  .scene-tools{right:12px;bottom:98px;max-width:204px;gap:10px}
  .workshop-scene .workshop-dock,.festival-scene #festivalStandNav{left:12px;bottom:98px;max-width:calc(100vw - 250px)}
  .workshop-dock>span{display:none}
  .workshop-dock button{flex:0 0 auto;font-size:12px;padding:8px}
}
@media(max-width:560px){
  .scene-tools{right:10px;bottom:96px;max-width:172px;gap:8px}
  .scene-tools .view-tools{gap:5px}.scene-tools .view-tools button{min-width:34px;min-height:34px;font-size:12px;padding:6px 9px}
  #sceneNext .hotspot.go{font-size:12px;padding:6px 10px 6px 6px}.scene-tools .hotspot .dot{width:23px;height:23px}
  #modelControlSlot .lantern-toggle{font-size:12px;min-height:34px;padding:6px 11px}
  .workshop-scene .workshop-dock,.festival-scene #festivalStandNav{left:10px;bottom:96px;max-width:calc(100vw - 204px)}
}
