.cc-launcher {
  position: fixed; right: 18px; bottom: 24px; z-index: 70;
  display: flex; align-items: center; gap: 8px;
  height: 48px; padding: 0 18px 0 14px; border: 0; border-radius: 24px; cursor: pointer;
  background: var(--gold, #c6a052); color: #1a1310; font-family: inherit; font-size: 15px; font-weight: 600; letter-spacing: 1px;
  box-shadow: 0 6px 20px rgba(0,0,0,.25);
}
.cc-launcher svg { width: 22px; height: 22px; }
.cc-launcher .cc-dot {
  position: absolute; top: -4px; right: -2px; min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 10px; background: #d9342b; color: #fff; font-size: 12px; line-height: 20px; text-align: center;
}
.cc-launcher .cc-dot:empty { display: none; }

.cc-panel {
  position: fixed; right: 18px; bottom: 84px; z-index: 80;
  display: flex; flex-direction: column;
  width: 370px; height: min(600px, calc(100vh - 110px));
  background: #f4f2ef; border-radius: 8px; overflow: hidden;
  box-shadow: 0 16px 50px rgba(0,0,0,.35);
  opacity: 0; transform: translateY(16px) scale(.98); pointer-events: none; transition: .2s ease;
}
.cc-panel.open { opacity: 1; transform: none; pointer-events: auto; }

.cc-head {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px;
  background: #33251d; color: #fff;
}
.cc-avatar {
  display: grid; place-items: center; flex-shrink: 0; width: 38px; height: 38px; border-radius: 50%;
  background: #c6a052; color: #1a1310; font-weight: 700; font-size: 14px;
}
.cc-title { flex: 1; min-width: 0; }
.cc-title b { display: block; font-size: 15px; letter-spacing: 1px; }
.cc-title small { display: flex; align-items: center; gap: 5px; font-size: 12px; color: #b9ab9c; }
.cc-title small i { width: 7px; height: 7px; border-radius: 50%; background: #8fd16a; }
.cc-title small.off i { background: #999; }
.cc-close { width: 32px; height: 32px; border: 0; background: none; color: #cfc4b8; font-size: 24px; cursor: pointer; }

.cc-promo {
  padding: 8px 14px; background: #fff8e8; border-bottom: 1px solid #efe2c2;
  font-size: 12px; color: #6f5a2e;
}
.cc-promo b { color: #b3261e; }

.cc-body { flex: 1; overflow-y: auto; padding: 14px 12px; }
.cc-msg { display: flex; gap: 8px; margin-bottom: 12px; }
.cc-msg .cc-avatar { width: 30px; height: 30px; font-size: 12px; }
.cc-bubble {
  max-width: 76%; padding: 9px 12px; border-radius: 4px 12px 12px 12px;
  background: #fff; color: #2b241f; font-size: 14px; line-height: 1.55;
  white-space: pre-wrap; word-break: break-word; box-shadow: 0 1px 2px rgba(0,0,0,.05);
}
.cc-msg.me { flex-direction: row-reverse; }
.cc-msg.me .cc-bubble { background: #4a382d; color: #fff; border-radius: 12px 4px 12px 12px; }
.cc-time { margin: 4px 0 12px; text-align: center; font-size: 11px; color: #a8998a; }

.cc-chips { display: flex; gap: 6px; padding: 8px 10px 0; overflow-x: auto; scrollbar-width: none; }
.cc-chips::-webkit-scrollbar { display: none; }
.cc-chips button {
  flex-shrink: 0; padding: 4px 12px; border: 1px solid #d9c38c; border-radius: 14px;
  background: #fff; color: #7a5c22; font-family: inherit; font-size: 13px; cursor: pointer;
}
.cc-chips button:first-child { background: #b3261e; border-color: #b3261e; color: #fff; }

.cc-input { display: flex; gap: 8px; padding: 10px; background: #f4f2ef; }
.cc-input textarea {
  flex: 1; height: 40px; max-height: 100px; padding: 9px 12px; resize: none;
  border: 1px solid #ddd5ca; border-radius: 20px; outline: none; background: #fff;
  font-family: inherit; font-size: 14px; line-height: 1.4; color: #2b241f;
}
.cc-input textarea:focus { border-color: #c6a052; }
.cc-input button {
  flex-shrink: 0; height: 40px; padding: 0 18px; border: 0; border-radius: 20px; cursor: pointer;
  background: #c6a052; color: #1a1310; font-family: inherit; font-size: 14px; font-weight: 600;
}
.cc-input button:disabled { opacity: .5; cursor: default; }
.cc-status { padding: 0 14px 6px; font-size: 11px; color: #b3261e; text-align: center; }
.cc-status:empty { display: none; }

@media (max-width: 640px) {
  .cc-launcher { display: none; }
  .cc-panel {
    inset: 0; width: auto; height: auto; border-radius: 0; bottom: 0; right: 0;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .tabbar .tab-svc { position: relative; }
  .tabbar .cc-tab-dot {
    position: absolute; top: 6px; right: calc(50% - 20px); min-width: 16px; height: 16px; padding: 0 4px;
    border-radius: 8px; background: #d9342b; color: #fff; font-size: 10px; line-height: 16px; text-align: center;
  }
  .tabbar .cc-tab-dot:empty { display: none; }
}
