.kolli-tgsc-panel,
.kolli-tgsc-btn {
  --kolli-tgsc-surface: var(--wp--preset--color--base, #fff);
  --kolli-tgsc-surface-text: var(--wp--preset--color--contrast, #111);
  --kolli-tgsc-accent: var(--wp--preset--color--primary, #111);
  --kolli-tgsc-accent-text: var(--wp--preset--color--base, #fff);
}

.kolli-tgsc-btn {
  position: fixed;
  z-index: 99999;
  width: 56px;
  height: 56px;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  font-size: 22px;
  line-height: 56px;
  text-align: center;
  background: var(--kolli-tgsc-accent, #111);
  color: var(--kolli-tgsc-accent-text, #fff);
  font-family: inherit;
}

.kolli-tgsc-panel {
  position: fixed;
  z-index: 99999;
  width: min(380px, calc(100vw - 24px));
  height: 520px;
  max-height: calc(100vh - 90px);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  background: var(--kolli-tgsc-surface, #fff);
  color: var(--kolli-tgsc-surface-text, #111);
  font-family: inherit;
  overflow: hidden;
  display: none;
}

.kolli-tgsc-panel.open { display: flex; flex-direction: column; }

.kolli-tgsc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  border-bottom-color: color-mix(in srgb, var(--kolli-tgsc-surface-text, #111) 12%, transparent);
}

.kolli-tgsc-header h3 {
  margin: 0;
  font-size: 14px;
}

.kolli-tgsc-close {
  border: 0;
  background: transparent;
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
  color: inherit;
}

.kolli-tgsc-body {
  flex: 1;
  padding: 12px;
  overflow: auto;
}

.kolli-tgsc-msg {
  margin: 8px 0;
  display: flex;
}

.kolli-tgsc-msg.user { justify-content: flex-end; }
.kolli-tgsc-msg.support { justify-content: flex-start; }

.kolli-tgsc-bubble {
  max-width: 85%;
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.35;
  white-space: pre-wrap;
  word-break: break-word;
  border: 1px solid rgba(0,0,0,0.08);
  border-color: color-mix(in srgb, var(--kolli-tgsc-surface-text, #111) 12%, transparent);
  background: rgba(0,0,0,0.03);
  background: color-mix(in srgb, var(--kolli-tgsc-surface-text, #111) 6%, transparent);
}

.kolli-tgsc-msg.user .kolli-tgsc-bubble {
  background: var(--kolli-tgsc-accent, #111);
  color: var(--kolli-tgsc-accent-text, #fff);
  border-color: color-mix(in srgb, var(--kolli-tgsc-accent, #111) 70%, transparent);
}

.kolli-tgsc-footer {
  border-top: 1px solid rgba(0,0,0,0.08);
  border-top-color: color-mix(in srgb, var(--kolli-tgsc-surface-text, #111) 12%, transparent);
  padding: 10px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.kolli-tgsc-input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.15);
  border-color: color-mix(in srgb, var(--kolli-tgsc-surface-text, #111) 20%, transparent);
  outline: none;
  background: var(--kolli-tgsc-surface, #fff);
  color: var(--kolli-tgsc-surface-text, #111);
  font-family: inherit;
}

.kolli-tgsc-send {
  padding: 10px 12px;
  border-radius: 12px;
  border: 0;
  cursor: pointer;
  background: var(--kolli-tgsc-accent, #2b6cff);
  color: var(--kolli-tgsc-accent-text, #fff);
  font-weight: 600;
  font-family: inherit;
}

.kolli-tgsc-namegate {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px dashed rgba(0,0,0,0.25);
  border-color: color-mix(in srgb, var(--kolli-tgsc-surface-text, #111) 25%, transparent);
  border-radius: 12px;
  margin-bottom: 12px;
}
