:root {
  --cc-bg: #F5F4EE;
  --cc-sidebar: #EDECE4;
  --cc-accent: #C96442;
  --cc-accent-hover: #B5573A;
  --cc-text: #2D2A26;
  --cc-text-muted: #6B675F;
  --cc-border: #E0DED4;
  --cc-bubble-user: #E8E6DC;
  --cc-bubble-assistant: #FFFFFF;
  --cc-radius: 14px;
}

* { box-sizing: border-box; }

body.claude-chat-page {
  margin: 0;
  background: var(--cc-bg);
  color: var(--cc-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.cc-app {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* Sidebar */
.cc-sidebar {
  width: 260px;
  flex-shrink: 0;
  background: var(--cc-sidebar);
  border-right: 1px solid var(--cc-border);
  display: flex;
  flex-direction: column;
  padding: 16px 12px;
  transition: margin-left .25s ease;
}

.cc-sidebar.collapsed {
  margin-left: -260px;
}

.cc-new-chat {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--cc-accent);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 16px;
}
.cc-new-chat:hover { background: var(--cc-accent-hover); }

.cc-site-title {
  font-weight: 700;
  font-size: 15px;
  padding: 0 4px 12px 4px;
  color: var(--cc-text);
}

.cc-history-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--cc-text-muted);
  padding: 8px 8px 4px;
}

.cc-history-list {
  flex: 1;
  overflow-y: auto;
  font-size: 13.5px;
}

.cc-history-item {
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--cc-text-muted);
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cc-history-item:hover { background: rgba(0,0,0,0.05); }
.cc-history-item.active { background: rgba(201,100,66,0.12); color: var(--cc-text); }

/* Main column */
.cc-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.cc-topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--cc-border);
}

.cc-toggle-sidebar {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  color: var(--cc-text);
}
.cc-toggle-sidebar:hover { background: rgba(0,0,0,0.05); }

.cc-topbar-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--cc-text-muted);
}

/* Messages */
.cc-messages {
  flex: 1;
  overflow-y: auto;
  padding: 24px 0 8px;
}

.cc-messages-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 20px;
}

.cc-empty-state {
  max-width: 640px;
  margin: 8vh auto 0;
  text-align: center;
  padding: 0 20px;
}
.cc-empty-state h1 {
  font-size: 28px;
  font-weight: 600;
  color: var(--cc-text);
}
.cc-empty-state p {
  color: var(--cc-text-muted);
  font-size: 15px;
}

.cc-msg {
  display: flex;
  margin-bottom: 22px;
  gap: 12px;
}
.cc-msg.user { justify-content: flex-end; }

.cc-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--cc-accent);
  color: #fff;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
}

.cc-bubble {
  max-width: 78%;
  padding: 12px 16px;
  border-radius: var(--cc-radius);
  font-size: 15px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.cc-msg.user .cc-bubble {
  background: var(--cc-bubble-user);
  border-top-right-radius: 4px;
}
.cc-msg.assistant .cc-bubble {
  background: var(--cc-bubble-assistant);
  border: 1px solid var(--cc-border);
  border-top-left-radius: 4px;
}

.cc-typing {
  display: inline-flex;
  gap: 4px;
  padding: 6px 0;
}
.cc-typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cc-text-muted);
  animation: cc-bounce 1.2s infinite ease-in-out;
}
.cc-typing span:nth-child(2) { animation-delay: .15s; }
.cc-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes cc-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: .5; }
  30% { transform: translateY(-4px); opacity: 1; }
}

/* Composer */
.cc-composer-wrap {
  padding: 12px 20px 20px;
}
.cc-composer {
  max-width: 720px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--cc-border);
  border-radius: 20px;
  padding: 10px 10px 10px 18px;
  display: flex;
  align-items: flex-end;
  gap: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.cc-textarea {
  flex: 1;
  border: none;
  outline: none;
  resize: none;
  font-size: 15px;
  font-family: inherit;
  line-height: 1.5;
  max-height: 200px;
  padding: 6px 0;
  background: transparent;
  color: var(--cc-text);
}

.cc-send-btn {
  background: var(--cc-accent);
  border: none;
  color: #fff;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.cc-send-btn:disabled {
  background: #D9D6CC;
  cursor: not-allowed;
}

.cc-footnote {
  text-align: center;
  font-size: 12px;
  color: var(--cc-text-muted);
  margin-top: 8px;
}

.cc-error-banner {
  max-width: 720px;
  margin: 0 auto 12px;
  background: #FBE7E4;
  border: 1px solid #E9A79C;
  color: #8A3A2E;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13.5px;
}

@media (max-width: 780px) {
  .cc-sidebar { position: fixed; z-index: 20; height: 100%; }
  .cc-sidebar:not(.collapsed) { box-shadow: 0 0 0 2000px rgba(0,0,0,0.25); }
  .cc-sidebar.collapsed { margin-left: -260px; }
  .cc-bubble { max-width: 90%; }
}
