.overlay-feedback {
  display: flex;
  min-height: 0;
  max-height: 100%;
  flex-direction: column;
  overflow: hidden;
  color: var(--island-text);
  cursor: pointer;
  --overlay-feedback-accent: var(--island-accent, #7c7aff);
  --overlay-feedback-accent-soft: color-mix(in srgb, var(--overlay-feedback-accent) 18%, transparent);
  --overlay-feedback-accent-line: color-mix(in srgb, var(--overlay-feedback-accent) 46%, var(--island-border));
  --overlay-feedback-reader-min-height: 136px;
  --overlay-feedback-reader-height: 360px;
}

.overlay-feedback--completion {
  --overlay-feedback-accent: #22c55e;
}

.overlay-feedback--response {
  --overlay-feedback-accent: #38bdf8;
}

.overlay-feedback__session {
  display: flex;
  flex: 0 0 auto;
  align-items: flex-start;
  gap: 12px;
  padding: 11px 18px 7px;
}

.overlay-feedback__avatar {
  display: flex;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  align-items: center;
  justify-content: center;
}

.overlay-feedback__session-copy {
  min-width: 0;
  flex: 1;
}

.overlay-feedback__session-row {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
}

.overlay-feedback__title {
  min-width: 0;
  overflow: hidden;
  color: var(--island-text);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.overlay-feedback__badge {
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--island-card-hover);
  color: var(--island-text-secondary);
  font-size: 8.5px;
  font-weight: 600;
  line-height: 1.3;
  padding: 2px 7px;
}

.overlay-feedback__badge--status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--overlay-feedback-accent-line);
  background: var(--overlay-feedback-accent-soft);
  color: color-mix(in srgb, var(--overlay-feedback-accent) 84%, var(--island-text) 16%);
}

.overlay-feedback__badge--source {
  background: rgba(16, 185, 129, 0.16);
  color: #00d184;
}

.overlay-feedback__duration {
  flex: 0 0 auto;
  color: var(--island-text-muted);
  font-family: var(--font-mono);
  font-size: 9px;
  font-variant-numeric: tabular-nums;
}

.overlay-feedback__actions {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.overlay-feedback__icon-btn {
  display: flex;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 5px;
  background: var(--island-subtle, rgba(255, 255, 255, 0.05));
  color: var(--island-text-muted);
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
}

.overlay-feedback__icon-btn:hover {
  background: var(--island-button-hover);
  color: var(--island-text);
}

.overlay-feedback__close {
  font-size: 14px;
}

.overlay-feedback__user-line,
.overlay-feedback__preview {
  min-width: 0;
  overflow: hidden;
  font-size: 11px;
  line-height: 1.45;
}

.overlay-feedback__user-line {
  margin-top: 5px;
  color: var(--island-text-secondary);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.overlay-feedback__user-line span:first-child {
  color: var(--island-text-muted);
  font-weight: 600;
}

.overlay-feedback__preview {
  display: -webkit-box;
  color: var(--island-text-muted);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.overlay-feedback__detail {
  display: flex;
  min-height: min(calc(var(--overlay-feedback-reader-min-height) + 24px), var(--overlay-feedback-reader-height));
  max-height: var(--overlay-feedback-reader-height);
  width: calc(100% - 36px);
  flex: 1 1 var(--overlay-feedback-reader-height);
  flex-direction: column;
  box-sizing: border-box;
  margin: 8px 18px 10px;
  padding: 0;
  overflow: hidden;
  text-align: left;
  border: 1px solid var(--island-border);
  border-radius: 9px;
  background:
    linear-gradient(180deg, var(--overlay-feedback-accent-soft), transparent 76px),
    color-mix(in srgb, var(--island-card) 88%, transparent);
  cursor: pointer;
}

.overlay-feedback__detail:hover {
  border-color: var(--overlay-feedback-accent-line);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--overlay-feedback-accent) 24%, transparent), transparent 86px),
    var(--island-card-hover);
}

.overlay-feedback__scroll {
  width: 100%;
  height: 100%;
  min-height: 0;
  box-sizing: border-box;
  overflow-y: auto;
  padding: 10px 12px 12px;
  scrollbar-width: none;
}

.overlay-feedback__scroll::-webkit-scrollbar {
  display: none;
}

