.sound-toggle{color:inherit;font:inherit;-webkit-tap-highlight-color:transparent}
.sound-toggle{display:flex;align-items:center;justify-content:center;width:44px;height:48px;min-width:44px;padding:0;border:0;background:none;cursor:pointer;touch-action:manipulation;color:var(--ink)}
.sound-bars{width:32px;height:32px;border:1px solid #ffffff65;border-radius:50%;display:flex;align-items:center;justify-content:center;gap:2px;transition:border-color .25s ease,opacity .25s ease;opacity:.72}
.sound-bars i{display:block;width:2px;height:12px;border-radius:2px;background:currentColor;transform:scaleY(.22);transform-origin:center;transition:transform .35s ease}
.sound-toggle:hover .sound-bars,.sound-toggle:focus-visible .sound-bars{opacity:1;border-color:#ffffffbb}
.sound-toggle[data-playing="true"] .sound-bars{opacity:1;border-color:#ffffff9c}
.sound-toggle[data-playing="true"] i{animation:sound-breathe 1.25s ease-in-out infinite alternate}
.sound-toggle[data-playing="true"] i:nth-child(2){animation-duration:.92s;animation-delay:-.55s}
.sound-toggle[data-playing="true"] i:nth-child(3){animation-duration:1.45s;animation-delay:-.8s}
.sound-toggle[data-playing="true"] i:nth-child(4){animation-duration:1.1s;animation-delay:-.3s}
.sound-toggle[data-playing="true"] i:nth-child(5){animation-duration:1.7s;animation-delay:-1.3s}
.sound-toggle[data-sound="loading"] .sound-bars{animation:sound-loading 1s ease-in-out infinite alternate}
@keyframes sound-breathe{from{transform:scaleY(.25)}to{transform:scaleY(.92)}}
@keyframes sound-loading{from{opacity:.35}to{opacity:.8}}
.sound-toggle{width:52px;height:52px;min-width:52px;min-height:52px;border-radius:50%;padding:0}
.sound-bars{position:relative;width:40px;height:40px;flex:none;border-color:#d6f3ff63;background:#0004;opacity:.68;box-shadow:0 0 7px #d3f0ff10,inset 0 0 7px #d3f0ff08;transition:border-color .25s ease,opacity .25s ease,box-shadow .25s ease,transform .18s ease}
.sound-bars i{height:15px}
.sound-bars::after{content:"";position:absolute;top:3px;right:4px;width:6px;height:6px;pointer-events:none;background:#e8f8ff;clip-path:polygon(50% 0,61% 39%,100% 50%,61% 61%,50% 100%,39% 61%,0 50%,39% 39%);filter:drop-shadow(0 0 3px #9edcff);opacity:0;transform:scale(.65)}
.sound-toggle[data-playing="false"]:not([data-sound="loading"]) .sound-bars{animation:sound-idle-glow 7.5s ease-in-out infinite}
.sound-toggle[data-playing="false"]:not([data-sound="loading"]) .sound-bars::after{animation:sound-star-glint 13s ease-in-out infinite}
.sound-toggle[data-playing="true"] .sound-bars{border-color:#d8f3ffc9;box-shadow:0 0 12px #c0e9ff35,inset 0 0 8px #c0e9ff0d;opacity:1}
.sound-toggle:hover .sound-bars,.sound-toggle:focus-visible .sound-bars{border-color:#e8f8ffdc;box-shadow:0 0 14px #c0e9ff36;opacity:1}
.sound-toggle:focus-visible{outline:1px solid #d8f3ff99;outline-offset:1px}
.sound-toggle:active .sound-bars{transform:scale(.94)}
@keyframes sound-idle-glow{0%,100%{box-shadow:0 0 7px #d3f0ff10,inset 0 0 7px #d3f0ff08}50%{box-shadow:0 0 12px #d3f0ff24,inset 0 0 9px #d3f0ff10}}
@keyframes sound-star-glint{0%,87%,100%{opacity:0;transform:scale(.65)}90%{opacity:.75;transform:scale(1)}94%{opacity:0;transform:scale(.85)}}
@media(prefers-reduced-motion:reduce){.sound-bars,.sound-bars::after,.sound-bars i{animation:none!important;transition:none!important}.sound-toggle[data-playing="true"] i{transform:scaleY(.45)!important}.sound-toggle[data-playing="true"] i:nth-child(2n){transform:scaleY(.8)!important}.sound-bars::after{opacity:.22}}

/* One optional audio control, outside renderer/inert navigation layers. */
#journeySound{position:fixed;z-index:250;left:max(14px,env(safe-area-inset-left,0px));bottom:max(14px,env(safe-area-inset-bottom,0px));color:#e9f0f2}
#journeySound:disabled,body.journey-starting #journeySound{visibility:hidden;pointer-events:none}
body.review-enabled #journeySound{left:auto;right:max(14px,env(safe-area-inset-right,0px))}
/* Center the opening cue in its own footer space; leave the sound target free. */
#cue{left:50%;right:auto;bottom:max(32px,calc(env(safe-area-inset-bottom,0px) + 18px));transform:translateX(-50%);max-width:calc(100vw - 164px);text-align:center;white-space:nowrap}

/* Drift's silk sound control. The existing audio state and 52px tap target stay. */
#journeySound{--silk-colors:linear-gradient(0deg,#001eff,#00cfff 22%,#002fff 36%,#fff134 47%,#ff6100 55%,#001fff 65%,#03f0ff 85%,#0017ef)}
#journeySound .sound-bars{isolation:isolate;border-color:#b7d9ed40;background:#0a0c1080;box-shadow:none}
#journeySound .sound-bars::before{content:"";position:absolute;inset:7px;border-radius:50%;background:var(--silk-colors);background-size:240% 240%;animation:control-silk-flow 12s ease-in-out -5s infinite alternate;filter:blur(13px);opacity:.12;z-index:-1;pointer-events:none}
#journeySound .sound-bars i{height:15px;background:var(--silk-colors);background-size:100% 300%;box-shadow:0 0 4px #00cfff35;opacity:.65;animation:control-silk-flow 12s ease-in-out -5s infinite alternate}
#journeySound[data-playing="false"]:not([data-sound="loading"]) .sound-bars{animation:none}
#journeySound .sound-bars::after{display:none}
#journeySound[data-playing="true"] .sound-bars{border-color:#b7d9ed70;box-shadow:none;opacity:1}
#journeySound[data-playing="true"] i{opacity:1;animation:control-silk-flow 12s ease-in-out -5s infinite alternate,control-silk-level 2.8s ease-in-out infinite alternate}
#journeySound[data-playing="true"] i:nth-child(2){animation-duration:12s,2.3s;animation-delay:-5s,-.9s}
#journeySound[data-playing="true"] i:nth-child(3){animation-duration:12s,3.4s;animation-delay:-5s,-1.6s}
#journeySound[data-playing="true"] i:nth-child(4){animation-duration:12s,2.6s;animation-delay:-5s,-.6s}
#journeySound[data-playing="true"] i:nth-child(5){animation-duration:12s,2.8s;animation-delay:-5s,-1.2s}
#journeySound:hover .sound-bars,#journeySound:focus-visible .sound-bars{border-color:#e8f8ffb0;box-shadow:0 0 12px #c0e9ff24;opacity:1}
body[data-spectrum-motion="paused"] #journeySound .sound-bars,body[data-spectrum-motion="paused"] #journeySound .sound-bars::before,body[data-spectrum-motion="paused"] #journeySound i,
body.journey-starting #journeySound .sound-bars,body.journey-starting #journeySound .sound-bars::before,body.journey-starting #journeySound i{animation-play-state:paused!important}
@keyframes control-silk-flow{0%{background-position:0% 10%}35%{background-position:55% 85%}70%{background-position:100% 35%}100%{background-position:30% 100%}}
@keyframes control-silk-level{from{transform:scaleY(.3)}to{transform:scaleY(.9)}}
@media(prefers-reduced-motion:reduce){#journeySound .sound-bars,#journeySound .sound-bars::before,#journeySound i{animation:none!important;transition:none!important}}
