.feedback-link {
  padding: 5px 0;
  border: 0;
  background: none;
  color: var(--mint);
  font: inherit;
  text-underline-offset: 4px;
}
.feedback-link:hover { text-decoration: underline; }
.quiz-nav .feedback-link, .vs-actions .feedback-link { font-size: 14px; }

#feedback-dialog {
  width: min(560px, calc(100% - 24px));
  max-width: none;
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0;
  border: 1px solid #4e6156;
  border-radius: 9px;
  background: #19201d;
  color: var(--text);
  box-shadow: 0 18px 65px #060c09a6;
}
#feedback-dialog::backdrop { background: #080d0bc9; }
body:has(#feedback-dialog[open]) { overflow: hidden; }
.feedback-heading, #feedback-form { padding-inline: clamp(18px, 4vw, 30px); }
.feedback-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-block: 12px;
  border-bottom: 1px solid var(--line);
}
.feedback-heading h2 { font-size: 23px; letter-spacing: -.04em; }
#feedback-form { display: grid; gap: 17px; padding-block: 20px 25px; }
#feedback-prompt { color: #d9e2d9; }
.feedback-group { margin: 0; padding: 0; border: 0; min-width: 0; }
.feedback-group legend, .feedback-field label {
  padding: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
}
#feedback-categories { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 7px; }
.feedback-chip { position: relative; cursor: pointer; }
.feedback-chip input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.feedback-chip span {
  display: block;
  border: 1px solid #56635c;
  border-radius: 30px;
  padding: 6px 14px;
  font-size: 14px;
  background: #202824;
}
.feedback-chip input:checked + span {
  border-color: var(--mint);
  color: #14221c;
  background: var(--mint);
  font-weight: 750;
}
.feedback-chip input:focus-visible + span, #feedback-form textarea:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}
.feedback-field { display: grid; gap: 5px; }
.feedback-field[hidden] { display: none; }
.feedback-field small, .feedback-count, #feedback-delivery { color: var(--mute); font-size: 13px; }
.feedback-field textarea, .feedback-field input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #627067;
  border-radius: 4px;
  background: #111815;
  color: var(--text);
  font: inherit;
}
.feedback-field textarea { resize: vertical; }
.feedback-field textarea::placeholder { color: #a0aca3; }
.feedback-count { justify-self: end; font-family: var(--mono); }
.feedback-context {
  padding: 9px 12px;
  border-left: 2px solid var(--mint);
  color: #c5d4ca;
  background: #25322b;
  font-size: 13px;
  overflow-wrap: anywhere;
}
.feedback-context strong { color: var(--mint); }
.feedback-context p { white-space: pre-line; }
.feedback-actions { display: grid; gap: 9px; }
.feedback-actions button { justify-self: start; }
#feedback-status { color: var(--mint); font-size: 14px; }
#feedback-status:empty { display: none; }
@media (forced-colors: active) {
  .feedback-chip input:checked + span { outline: 2px solid Highlight; outline-offset: -3px; }
}
