/* Fakeh is self-contained so shared page styles cannot change its controls. */
#fakeh-widget,#fakeh-widget *{box-sizing:border-box}
#fakeh-widget{
  --fakeh-bg:var(--fx-panel,#102433);--fakeh-alt:var(--fx-panel-alt,#142d3b);
  --fakeh-ink:var(--fx-ink,#e9f5fc);--fakeh-muted:var(--fx-muted,#a8bdcb);
  --fakeh-line:var(--fx-line,#284554);--fakeh-accent:var(--fx-accent,#37e0c2);
  --fakeh-vv-height:100dvh;--fakeh-vv-bottom:0px;
  position:fixed;inset-inline-end:max(20px,env(safe-area-inset-left),env(safe-area-inset-right));bottom:calc(20px + env(safe-area-inset-bottom) + var(--fakeh-vv-bottom));
  z-index:10005;color:var(--fakeh-ink);font:calc(13px * var(--fx-font-scale,1))/1.65 Tahoma,Arial,sans-serif;text-align:start;
  width:fit-content;max-width:calc(100vw - 24px);isolation:isolate
}
#fakeh-widget[hidden],#fakeh-widget [hidden]{display:none!important}
.fakeh-bottom-space{height:96px;flex:none;clear:both;pointer-events:none}
#fakeh-widget button,#fakeh-widget textarea,#fakeh-widget a{font-family:inherit;letter-spacing:normal;text-transform:none}
#fakeh-widget button{
  appearance:none;cursor:pointer;box-shadow:none;margin:0;line-height:1.5;text-align:inherit;
  color:inherit;background:transparent;border:0;min-width:44px;min-height:44px;font-size:inherit;border-radius:0
}
#fakeh-widget button:disabled{opacity:.5;cursor:default;transform:none}
#fakeh-widget button:focus-visible,#fakeh-widget a:focus-visible,#fakeh-widget textarea:focus-visible{
  outline:3px solid var(--fakeh-accent);outline-offset:3px
}
#fakeh-widget svg{display:block;width:22px;height:22px;flex:none;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
#fakeh-widget .fakeh-launcher{
  display:flex;align-items:center;gap:10px;padding:7px 17px 7px 7px;min-height:64px;max-width:220px;
  background:var(--fakeh-bg);border:1px solid var(--fakeh-line);border-radius:21px;
  box-shadow:0 8px 32px #0003,0 0 0 3px color-mix(in srgb,var(--fakeh-accent) 8%,transparent);
  transition:transform .18s ease,box-shadow .18s ease
}
#fakeh-widget[dir=rtl] .fakeh-launcher{padding:7px 7px 7px 17px}
#fakeh-widget .fakeh-launcher:hover{transform:translateY(-2px);box-shadow:0 10px 34px #0005,0 0 0 3px color-mix(in srgb,var(--fakeh-accent) 15%,transparent)}
#fakeh-widget .fakeh-orb,#fakeh-widget .fakeh-avatar{
  display:grid;place-items:center;flex:none;color:var(--fakeh-accent);
  background:color-mix(in srgb,var(--fakeh-accent) 11%,var(--fakeh-bg));border:1px solid color-mix(in srgb,var(--fakeh-accent) 36%,var(--fakeh-line))
}
#fakeh-widget .fakeh-orb{width:48px;height:48px;border-radius:16px}
#fakeh-widget .fakeh-orb svg{width:37px;height:37px;stroke-width:1.65}
#fakeh-widget .fakeh-face-shell{fill:color-mix(in srgb,var(--fakeh-accent) 12%,transparent)}
#fakeh-widget .fakeh-face-line{stroke:var(--fakeh-accent);stroke-width:2}
#fakeh-widget .fakeh-spark{fill:var(--fakeh-accent);stroke:none}
#fakeh-widget .fakeh-launcher-labels{display:grid;gap:1px;min-width:0}
#fakeh-widget .fakeh-launcher-labels strong{font-size:calc(15px * var(--fx-font-scale,1));font-weight:700;color:var(--fakeh-ink)}
#fakeh-widget .fakeh-launcher-labels>span{font-size:calc(11px * var(--fx-font-scale,1));color:var(--fakeh-muted);white-space:nowrap}
#fakeh-widget .fakeh-panel{
  position:absolute;inset-inline-end:0;bottom:80px;width:400px;max-width:calc(100vw - 40px);
  height:min(640px,calc(var(--fakeh-vv-height) - 114px));min-height:220px;
  display:flex;flex-direction:column;overflow:hidden;background:var(--fakeh-bg);
  border:1px solid var(--fakeh-line);border-radius:25px;box-shadow:0 24px 80px #0006;
  animation:fakeh-open .18s ease both
}
#fakeh-widget .fakeh-header{display:flex;align-items:center;gap:9px;padding:15px 12px 12px;border-bottom:1px solid var(--fakeh-line);flex:none}
#fakeh-widget .fakeh-avatar{width:39px;height:39px;border-radius:13px}
#fakeh-widget .fakeh-avatar svg{width:31px;height:31px;stroke-width:1.5}
#fakeh-widget .fakeh-titles{flex:1;min-width:0}
#fakeh-widget .fakeh-titles h2{font-size:calc(18px * var(--fx-font-scale,1));line-height:1.4;margin:0;color:var(--fakeh-ink);font-weight:700}
#fakeh-widget .fakeh-mode{font-size:calc(10px * var(--fx-font-scale,1));line-height:1.5;margin:3px 0 0;color:var(--fakeh-muted);overflow-wrap:anywhere}
#fakeh-widget .fakeh-mode[data-mode=ai]{color:var(--fakeh-accent)}
#fakeh-widget .fakeh-icon-button{display:grid;place-items:center;width:44px;height:44px;flex:none;border-radius:13px;color:var(--fakeh-muted)}
#fakeh-widget .fakeh-icon-button:hover{background:var(--fakeh-alt);color:var(--fakeh-ink)}
#fakeh-widget .fakeh-context{display:flex;gap:7px;align-items:center;padding:9px 16px;background:var(--fakeh-alt);border-bottom:1px solid var(--fakeh-line);font-size:calc(11px * var(--fx-font-scale,1));color:var(--fakeh-muted);flex:none}
#fakeh-widget .fakeh-context-dot{width:6px;height:6px;border-radius:50%;background:var(--fakeh-accent);flex:none}
#fakeh-widget .fakeh-log{flex:1;min-height:40px;overflow:auto;overscroll-behavior:contain;padding:18px 14px 9px;scrollbar-width:thin;scrollbar-color:var(--fakeh-line) transparent}
#fakeh-widget .fakeh-welcome{padding:16px 9px 14px;line-height:1.9}
#fakeh-widget .fakeh-welcome-eyebrow{display:block;color:var(--fakeh-accent);font-size:calc(10px * var(--fx-font-scale,1));font-weight:700;margin-bottom:9px}
#fakeh-widget .fakeh-welcome p{margin:0;font-size:calc(14px * var(--fx-font-scale,1));color:var(--fakeh-ink)}
#fakeh-widget .fakeh-message{max-width:95%;padding:11px 12px;margin:0 0 13px;border:1px solid var(--fakeh-line);border-radius:17px;background:var(--fakeh-alt);overflow-wrap:anywhere}
#fakeh-widget .fakeh-message-user{margin-inline-start:auto;background:color-mix(in srgb,var(--fakeh-accent) 10%,var(--fakeh-bg));border-color:color-mix(in srgb,var(--fakeh-accent) 33%,var(--fakeh-line));border-end-end-radius:5px}
#fakeh-widget .fakeh-message-assistant{margin-inline-end:auto;border-end-start-radius:5px}
#fakeh-widget .fakeh-message-name{display:block;font-size:calc(10px * var(--fx-font-scale,1));color:var(--fakeh-muted);margin-bottom:5px}
#fakeh-widget .fakeh-message-user .fakeh-message-name{color:var(--fakeh-accent)}
#fakeh-widget .fakeh-message-text{font-size:calc(13px * var(--fx-font-scale,1));line-height:1.85;margin:0;white-space:pre-wrap;unicode-bidi:plaintext;color:var(--fakeh-ink);overflow-wrap:anywhere}
#fakeh-widget .fakeh-message-links{display:flex;flex-wrap:wrap;gap:6px;margin-top:11px}
#fakeh-widget .fakeh-route-link{display:inline-flex;align-items:center;justify-content:space-between;gap:8px;min-height:44px;color:var(--fakeh-accent);font-size:calc(11px * var(--fx-font-scale,1));padding:7px 10px;background:var(--fakeh-bg);border:1px solid var(--fakeh-line);border-radius:11px;text-decoration:none;max-width:100%;overflow-wrap:anywhere}
#fakeh-widget .fakeh-route-link:hover{border-color:var(--fakeh-accent)}
#fakeh-widget .fakeh-route-link svg{width:14px;height:14px}
#fakeh-widget[dir=rtl] .fakeh-route-link svg{transform:rotate(180deg)}
#fakeh-widget .fakeh-suggestions{display:flex;gap:6px;padding:3px 14px 12px;flex-wrap:wrap;flex:none;max-height:190px;overflow:auto}
#fakeh-widget .fakeh-chip{padding:8px 11px;min-height:44px;background:var(--fakeh-alt);color:var(--fakeh-ink);border:1px solid var(--fakeh-line);border-radius:12px;font-size:calc(11px * var(--fx-font-scale,1));max-width:100%;overflow-wrap:anywhere}
#fakeh-widget .fakeh-chip:hover{border-color:var(--fakeh-accent);color:var(--fakeh-accent)}
#fakeh-widget .fakeh-thinking{display:flex;align-items:center;gap:9px;color:var(--fakeh-muted);font-size:calc(11px * var(--fx-font-scale,1));padding:4px 6px 12px}
#fakeh-widget .fakeh-thinking-dots{display:flex;gap:4px}
#fakeh-widget .fakeh-thinking-dots i{width:5px;height:5px;background:var(--fakeh-accent);border-radius:50%;animation:fakeh-think 1.1s ease-in-out infinite}
#fakeh-widget .fakeh-thinking-dots i:nth-child(2){animation-delay:.14s}
#fakeh-widget .fakeh-thinking-dots i:nth-child(3){animation-delay:.28s}
#fakeh-widget .fakeh-status{font-size:calc(11px * var(--fx-font-scale,1));line-height:1.7;margin:0 14px 9px;padding:8px 10px;border-inline-start:2px solid var(--fakeh-accent);background:var(--fakeh-alt);flex:none;max-height:90px;overflow:auto;color:var(--fakeh-ink)}
#fakeh-widget .fakeh-status a{display:inline-block;color:var(--fakeh-accent);font-size:inherit;min-height:32px;padding:5px 0;margin-inline-start:8px}
#fakeh-widget .fakeh-confirm{display:flex;align-items:center;gap:6px;flex-wrap:wrap;padding:10px 14px;background:var(--fakeh-alt);border-top:1px solid var(--fakeh-line);flex:none;font-size:calc(11px * var(--fx-font-scale,1))}
#fakeh-widget .fakeh-confirm>span{flex:1 1 100%}
#fakeh-widget .fakeh-small-button{padding:8px 10px;border:1px solid var(--fakeh-line);border-radius:10px;background:var(--fakeh-bg);font-size:calc(11px * var(--fx-font-scale,1))}
#fakeh-widget .fakeh-small-button:hover{border-color:var(--fakeh-accent)}
#fakeh-widget .fakeh-form{margin:0;padding:12px 12px 7px;border-top:1px solid var(--fakeh-line);flex:none}
#fakeh-widget .fakeh-input-row{display:flex;gap:7px;align-items:end;min-width:0}
#fakeh-widget textarea{
  display:block;min-width:0;width:100%;min-height:68px;max-height:110px;resize:vertical;
  margin:0;padding:10px 11px;color:var(--fakeh-ink);background:var(--fakeh-alt);border:1px solid var(--fakeh-line);
  border-radius:14px;font-size:calc(16px * var(--fx-font-scale,1))!important;line-height:1.55;box-shadow:none
}
#fakeh-widget textarea::placeholder{color:var(--fakeh-muted);opacity:1}
#fakeh-widget .fakeh-send{display:grid;place-items:center;flex:none;width:45px;height:45px;min-width:45px;color:var(--fakeh-bg);background:var(--fakeh-accent);border-radius:14px}
#fakeh-widget .fakeh-send:hover{filter:brightness(1.06)}
#fakeh-widget[dir=rtl] .fakeh-send svg{transform:scaleX(-1)}
#fakeh-widget .fakeh-form-meta{display:flex;justify-content:space-between;align-items:start;gap:8px;font-size:calc(9px * var(--fx-font-scale,1));line-height:1.6;color:var(--fakeh-muted);margin-top:7px}
#fakeh-widget .fakeh-count{direction:ltr;white-space:nowrap;flex:none}
#fakeh-widget .fakeh-storage-note{font-size:calc(9px * var(--fx-font-scale,1));line-height:1.6;color:var(--fakeh-muted);margin:0;padding:0 12px 10px;flex:none}
#fakeh-widget .fakeh-visually-hidden{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@keyframes fakeh-open{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}
@keyframes fakeh-think{0%,70%,100%{opacity:.45;transform:translateY(0)}35%{opacity:1;transform:translateY(-3px)}}
@media(max-width:600px),(max-height:480px){
  #fakeh-widget{inset-inline-end:max(12px,env(safe-area-inset-left),env(safe-area-inset-right));bottom:calc(12px + env(safe-area-inset-bottom) + var(--fakeh-vv-bottom))}
  #fakeh-widget .fakeh-launcher{padding:5px 10px 5px 5px;gap:7px;min-height:58px;border-radius:19px}
  #fakeh-widget[dir=rtl] .fakeh-launcher{padding:5px 5px 5px 10px}
  #fakeh-widget .fakeh-launcher-labels>span{display:none}
  #fakeh-widget .fakeh-launcher-labels strong{font-size:calc(12px * var(--fx-font-scale,1))}
  #fakeh-widget .fakeh-orb{width:45px;height:45px;border-radius:14px}
  #fakeh-widget .fakeh-panel{
    position:fixed;inset-inline:8px;bottom:calc(8px + env(safe-area-inset-bottom) + var(--fakeh-vv-bottom));width:auto;max-width:none;
    height:min(660px,calc(var(--fakeh-vv-height) - 18px - env(safe-area-inset-bottom)));min-height:0;border-radius:22px;z-index:1
  }
  #fakeh-widget.is-open .fakeh-launcher{visibility:hidden}
  #fakeh-widget .fakeh-header{padding:10px 9px 9px}
  #fakeh-widget .fakeh-log{padding-top:12px}
  #fakeh-widget .fakeh-welcome{padding:8px 5px 10px}
  #fakeh-widget .fakeh-suggestions{gap:5px;padding-bottom:9px;max-height:160px}
}
@media(max-height:560px){
  #fakeh-widget .fakeh-context{display:none}
  #fakeh-widget .fakeh-suggestions{max-height:88px;padding-bottom:6px}
  #fakeh-widget .fakeh-storage-note{display:none}
  #fakeh-widget .fakeh-header{padding-block:6px}
  #fakeh-widget .fakeh-form{padding-top:7px}
  #fakeh-widget textarea{min-height:48px;max-height:70px}
  #fakeh-widget .fakeh-welcome{padding-block:4px}
}
@media(prefers-reduced-motion:reduce){
  #fakeh-widget *,#fakeh-widget *::before,#fakeh-widget *::after{animation:none!important;transition:none!important}
}
html[data-reduce-motion=true] #fakeh-widget *,html[data-reduce-motion=true] #fakeh-widget *::before,html[data-reduce-motion=true] #fakeh-widget *::after{animation:none!important;transition:none!important}
@media print{#fakeh-widget,.fakeh-bottom-space{display:none!important}}

/* visualViewport shrinks for the software keyboard without changing CSS media height. */
#fakeh-widget.is-short .fakeh-context,#fakeh-widget.is-short .fakeh-suggestions,#fakeh-widget.is-short .fakeh-storage-note,#fakeh-widget.is-short .fakeh-form-meta{display:none}
#fakeh-widget.is-short .fakeh-header{padding-block:6px}
#fakeh-widget.is-short .fakeh-log{min-height:0;padding:8px 12px}
#fakeh-widget.is-short .fakeh-form{padding-block:7px}
#fakeh-widget.is-short textarea{min-height:48px;max-height:70px}
#fakeh-widget.is-short .fakeh-status{max-height:60px}

#fakeh-widget[inert]{visibility:hidden}
#fakeh-widget .fakeh-panel[data-fx-overlay-active] .fakeh-log{overscroll-behavior-y:contain;touch-action:pan-y}
