.feedback-page {
  max-width: 960px;
  margin-inline: auto;
}
.feedback-page details {
  margin-block: 24px;
  padding: 16px;
  border: 1px solid var(--line, #cbded3);
  border-radius: 16px;
}
.feedback-page summary {
  cursor: pointer;
  font-weight: bold;
}
.feedback-spec-preview {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: inherit;
  line-height: 1.6;
  background: #f1f5ef;
  padding: 20px;
  border-radius: 16px;
}
.feedback-page button {
  min-height: 48px;
}
/* «Dê um feedback» do professor (canvas S03, feedback-page.js): o formulário num cartão e «Como ajudar mais» ao lado;
   abaixo de 900 px, uma coluna. */
.feedback-s03 .feedback-lead {
  margin: 0 0 20px;
  color: var(--app-muted);
}
.feedback-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 20px;
  align-items: start;
}
.feedback-card {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 24px;
}
.feedback-topics {
  margin: 0;
  padding: 0;
  border: 0;
}
.feedback-topics legend,
.feedback-label {
  margin: 0 0 8px;
  padding: 0;
  font-weight: 800;
}
.feedback-label small {
  display: block;
  font-weight: 400;
  color: var(--app-muted);
}
.feedback-topics > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.feedback-chip,
.feedback-file {
  position: relative;
}
.feedback-chip input,
.feedback-file input {
  position: absolute;
  inset: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}
.feedback-chip span {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 4px 14px;
  border: 1px solid var(--app-border);
  border-radius: 999px;
  background: var(--app-card);
  font-weight: 700;
  cursor: pointer;
}
.feedback-chip input:checked + span {
  background: var(--app-primary);
  border-color: var(--app-primary);
  color: #fff;
}
.feedback-chip input:focus-visible + span {
  outline: 3px solid var(--app-focus, #8a4a00);
  outline-offset: 2px;
}
.feedback-card textarea,
.feedback-card input[type='email'] {
  width: 100%;
  box-sizing: border-box;
  min-height: 48px;
  padding: 12px;
  border: 1px solid var(--app-line, var(--app-border));
  border-radius: 12px;
  font: inherit;
}
.feedback-dictate,
.feedback-contact-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
}
.feedback-dictate p,
.feedback-capture p.muted {
  flex: 1 1 220px;
  margin: 0;
  font-size: 14px;
}
.feedback-contact-row input[type='email'] {
  flex: 1 1 260px;
  width: auto;
}
.feedback-contact-row .activity-choice {
  flex: 1 1 220px;
}
.feedback-file {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 8px 16px;
  border: 1px dashed var(--app-line, var(--app-border));
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
}
.feedback-file:focus-within {
  outline: 3px solid var(--app-focus, #8a4a00);
}
.feedback-capture-preview {
  display: grid;
  gap: 8px;
  margin: 0;
}
.feedback-capture-preview img {
  max-width: 100%;
  max-height: 220px;
  justify-self: start;
  border: 1px solid var(--app-border);
  border-radius: 12px;
  object-fit: contain;
}
.feedback-capture-preview figcaption {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  overflow-wrap: anywhere;
}
.feedback-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--app-border);
}
.feedback-card button,
.feedback-done button {
  min-height: 48px;
}
#beta-feedback-error:empty {
  display: none;
}
#beta-feedback-error {
  margin: 0;
  color: #9b2c1f;
  font-weight: 700;
}
.feedback-aside ul {
  padding-left: 20px;
}
.feedback-aside li + li {
  margin-top: 8px;
}
.feedback-done strong {
  overflow-wrap: anywhere;
}
@media (max-width: 899px) {
  .feedback-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .feedback-card {
    padding: 16px;
  }
  .feedback-actions button {
    flex: 1 1 100%;
  }
}

/* «Seus feedbacks»: uma linha por contribuição, com o assunto e o estado. */
.feedback-mine {
  margin-top: 20px;
}
.feedback-mine ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.feedback-mine li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid var(--app-border);
}
.feedback-mine-title {
  font-weight: 700;
  overflow-wrap: anywhere;
}
.feedback-mine-topic {
  color: var(--app-muted);
}
.feedback-mine-state {
  padding: 2px 12px;
  border: 1px solid var(--app-border);
  border-radius: 999px;
  font-size: 0.9em;
  white-space: nowrap;
}
@media (max-width: 600px) {
  .feedback-mine li {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .feedback-mine-topic {
    grid-column: 1;
  }
}
