.feedback-launch {
  position: static;
  width: 100%;
  min-height: 48px;
  padding: 11px 17px;
  border-color: rgba(70, 166, 255, .55);
  background: #1168b7;
  color: #fff;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .38);
  font-weight: 800;
}

body.feedback-open {
  overflow: hidden;
}

.feedback-dialog {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  padding: 22px;
  place-items: center;
}

.feedback-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: rgba(0, 0, 0, .72);
}

.feedback-sheet {
  position: relative;
  z-index: 1;
  width: min(100%, 620px);
  max-height: min(88vh, 760px);
  max-height: min(88dvh, 760px);
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 24px;
  background: #0b1320;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .62);
  -webkit-overflow-scrolling: touch;
}

.feedback-sheet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.feedback-sheet-head h2,
.feedback-sheet-head p {
  margin-top: 0;
}

.feedback-close {
  flex: 0 0 44px;
  width: 44px;
  min-height: 44px;
  padding: 0;
  font-size: 26px;
  line-height: 1;
}

.feedback-form {
  display: grid;
  gap: 16px;
}

.feedback-context {
  margin: 0;
  border-left: 3px solid #2388e4;
  padding: 10px 12px;
  background: rgba(35, 136, 228, .1);
  color: var(--muted);
  font-size: .84rem;
}

.feedback-error {
  margin: 0;
  border-left: 3px solid #e05368;
  padding: 10px 12px;
  background: rgba(224, 83, 104, .12);
  color: #ffb4c0;
}

.feedback-admin-panel {
  margin: 22px 0;
}

.feedback-admin-list {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.feedback-admin-card {
  display: grid;
  gap: 13px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 14px;
  padding: 16px;
  background: rgba(8, 13, 23, .56);
}

.feedback-admin-head,
.feedback-admin-context,
.feedback-admin-controls,
.feedback-admin-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.feedback-admin-head strong,
.feedback-admin-head span,
.feedback-admin-context span {
  overflow-wrap: anywhere;
}

.feedback-admin-message {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.feedback-admin-context {
  justify-content: flex-start;
  color: var(--muted);
  font-size: .78rem;
}

.feedback-admin-footer {
  align-items: center;
}

.feedback-admin-footer .actions {
  flex: 0 0 auto;
}

.feedback-notes-has-content {
  border-color: rgba(70, 166, 255, .65);
  color: #a8d6ff;
}

.admin-feedback-notes-sheet {
  width: min(100%, 700px);
}

.admin-feedback-notes-report {
  margin-bottom: 18px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 12px;
  padding: 14px;
  background: rgba(255, 255, 255, .035);
}

.admin-feedback-notes-report p {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.admin-feedback-notes-report p + p {
  margin-top: 10px;
  font-size: .78rem;
}

#adminFeedbackNotesText {
  min-height: 150px;
}

.feedback-status {
  display: inline-flex;
  border-radius: 999px;
  padding: 5px 9px;
  background: rgba(255, 255, 255, .08);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.feedback-status.new { color: #8dc8ff; }
.feedback-status.reviewing { color: #ffd187; }
.feedback-status.fixed { color: #83f0c0; }
.feedback-status.closed { color: #b7bdc8; }

.feedback-admin-controls select {
  flex: 0 0 150px;
}

.feedback-admin-controls textarea {
  flex: 1 1 260px;
  min-height: 84px;
}

.feedback-admin-controls button {
  align-self: flex-end;
}

@media (max-width: 900px) {
  .feedback-launch {
    min-height: 48px;
  }
}

@media (max-width: 640px) {
  .feedback-launch {
    min-height: 46px;
  }

  .feedback-dialog {
    align-items: end;
    padding: 0;
  }

  .feedback-sheet {
    width: 100%;
    max-height: 92vh;
    max-height: 92dvh;
    border-radius: 20px 20px 0 0;
    padding: 20px 16px calc(20px + env(safe-area-inset-bottom));
  }

  .feedback-sheet input,
  .feedback-sheet textarea,
  .feedback-sheet select {
    font-size: 16px;
  }

  .feedback-admin-head,
  .feedback-admin-controls,
  .feedback-admin-footer {
    display: grid;
  }

  .feedback-admin-controls > *,
  .feedback-admin-footer > *,
  .feedback-admin-footer .actions,
  .feedback-admin-footer .actions > * {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .feedback-sheet {
    scroll-behavior: auto;
  }
}
