#svc-root {
  --g9: #0d411d;
  --g8: #13532a;
  --g6: #288e45;
  --g5: #3aa257;
  --g1: #e3f1df;
  --g0: #eff7ec;
  --y: #f8c22a;
  --y6: #e5ac0d;
  --ink: #10251a;
  --text: #4a5a50;
  --muted: #7b877f;
  --line: #e4e6df;
  --cream: #f8f6f0;
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 2147483000;
  font-family: "Work Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.45;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}
#svc-root *, #svc-root *::before, #svc-root *::after { box-sizing: border-box; }
#svc-root button { font: inherit; cursor: pointer; }
#svc-root svg { display: block; }
#svc-root [hidden] { display: none !important; }
#svc-root a { color: var(--g6); }
#svc-root :focus:not(:focus-visible) { outline: none; }
#svc-root :focus-visible { outline: 3px solid rgba(248, 194, 42, .8); outline-offset: 2px; }

/* launcher */
.svc-launcher {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 56px;
  padding: 0 22px 0 18px;
  border: 0;
  border-radius: 999px;
  background: var(--g9);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .9), 0 14px 34px rgba(13, 65, 29, .28);
  transition: transform .15s ease, background .15s ease;
}
.svc-launcher:hover { background: var(--g8); transform: translateY(-2px); }
.svc-l-ico { color: var(--y); }
.svc-l-ico svg { width: 24px; height: 24px; }
.svc-badge {
  position: absolute;
  top: 4px;
  right: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--y);
  border: 2px solid var(--g9);
}
.svc-open .svc-launcher { padding: 0; width: 56px; justify-content: center; }
.svc-open .svc-l-txt { display: none; }

/* teaser */
.svc-teaser {
  position: relative;
  max-width: 300px;
  margin-bottom: 12px;
  animation: svc-in .25s ease-out;
}
.svc-t-body {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  text-align: left;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px 14px 4px 14px;
  box-shadow: 0 16px 40px rgba(13, 65, 29, .16);
  color: var(--ink);
}
.svc-t-body .svc-logo svg { width: 30px; height: 30px; }
.svc-t-text { font-size: 14px; }
.svc-t-x {
  position: absolute;
  top: -10px;
  left: -10px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  display: grid;
  place-items: center;
  padding: 0;
  box-shadow: 0 4px 10px rgba(0, 0, 0, .08);
}
.svc-t-x svg { width: 14px; height: 14px; }

