.project-assistant {
  position: fixed;
  right: 22px;
  bottom: 24px;
  z-index: 75;
  font: 14px/1.5 system-ui;
  color: #ede8dc;
}
.assistant-launch {
  border: 1px solid #ab8740;
  background: #2d2515;
  color: #f2d98a;
  border-radius: 24px;
  padding: 11px 20px;
  box-shadow: 0 5px 25px #0007;
  cursor: pointer;
}
.assistant-panel {
  width: 410px;
  max-width: calc(100vw - 24px);
  height: min(790px, 88vh);
  display: flex;
  flex-direction: column;
  background: #171610;
  border: 1px solid #66552c;
  border-radius: 16px;
  box-shadow: 0 15px 55px #0009;
  overflow: hidden;
}
.assistant-panel header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 18px;
  background: #252115;
}
.assistant-panel header strong {
  font-size: 16px;
}
.assistant-panel small {
  display: block;
  color: #b9af95;
  font-size: 12px;
}
.assistant-panel header button {
  font-size: 24px;
  background: none;
  border: 0;
  color: inherit;
  cursor: pointer;
}
.assistant-hint {
  margin: 12px 16px;
  color: #e0c77e;
}
.assistant-models {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  padding: 0 16px;
}
.assistant-models label:first-child {
  grid-column: 1/-1;
}
.assistant-panel label {
  font-size: 12px;
  color: #c5bca5;
  min-width: 0;
}
.assistant-panel select,
.assistant-panel textarea {
  display: block;
  width: 100%;
  box-sizing: border-box;
  background: #0e0e0a;
  color: #f4ecdb;
  border: 1px solid #4d442b;
  border-radius: 7px;
  padding: 7px;
  min-width: 0;
}
.assistant-target {
  padding: 9px 16px;
}
.assistant-messages {
  flex: 1;
  min-height: 80px;
  overflow: auto;
  padding: 8px 16px;
  overscroll-behavior: contain;
}
.assistant-message {
  padding: 9px 12px;
  background: #24221a;
  border-radius: 10px;
  margin: 8px 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.assistant-message.user {
  background: #39301c;
  margin-left: 22px;
}
.assistant-empty {
  color: #9f9680;
}
.assistant-progress {
  font-size: 12px;
  color: #d2bc74;
  white-space: pre-wrap;
}
.assistant-error {
  font-size: 12px;
  color: #f1a49b;
  margin: 8px 16px;
  white-space: pre-wrap;
}
.assistant-panel form {
  border-top: 1px solid #393223;
  padding: 12px 16px;
}
.assistant-panel textarea {
  resize: vertical;
  max-height: 180px;
}
.assistant-form-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 9px;
  gap: 8px;
}
.assistant-panel button:not(header button) {
  font: inherit;
  border: 1px solid #66552c;
  background: #30291a;
  color: #f0d78e;
  border-radius: 7px;
  padding: 6px 10px;
  cursor: pointer;
}
.assistant-panel button:disabled {
  opacity: 0.5;
  cursor: default;
}
.assistant-form-actions button[type="submit"] {
  background: #b99540 !important;
  color: #17140b !important;
  font-weight: 600;
}
@media (max-width: 600px) {
  .project-assistant {
    right: 12px;
    bottom: 12px;
  }
  .assistant-panel {
    height: 86vh;
  }
}
