#feedback-dialog {
  width: min(680px, calc(100vw - 24px));
  max-width: 680px;
  max-height: min(90vh, 860px);
  padding: 0;
  position: fixed;
  inset: 0;
  margin: auto;
  border: 1px solid var(--border-highlight, rgba(255,255,255,.24));
  border-radius: 28px;
  color: var(--text-main, #f5f7ff);
  background: var(--bg-card, rgba(20,22,34,.98));
  box-shadow: 0 28px 90px rgba(0,0,0,.48), inset 0 1px 0 rgba(255,255,255,.14);
  overflow: hidden;
}
#feedback-dialog::backdrop { background: rgba(0,0,0,.72); backdrop-filter: blur(6px); }
html.light-mode #feedback-dialog { color: #0f172a; background: rgba(255,255,255,.98); }
.feedback-form { padding: 24px; overflow-y: auto; max-height: min(90vh, 860px); }
.feedback-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--border-glass, rgba(255,255,255,.11)); }
.feedback-eyebrow { margin: 0 0 4px; color: #67e8f9; font: 700 10px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .14em; }
.feedback-header h2 { margin: 0; font-size: 20px; line-height: 1.3; }
.feedback-close { width: 34px; height: 34px; border-radius: 999px; background: rgba(255,255,255,.08); display: inline-flex; align-items: center; justify-content: center; color: inherit; }
.feedback-context { margin: 14px 0 0; color: var(--text-muted, #949ab8); font: 11px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; }
.feedback-fields { display: grid; gap: 14px; margin-top: 18px; }
.feedback-fields label { display: block; font-size: 12px; font-weight: 600; }
.feedback-fields input, .feedback-fields select, .feedback-fields textarea { display: block; margin-top: 7px; }
.feedback-fields input, .feedback-fields select, .feedback-fields textarea { width: 100%; border: 1px solid rgba(255,255,255,.14); border-radius: 14px; padding: 11px 13px; outline: none; color: inherit; background: rgba(0,0,0,.28); font: 13px/1.5 -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif; transition: border-color .2s ease, box-shadow .2s ease; }
html.light-mode .feedback-fields input, html.light-mode .feedback-fields select, html.light-mode .feedback-fields textarea { background: rgba(15,23,42,.045); border-color: rgba(15,23,42,.14); }
.feedback-fields textarea { resize: vertical; min-height: 78px; }
.feedback-fields input:focus, .feedback-fields select:focus, .feedback-fields textarea:focus { border-color: #22d3ee; box-shadow: 0 0 0 3px rgba(34,211,238,.14); }
.feedback-fields select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, #67e8f9 50%), linear-gradient(135deg, #67e8f9 50%, transparent 50%); background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
.feedback-fields option { color: #0f172a; background: #fff; }
.feedback-required { color: #fb7185; font-size: 10px; font-weight: 500; }
.feedback-optional { color: var(--text-muted, #949ab8); font-size: 10px; font-weight: 500; }
.feedback-count { margin: -8px 0 0; text-align: right; color: var(--text-muted, #949ab8); font: 10px ui-monospace, SFMono-Regular, Menlo, monospace; }
.feedback-help { margin: 14px 0 0; color: var(--text-muted, #949ab8); font-size: 11px; line-height: 1.6; }
.feedback-status { min-height: 18px; margin: 10px 0 0; color: #67e8f9; font-size: 11px; line-height: 1.5; }
.feedback-footer { display: grid; gap: 12px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border-glass, rgba(255,255,255,.11)); }
.feedback-footer > a, .feedback-history-link { color: #67e8f9; font-size: 11px; text-decoration: none; }
.feedback-footer > a:hover, .feedback-history-link:hover { text-decoration: underline; }
.feedback-submit-row { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 9px; }
.feedback-card-actions { position: relative; z-index: 12; display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.08); }
.feedback-card-button { padding: 7px 11px; border: 1px solid rgba(103,232,249,.28); border-radius: 13px; color: #a5f3fc; background: rgba(34,211,238,.1); font-size: 11px; font-weight: 700; }
.feedback-card-button:hover { background: rgba(34,211,238,.18); }
.feedback-history-link { color: var(--text-muted, #949ab8); font-size: 10px; white-space: nowrap; }
.feedback-primary, .feedback-secondary { padding: 10px 14px; border-radius: 13px; font-size: 12px; font-weight: 700; }
.feedback-primary { color: #fff; background: linear-gradient(90deg, #06b6d4, #2563eb); box-shadow: 0 7px 20px rgba(14,165,233,.22); }
.feedback-secondary { color: inherit; background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.12); }
.feedback-clear { justify-self: end; border: 0; padding: 0; color: var(--text-muted, #949ab8); background: transparent; font-size: 10px; text-decoration: underline; cursor: pointer; }
.feedback-copy-buffer { position: fixed; left: -10000px; top: 0; width: 2px; height: 2px; opacity: 0; }
@media (max-width: 640px) {
  #feedback-dialog { width: 100vw; max-width: none; max-height: 94vh; inset: auto 0 0; margin: 0; border-radius: 26px 26px 0 0; }
  .feedback-form { padding: 20px 16px calc(20px + env(safe-area-inset-bottom)); max-height: 94vh; }
  .feedback-submit-row { display: grid; grid-template-columns: 1fr 1fr; }
  .feedback-submit-row button { width: 100%; }
}

html.light-mode .feedback-card-button { color: #0e7490; }
html.light-mode .feedback-eyebrow, html.light-mode .feedback-status, html.light-mode .feedback-footer > a { color: #0e7490; }
.feedback-card-button, .feedback-history-link { min-height: 40px; display: inline-flex; align-items: center; }
@media (max-width: 640px) { .feedback-fields input, .feedback-fields select, .feedback-fields textarea { font-size: 16px; } }
