.portrait img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: inherit;
}

.message-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.message-action {
  border: 0;
  background: transparent;
  color: #8b716a;
  padding: 5px 3px;
  font-size: 10px;
}

.voice-state {
  border-radius: 999px;
  padding: 4px 8px;
  background: #f1ebe6;
  color: #8a7770;
  font-size: 9px;
}
.voice-state.preparing,.voice-state.checking { color: #9a5d68; background: #f6e9e7; }
.voice-state.ready { color: #4f765d; background: #e9f2eb; }
.voice-state.failed { color: #9d3f4b; background: #f7e6e7; }

.feedback-trigger {
  border: 1px solid #d7c3ba;
  background: #fffaf6;
  color: #772e42;
  border-radius: 999px;
  padding: 6px 11px;
  font-size: 10px;
}

.feedback-trigger.sent {
  color: #827570;
  background: #f3eee8;
}

.feedback-panel {
  display: grid;
  gap: 14px;
  margin-top: 12px;
  padding: 16px;
  border: 1px solid #eadbd3;
  border-radius: 18px;
  background: linear-gradient(155deg,#fffdf9 0%,#f8f0eb 100%);
  box-shadow: 0 14px 36px rgba(76,48,54,.09);
}

.feedback-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.feedback-panel-head small {
  display: block;
  margin-bottom: 4px;
  color: #9a7a70;
  font-size: 9px;
  letter-spacing: .08em;
}

.feedback-panel-head strong {
  display: block;
  color: #4f353b;
  font-size: 14px;
  line-height: 1.45;
}

.feedback-close {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 50%;
  background: rgba(119,46,66,.07);
  color: #8e6f72;
  font-size: 18px;
}

.feedback-options {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.feedback-options button {
  border: 1px solid #e3d5cd;
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(255,255,255,.75);
  color: #75635f;
  font-size: 10px;
  line-height: 1;
}

.feedback-options button.selected {
  border-color: #772e42;
  background: #772e42;
  color: #fff;
  box-shadow: 0 4px 12px rgba(119,46,66,.18);
}

.feedback-panel label {
  display: grid;
  gap: 7px;
  color: #69585a;
  font-size: 10px;
}

.feedback-panel textarea {
  width: 100%;
  resize: vertical;
  border: 1px solid #e2d4cc;
  border-radius: 12px;
  background: white;
  color: #413638;
  font-size: 12px;
  line-height: 1.6;
  padding: 11px 12px;
  min-height: 72px;
  box-sizing: border-box;
}

.feedback-panel textarea:focus {
  outline: 0;
  border-color: #a66d7d;
  box-shadow: 0 0 0 3px rgba(119,46,66,.08);
}

.feedback-more {
  border-top: 1px solid #eadfd9;
  padding-top: 12px;
}

.feedback-more summary {
  cursor: pointer;
  color: #725f5d;
  font-size: 11px;
  list-style: none;
}

.feedback-more summary::-webkit-details-marker { display: none; }
.feedback-more summary::after { content: '＋'; float: right; color: #9b6876; }
.feedback-more[open] summary::after { content: '－'; }
.feedback-more summary small { color: #aa9991; }
.feedback-more-body { display: grid; gap: 12px; padding-top: 12px; }
.feedback-audio-field input { width: 100%; color: #8a7872; font-size: 10px; }
.feedback-audio-field input::file-selector-button { margin-right: 8px; border: 1px solid #ddcec6; border-radius: 9px; padding: 7px 10px; background: #fff; color: #72545d; }

.feedback-submit-row { display: block; }
.feedback-submit-row .primary {
  width: 100%;
  justify-content: center;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 12px;
}

@media (max-width: 480px) {
  .feedback-panel { margin: 12px -2px 0; padding: 15px 14px; border-radius: 16px; }
  .feedback-options { gap: 6px; }
  .feedback-options button { padding: 7px 9px; }
}
