
/* ── Canvas drawer ─────────────────────────────────────────────── */
.drawer-canvas { width: min(420px, 96vw); }

.canvas-create-form {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  padding: .75rem 1rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.canvas-input {
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 8px;
  padding: .5rem .75rem;
  color: inherit;
  font-size: .9rem;
  outline: none;
  transition: border-color .2s;
}
.canvas-input:focus { border-color: rgba(255,255,255,.4); }
.canvas-input::placeholder { opacity: .45; }

.project-item {
  padding: .75rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,.06);
  cursor: default;
  transition: background .15s;
}
.project-item:hover { background: rgba(255,255,255,.04); }
.project-item.active { background: rgba(255,255,255,.08); }

.project-item-name {
  font-weight: 600;
  font-size: .95rem;
  margin-bottom: .2rem;
}
.project-item-desc {
  font-size: .8rem;
  opacity: .55;
  margin-bottom: .5rem;
}
.project-item-actions {
  display: flex;
  gap: .4rem;
  flex-wrap: wrap;
}

.canvas-detail-head {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .75rem 1rem .5rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.canvas-detail-title {
  font-weight: 600;
  font-size: 1rem;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-art-card {
  position: relative;
}
.project-art-actions {
  display: flex;
  gap: .35rem;
  flex-wrap: wrap;
  margin-top: .5rem;
}

.btn-danger {
  background: rgba(239,68,68,.18);
  color: #fca5a5;
  border: 1px solid rgba(239,68,68,.3);
  border-radius: 8px;
  padding: .3rem .65rem;
  font-size: .75rem;
  cursor: pointer;
  transition: background .15s;
}
.btn-danger:hover { background: rgba(239,68,68,.3); }

/* project injection inside artifact full panel */
.proj-inject {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: .75rem;
}

/* ── Synthesize Modal ───────────────────────────────────────────────────── */
.synth-modal-overlay {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(0,0,0,.65); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.synth-modal {
  width: 100%; max-width: 640px; max-height: 90vh;
  background: rgba(20,20,35,.92);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 20px;
  box-shadow: 0 24px 80px rgba(0,0,0,.6);
  overflow-y: auto;
  padding: 24px;
  display: flex; flex-direction: column; gap: 16px;
}
.synth-modal-head {
  display: flex; align-items: center; justify-content: space-between;
}
.synth-modal-title {
  font-size: 1.1rem; font-weight: 700; color: #fff;
  letter-spacing: .03em;
}
.synth-label {
  font-size: .72rem; font-weight: 600; color: rgba(255,255,255,.45);
  text-transform: uppercase; letter-spacing: .08em; margin-bottom: 8px;
}
.synth-chips {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.synth-chip {
  background: rgba(200,169,110,.18); border: 1px solid rgba(200,169,110,.35);
  color: #c8a96e; border-radius: 20px; padding: 3px 10px; font-size: .78rem;
}
.synth-presets {
  display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px;
}
.synth-preset-btn {
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.15);
  color: rgba(255,255,255,.7); border-radius: 20px; padding: 4px 12px;
  font-size: .78rem; cursor: pointer; transition: all .2s;
}
.synth-preset-btn:hover, .synth-preset-btn.active {
  background: rgba(200,169,110,.25); border-color: rgba(200,169,110,.5);
  color: #c8a96e;
}
.synth-textarea {
  width: 100%; background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.15); border-radius: 12px;
  color: #fff; font-size: .92rem; padding: 12px 14px;
  resize: vertical; outline: none; font-family: inherit;
  box-sizing: border-box;
}
.synth-textarea:focus { border-color: rgba(200,169,110,.5); }
.synth-footer {
  display: flex; justify-content: flex-end; gap: 10px;
}
.synth-result-wrap {
  border-top: 1px solid rgba(255,255,255,.1); padding-top: 16px;
}
.synth-result {
  background: rgba(255,255,255,.05); border-radius: 12px;
  padding: 14px 16px; color: rgba(255,255,255,.88);
  font-size: .9rem; line-height: 1.65; white-space: pre-wrap;
  max-height: 320px; overflow-y: auto; margin-bottom: 12px;
}
.synth-thinking {
  color: rgba(200,169,110,.7); font-style: italic; animation: pulse 1.5s infinite;
}
.synth-result-actions {
  display: flex; gap: 8px; flex-wrap: wrap;
}
/* Synthesize button in toolbar */
.canvas-synth-btn {
  background: linear-gradient(135deg, rgba(200,169,110,.4), rgba(160,100,220,.4)) !important;
  border-color: rgba(200,169,110,.5) !important;
  font-weight: 600;
}

/* ── Synthesize Modal ───────────────────────────────────────── */
.canvas-synth-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.65);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 120;
}
.canvas-synth-modal {
  background: rgba(18,18,28,.92);
  border: 1px solid rgba(200,169,110,.35);
  border-radius: 16px;
  width: min(680px, 92vw);
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,.6);
}
.canvas-synth-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  font-weight: 600;
  font-size: 1.05em;
  color: #c8a96e;
}
.canvas-synth-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.canvas-synth-label {
  font-size: .8em;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: rgba(255,255,255,.45);
  margin-bottom: 6px;
  display: block;
}
.canvas-synth-textarea {
  width: 100%;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 10px;
  color: #e8e0d4;
  font-size: .95em;
  line-height: 1.6;
  padding: 12px 14px;
  resize: vertical;
  font-family: inherit;
  box-sizing: border-box;
}
.canvas-synth-textarea:focus {
  outline: none;
  border-color: rgba(200,169,110,.5);
}
.canvas-synth-result {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.canvas-synth-output {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px;
  padding: 14px 16px;
  color: #d8d0c4;
  font-size: .93em;
  line-height: 1.7;
  white-space: pre-wrap;
  min-height: 120px;
  max-height: 300px;
  overflow-y: auto;
}
.canvas-synth-footer {
  display: flex;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid rgba(255,255,255,.08);
  justify-content: flex-end;
  flex-wrap: wrap;
}