.overlay-feedback__transcript {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 7px;
}

.overlay-feedback__transcript-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.overlay-feedback__status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  background: var(--overlay-feedback-accent-soft);
  color: color-mix(in srgb, var(--overlay-feedback-accent) 82%, var(--island-text) 18%);
  font-size: 9.5px;
  font-weight: 600;
  line-height: 1.25;
  padding: 3px 8px;
}

.overlay-feedback__status-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--overlay-feedback-accent);
  box-shadow: 0 0 10px color-mix(in srgb, var(--overlay-feedback-accent) 52%, transparent);
}

.overlay-feedback__message {
  min-width: 0;
  overflow: hidden;
}

.overlay-feedback__conversation {
  min-width: 0;
  overflow: hidden;
  border-radius: 7px;
  background: var(--island-subtle);
}

.overlay-feedback__message--user {
  display: flex;
  align-items: center;
  gap: 4px;
  border-bottom: 1px solid color-mix(in srgb, var(--overlay-feedback-accent) 20%, var(--island-border));
  background: color-mix(in srgb, var(--island-card-hover) 62%, transparent);
  color: var(--island-text-secondary);
  font-size: 11px;
  font-weight: 550;
  line-height: 1.45;
  padding: 7px 9px;
}

.overlay-feedback__message-prefix {
  flex: 0 0 auto;
  color: var(--island-text-muted);
}

.overlay-feedback__message-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.overlay-feedback__message--assistant {
  min-height: calc(var(--overlay-feedback-reader-min-height) - 52px);
  padding: 10px 11px 12px;
  box-sizing: border-box;
}

.overlay-feedback__markdown {
  color: var(--island-text);
  font-size: 12px;
  font-weight: 520;
  line-height: 1.58;
  overflow-wrap: anywhere;
}

.overlay-feedback__markdown h1,
.overlay-feedback__markdown h2,
.overlay-feedback__markdown h3,
.overlay-feedback__markdown h4 {
  margin: 10px 0 7px;
  color: var(--island-text);
  font-weight: 750;
  line-height: 1.25;
}

.overlay-feedback__markdown h1 {
  font-size: 15px;
}

.overlay-feedback__markdown h2 {
  font-size: 14px;
}

.overlay-feedback__markdown h3,
.overlay-feedback__markdown h4 {
  font-size: 12.5px;
}

.overlay-feedback__markdown h1:first-child,
.overlay-feedback__markdown h2:first-child,
.overlay-feedback__markdown h3:first-child,
.overlay-feedback__markdown h4:first-child {
  margin-top: 0;
}

.overlay-feedback__markdown p,
.overlay-feedback__markdown ul,
.overlay-feedback__markdown ol {
  margin: 0 0 6px;
}

.overlay-feedback__markdown p:last-child,
.overlay-feedback__markdown ul:last-child,
.overlay-feedback__markdown ol:last-child {
  margin-bottom: 0;
}

.overlay-feedback__markdown ul,
.overlay-feedback__markdown ol {
  padding-left: 15px;
}

.overlay-feedback__markdown li {
  margin: 2px 0;
}

.overlay-feedback__markdown hr {
  height: 1px;
  margin: 10px 0;
  border: 0;
  background: color-mix(in srgb, var(--island-text) 20%, transparent);
}

.overlay-feedback__markdown blockquote {
  margin: 7px 0;
  border-left: 2px solid color-mix(in srgb, var(--island-accent) 72%, var(--island-text) 8%);
  color: var(--island-text-secondary);
  padding: 2px 0 2px 10px;
}

