#ksc-root{--ksc-accent:#e58a24;position:fixed;right:24px;bottom:24px;z-index:99999;font-family:inherit;color:#292323}
.ksc-launcher{border:1px solid #e4a04b;border-radius:28px;background:var(--ksc-accent);color:#fff;padding:13px 19px;box-shadow:0 6px 24px #0002;display:flex;gap:9px;align-items:center;cursor:pointer;font:inherit;font-weight:600}
.ksc-launcher[hidden]{display:none}
.ksc-panel{width:min(390px,calc(100vw - 28px));max-height:min(720px,calc(100vh - 95px));background:#fff;border:1px solid #e9e3e3;border-radius:16px;box-shadow:0 12px 48px #0003;overflow:hidden;display:flex;flex-direction:column}
.ksc-panel[hidden]{display:none}
.ksc-header{background:var(--ksc-accent);color:#fff;padding:14px;display:flex;align-items:center;gap:11px}
.ksc-avatar{width:38px;height:38px;border-radius:50%;background:#fff;color:var(--ksc-accent);display:grid;place-items:center;font-family:Georgia,serif;font-size:21px}
.ksc-headtext{display:flex;flex-direction:column;flex:1}.ksc-headtext strong{font-size:14px}.ksc-headtext small{opacity:.85;font-size:11px}
.ksc-close{border:0;background:transparent;color:#fff;font-size:27px;line-height:1;cursor:pointer}
.ksc-body{overflow:auto;padding:15px}
.ksc-welcome{font-size:13px;line-height:1.5;margin:0 0 13px}
.ksc-form{display:grid;gap:11px}
.ksc-form label{display:grid;gap:5px;font-size:12px;font-weight:600}
.ksc-form input:not([type=checkbox]),.ksc-form select,.ksc-form textarea{width:100%;box-sizing:border-box;border:1px solid #e3dadd;border-radius:8px;padding:10px 11px;font:inherit;font-size:13px;background:#fff;color:#292323}
.ksc-form textarea{resize:vertical;min-height:90px}
.ksc-two{display:grid;grid-template-columns:1fr 1fr;gap:9px}
.ksc-consent{display:flex!important;grid-template-columns:16px 1fr!important;align-items:start;font-weight:400!important;line-height:1.4}
.ksc-consent input{margin:2px 0 0}
.ksc-submit{border:0;border-radius:24px;background:var(--ksc-accent);color:#fff;padding:12px 16px;font:inherit;font-size:13px;font-weight:600;cursor:pointer}
.ksc-submit:disabled{opacity:.6;cursor:wait}
.ksc-status{font-size:12px;line-height:1.45}.ksc-status:empty{display:none}.ksc-status.is-success{color:#187344}.ksc-status.is-error{color:#b42318}.ksc-status.is-pending{color:#666}
.ksc-note{font-size:10px;color:#888;line-height:1.4;margin:12px 0 0}
.ksc-trap{position:absolute!important;left:-10000px!important;width:1px;height:1px;overflow:hidden}
@media(max-width:600px){#ksc-root{right:12px;bottom:12px}.ksc-panel{max-height:calc(100vh - 80px)}.ksc-two{grid-template-columns:1fr}}

/* v0.5.1: subtle warm-orange outline on the question launcher */
#ksc-root .ksc-launcher{border:1px solid #e4a04b!important;box-shadow:0 2px 10px #00000018, inset 0 0 0 1px #e4a04b22!important;}
#ksc-root .ksc-launcher:hover{border-color:#d98b2b!important;box-shadow:0 3px 13px #00000020, inset 0 0 0 1px #d98b2b33!important;}

/* v0.5.2: warm orange accent replaces burgundy */
#ksc-root{--ksc-accent:#e58a24}
#ksc-root .ksc-launcher{background:#e58a24;border-color:#d97912}
#ksc-root .ksc-header{background:#e58a24}
#ksc-root .ksc-submit{background:#e58a24}
#ksc-root .ksc-avatar{color:#d97912}
#ksc-root .ksc-launcher:hover,#ksc-root .ksc-submit:hover{background:#d97912}

/* v0.5.3: launcher stays light; only a thin orange outline */
#ksc-root .ksc-launcher{
  background:#f3f3f3!important;
  color:#3d3d3d!important;
  border:1px solid #e4a04b!important;
  box-shadow:0 2px 10px #00000018, inset 0 0 0 1px #e4a04b22!important;
}
#ksc-root .ksc-launcher:hover{
  background:#f3f3f3!important;
  color:#3d3d3d!important;
  border-color:#d98b2b!important;
  box-shadow:0 3px 13px #00000020, inset 0 0 0 1px #d98b2b33!important;
}

/* v0.5.4: graphite site theme, neutral submit button and direct VK contact */
#ksc-root{--ksc-accent:#3b3b3b;color:#292929}
#ksc-root .ksc-header{background:#3b3b3b!important}
#ksc-root .ksc-avatar{color:#3b3b3b!important}
#ksc-root .ksc-submit{
  background:#eeeeee!important;
  color:#333333!important;
  border:1px solid #d7d7d7!important;
}
#ksc-root .ksc-submit:hover{background:#e4e4e4!important}
#ksc-root .ksc-vk-button{
  display:flex;align-items:center;justify-content:center;
  box-sizing:border-box;width:100%;min-height:44px;
  padding:11px 16px;border:1px solid #bdbdbd;border-radius:24px;
  background:#f7f7f7;color:#333;text-decoration:none;
  font:inherit;font-size:13px;font-weight:600;text-align:center;
}
#ksc-root .ksc-vk-button:hover{background:#eeeeee;border-color:#999;color:#222}

/* v0.5.5: use the site's microphone logo in the consultant header */
#ksc-root .ksc-avatar{overflow:hidden;background:#fff}
#ksc-root .ksc-avatar img{display:block;width:34px;height:34px;object-fit:contain;border-radius:50%}

/* v0.5.6: restore the rectangular launcher; keep all other styling unchanged */
#ksc-root .ksc-launcher{
  border-radius:6px!important;
}
#ksc-root .ksc-launcher:hover{
  border-radius:6px!important;
}

/* v0.5.7: slightly more compact contact form */
#ksc-root .ksc-form textarea{min-height:76px}
#ksc-root .ksc-body{padding:13px}
#ksc-root .ksc-form{gap:10px}

/* v0.5.8: slightly taller message field and prevent mobile header sticking */
#ksc-root .ksc-form textarea{min-height:116px}
#ksc-root .ksc-header{
  position:static!important;
  top:auto!important;
  bottom:auto!important;
  transform:none!important;
  flex:0 0 auto!important;
  z-index:auto!important;
}
#ksc-root .ksc-panel{position:relative}
@media(max-width:600px){
  #ksc-root .ksc-header{
    position:static!important;
    inset:auto!important;
  }
  #ksc-root .ksc-body{
    min-height:0;
    overscroll-behavior:contain;
  }
}

/* v0.5.9: scroll the entire consultant panel, including its header.
   Previously only .ksc-body scrolled, making the header appear fixed. */
#ksc-root .ksc-panel{
  overflow-x:hidden!important;
  overflow-y:auto!important;
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
}
#ksc-root .ksc-header{
  position:static!important;
  flex:0 0 auto!important;
}
#ksc-root .ksc-body{
  overflow:visible!important;
  flex:0 0 auto!important;
  min-height:0!important;
}
@media(max-width:600px){
  #ksc-root .ksc-panel{
    max-height:calc(100dvh - 80px)!important;
    max-height:calc(100vh - 80px)!important;
  }
}

