*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --sidebar-bg: #171717;
  --main-bg: #212121;
  --composer-bg: #2f2f2f;
  --surface-hover: #2a2a2a;
  --surface-active: #333;
  --border: rgba(255, 255, 255, 0.1);
  --text-primary: #ececec;
  --text-secondary: #b4b4b4;
  --text-tertiary: #8e8ea0;
  --sidebar-width: 260px;
  --header-height: 52px;
  --accent: #10a37f;
}

body {
  font-family: ui-sans-serif, -apple-system, system-ui, "Segoe UI", Helvetica, Arial, sans-serif;
  background: var(--main-bg);
  color: var(--text-primary);
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}

/* ── Creator mode ────────────────────────────────────────────── */
#creator {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 2rem;
  gap: 1.25rem;
  overflow-y: auto;
}

.creator-logo {
  color: var(--text-primary);
  opacity: 0.85;
}

#creator h1 {
  font-size: 2.2rem;
  font-weight: 700;
  text-align: center;
  color: var(--text-primary);
  line-height: 1.2;
}

#creator p.subtitle {
  color: var(--text-tertiary);
  font-size: 1rem;
  text-align: center;
  max-width: 480px;
}

.creator-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
  max-width: 520px;
}

.creator-form input {
  background: var(--composer-bg);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  color: var(--text-primary);
  font-size: 1rem;
  font-family: inherit;
  padding: 14px 16px;
  outline: none;
  transition: border-color 0.2s;
}

.creator-form input::placeholder { color: var(--text-tertiary); }
.creator-form input:focus { border-color: rgba(255,255,255,0.25); }

.creator-form button {
  background: var(--accent);
  border: none;
  border-radius: 14px;
  color: #fff;
  cursor: pointer;
  font-size: 1rem;
  font-family: inherit;
  font-weight: 600;
  padding: 14px;
  transition: background 0.2s;
}

.creator-form button:hover { background: #0d8f6d; }

#link-result {
  display: none;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
  max-width: 520px;
}

#preview-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 10px;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.9rem;
  font-family: inherit;
  font-weight: 500;
  padding: 10px 16px;
  width: 100%;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

#preview-btn:hover {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.25);
  color: var(--text-primary);
}

/* ── Preview modal ───────────────────────────────────────────── */
#preview-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

#preview-modal.open {
  display: flex;
}

#preview-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

#preview-window {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 900px;
  height: min(600px, 85vh);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.08);
  animation: modal-in 0.22s ease;
}

@keyframes modal-in {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* Browser chrome bar */
#preview-chrome {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #1e1e1e;
  padding: 0 12px;
  height: 40px;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.chrome-dots {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot-red    { background: #ff5f57; }
.dot-yellow { background: #febc2e; }
.dot-green  { background: #28c840; }

.chrome-url {
  flex: 1;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 6px;
  color: var(--text-tertiary);
  font-size: 0.75rem;
  font-family: ui-monospace, monospace;
  padding: 4px 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  user-select: all;
}

#preview-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: var(--text-tertiary);
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}

#preview-close:hover { background: rgba(255,255,255,0.08); color: var(--text-primary); }

/* iframe viewport */
#preview-viewport {
  flex: 1;
  overflow: hidden;
  background: var(--main-bg);
}

#preview-iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

#link-result label {
  font-size: 0.85rem;
  color: var(--text-tertiary);
}

.link-copy-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

#generated-link {
  background: var(--composer-bg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 0.88rem;
  padding: 10px 12px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  user-select: all;
  cursor: text;
}

#copy-btn {
  background: var(--accent);
  border: none;
  border-radius: 10px;
  color: #fff;
  cursor: pointer;
  font-size: 0.85rem;
  font-family: inherit;
  font-weight: 600;
  padding: 0 16px;
  height: 42px;
  transition: background 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}

#copy-btn:hover { background: #0d8f6d; }
#copy-btn.copied { background: #2a7a5e; }
#copy-btn.error  { background: #7a2a2a; }

#launch-btn {
  background: var(--composer-bg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: var(--text-primary);
  cursor: pointer;
  padding: 0 12px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s;
  flex-shrink: 0;
}

#launch-btn:hover { background: var(--surface-hover); border-color: rgba(255,255,255,0.2); }

/* ── Animation mode ──────────────────────────────────────────── */
#animation-wrapper {
  display: none;
  flex-direction: row;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: var(--main-bg);
}

