/* V8: speech bubbles anchored above the speaker (speech-v8.js). The fixed subtitle panel stays
   in the DOM for screen readers but no longer competes with the bubble on screen. */
body.playing .subtitle{position:fixed!important;width:1px!important;height:1px!important;padding:0!important;margin:0!important;overflow:hidden!important;clip-path:inset(50%)!important;border:0!important;opacity:0!important;pointer-events:none!important}
#cook-bubble,#chef-bubble{transform:translate(-50%,-100%) scale(var(--s,1));transform-origin:50% 100%;transition:opacity .2s}
#cook-bubble{border-radius:12px;max-width:220px;text-align:center}
#cook-bubble:after{left:calc(50% - 7px + var(--tail-x,0px))}
#chef-bubble:after{left:calc(50% - 10px + var(--tail-x,0px))}
#chef-bubble.furious{transform:translate(-50%,-100%) scale(var(--s,1)) rotate(-2deg)}
#cook-bubble.behind,#chef-bubble.behind{opacity:.72}
#cook-bubble.self{transform:translate(-50%,0);border-radius:10px}
#cook-bubble.self:after{display:none}
@keyframes v8-pop{from{opacity:0}to{opacity:1}}
#chef-bubble,#cook-bubble{animation:v8-pop .18s}
/* Volume sliders in Settings */
.v8-mixer{display:grid;grid-template-columns:auto 1fr auto;gap:8px 12px;align-items:center;margin-top:10px}
.v8-mixer label{font:600 12px Bahnschrift,Arial,sans-serif;color:#3a2a1c}
.v8-mixer input[type=range]{width:100%;accent-color:#b5561f}
.v8-mixer output{font:12px Consolas,monospace;color:#7a3e1d;min-width:34px;text-align:right}
@media(prefers-reduced-motion:reduce){#chef-bubble,#cook-bubble{animation:none;transition:none}}
/* Start waits for shader warm-up so the first seconds of the shift do not hitch. */
#start:disabled{opacity:.72;cursor:progress;filter:saturate(.6)}
/* Narrow screens: smaller bubbles so they cover less of the HUD. */
@media(max-width:600px){#chef-bubble{width:190px;padding:8px 11px;font-size:12.5px}#chef-bubble small{font-size:8px;margin-bottom:3px}#cook-bubble{max-width:160px;font-size:11px}}
/* Admin TV feature: explicit pending / success / error states */
.admin-result{margin:12px 0 6px;padding:10px 12px;border-radius:6px;border:1px solid transparent;font-size:14px;line-height:1.45;color:#3a2a1c}
.admin-result:empty{display:none}
.admin-result code{font-family:ui-monospace,Consolas,monospace;background:rgba(58,42,28,.08);padding:1px 5px;border-radius:3px}
.admin-result.idle{background:rgba(58,42,28,.06);border-color:rgba(58,42,28,.18)}
.admin-result.pending{background:#f3e3b6;border-color:#c99a3a}
.admin-result.success{background:#dfe9c6;border-color:#5f8a3c;color:#24421a;animation:admin-pop .35s ease-out}
.admin-result.error{background:#f4d3c4;border-color:#a8452a;color:#5c1d0e}
.admin-tick{display:inline-grid;place-items:center;width:20px;height:20px;margin-right:8px;border-radius:50%;background:#4f7f32;color:#fff;font-weight:700;font-size:13px;vertical-align:-4px}
.admin-spinner{display:inline-block;width:14px;height:14px;margin-right:8px;border:2px solid #c99a3a;border-top-color:transparent;border-radius:50%;vertical-align:-2px;animation:admin-spin .8s linear infinite}
button.admin-done{background:#4f7f32!important;color:#fff!important}
@keyframes admin-spin{to{transform:rotate(360deg)}}
@keyframes admin-pop{from{transform:scale(.97);opacity:.4}to{transform:none;opacity:1}}
@media (prefers-reduced-motion:reduce){.admin-result.success,.admin-spinner{animation:none}}
/* Guest chat bubble (audience-v9.js): same family as the cook's, pinned above the guest's head */
#guest-bubble{position:fixed;z-index:4;pointer-events:none;max-width:250px;padding:9px 13px;transform:translate(-50%,-100%);background:#f3e6c4;color:#342219;border:3px solid #4b6b5c;border-radius:12px;box-shadow:0 6px 0 #2a1d1466;font:600 14px/1.3 system-ui,sans-serif}
#guest-bubble small{display:block;font:700 9px/1 ui-monospace,Consolas,monospace;letter-spacing:.12em;color:#4b6b5c;margin-bottom:4px}
#guest-bubble::after{content:'';position:absolute;left:50%;bottom:-11px;margin-left:-8px;border:8px solid transparent;border-top-color:#4b6b5c}
@media(max-width:600px){#guest-bubble{max-width:170px;font-size:12px}}
