.chester-widget{font-family:inherit;color:#1a2e36;font-size:14px;line-height:1.5}.chester-widget *{box-sizing:border-box}.chester-widget button,.chester-widget input{font:inherit}.chester-floating{position:fixed;right:22px;bottom:20px;z-index:999990}.chester-launcher{position:relative;display:flex;align-items:center;gap:9px;border:1px solid #86b8b5;background:linear-gradient(125deg,#10303c,#164957);color:#fff;border-radius:55px 55px 55px 24px;padding:7px 16px 7px 6px;cursor:pointer;box-shadow:0 12px 36px #001b2b55;transition:transform .25s,box-shadow .25s;animation:chester-pulse 4.5s ease-in-out infinite}.chester-launcher:hover{transform:translateY(-4px);box-shadow:0 16px 38px #001b2b66}.chester-launcher-pet{display:grid;place-items:center;width:65px;height:65px;border-radius:50%;background:linear-gradient(145deg,#f0fbfa,#cce7e5);border:3px solid #ffffff7f;overflow:hidden;animation:chester-bob 3.5s ease-in-out infinite}.chester-launcher-pet img{width:100%;height:100%;object-fit:contain}.chester-launcher-caption{display:flex;flex-direction:column;text-align:left}.chester-launcher-caption strong{font-size:13px;letter-spacing:.1px}.chester-launcher-caption small{font-size:11px;color:#d9f5f1}.chester-online-dot{position:absolute;left:56px;bottom:12px;width:12px;height:12px;background:#50df96;border:2px solid white;border-radius:50%}.chester-panel{width:min(410px,calc(100vw - 24px));height:min(640px,calc(100dvh - 110px));display:flex;flex-direction:column;background:#fff;border:1px solid #d6e5e7;border-radius:22px;box-shadow:0 22px 65px #061f2d48;overflow:hidden}.chester-panel[hidden]{display:none!important}.chester-floating .chester-panel{position:absolute;bottom:87px;right:0}.chester-inline .chester-panel{position:relative;width:min(100%,560px);height:640px;max-height:80dvh}.chester-header{display:flex;align-items:center;gap:11px;padding:13px 15px;background:linear-gradient(115deg,#092b37,#195160);color:#fff;min-height:88px}.chester-avatar{width:60px;height:60px;border:2px solid #ffffff55;background:#e2f4f3;border-radius:20px;overflow:hidden;flex-shrink:0;box-shadow:0 4px 15px #0002}.chester-avatar img{width:100%;height:100%;object-fit:contain}.chester-title{min-width:0}.chester-title strong{font-size:17px;display:block}.chester-title small{font-size:10px;color:#d3e8e7;display:block;line-height:1.55}.chester-sparkle{color:#7de6cf}.chester-status-dot{display:inline-block;width:7px;height:7px;background:#5de7a1;border-radius:50%;margin-right:3px}.chester-close{margin-left:auto;border:0;background:#ffffff20;color:#fff;border-radius:50%;width:30px;height:30px;cursor:pointer;font-size:22px;flex-shrink:0}.chester-inline .chester-close{display:none}.chester-thread{flex:1;overflow-y:auto;padding:17px 12px;background:linear-gradient(180deg,#eff7f8,#f9fbfb);display:flex;flex-direction:column;gap:12px;scrollbar-width:thin}.chester-message-row{display:flex;align-items:flex-end;gap:6px}.chester-message-left{align-self:flex-start;max-width:95%}.chester-message-right{align-self:flex-end;max-width:88%}.chester-message-avatar{width:27px;height:27px;object-fit:contain;border:1px solid #d4e5e4;border-radius:50%;background:#fff;flex-shrink:0}.chester-message{padding:11px 13px;border-radius:16px;white-space:pre-wrap;overflow-wrap:anywhere;box-shadow:0 3px 9px #12313b0d}.chester-bot{background:#fff;border:1px solid #e0eded;border-bottom-left-radius:5px}.chester-user{background:#d7f2e7;border:1px solid #bee3d6;border-bottom-right-radius:5px}.chester-quick{display:flex;gap:7px;overflow-x:auto;padding:10px 12px 7px;flex-shrink:0;scrollbar-width:thin}.chester-quick button{background:#e8f4f3;border:1px solid #c4dedc;color:#18505a;border-radius:100px;padding:8px 11px;white-space:nowrap;cursor:pointer;font-size:12px;font-weight:600;flex-shrink:0}.chester-quick button:hover{background:#d4eae7}.chester-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:8px 12px 12px}.chester-actions a,.chester-actions button{display:flex;align-items:center;justify-content:center;border:1px solid #15505d;text-decoration:none!important;text-align:center;padding:11px 7px;background:#fff;color:#16505c;border-radius:11px;cursor:pointer;font-size:12px;font-weight:700;min-height:44px;line-height:1.3}.chester-actions a{background:#163d48;color:#fff}.chester-actions button:disabled{opacity:.45;cursor:not-allowed}.chester-form{padding:10px 12px;display:flex;gap:7px;border-top:1px solid #e7efef}.chester-form input{min-width:0;flex:1;padding:12px;border:1px solid #d5e5e4;border-radius:11px;background:#fff;color:#1c3640;outline-offset:2px}.chester-form button{border:0;background:#164856;color:#fff;border-radius:11px;width:46px;cursor:pointer;font-size:19px}.chester-note{font-size:10px!important;color:#72888b;text-align:center;margin:0!important;padding:0 12px 11px}.chester-note a{color:#174f59;text-decoration:underline}@keyframes chester-bob{0%,100%{transform:translateY(0) rotate(-2deg)}50%{transform:translateY(-5px) rotate(3deg)}}@keyframes chester-pulse{0%,100%{box-shadow:0 12px 36px #001b2b55}50%{box-shadow:0 12px 36px #001b2b55,0 0 0 7px #62cfbb14}}@media(max-width:480px){.chester-floating{bottom:12px;right:12px}.chester-floating .chester-panel{width:calc(100vw - 24px);height:min(690px,calc(100dvh - 108px));bottom:82px}.chester-launcher-pet{width:55px;height:55px}.chester-online-dot{left:47px}.chester-launcher-caption strong{font-size:12px}}@media(prefers-reduced-motion:reduce){.chester-launcher,.chester-launcher-pet{animation:none!important}.chester-launcher{transition:none}}

/* Chester 0.5 */
.chester-panel{box-shadow:0 26px 76px rgba(4,31,44,.30);border-color:#d9e8e7}
.chester-launcher:focus-visible,.chester-widget button:focus-visible,.chester-widget input:focus-visible{outline:3px solid #35b9cb;outline-offset:3px}
.chester-thread{background:radial-gradient(circle at 18% 0%,#e7f8f4 0,transparent 44%),linear-gradient(#f6fafb,#eef7f7)}
.chester-message{line-height:1.55}
.chester-bot{border-color:#d5e8e8}
.chester-quick button{transition:background .18s,transform .18s}
.chester-quick button:hover{transform:translateY(-2px)}
.chester-actions a:hover,.chester-actions button:hover:not(:disabled){filter:brightness(1.1)}
.chester-widget .chester-launcher-pet img{transform-origin:center;animation:chester-wiggle 7s ease-in-out infinite}
@keyframes chester-wiggle{0%,86%,100%{transform:rotate(0) scale(1)}89%{transform:rotate(-8deg) scale(1.04)}93%{transform:rotate(8deg) scale(1.04)}96%{transform:rotate(-3deg)}}
@media(prefers-reduced-motion:reduce){.chester-widget .chester-launcher-pet img{animation:none}}

/* Chester 0.6: diseño móvil robusto: independiente del contenedor de WordPress */
.chester-widget{--chester-vh:100dvh;--chester-top:0px;--chester-safe-bottom:env(safe-area-inset-bottom,0px)}
.chester-floating{isolation:isolate}
.chester-floating .chester-panel{max-width:calc(100vw - 24px);min-width:0}
.chester-thread{min-height:0;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
.chester-title{flex:1}.chester-header{flex-shrink:0}.chester-actions,.chester-form,.chester-note{flex-shrink:0}
.chester-quick{min-width:0}.chester-form input{font-size:16px!important;min-width:0}
.chester-message{font-size:14px;max-width:100%}
.chester-message-row{min-width:0}.chester-message-row .chester-message{min-width:0}
.chester-widget .chester-close{display:grid;place-items:center;font-size:25px;line-height:1}
@media(max-width:640px){
 .chester-floating{position:fixed!important;right:12px!important;bottom:calc(12px + env(safe-area-inset-bottom,0px))!important;left:auto!important;top:auto!important;z-index:2147483000!important;transform:none!important;filter:none!important}
 .chester-floating.chester-is-open{inset:0!important;right:0!important;bottom:0!important;left:0!important;top:0!important;pointer-events:none}
 .chester-floating.chester-is-open .chester-launcher{display:none!important}
 .chester-floating .chester-panel{position:fixed!important;left:0!important;right:0!important;top:var(--chester-top,0px)!important;bottom:auto!important;width:100vw!important;max-width:100vw!important;height:var(--chester-vh,100dvh)!important;max-height:var(--chester-vh,100dvh)!important;min-height:0!important;margin:0!important;border:0!important;border-radius:0!important;transform:none!important;pointer-events:auto;display:flex!important;padding-top:env(safe-area-inset-top,0px)}
 .chester-floating .chester-panel[hidden]{display:none!important}
 .chester-header{padding:10px 12px;min-height:68px}.chester-avatar{height:46px;width:46px;border-radius:14px}.chester-title strong{font-size:16px}.chester-title small{font-size:10px;max-width:220px}
 .chester-thread{padding:12px 10px;gap:10px}.chester-quick{padding:8px 10px}.chester-quick button{padding:8px 10px}
 .chester-actions{gap:6px;padding:6px 9px}.chester-actions a,.chester-actions button{min-width:0;padding:8px 4px;font-size:11px;min-height:42px}
 .chester-form{padding:8px 9px calc(8px + env(safe-area-inset-bottom,0px))}.chester-form input{padding:10px 11px}.chester-note{display:none}
 .chester-inline .chester-panel{width:100%;max-width:100%;height:min(680px,85dvh)}
}
@media(max-width:360px){.chester-launcher-caption{display:none}.chester-launcher{padding:5px;border-radius:50%}.chester-title small{font-size:9px}.chester-actions a,.chester-actions button{font-size:10px}}
@media(prefers-reduced-motion:reduce){.chester-widget *, .chester-widget *:before,.chester-widget *:after{animation-duration:.01ms!important;transition-duration:.01ms!important}}

/* Chester 1.0: teclado móvil, mensajes y acabado visual */
.chester-floating .chester-panel{contain:layout style;overscroll-behavior:contain}
.chester-panel{min-height:0!important}
.chester-thread{flex:1 1 0;min-height:0!important;scroll-padding-bottom:16px;overflow-anchor:auto}
.chester-form{position:relative;z-index:2;background:#fff;align-items:center;margin:0!important}
.chester-form input{font-size:16px!important;line-height:1.25;min-height:46px;box-shadow:none!important;appearance:none;-webkit-appearance:none}
.chester-form input:focus{border-color:#38a6a2;outline:2px solid #38a6a233;outline-offset:0}
.chester-form button{height:46px;flex-shrink:0;transition:filter .2s ease,transform .2s ease}
.chester-form button:active{transform:scale(.94)}
.chester-message{font-size:14px;line-height:1.58;letter-spacing:.02px}
.chester-message-row{max-width:100%;animation:chester-arrive .22s ease-out both}
.chester-message-left{max-width:min(95%,360px)}
.chester-typing{display:flex;align-items:center;gap:8px;color:#58757c;font-size:12px;padding:7px 10px;margin-left:32px;align-self:flex-start;background:#fff;border:1px solid #e1eeee;border-radius:13px}
.chester-typing-dots{display:inline-flex;gap:3px;align-items:center}
.chester-typing-dots i{display:block;background:#2d8e89;border-radius:50%;width:5px;height:5px;animation:chester-dot 1.1s infinite ease-in-out}
.chester-typing-dots i:nth-child(2){animation-delay:.13s}.chester-typing-dots i:nth-child(3){animation-delay:.26s}
@keyframes chester-dot{0%,70%,100%{opacity:.3;transform:translateY(0)}35%{opacity:1;transform:translateY(-4px)}}
@keyframes chester-arrive{from{opacity:.3;transform:translateY(7px)}to{opacity:1;transform:translateY(0)}}
@media(max-width:640px){
 .chester-floating.chester-is-open{position:fixed!important;inset:0!important;z-index:2147483000!important}
 .chester-floating .chester-panel{height:var(--chester-vh,100dvh)!important;max-height:var(--chester-vh,100dvh)!important;top:var(--chester-top,0px)!important;left:0!important;right:0!important;bottom:auto!important;width:100%!important;padding-top:0!important;padding-bottom:env(safe-area-inset-bottom,0px)!important;border-radius:0!important}
 .chester-header{padding-top:max(9px,env(safe-area-inset-top,0px));min-height:62px}
 .chester-thread{padding:13px 11px 8px;overscroll-behavior:contain}
 .chester-quick{padding:6px 10px;max-height:50px}
 .chester-actions{padding:5px 9px 7px}
 .chester-form{padding:7px 9px!important;border-top:1px solid #e2efed}
 .chester-form input{min-height:44px;height:44px}
 .chester-form button{height:44px}
 .chester-note{display:none!important}
}
@media(max-width:640px) and (max-height:420px){.chester-quick{display:none}.chester-actions{padding:3px 7px}.chester-actions a,.chester-actions button{min-height:34px}.chester-header{min-height:48px}.chester-avatar{height:38px;width:38px}}
@media(prefers-reduced-motion:reduce){.chester-message-row,.chester-typing-dots i{animation:none!important}}

/* Chester 1.1 — true mobile fullscreen modal; keyboard-safe layout */
html.chester-page-locked{overflow:hidden!important;overscroll-behavior:none!important}
body.chester-page-locked{position:fixed!important;top:var(--chester-locked-scroll,0px)!important;left:0!important;right:0!important;width:100%!important;overflow:hidden!important;overscroll-behavior:none!important}
@media(max-width:640px){
 .chester-floating.chester-is-open{position:fixed!important;inset:0!important;width:100vw!important;height:100dvh!important;pointer-events:auto!important;background:#fff!important;z-index:2147483000!important;overflow:hidden!important}
 .chester-floating.chester-is-open .chester-panel{position:fixed!important;top:var(--chester-top,0px)!important;left:0!important;right:0!important;bottom:auto!important;width:100vw!important;max-width:100vw!important;height:var(--chester-vh,100dvh)!important;max-height:var(--chester-vh,100dvh)!important;overflow:hidden!important;padding:0!important;background:#fff!important;display:flex!important;flex-direction:column!important}
 .chester-floating .chester-header{flex:0 0 auto!important}
 .chester-floating .chester-thread{flex:1 1 auto!important;min-height:0!important;overflow-y:auto!important;overscroll-behavior:contain!important}
 .chester-floating .chester-quick{flex:0 0 auto!important;max-width:100vw!important;overflow-x:auto!important;overscroll-behavior-x:contain!important}
 .chester-floating .chester-actions{flex:0 0 auto!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important}
 .chester-floating .chester-actions a,.chester-floating .chester-actions button{font-size:11px!important;letter-spacing:0!important;overflow-wrap:anywhere!important;white-space:normal!important}
 .chester-floating .chester-form{flex:0 0 auto!important;background:#fff!important;padding:8px 10px max(8px,env(safe-area-inset-bottom))!important;z-index:5!important}
 .chester-floating .chester-form input{font-size:16px!important;min-width:0!important;width:auto!important;flex:1 1 auto!important}
 .chester-floating.chester-keyboard-open .chester-quick,.chester-floating.chester-keyboard-open .chester-actions{display:none!important}
 .chester-floating.chester-keyboard-open .chester-form{padding:7px 9px!important}
 .chester-floating.chester-keyboard-open .chester-header{min-height:52px!important;padding:5px 10px!important}
 .chester-floating.chester-keyboard-open .chester-avatar{width:40px!important;height:40px!important}
 .chester-floating.chester-keyboard-open .chester-header small{font-size:10px!important}
}

/* Chester 1.2: background is a separate opaque shield over the entire layout viewport.
   Safari may draw the translucent native keyboard over web content; the web cannot style it. */
@media(max-width:640px){
 body > .chester-floating.chester-is-open{
  position:fixed!important;inset:0!important;top:0!important;left:0!important;
  width:100vw!important;height:var(--chester-screen-height,100lvh)!important;
  min-height:100lvh!important;background:#ffffff!important;
  contain:layout style!important;isolation:isolate!important;
  z-index:2147483646!important;overflow:hidden!important;touch-action:none!important;
 }
 body > .chester-floating.chester-is-open .chester-panel{z-index:2!important;touch-action:pan-y!important;}
 body > .chester-floating.chester-is-open .chester-thread{touch-action:pan-y!important;}
 body > .chester-floating.chester-is-open .chester-quick{touch-action:pan-x!important;}
 body > .chester-floating.chester-is-open .chester-form{touch-action:auto!important;}
}

/* 1.3: full-screen modal and scroll isolation, scoped only to the open floating Chester. */
@media (max-width:640px){
 html.chester-page-locked,html.chester-page-locked body{overscroll-behavior:none!important;}
 html.chester-page-locked body{touch-action:none!important;}
 body > .chester-widget.chester-floating.chester-is-open{
  position:fixed!important;inset:0!important;transform:none!important;
  width:100%!important;height:100lvh!important;max-height:none!important;
  background:#fff!important;overflow:hidden!important;
  z-index:2147483646!important;isolation:isolate!important;pointer-events:auto!important;
 }
 body > .chester-widget.chester-floating.chester-is-open .chester-panel{
  position:fixed!important;top:var(--chester-top,0px)!important;left:0!important;
  width:100%!important;height:var(--chester-vh,100dvh)!important;
  max-height:var(--chester-vh,100dvh)!important;right:auto!important;bottom:auto!important;
  border:none!important;border-radius:0!important;box-shadow:none!important;
  transform:none!important;overflow:hidden!important;display:flex!important;flex-direction:column!important;
 }
 body > .chester-widget.chester-floating.chester-is-open .chester-thread{min-height:0!important;flex:1 1 auto!important;overflow-y:auto!important;-webkit-overflow-scrolling:touch!important;touch-action:pan-y!important;overscroll-behavior:contain!important;}
 body > .chester-widget.chester-floating.chester-is-open .chester-quick{touch-action:pan-x!important;}
 body > .chester-widget.chester-floating.chester-is-open .chester-form input{font-size:16px!important;}
}

/* Chester 1.4: correct X alignment, preserve 1.3 scroll lock unchanged */
.chester-widget .chester-close{display:flex!important;align-items:center!important;justify-content:center!important;padding:0!important;width:36px!important;height:36px!important;min-width:36px!important;min-height:36px!important;line-height:1!important;font-family:Arial,sans-serif!important;font-size:25px!important;font-weight:400!important;appearance:none;-webkit-appearance:none}
.chester-widget .chester-close span{display:block!important;line-height:1!important;transform:translateY(-1px);margin:0!important;padding:0!important}
.chester-widget .chester-actions a,.chester-widget .chester-actions button{transition:filter .18s ease,transform .18s ease}
.chester-widget .chester-actions a:active,.chester-widget .chester-actions button:active{transform:scale(.985)}