/* ── Sidebar ─────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  height: 100vh;
  height: 100dvh;
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  flex-shrink: 0;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  padding-bottom: 8px;
}

.sidebar-nav::-webkit-scrollbar { display: none; }

/* Sidebar top row: home icon + close button */
.sidebar-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  height: var(--header-height);
  flex-shrink: 0;
}

.sidebar-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--text-tertiary);
  cursor: pointer;
  flex-shrink: 0;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.sidebar-icon-btn:hover { background: var(--surface-hover); color: var(--text-primary); }

/* Sidebar item */
.sidebar-list {
  list-style: none;
  padding: 0 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
}

.sidebar-item:hover { background: var(--surface-hover); color: var(--text-primary); }

.sidebar-item-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--text-tertiary);
}

.sidebar-section-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-tertiary);
  padding: 12px 18px 4px;
  flex-shrink: 0;
}

.sidebar-history {
  padding: 0 8px;
}

.sidebar-chat-btn {
  font-size: 0.875rem;
  color: var(--text-secondary);
  padding: 8px 10px;
}

.sidebar-spacer {
  flex: 1;
  min-height: 16px;
}

.sidebar-bottom {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex-shrink: 0;
}

.sidebar-profile {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  color: var(--text-primary);
  font-size: 0.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sidebar-profile-name {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* ── Main panel ──────────────────────────────────────────────── */
.chat-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

/* ── Header ──────────────────────────────────────────────────── */
.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  height: var(--header-height);
  flex-shrink: 0;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 4px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.model-switcher {
  display: flex;
  align-items: center;
  gap: 4px;
  background: transparent;
  border: none;
  border-radius: 10px;
  color: var(--text-primary);
  cursor: pointer;
  font-family: inherit;
  padding: 6px 10px;
  min-height: 36px;
  transition: background 0.15s;
}

.model-switcher:hover { background: var(--surface-hover); }

.header-wordmark {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.chevron {
  color: var(--text-tertiary);
  flex-shrink: 0;
}

.avatar-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.15);
  color: var(--text-primary);
  font-size: 0.78rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.15s;
}

.avatar-btn:hover { opacity: 0.8; }

/* ── Welcome body ─────────────────────────────────────────────── */
.chat-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  min-height: 0;
}

.chat-welcome {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 1.5rem 1.5rem 1rem;
  width: 100%;
}

.chat-logo {
  color: var(--text-primary);
}

.chat-title {
  font-size: 2rem;
  font-weight: 600;
  color: var(--text-primary);
  text-align: center;
  letter-spacing: -0.02em;
}

/* ── Suggestion chips ────────────────────────────────────────── */
.suggestion-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  max-width: 600px;
}

