/* Cholo helper (DRAFT v2): lives in the top toolbar, left edge. Tap the logo = live voice; 💬 = menu/typed chat. Mouth driven by --m (0..1). */
.cholo-balloon{position:relative;max-width:min(360px,calc(100vw - 28px));max-height:70vh;overflow:auto;background:#fff;color:#111;border:3px solid #111;border-radius:22px;padding:14px 16px 12px;box-shadow:5px 5px 0 #ff5ace;font-size:16px;line-height:1.35;font-weight:600}
.cholo-balloon[hidden]{display:none}
.cholo-txt{padding-right:18px;white-space:pre-wrap}
.cholo-x{position:absolute;top:4px;right:8px;border:0;background:none;font-size:22px;line-height:1;color:#555;cursor:pointer}
.cholo-acts{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px}
.cholo-acts:empty{display:none}
.cholo-acts button{border:2px solid #111;background:linear-gradient(#f59e0b,#d97706);color:#111;font-weight:800;border-radius:999px;padding:7px 12px;font-size:14px;cursor:pointer}
.cholo-draft{display:block;margin-top:8px;font-size:10px;letter-spacing:.08em;text-transform:uppercase;color:#c026d3;font-weight:800}
.cholo-t{width:100%;border-collapse:collapse;margin:8px 0;font-size:14px}
.cholo-t td,.cholo-t th{padding:4px 6px;border-bottom:1px solid #ddd;text-align:left}
.cholo-t input{width:6.5em;font:inherit;padding:4px;border:2px solid #111;border-radius:8px}
.cholo-sm{font-size:12px;color:#555;font-weight:500}
.cholo-ul{margin:6px 0;padding-left:18px;font-size:14px;font-weight:500}
.cholo-msg{background:#f3f3f3;border-left:4px solid #ff5ace;border-radius:8px;padding:6px 8px;margin:6px 0;font-weight:500;font-size:14px}
.cholo-msg i{display:block;font-size:11px;color:#c026d3;font-style:normal;font-weight:800;text-transform:uppercase}
.cholo-chat{max-height:38vh;overflow:auto;margin-top:8px;display:flex;flex-direction:column;gap:6px}
.cholo-m{padding:7px 10px;border-radius:14px;max-width:88%;font-weight:500;font-size:15px}
.cholo-m.ai{background:#f3f3f3;border:2px solid #111;align-self:flex-start}
.cholo-m.me{background:#ffe1f6;border:2px solid #ff5ace;align-self:flex-end}
.cholo-balloon{max-width:min(400px,calc(100vw - 28px))}

.cholo{display:inline-flex;align-items:center;gap:4px;flex:0 0 auto;font-family:system-ui,-apple-system,"Segoe UI",sans-serif;position:relative;z-index:1}
.cholo-dup{display:none!important}
.cholo-bar{position:sticky;top:0;z-index:30;display:flex;align-items:center;gap:.6rem;padding:.45rem .8rem;padding-left:max(.8rem,env(safe-area-inset-left));background:#0a0a0af2;border-bottom:1px solid #262626}
.cholo-logo{position:relative;width:52px;height:52px;min-width:44px;border-radius:50%;padding:0;border:3px solid #ff5ace;background:#0a0a0a;cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent;transition:transform .12s,box-shadow .2s,border-color .2s}
.cholo-logo:active{transform:scale(.93)}
.cholo-logo:focus-visible{outline:3px solid #f59e0b;outline-offset:2px}
.cholo-face{position:absolute;inset:0;border-radius:50%;overflow:hidden;display:block}
.cholo-face img{width:100%;height:100%;object-fit:contain;display:block;pointer-events:none}
.cholo-st{position:absolute;right:-3px;bottom:-3px;width:16px;height:16px;border-radius:50%;border:2px solid #0a0a0a;background:#525252;display:none}
.cholo[data-state=connecting] .cholo-st,.cholo[data-state=listening] .cholo-st,.cholo[data-state=talking] .cholo-st,.cholo[data-state=ended] .cholo-st{display:block}
.cholo[data-state=connecting] .cholo-logo{border-color:#f59e0b;animation:cholo-spin 1s linear infinite}
.cholo[data-state=connecting] .cholo-st{background:#f59e0b}
.cholo[data-state=listening] .cholo-logo{border-color:#22c55e;box-shadow:0 0 0 3px #22c55e44}
.cholo[data-state=listening] .cholo-st{background:#22c55e;animation:cholo-pulse 1.4s ease-in-out infinite}
.cholo[data-state=talking] .cholo-logo{border-color:#ff5ace;box-shadow:0 0 0 calc(2px + var(--m,0)*6px) #ff5ace55}
.cholo[data-state=talking] .cholo-st{background:#ff5ace}
.cholo[data-state=ended] .cholo-st{background:#737373}
.cholo.typing .cholo-face img{animation:cholo-wob .5s ease-in-out infinite alternate}
@keyframes cholo-spin{0%{box-shadow:2px 0 0 #f59e0b}50%{box-shadow:-2px 0 0 #f59e0b}100%{box-shadow:2px 0 0 #f59e0b}}
@keyframes cholo-pulse{50%{transform:scale(1.25);opacity:.7}}
@keyframes cholo-wob{from{transform:translateY(1px)}to{transform:translateY(-1.5px)}}
.cholo-more{width:34px;height:34px;min-width:34px;border-radius:50%;border:2px solid #404040;background:#171717;color:#fff;font-size:16px;line-height:1;padding:0;cursor:pointer;touch-action:manipulation}
.cholo-more:active{transform:scale(.92)}
.cholo-pop{position:fixed;top:72px;left:10px;z-index:9000;max-width:calc(100vw - 20px);font-family:system-ui,-apple-system,"Segoe UI",sans-serif}
.cholo-badge{display:inline-block;margin-left:8px;font-size:12px;font-weight:800;border-radius:999px;padding:2px 8px;background:#eee;vertical-align:middle}
.cholo-badge[data-s=listening]{background:#dcfce7;color:#166534}.cholo-badge[data-s=talking]{background:#ffe1f6;color:#a21caf}.cholo-badge[data-s=connecting]{background:#fef3c7;color:#92400e}
@media (max-width:560px){.cholo-logo{width:44px;height:44px}.cholo-more{width:30px;height:30px;min-width:30px;font-size:14px}}
@media (prefers-reduced-motion:reduce){.cholo *{animation:none!important;transition:none!important}.cholo .cholo-stache{transform:none!important}.cholo[data-state=talking] .cholo-logo{box-shadow:0 0 0 4px #ff5ace55}}
.cholo-bar:has(+.gate){position:fixed;left:0;right:0;top:0}
.cholo[data-state=unavailable] .cholo-logo{border-color:#737373;filter:grayscale(1) brightness(.8)}
.cholo[data-state=unavailable] .cholo-st{display:block;background:#ef4444}
.cholo-badge[data-s=unavailable]{background:#fee2e2;color:#991b1b}
.cholo-more{font-weight:900;font-size:18px}
/* v9 voice only, no text: icon-only call controls beside the logo */
.cholo-call{display:inline-flex;gap:4px;margin-left:2px}.cholo-call[hidden]{display:none}
.cholo-ic{width:40px;height:40px;min-width:40px;border-radius:50%;border:2px solid #404040;background:#171717;padding:0;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;touch-action:manipulation}
.cholo-ic svg{width:22px;height:22px;fill:none;stroke:#fff;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.cholo-ic .sl{display:none}.cholo-ic.on{border-color:#f59e0b}.cholo-ic.on .sl{display:inline;stroke:#f59e0b}
.cholo-ic.hang{background:#dc2626;border-color:#dc2626}.cholo-ic.hang svg{fill:#fff;stroke:#fff;stroke-width:1}
.cholo-ic:active{transform:scale(.92)}
.cholo[data-state=micblocked] .cholo-logo,.cholo[data-state=failed] .cholo-logo{border-color:#737373;filter:grayscale(1) brightness(.8)}
.cholo[data-state=micblocked] .cholo-st,.cholo[data-state=failed] .cholo-st{display:block;background:#ef4444}
.cholo[data-state=unavailable] .cholo-st::after,.cholo[data-state=micblocked] .cholo-st::after{content:"";position:absolute;left:3px;right:3px;top:5px;height:2px;background:#fff;border-radius:1px}
@media (max-width:560px){.cholo-ic{width:36px;height:36px;min-width:36px}}
.cholo:has(.cholo-call:not([hidden])) .cholo-more{display:none}

/* v10: top right of the toolbar; chat-bubble art (round pink bubble + cartoon speech balloon); mustache talks */
.cholo{margin-left:auto;order:99}
.cholo-more{order:1}.cholo-call{order:2}.cholo-logo{order:3}
.cholo-logo{overflow:visible;border:3px solid #ff5ace;background:#0a0a0a;box-shadow:0 0 0 3px #0a0a0a,0 6px 22px #ff5ace66}
.cholo-face{background:#0a0a0a}
.cholo-stache{position:absolute;inset:0;background:center/100% 100% no-repeat;pointer-events:none;transform-origin:50% 58.6%;will-change:transform}
.cholo-stache.l{background-image:url(/assets/img/cholo-stache-l.webp);transform:translateY(calc(var(--m,0)*-3.5%)) rotate(calc(var(--m,0)*13deg + var(--w,0)*4deg))}
.cholo-stache.r{background-image:url(/assets/img/cholo-stache-r.webp);transform:translateY(calc(var(--m,0)*-3.5%)) rotate(calc(var(--m,0)*-13deg + var(--w,0)*4deg))}
.cholo-say{position:absolute;left:-15px;top:-9px;width:24px;height:17px;background:#fff;border:2px solid #111;border-radius:9px;box-shadow:2px 2px 0 #ff5ace;display:flex;align-items:center;justify-content:center;gap:2px;pointer-events:none;z-index:2}
.cholo-say::after{content:"";position:absolute;right:1px;bottom:-7px;border:4px solid transparent;border-top:6px solid #111;border-bottom:0;transform:rotate(-30deg)}
.cholo-say i{width:3px;height:3px;border-radius:50%;background:#111;display:block}
.cholo[data-state=talking] .cholo-say i{animation:cholo-dot 0.9s ease-in-out infinite}.cholo[data-state=talking] .cholo-say i:nth-child(2){animation-delay:.15s}.cholo[data-state=talking] .cholo-say i:nth-child(3){animation-delay:.3s}
@keyframes cholo-dot{50%{transform:translateY(-2px)}}
.cholo[data-state=listening] .cholo-say{border-color:#166534;box-shadow:2px 2px 0 #22c55e}
.cholo-st{right:auto;left:-3px}
.cholo-pop .cholo-balloon::after{content:"";position:absolute;right:var(--tailr,22px);top:-16px;width:0;height:0;border:9px solid transparent;border-bottom:14px solid #111;border-top:0}
.cholo-bar{justify-content:flex-end}
@media (max-width:560px){.cholo-say{left:-11px;top:-7px;width:20px;height:14px}.cholo-say i{width:2px;height:2px}}
@media (prefers-reduced-motion:reduce){.cholo .cholo-stache{transform:none!important}}
.cholo-host>.cholo{position:absolute;margin:0;z-index:5}

#cholo .cholo-face img{width:100%!important;height:100%!important;border:0!important;border-radius:0!important;background:none!important;margin:0!important;max-width:none!important}
/* v11: "?" keeps its 34px look but gets a 48px tap target (kiosk tap-target rule) */
.cholo .cholo-more{width:48px;height:48px;min-width:48px;border:0;background:radial-gradient(circle,#171717 0 15px,#404040 15px 17px,transparent 17.6px)}
@media (max-width:560px){.cholo .cholo-more{width:44px;height:44px;min-width:44px;background:radial-gradient(circle,#171717 0 13px,#404040 13px 15px,transparent 15.6px)}}