.overlay-feedback__markdown code {
  border-radius: 4px;
  background: color-mix(in srgb, var(--island-card-hover) 72%, transparent);
  color: color-mix(in srgb, var(--island-accent, #7c7aff) 82%, #ffffff 18%);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 650;
  padding: 1px 4px;
}

.overlay-feedback__markdown pre {
  overflow: auto;
  margin: 7px 0;
  border: 1px solid color-mix(in srgb, var(--island-text) 12%, transparent);
  border-radius: 7px;
  background: color-mix(in srgb, var(--island-bg) 82%, #ffffff 4%);
  padding: 8px;
}

.overlay-feedback__markdown pre code {
  background: transparent;
  color: var(--island-text);
  font-size: 10.8px;
  font-weight: 500;
  line-height: 1.5;
  padding: 0;
}

.overlay-feedback__markdown table {
  width: 100%;
  margin: 8px 0 10px;
  border: 1px solid color-mix(in srgb, var(--island-text) 13%, transparent);
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 8px;
  background: color-mix(in srgb, var(--island-card) 88%, transparent);
  font-size: 11.5px;
  line-height: 1.45;
  overflow: hidden;
}

.overlay-feedback__markdown thead {
  background: color-mix(in srgb, var(--island-card-hover) 78%, #ffffff 3%);
}

.overlay-feedback__markdown th,
.overlay-feedback__markdown td {
  min-width: 0;
  padding: 7px 9px;
  border-right: 1px solid color-mix(in srgb, var(--island-text) 10%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--island-text) 10%, transparent);
  text-align: left;
  vertical-align: top;
}

.overlay-feedback__markdown th {
  color: var(--island-text);
  font-size: 10.8px;
  font-weight: 760;
  letter-spacing: 0;
}

.overlay-feedback__markdown td {
  color: color-mix(in srgb, var(--island-text) 90%, var(--island-text-secondary) 10%);
}

.overlay-feedback__markdown th:first-child,
.overlay-feedback__markdown td:first-child {
  width: 76px;
  min-width: 76px;
  overflow-wrap: normal;
  white-space: nowrap;
  word-break: keep-all;
}

.overlay-feedback__markdown th:last-child,
.overlay-feedback__markdown td:last-child {
  border-right: 0;
}

.overlay-feedback__markdown tbody tr:last-child td {
  border-bottom: 0;
}

.overlay-feedback__markdown tbody tr:nth-child(even) {
  background: color-mix(in srgb, var(--island-text) 4%, transparent);
}

.overlay-feedback__reply {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 9px;
  margin-top: 0;
  border-top: 1px solid var(--island-border);
  background: color-mix(in srgb, var(--island-bg) 88%, transparent);
  padding: 9px 18px 10px;
}

.overlay-feedback__reply--hint {
  justify-content: space-between;
}

.overlay-feedback__hint-text {
  min-width: 0;
  overflow: hidden;
  color: var(--island-text-secondary);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.overlay-feedback__hint-cta {
  flex: 0 0 auto;
  height: 26px;
  border: 1px solid var(--island-border);
  border-radius: 8px;
  background: var(--island-card);
  color: var(--overlay-feedback-accent);
  cursor: pointer;
  font-size: 11px;
  font-weight: 750;
  padding: 0 12px;
}

.overlay-feedback__hint-cta:hover {
  border-color: var(--overlay-feedback-accent-line);
  background: var(--island-card-hover);
}

.overlay-feedback__input {
  min-width: 0;
  height: 32px;
  flex: 1;
  border: 1px solid var(--island-border);
  border-radius: 9px;
  background: var(--island-card);
  color: var(--island-text);
  font-size: 11px;
  outline: none;
  padding: 0 12px;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.overlay-feedback__input::placeholder {
  color: var(--island-text-muted);
}

.overlay-feedback__input:focus {
  border-color: var(--overlay-feedback-accent-line);
  box-shadow: 0 0 0 2px var(--overlay-feedback-accent-soft);
}

.overlay-feedback__input[data-has-draft="true"] {
  border-color: color-mix(in srgb, var(--island-accent, #7b78ff) 78%, var(--island-border));
  background:
    linear-gradient(90deg, var(--island-accent, #7b78ff) 0 3px, transparent 3px),
    var(--island-card);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--island-accent, #7b78ff) 22%, transparent);
}

.overlay-feedback__send {
  height: 32px;
  min-width: 66px;
  border: 0;
  border-radius: 9px;
  background: var(--overlay-feedback-accent);
  color: #fff;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  padding: 0 15px;
}

.overlay-feedback__send:disabled {
  cursor: not-allowed;
  opacity: 0.35;
}

.overlay-feedback__progress {
  flex: 0 0 auto;
  height: 2px;
  background: var(--island-subtle);
  overflow: hidden;
}

.overlay-feedback__progress-bar {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  background: var(--overlay-feedback-accent);
  transform-origin: left center;
  transition: transform 100ms linear;
}