.chip {
  display: flex;
  align-items: center;
  gap: 7px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.875rem;
  font-family: inherit;
  padding: 8px 16px;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.chip svg { color: var(--text-tertiary); flex-shrink: 0; }
.chip:hover { background: var(--surface-hover); border-color: rgba(255,255,255,0.25); color: var(--text-primary); }
.chip:hover svg { color: var(--text-secondary); }

/* ── Composer area ───────────────────────────────────────────── */
.composer-area {
  padding: 0 16px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.composer-wrapper {
  width: 100%;
  max-width: 680px;
}

/* The actual composer box — matches ChatGPT's border-radius: 28px superellipse */
.composer {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas: 'leading primary trailing';
  align-items: center;
  background: var(--composer-bg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 28px;
  padding: 10px 12px;
  gap: 4px;
  transition: border-color 0.2s, box-shadow 0.2s;
  min-height: 56px;
}

.composer.focused {
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.05);
}

.composer-leading {
  grid-area: leading;
  display: flex;
  align-items: center;
}

.composer-primary {
  grid-area: primary;
  min-width: 0;
  padding: 0 6px;
  display: flex;
  align-items: center;
}

.composer-trailing {
  grid-area: trailing;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* + button */
.composer-plus {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--text-tertiary);
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}

.composer-plus:hover { background: var(--surface-active); color: var(--text-primary); }

/* Text area */
.composer-text {
  color: var(--text-primary);
  font-size: 1rem;
  line-height: 1.5;
  min-height: 24px;
  word-break: break-word;
  white-space: pre-wrap;
  flex: 1;
}

/* Cursor */
.chat-cursor {
  display: inline-block;
  width: 2px;
  height: 1.15em;
  background: var(--text-primary);
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* Voice button */
.composer-voice {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 36px;
  padding: 0 10px;
  border-radius: 20px;
  border: none;
  background: transparent;
  color: var(--text-tertiary);
  cursor: pointer;
  font-size: 0.8125rem;
  font-family: inherit;
  font-weight: 500;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}

.composer-voice:hover { background: var(--surface-active); color: var(--text-primary); }

.voice-label {
  color: var(--text-tertiary);
}

/* Send button */
.send-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: #424242;
  color: #fff;
  cursor: default;
  flex-shrink: 0;
  transition: background 0.2s, transform 0.1s;
}

.send-btn.active {
  background: var(--text-primary);
  color: var(--main-bg);
  cursor: pointer;
}

.send-btn.clicked {
  transform: scale(0.85);
  background: #b4b4b4;
}

/* Disclaimer */
.disclaimer {
  font-size: 0.75rem;
  color: #666;
  text-align: center;
}

/* ── Intro overlay ───────────────────────────────────────────── */
#intro-overlay {
  position: fixed;
  inset: 0;
  background: var(--main-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1rem;
  z-index: 100;
  transition: opacity 0.5s;
}

#intro-overlay.fade-out {
  opacity: 0;
  pointer-events: none;
}

#intro-overlay h2 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  text-align: center;
}

#intro-overlay .intro-query {
  font-size: 1.05rem;
  color: var(--text-tertiary);
  text-align: center;
  max-width: 520px;
  padding: 0 1.5rem;
  font-style: italic;
}

/* ── Snark card ──────────────────────────────────────────────── */
#snark-card {
  position: fixed;
  bottom: -220px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 40px);
  max-width: 520px;
  background: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  padding: 20px 22px 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255,255,255,0.05);
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: bottom 0.5s cubic-bezier(0.34, 1.4, 0.64, 1);
}

#snark-card.visible {
  bottom: 32px;
  bottom: max(32px, calc(env(safe-area-inset-bottom) + 16px));
}

.snark-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.snark-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

.snark-text {
  font-size: 1.05rem;
  font-style: italic;
  color: var(--text-primary);
  line-height: 1.5;
}