/* v0.6.0: one shared scroll viewport contains BOTH header and form */
#ksc-root .ksc-panel{
  display:flex!important;
  flex-direction:column!important;
  overflow:hidden!important;
}
#ksc-root .ksc-scroll{
  display:block!important;
  flex:1 1 auto!important;
  min-height:0!important;
  overflow-x:hidden!important;
  overflow-y:auto!important;
  -webkit-overflow-scrolling:touch!important;
  overscroll-behavior:contain;
}
#ksc-root .ksc-scroll .ksc-header{
  position:static!important;
  inset:auto!important;
  flex:0 0 auto!important;
  transform:none!important;
}
#ksc-root .ksc-scroll .ksc-body{
  overflow:visible!important;
  flex:0 0 auto!important;
  min-height:0!important;
}

/* v0.6.1: enforce hidden states against theme-wide button/section styles */
#ksc-root .ksc-launcher[hidden],
#ksc-root .ksc-panel[hidden]{
  display:none!important;
}
#ksc-root .ksc-launcher:not([hidden]){
  display:flex!important;
}
#ksc-root .ksc-panel:not([hidden]){
  display:flex!important;
}

/* v0.6.2: keep a visible gap above the panel on mobile */
@media(max-width:600px){
  #ksc-root .ksc-panel{
    max-height:calc(100dvh - 48px)!important;
    max-height:calc(100vh - 48px)!important;
    margin-top:16px!important;
  }
}

/* v0.6.3: anchor the open panel to the mobile visual viewport with safe top/bottom gaps */
@media(max-width:600px){
  #ksc-root .ksc-panel:not([hidden]){
    position:fixed!important;
    top:calc(env(safe-area-inset-top, 0px) + 18px)!important;
    bottom:calc(env(safe-area-inset-bottom, 0px) + 18px)!important;
    left:12px!important;
    right:12px!important;
    width:auto!important;
    height:auto!important;
    max-height:none!important;
    min-height:0!important;
    margin:0!important;
    box-sizing:border-box!important;
  }
  #ksc-root .ksc-scroll{
    min-height:0!important;
    max-height:100%!important;
    overscroll-behavior:contain!important;
  }
}
