#feedback-dialog {
  box-sizing: border-box;
  width: min(580px, calc(100vw - 24px - 2 * max(env(safe-area-inset-left), env(safe-area-inset-right))));
  max-width: calc(100vw - 24px - 2 * max(env(safe-area-inset-left), env(safe-area-inset-right)));
  max-height: calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid #7c826b;
  border-radius: 12px;
  background: #272332;
  color: #f4e6d4;
}
#feedback-body {
  box-sizing: border-box;
  max-height: calc(100dvh - 26px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  padding: 24px;
  overflow: auto;
  overscroll-behavior: contain;
}
#feedback-dialog h2 { margin: 0 0 10px; padding-right: 28px; font-size: 22px; }
#feedback-dialog p { margin: 0 0 10px; font-size: 14px; line-height: 1.5; }
#feedback-dialog #feedback-sender { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#feedback-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 44px;
  height: 44px;
  border: 0;
  background: #272332;
  border-radius: 50%;
  z-index: 1;
  color: inherit;
  font-size: 28px;
  cursor: pointer;
}
#feedback-form { display: grid; gap: 6px; }
#feedback-form label, #feedback-context-label { font-weight: bold; margin-top: 0; }
#feedback-contact { display: grid; gap: 6px; }
#feedback-contact[hidden] { display: none; }
#feedback-form input, #feedback-form select, #feedback-form textarea {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 10px;
  border: 1px solid #a79aab;
  border-radius: 4px;
  background: #17151e;
  color: #f4e6d4;
  font: inherit;
  font-size: 16px;
}
#feedback-form textarea { resize: vertical; }
#feedback-count { text-align: right; font-size: 13px; }
#feedback-context {
  box-sizing: border-box;
  height: 6.5rem;
  max-height: 6.5rem;
  overflow: auto;
  margin: 0;
  padding: 8px;
  border: 1px solid #a79aab;
  border-radius: 4px;
  background: #17151e;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: 12px/1.5 ui-monospace, monospace;
}
#feedback-status { margin: 0; }
#feedback-send {
  min-height: 44px;
  padding: 10px 18px;
  border: 0;
  border-radius: 5px;
  background: #d7eab0;
  color: #222738;
  font: inherit;
  font-weight: bold;
  cursor: pointer;
}
#feedback-send:disabled { opacity: .55; cursor: default; }
#feedback-dialog :focus-visible { outline: 3px solid #d7eab0; outline-offset: 2px; }
[data-feedback] { flex-shrink: 0; }
@media (max-width: 700px) {
  #feedback-body { padding: 20px 16px; }
  [data-feedback], .game-bar [data-feedback] { min-width: 44px; min-height: 44px; }
}