.snark-footer {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.snark-timer {
  font-size: 0.8rem;
  color: var(--text-tertiary);
}

.snark-timer strong {
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

.snark-progress-track {
  width: 100%;
  height: 2px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  overflow: hidden;
}

.snark-progress-bar {
  height: 100%;
  width: 100%;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 2px;
  transform-origin: left;
  transition: transform linear;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 768px) {
  .sidebar { display: none; }

  .chat-logo svg { width: 32px; height: 32px; }

  .chat-title { font-size: 1.5rem; }

  .chat-welcome { gap: 12px; padding: 1rem; }

  .suggestion-chips { gap: 6px; }

  .chip { font-size: 0.8rem; padding: 7px 12px; }

  .composer-area { padding: 0 10px 16px; }

  .voice-label { display: none; }

  #snark-card { max-width: calc(100% - 24px); border-radius: 14px; }
}

@media (max-width: 540px) {
  #creator h1 { font-size: 1.6rem; }

  #creator { padding: 1rem 1rem; gap: 0.75rem; justify-content: flex-start; padding-top: max(1.25rem, env(safe-area-inset-top)); }

  .creator-logo svg { width: 26px; height: 26px; }

  .creator-form input,
  .creator-form button { font-size: 0.95rem; padding: 12px 14px; }

  #generated-link { flex-basis: 100%; }

  #copy-btn { flex: 1; height: 44px; padding: 0; }

  #launch-btn { height: 44px; padding: 0 14px; }

  #intro-overlay h2 { font-size: 1.5rem; }

  #intro-overlay .intro-query { font-size: 0.95rem; }

  .composer { border-radius: 20px; }

  .suggestion-chips { display: none; }

  .chat-welcome { gap: 8px; padding: 0.75rem; }

  #snark-card { padding: 14px 16px 12px; gap: 8px; }

  .snark-text { font-size: 0.95rem; }
}

@media (max-width: 380px) {
  #creator h1 { font-size: 1.4rem; }
  #creator { gap: 0.6rem; }
  .target-btn { padding: 7px 12px; font-size: 0.8rem; }
  #creator p.subtitle { font-size: 0.85rem; }
}

/* ── Target selector ─────────────────────────────────────────── */
.creator-logo-hidden { display: none; }

.target-selector {
  display: flex;
  gap: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 4px;
}

.target-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  background: transparent;
  border: none;
  border-radius: 10px;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.875rem;
  font-family: inherit;
  font-weight: 500;
  padding: 9px 18px;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

.target-btn:hover { color: var(--text-primary); }

.target-btn.active {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

/* ── ChatGPT/Claude UI wrappers ──────────────────────────────── */
#chatgpt-ui {
  display: flex;
  flex-direction: row;
  flex: 1;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

#claude-ui {
  display: none;
  flex-direction: row;
  flex: 1;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: #f9f7f2;
}

#animation-wrapper.claude-mode {
  background: #f9f7f2;
}

#animation-wrapper.claude-mode #chatgpt-ui {
  display: none;
}

#animation-wrapper.claude-mode #claude-ui {
  display: flex;
}

#animation-wrapper.claude-mode #intro-overlay {
  background: #f9f7f2;
}

#animation-wrapper.claude-mode #intro-overlay h2 {
  color: #c4622d;
}

#animation-wrapper.claude-mode #intro-overlay .intro-query {
  color: #6e6d69;
}

#animation-wrapper.claude-mode .chat-cursor {
  background: #131312;
}

/* ── Claude sidebar ──────────────────────────────────────────── */
.cl-sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  height: 100vh;
  height: 100dvh;
  background: #e8e3d7;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  flex-shrink: 0;
}

.cl-sidebar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  height: var(--header-height);
  flex-shrink: 0;
}

.cl-logo-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  border-radius: 8px;
  padding: 4px 6px;
  transition: background 0.15s;
}

.cl-logo-btn:hover { background: rgba(0,0,0,0.06); }

.cl-logo-text {
  font-size: 1rem;
  font-weight: 600;
  color: #131312;
  letter-spacing: -0.01em;
}

.cl-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: #6e6d69;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}

.cl-icon-btn:hover { background: rgba(0,0,0,0.07); color: #131312; }

.cl-sidebar-section-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #9e9b92;
  padding: 12px 16px 4px;
  flex-shrink: 0;
}