/* panel */
.svc-panel {
  width: 400px;
  height: min(660px, calc(100vh - 120px));
  margin-bottom: 14px;
  background: var(--cream);
  border-radius: 16px;
  box-shadow: 0 22px 50px rgba(13, 65, 29, .22);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(13, 65, 29, .08);
  animation: svc-in .2s ease-out;
}
@keyframes svc-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.svc-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 10px 14px 16px;
  background: var(--g9);
  color: #fff;
}
.svc-logo svg { width: 38px; height: 38px; }
.svc-head .svc-logo svg rect { fill: #13532a; }
.svc-titles { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.svc-titles strong { font-size: 17px; font-weight: 800; letter-spacing: -.01em; }
.svc-sub { font-size: 12.5px; color: #b9d1c0; display: flex; align-items: center; gap: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.svc-sub::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--g5); flex-shrink: 0; box-shadow: 0 0 0 3px rgba(58, 162, 87, .25); }
.svc-sub.svc-live::before { background: var(--y); box-shadow: 0 0 0 3px rgba(248, 194, 42, .25); }
.svc-demo {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  border-radius: 6px;
  background: var(--y);
  color: var(--ink);
  font-size: 12.5px !important;
  font-weight: 700;
  padding: 7px 10px;
  white-space: nowrap;
}
.svc-demo:hover { background: var(--y6); }
.svc-demo svg { width: 15px; height: 15px; }
.svc-icon {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #d6e6da;
  display: grid;
  place-items: center;
  padding: 0;
}
.svc-icon:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.svc-icon svg { width: 18px; height: 18px; }

/* log */
.svc-log {
  flex: 1;
  min-height: 90px;
  overflow-y: auto;
  padding: 16px 16px 8px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.svc-msg {
  max-width: 86%;
  padding: 10px 13px;
  border-radius: 14px;
  overflow-wrap: anywhere;
}
.svc-msg p { margin: 0 0 .5em; }
.svc-msg p:last-child { margin-bottom: 0; }
.svc-msg ul { margin: .3em 0 .5em; padding-left: 1.15em; }
.svc-msg ul:last-child { margin-bottom: 0; }
.svc-msg li { margin: .15em 0; }
.svc-msg strong { color: var(--ink); font-weight: 700; }
.svc-assistant, .svc-agent {
  align-self: flex-start;
  background: #fff;
  border: 1px solid var(--line);
  border-bottom-left-radius: 4px;
  color: var(--text);
}
.svc-agent { border-color: var(--y); box-shadow: inset 3px 0 0 var(--y); }
.svc-who { display: block; font-size: 11.5px; font-weight: 700; color: var(--g6); margin-bottom: 2px; text-transform: uppercase; letter-spacing: .04em; }
.svc-user {
  align-self: flex-end;
  background: var(--g9);
  color: #fff;
  border-bottom-right-radius: 4px;
  white-space: pre-wrap;
}
.svc-error { align-self: center; background: #fdf0ee; color: #a3321f; font-size: 13px; text-align: center; }
.svc-typing { display: flex; gap: 4px; padding: 14px; }
.svc-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--g5); animation: svc-dot 1.2s infinite ease-in-out; }
.svc-typing i:nth-child(2) { animation-delay: .15s; }
.svc-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes svc-dot {
  0%, 80%, 100% { opacity: .3; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-3px); }
}

/* dock: picker, chips, form */
.svc-dock:empty { display: none; }
.svc-dock { padding: 4px 16px 12px; }
.svc-dock-scroll { max-height: 56%; overflow-y: auto; flex-shrink: 0; }
.svc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.svc-card {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  text-align: left;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  transition: border-color .12s ease, box-shadow .12s ease, transform .12s ease;
}
.svc-card:hover { border-color: var(--g5); box-shadow: 0 8px 20px rgba(13, 65, 29, .1); transform: translateY(-1px); }
.svc-card-ico {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--g0);
  color: var(--g9);
  display: grid;
  place-items: center;
}
.svc-card-ico svg { width: 18px; height: 18px; }
.svc-card-txt { display: flex; flex-direction: column; min-width: 0; }
.svc-card-txt strong { font-size: 13px; font-weight: 700; line-height: 1.25; }
.svc-card-txt small { font-size: 11.5px; color: var(--muted); line-height: 1.3; margin-top: 2px; }

.svc-chips { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.svc-chip {
  border: 1.5px solid var(--g9);
  background: #fff;
  color: var(--g9);
  padding: 7px 13px;
  border-radius: 999px;
  font-size: 13.5px !important;
  font-weight: 600;
}
.svc-chip:hover { background: var(--g9); color: #fff; }
.svc-chip-ghost { border-color: transparent; background: transparent; color: var(--muted); font-weight: 500; }
.svc-chip-ghost:hover { background: transparent; color: var(--ink); text-decoration: underline; }

.svc-card-form {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  box-shadow: 0 10px 30px rgba(13, 65, 29, .08);
}
.svc-f { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--text); font-weight: 600; }
.svc-f input {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  font: inherit;
  font-size: 14px;
  font-weight: 400;
  color: var(--ink);
  background: var(--cream);
  width: 100%;
}
.svc-f input:focus { outline: none; border-color: var(--g5); background: #fff; }
.svc-f-err { grid-column: 1 / -1; color: #a3321f; font-size: 13px; }
.svc-card-form .svc-btn { grid-column: 1 / -1; }
.svc-later { grid-column: 1 / -1; border: 0; background: none; color: var(--muted); font-size: 13px !important; padding: 0; }
.svc-later:hover { color: var(--ink); text-decoration: underline; }
.svc-f-note { grid-column: 1 / -1; margin: 0; font-size: 11.5px; color: var(--muted); text-align: center; }
.svc-f-note a { color: inherit !important; }

.svc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 6px;
  padding: 11px 16px;
  font-weight: 700;
  font-size: 14.5px;
  text-decoration: none;
}
.svc-btn-y { background: var(--y); color: var(--ink) !important; }
.svc-btn-y:hover { background: var(--y6); }
.svc-btn:disabled { opacity: .6; cursor: default; }
.svc-btn svg { width: 17px; height: 17px; }
.svc-msg .svc-btn { margin-top: 10px; }

/* composer */
.svc-form {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  background: #fff;
}
.svc-input {
  flex: 1;
  resize: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  color: var(--ink);
  max-height: 110px;
  background: var(--cream);
  line-height: 1.4;
}
.svc-input:focus { outline: none; border-color: var(--g5); background: #fff; }
.svc-send {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 10px;
  background: var(--g9);
  color: var(--y);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  padding: 0;
}
.svc-send:hover { background: var(--g8); }
.svc-send:disabled { opacity: .5; cursor: default; }
.svc-send svg { width: 20px; height: 20px; }
.svc-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }

.svc-foot { padding: 0 12px 10px; font-size: 11.5px; color: var(--muted); text-align: center; background: #fff; }
.svc-foot a { color: inherit !important; }

@media (max-width: 480px) {
  #svc-root { right: 14px; bottom: 14px; }
  .svc-l-txt { display: none; }
  .svc-launcher { width: 56px; padding: 0; justify-content: center; }
  #svc-root.svc-open .svc-launcher { display: none; }
  .svc-panel { position: fixed; inset: 0; width: 100%; height: 100%; margin: 0; border-radius: 0; border: 0; }
  .svc-demo span { display: none; }
  .svc-demo { padding: 7px; }
  .svc-input, .svc-f input { font-size: 16px; }
  .svc-card-form { grid-template-columns: 1fr; }
  .svc-teaser { max-width: calc(100vw - 28px); }
}

@media (prefers-reduced-motion: reduce) {
  .svc-panel, .svc-teaser, .svc-typing i { animation: none; }
  .svc-launcher, .svc-card { transition: none; }
}

.svc-ts:empty { display: none; }
.svc-ts { display: flex; justify-content: center; padding: 6px 12px 0; background: #fff; }
