:where(.jclc-shell, .jclc-panel) {
  --jclc-ink: #07100d;
  --jclc-surface: #0b1713;
  --jclc-surface-2: #12211c;
  --jclc-line: rgba(211, 232, 218, 0.16);
  --jclc-line-strong: rgba(211, 232, 218, 0.28);
  --jclc-text: #eef5ef;
  --jclc-muted: #97a99f;
  --jclc-accent: #4ade80;
  --jclc-accent-ink: #07130c;
  --jclc-danger: #d07b74;
  box-sizing: border-box;
  font-family: "Satoshi", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.jclc-shell *, .jclc-panel * { box-sizing: border-box; }
.jclc-shell button, .jclc-shell input, .jclc-panel button, .jclc-panel input, .jclc-panel textarea { font: inherit; }
.jclc-panel[hidden], .jclc-shell [hidden], .jclc-panel [hidden] { display: none !important; }

.jclc-shell { width: 100%; margin-top: 28px; }
:root.jclc-mobile-chat-open { overscroll-behavior: none; }
.jclc-shell + .actions { margin-top: 12px; }
.jclc-entry {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 46px;
  align-items: center;
  gap: 6px;
  padding: 5px;
  border: 1px solid var(--jclc-line-strong);
  border-radius: 18px;
  background: rgba(8, 20, 16, .78);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.055), 0 16px 36px rgba(0,0,0,.2);
  backdrop-filter: blur(16px) saturate(112%);
}
.jclc-entry-input {
  width: 100%;
  min-width: 0;
  height: 46px;
  padding: 0 13px;
  border: 0;
  outline: 0;
  color: var(--jclc-text);
  background: transparent;
  font-size: 16px !important;
  line-height: 1.2;
  appearance: none;
}
.jclc-entry-input::placeholder { color: #91a399; opacity: 1; }
.jclc-entry:focus-within { border-color: rgba(74,222,128,.54); box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 0 0 3px rgba(74,222,128,.08); }
.jclc-disclosure {
  margin: 8px 12px 0;
  color: rgba(151, 169, 159, .82);
  font-size: 11.5px;
  line-height: 1.35;
  text-align: center;
}
.jclc-launcher {
  width: 46px;
  height: 46px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 14px;
  color: var(--jclc-accent-ink);
  background: var(--jclc-accent);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: transform 140ms ease, background 140ms ease;
}
.jclc-launcher:hover { background: #86efac; }
.jclc-launcher:active { transform: scale(.96); }

.jclc-panel {
  --jclc-vvh: 100dvh;
  position: relative;
  width: 100%;
  height: min(500px, calc(var(--jclc-vvh) - 32px));
  max-height: none;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  color: var(--jclc-text);
  background: linear-gradient(180deg, #0f1e18, #050d0a);
  border: 1px solid var(--jclc-line-strong);
  border-radius: 28px;
  box-shadow: 0 28px 90px rgba(0, 0, 0, .46);
  backdrop-filter: blur(24px) saturate(112%);
  animation: jclc-open 210ms cubic-bezier(.22, .85, .28, 1);
  overscroll-behavior: contain;
}

.jclc-header {
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px 8px 16px;
}
.jclc-brand { min-width: 0; display: flex; flex: 1 1 auto; align-items: center; gap: 10px; }
.jclc-mark {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 28%, rgba(255,255,255,.82) 0 5%, transparent 20%),
    radial-gradient(circle at 58% 66%, #739184 0 24%, #d3e4d7 44%, #526e61 68%, #b6cbbb 100%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.24);
}
.jclc-title-wrap { min-width: 0; }
.jclc-title { margin: 0; color: var(--jclc-text); font-size: 15px; line-height: 1.15; font-weight: 680; letter-spacing: -0.015em; }
.jclc-subtitle { margin: 4px 0 0; display: flex; align-items: center; gap: 6px; color: var(--jclc-muted); font-size: 11px; line-height: 1; }
.jclc-status-dot { width: 6px; height: 6px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 8px rgba(74,222,128,.4); }
.jclc-status-dot[data-state="connecting"] { background: #d3b56e; }
.jclc-status-dot[data-state="error"] { background: var(--jclc-danger); }

.jclc-icon-button {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 50%;
  color: var(--jclc-muted);
  background: transparent;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: color 140ms ease, background 140ms ease, transform 140ms ease;
}
.jclc-icon-button:hover { color: var(--jclc-text); background: rgba(255,255,255,.06); }
.jclc-icon-button:active { transform: scale(.94); }
.jclc-header-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 2px; }
.jclc-call-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 13px;
  border: 1px solid var(--jclc-line-strong);
  border-radius: 999px;
  color: var(--jclc-accent-ink);
  background: var(--jclc-accent);
  font-size: 12px;
  font-weight: 670;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: transform 140ms ease, background 140ms ease;
}
.jclc-call-button:hover { background: #86efac; }
.jclc-call-button:active { transform: scale(.97); }

.jclc-body { position: relative; min-width: 0; min-height: 0; overflow: hidden; }
.jclc-transcript {
  height: 100%;
  min-width: 0;
  overflow: auto;
  padding: 10px 16px 18px;
  scrollbar-width: thin;
  scrollbar-color: rgba(210, 233, 218, .24) transparent;
  overscroll-behavior: contain;
}
.jclc-intro { padding: 6px 0 14px; }
.jclc-intro__title { margin: 0 0 16px; color: var(--jclc-text); font-size: clamp(22px, 6vw, 27px); line-height: 1.05; font-weight: 620; letter-spacing: -0.045em; }
.jclc-quick-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.jclc-quick {
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid var(--jclc-line);
  border-radius: 14px;
  color: #c8d7ce;
  background: rgba(255,255,255,.025);
  font-size: 12px;
  font-weight: 580;
  text-align: center;
  cursor: pointer;
  touch-action: manipulation;
  transition: border-color 140ms ease, background 140ms ease, color 140ms ease;
}
.jclc-quick:hover { color: var(--jclc-text); border-color: var(--jclc-line-strong); background: rgba(255,255,255,.055); }

.jclc-message { display: flex; flex-direction: column; gap: 3px; margin: 11px 0; }
.jclc-message--user { align-items: flex-end; }
.jclc-message--agent, .jclc-message--system { align-items: flex-start; }
.jclc-message__role { display: none; }
.jclc-message__bubble {
  max-width: 88%;
  padding: 10px 12px;
  border: 1px solid var(--jclc-line);
  border-radius: 15px 15px 15px 5px;
  color: #d7e3da;
  background: rgba(255,255,255,.045);
  font-size: 14px;
  line-height: 1.48;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.jclc-message--user .jclc-message__bubble { color: #13251c; background: var(--jclc-accent); border-color: transparent; border-radius: 15px 15px 5px 15px; }
.jclc-message--system .jclc-message__bubble { color: var(--jclc-muted); background: transparent; border-style: dashed; font-size: 12px; }
.jclc-message__bubble a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.jclc-typing { width: 48px; min-height: 32px; display: flex; align-items: center; justify-content: center; gap: 4px; margin: 10px 0; border: 1px solid var(--jclc-line); border-radius: 13px; background: rgba(255,255,255,.04); }
.jclc-typing span { width: 4px; height: 4px; border-radius: 50%; background: var(--jclc-muted); animation: jclc-dot 1.1s infinite ease-in-out; }
.jclc-typing span:nth-child(2) { animation-delay: .12s; }
.jclc-typing span:nth-child(3) { animation-delay: .24s; }

.jclc-composer {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 46px;
  align-items: center;
  gap: 8px;
  padding: 10px 12px max(10px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--jclc-line);
  background: rgba(6, 15, 12, .98);
}
.jclc-input {
  width: 100%;
  min-width: 0;
  height: 46px;
  padding: 0 16px;
  border: 1px solid var(--jclc-line-strong);
  border-radius: 16px;
  outline: none;
  color: var(--jclc-text);
  background: rgba(255,255,255,.045);
  font-size: 16px !important;
  line-height: 1.2;
  -webkit-text-size-adjust: 100%;
  appearance: none;
}
.jclc-input::placeholder { color: #7f9187; opacity: 1; }
.jclc-input:focus { border-color: rgba(74,222,128,.56); box-shadow: 0 0 0 3px rgba(74,222,128,.09); }
.jclc-send { width: 46px; height: 46px; color: var(--jclc-accent-ink); background: var(--jclc-accent); }
.jclc-send:hover { color: var(--jclc-accent-ink); background: #86efac; }
.jclc-send:disabled { cursor: default; opacity: .45; transform: none; }


.jclc-booking { position: absolute; inset: 0; z-index: 5; display: grid; grid-template-rows: auto minmax(0,1fr); background: #090a0d; }
.jclc-booking__head { min-height: 54px; display: grid; grid-template-columns: 58px minmax(0,1fr) 58px; align-items: center; padding: 5px 8px; border-bottom: 1px solid var(--jclc-line); background: #0f1014; }
.jclc-booking__title { grid-column: 2; margin: 0; text-align: center; color: var(--jclc-text); font-size: 15px; font-weight: 650; }
.jclc-booking__external { grid-column: 3; justify-self: end; color: #4ade80; font-size: 11px; font-weight: 700; text-decoration: none; }
.jclc-booking__external:hover { color: #86efac; }
.jclc-booking__frame-wrap { min-height: 0; overflow: hidden; background: #090a0d; }
.jclc-booking__frame { width: 100%; height: 100%; display: block; border: 0; background: #090a0d; }

.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }
.jclc-launcher:focus-visible, .jclc-panel button:focus-visible, .jclc-panel a:focus-visible { outline: 2px solid #86efac; outline-offset: 3px; }

@keyframes jclc-open { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }

@keyframes jclc-dot { 0%,70%,100% { opacity: .35; transform: translateY(0); } 35% { opacity: 1; transform: translateY(-3px); } }

@media (max-width: 700px), (pointer: coarse) {
  .jclc-shell { margin-top: 24px; }
  .jclc-panel {
    position: fixed;
    --jclc-mobile-top: max(8px, env(safe-area-inset-top));
    --jclc-mobile-bottom: max(8px, env(safe-area-inset-bottom));
    z-index: 1000;
    top: calc(var(--jclc-vv-top, 0px) + var(--jclc-mobile-top));
    right: max(8px, env(safe-area-inset-right));
    left: max(8px, env(safe-area-inset-left));
    width: auto;
    height: calc(var(--jclc-vvh) - var(--jclc-mobile-top) - var(--jclc-mobile-bottom));
    border-radius: 20px;
  }
  .jclc-header { min-height: 62px; }

  .jclc-transcript { padding: 8px 14px 16px; }
  .jclc-intro { padding-top: 4px; }
  .jclc-intro__title { font-size: 24px; }
  .jclc-composer { padding-left: 10px; padding-right: 10px; }
  .jclc-booking__head { grid-template-columns: 52px minmax(0,1fr) 52px; }
}

@media (max-width: 350px) {
  .jclc-panel { border-radius: 18px; }
  .jclc-quick-row { grid-template-columns: 1fr; }
  .jclc-call-button { min-width: 42px; width: 42px; padding: 0; }
  .jclc-call-button span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
}

@media (prefers-reduced-motion: reduce) {
  .jclc-shell, .jclc-panel, .jclc-panel *, .jclc-shell * { animation: none !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