.cl-nav-list {
  list-style: none;
  padding: 0 8px;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.cl-nav-item {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: #4a4845;
  font-size: 0.875rem;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
}

.cl-nav-item:hover { background: rgba(0,0,0,0.06); color: #131312; }

.cl-sidebar-spacer { flex: 1; min-height: 16px; }

.cl-sidebar-footer {
  border-top: 1px solid rgba(0,0,0,0.08);
  padding: 8px;
  flex-shrink: 0;
}

.cl-profile-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cl-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #c4622d;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cl-profile-name {
  font-size: 0.875rem;
  color: #4a4845;
}

/* ── Claude main panel ───────────────────────────────────────── */
.cl-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: #f9f7f2;
}

.cl-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  height: var(--header-height);
  flex-shrink: 0;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.cl-header-left {
  display: flex;
  align-items: center;
  gap: 4px;
}

.cl-header-right {
  display: flex;
  align-items: center;
  gap: 4px;
}

.cl-hamburger-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: #6e6d69;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.cl-hamburger-btn:hover { background: rgba(0,0,0,0.06); color: #131312; }

.cl-model-picker {
  display: flex;
  align-items: center;
  gap: 4px;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: #131312;
  cursor: pointer;
  font-family: inherit;
  padding: 6px 10px;
  min-height: 34px;
  transition: background 0.15s;
}

.cl-model-picker:hover { background: rgba(0,0,0,0.06); }

.cl-model-name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #131312;
}

.cl-model-picker svg { color: #6e6d69; }

/* Claude welcome body */
.cl-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  min-height: 0;
}

.cl-welcome {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 1.5rem;
}

.cl-logo-area {
  display: flex;
  align-items: center;
  justify-content: center;
}

.cl-greeting {
  font-size: 1.75rem;
  font-weight: 600;
  color: #131312;
  text-align: center;
  letter-spacing: -0.02em;
}

/* ── Claude composer ─────────────────────────────────────────── */
.cl-composer-area {
  padding: 0 16px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.cl-composer-wrapper {
  width: 100%;
  max-width: 680px;
}

.cl-composer-box {
  background: #ffffff;
  border: 1px solid #d8d5cc;
  border-radius: 16px;
  padding: 14px 16px 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.2s, box-shadow 0.2s;
  min-height: 80px;
}

.cl-composer-box.focused {
  border-color: #b8b4ab;
  box-shadow: 0 0 0 3px rgba(196, 98, 45, 0.08);
}

.cl-composer-input-row {
  min-height: 28px;
  display: flex;
  align-items: flex-start;
}

.cl-composer-text {
  color: #131312;
  font-size: 0.9375rem;
  line-height: 1.55;
  min-height: 24px;
  word-break: break-word;
  white-space: pre-wrap;
  flex: 1;
}

.cl-composer-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cl-toolbar-left {
  display: flex;
  align-items: center;
  gap: 2px;
}

.cl-tool-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: #6e6d69;
  cursor: pointer;
  font-size: 0.8125rem;
  font-family: inherit;
  font-weight: 500;
  padding: 6px 8px;
  transition: background 0.15s, color 0.15s;
}

.cl-tool-btn:hover { background: rgba(0,0,0,0.06); color: #131312; }

.cl-tool-label { color: inherit; }

/* Claude send button */
.cl-send-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: #d8d5cc;
  color: #9e9b92;
  cursor: default;
  flex-shrink: 0;
  transition: background 0.2s, color 0.2s, transform 0.1s;
}

.cl-send-btn.active {
  background: #c4622d;
  color: #fff;
  cursor: pointer;
}

.cl-send-btn.clicked {
  transform: scale(0.85);
  background: #a8522a;
}

.cl-disclaimer {
  font-size: 0.75rem;
  color: #9e9b92;
  text-align: center;
}

/* ── Claude responsive ───────────────────────────────────────── */
@media (max-width: 768px) {
  .cl-sidebar { display: none; }
  .cl-greeting { font-size: 1.4rem; }
  .cl-tool-label { display: none; }
  .cl-composer-area { padding: 0 10px 16px; }
}

@media (max-width: 540px) {
  .cl-composer-box { border-radius: 14px; }
}
