/* All rules remain inside the existing launcher or the mascot options panel. */
#bitbot-widget.plto-mascot-ready {
  --p-size: 140px;
  position: fixed;
  display: block;
  left: var(--p-x);
  top: var(--p-y);
  right: auto;
  bottom: auto;
  width: var(--p-size);
  height: calc(var(--p-size) * .94118 + 46px);
  z-index: var(--p-z,999999);
  isolation: isolate;
  --p-safe-top: env(safe-area-inset-top,0px);
  --p-safe-right: env(safe-area-inset-right,0px);
  --p-safe-bottom: env(safe-area-inset-bottom,0px);
  --p-safe-left: env(safe-area-inset-left,0px);
}
#bitbot-widget.plto-mascot-ready #bitbot-toggle {
  position: relative !important; inset: auto !important;
  width: 100%; height: calc(var(--p-size) * .94118);
  padding: 0; margin: 0; border: 0; border-radius: 18px;
  display: block; background: transparent !important; box-shadow: none !important;
  transform: none !important; cursor: grab; touch-action: none;
  -webkit-user-select: none; user-select: none;
}
#bitbot-widget.plto-mascot-ready #bitbot-toggle:active { cursor: grabbing; }
#bitbot-widget.plto-mascot-ready:not(.plto-mascot-hidden) #bitbot-toggle > svg { display:none !important; visibility:hidden !important; }
#bitbot-widget.plto-mascot-ready [hidden], .plto-mascot-menu[hidden] { display:none !important; }
#bitbot-widget .plto-mascot-art { position:relative; display:block; width:100%; height:100%; pointer-events:none; }
#bitbot-widget .plto-mascot-pose { position:absolute; inset:0; width:100% !important; height:100% !important; object-fit:contain; opacity:1; pointer-events:none; }
#bitbot-widget .plto-mascot-pose.is-active { opacity:1; }
#bitbot-widget .plto-mascot-face { position:absolute; left:34%; top:28%; width:29%; height:14%; display:block; overflow:hidden; }
#bitbot-widget .plto-mascot-gaze { position:absolute; inset:8% 8% 4%; display:block; transform:translate(var(--p-gx,0px),var(--p-gy,0px)); }
#bitbot-widget .plto-mascot-eye { position:absolute; top:4%; width:22%; height:39%; background:#99f6ff; border-radius:42%; box-shadow:0 0 5px #15dbff; transform-origin:center; }
#bitbot-widget .plto-mascot-eye:first-child { left:11%; }
#bitbot-widget .plto-mascot-eye:nth-child(2) { right:11%; animation-delay:.02s; }
#bitbot-widget .plto-mascot-mouth { position:absolute; left:34%; top:58%; width:32%; height:22%; border-bottom:2px solid #99f6ff; border-radius:0 0 50% 50%; filter:drop-shadow(0 0 2px #15dbff); transition:width .3s,left .3s,height .3s; }
#bitbot-widget [data-expression=happy] .plto-mascot-eye { border-radius:60% 60% 18% 18%; height:25%; top:13%; }
#bitbot-widget [data-expression=happy] .plto-mascot-mouth { left:26%; width:48%; height:25%; }
#bitbot-widget [data-expression=curious] .plto-mascot-eye:nth-child(2) { height:30%; top:10%; }
#bitbot-widget [data-expression=surprise] .plto-mascot-mouth { border:2px solid #99f6ff; border-radius:50%; width:18%; left:41%; height:23%; }
#bitbot-widget .plto-mascot-tools { display:flex; align-items:center; justify-content:center; gap:0; height:46px; }
#bitbot-widget .plto-mascot-tool, .plto-mascot-menu button {
  appearance:none; font:600 13px/1.25 system-ui,sans-serif; cursor:pointer;
  border:1px solid #6f6251; border-radius:9px; background:#241c19; color:#fff5dc;
  padding:8px 10px; margin:0; box-shadow:none; min-width:44px; min-height:44px;
}
#bitbot-widget .plto-mascot-drag { cursor:grab; touch-action:none; }
#bitbot-widget :focus-visible, .plto-mascot-menu :focus-visible { outline:3px solid #ffd050 !important; outline-offset:3px; }
#bitbot-widget.plto-mascot-hidden { --p-size:64px !important; }
#bitbot-widget.plto-mascot-hidden #bitbot-toggle { height:64px; cursor:pointer; }
#bitbot-widget.plto-mascot-hidden #bitbot-toggle { background:var(--bitbot-primary,#992124) !important; color:#fff; border-radius:18px; }
#bitbot-widget.plto-mascot-hidden #bitbot-toggle > svg { width:28px; height:28px; margin:auto; }
#bitbot-widget.plto-mascot-hidden .plto-mascot-art, #bitbot-widget.plto-mascot-hidden .plto-mascot-drag { display:none; }
#bitbot-widget.plto-mascot-paused *, #bitbot-widget.plto-mascot-paused *::before, #bitbot-widget.plto-mascot-paused *::after { animation-play-state:paused !important; transition:none !important; }
#bitbot-widget.plto-mascot-ready #bitbot-chat {
  position:fixed; left:var(--p-panel-x); top:var(--p-panel-y); right:auto; bottom:auto;
  width:min(var(--p-chat-width,450px),calc(100vw - 24px)); max-height:calc(100dvh - 32px); overflow:hidden;
}
.plto-mascot-menu {
  position:fixed; box-sizing:border-box; width:272px; max-width:calc(100vw - 24px);
  max-height:calc(100dvh - 24px); overflow-y:auto; overflow-x:hidden; z-index:1000000; isolation:isolate;
  padding:16px; border:1px solid #8a7352; border-radius:16px; background:#241c19;
  color:#fff5dc; box-shadow:0 14px 45px #0006; font:14px/1.4 system-ui,sans-serif;
}
.plto-mascot-menu * { box-sizing:border-box; }
.plto-mascot-menu header { display:flex; align-items:center; justify-content:space-between; gap:8px; margin:0 0 12px; padding:0; border:0; flex-direction:row; }
.plto-mascot-menu header strong { font-size:16px; color:#ffd050; }
.plto-mascot-menu .plto-mascot-actions { display:grid; gap:8px; }
.plto-mascot-menu .plto-mascot-actions > button { width:100%; text-align:left; }
.plto-mascot-menu button:hover { background:#493224; }
.plto-mascot-menu label { display:block; margin:16px 0 6px; color:#fff5dc; font-size:14px; }
.plto-mascot-menu input[type=range] { display:block; width:100%; height:32px; padding:0; margin:0; accent-color:#ffd050; }
.plto-mascot-menu .plto-mascot-move { display:flex; gap:6px; margin-top:10px; }
.plto-mascot-menu .plto-mascot-move button { flex:1; min-height:40px; }
.plto-mascot-menu p { margin:10px 0 0; font-size:12px; color:#ded0b8; line-height:1.45; }
@media(prefers-reduced-motion:reduce) {
  #bitbot-widget.plto-mascot-ready *, .plto-mascot-menu * { animation:none !important; transition:none !important; }
}
