/* Feedback shares the existing warm backstage palette and app controls. */
[hidden] { display: none !important; }
.feedback-brand-wrap { position: relative; display: block; width: max-content; max-width: calc(100% - 44px); margin-inline: auto; }
.feedback-brand-host, .comedy-brand:has(> .feedback-bulb), .event-page-brand:has(> .feedback-bulb) { position: relative; }
.feedback-bulb {
  position: absolute; left: calc(100% + 8px); top: 50%; transform: translateY(-50%);
  z-index: 12; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  width: 42px; height: 42px; padding: 8px; border: 1px solid #cda14c; border-radius: 12px;
  background: #382010f2; color: #ffdb83; text-decoration: none;
  box-shadow: inset 0 0 12px #ffca4820, 0 2px 8px #0007;
  font: 600 12px/1.2 system-ui, sans-serif; cursor: pointer; touch-action: manipulation;
}
.feedback-bulb:hover, .feedback-bulb:focus-visible { color: #fff2c5; border-color: #ffe0a0; background: #59300e; outline: 2px solid #ffdb83; outline-offset: 3px; }
.feedback-bulb svg { flex: 0 0 23px; overflow: visible; }
.feedback-bulb-label { display: none; }
.feedback-bulb-count { position: absolute; top: -7px; right: -7px; min-width: 19px; padding: 2px 5px; border: 1px solid #ffdc83; border-radius: 12px; background: #692918; color: #fff3db; text-align: center; font: 700 11px/1.2 system-ui, sans-serif; }
.feedback-sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }

.feedback-dialog, .feedback-composer, .feedback-board, .feedback-changes, .feedback-changes-notice {
  --feedback-panel: var(--panel, #21120ef2); --feedback-line: var(--line, #956c43);
  --feedback-ink: var(--ink, #fff2dc); --feedback-muted: var(--muted, #c9b89b); --feedback-gold: var(--gold, #ffdc83);
  color: var(--feedback-ink); font-family: system-ui, -apple-system, "Segoe UI", sans-serif; line-height: 1.5;
}
.feedback-dialog *, .feedback-composer *, .feedback-board *, .feedback-changes *, .feedback-changes-notice * { box-sizing: border-box; }
.feedback-dialog {
  /* The popup can sit over the older public page: keep its admin palette local. */
  --panel: #1c0e0aee; --line: #956c43; --ink: #fff2dc;
  --muted: #c9b89b; --gold: #ffdc83; --accent: #ffb547;
  position: fixed; inset: 0; margin: auto; width: min(520px, calc(100vw - 28px));
  max-width: calc(100vw - 28px); height: min(570px, calc(var(--feedback-vv-height, 100dvh) - 24px));
  max-height: calc(var(--feedback-vv-height, 100dvh) - 24px); padding: 20px;
  border: 2px solid var(--feedback-line); border-radius: 16px; background: #24110ffb;
  box-shadow: 0 18px 60px #0009; overflow: auto; z-index: 500;
  font-size: 16px; text-align: left; text-transform: none;
}
.feedback-dialog[open] { display: flex; flex-direction: column; }
.feedback-dialog::backdrop { background: #090302ab; }
.feedback-dialog.is-modeless { inset: auto 24px 24px auto; margin: 0; }
.feedback-dialog-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 12px; flex-shrink: 0; }
.feedback-dialog-bar h2, .feedback-composer-heading { font: italic 700 1.5rem/1.2 Georgia, serif; color: var(--feedback-gold); margin: 0; }
.feedback-dialog-bar h2:focus { outline: none; }
.feedback-dialog.is-modeless .feedback-dialog-bar { cursor: move; touch-action: none; user-select: none; }
.feedback-dialog .feedback-board-link, .feedback-full-page, .feedback-composer .feedback-board-link { font-size: .82rem; color: var(--feedback-gold); }
.feedback-compose-form { display: flex; flex-direction: column; gap: 10px; min-height: 0; flex: 1; margin: 0; }
.feedback-details-label { display: flex; flex-direction: column; flex: 1; min-height: 80px; gap: 6px; font-weight: 600; margin: 0; }
.feedback-compose-form textarea { flex: 1; min-height: 70px; resize: none; margin: 0; width: 100%; }
.feedback-dialog textarea { padding: 12px; font: 400 16px/1.45 system-ui, sans-serif; border: 1px solid #c996526b; border-radius: 8px; background: #ffffff09; color: var(--feedback-ink); }
.feedback-dialog textarea:focus { outline: 2px solid var(--feedback-gold); outline-offset: 1px; }
.feedback-dialog textarea::placeholder { color: #c9b89b; opacity: .85; }
.feedback-capture { font-size: .76rem; color: var(--feedback-muted); margin: 0; overflow-wrap: anywhere; line-height: 1.4; text-transform: none; }
.feedback-compose-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; flex-shrink: 0; }
.feedback-compose-actions .btn { text-align: center; min-height: 44px; }
.feedback-dialog .btn { display: inline-block; padding: 10px 16px; border: 1px solid var(--feedback-gold); border-radius: 10px; background: var(--feedback-gold); color: #211200; font: 700 1rem/1.4 system-ui, sans-serif; cursor: pointer; text-decoration: none; }
.feedback-dialog .btn.quiet { background: transparent; border-color: #ffffff59; color: var(--feedback-ink); }
.feedback-dialog .btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.feedback-dialog .flash { padding: 8px 10px; margin: 0; border-radius: 8px; font-size: .85rem; }
.feedback-dialog .flash.err { background: #bc332a20; border: 1px solid #c2413b; }
.feedback-dialog button:disabled, .feedback-board button:disabled, .feedback-composer button:disabled { opacity: .5; cursor: default; }
.feedback-composer { display: flex; flex-direction: column; gap: 14px; height: var(--feedback-composer-height, calc(100dvh - 230px)); min-height: 280px; max-height: 660px; margin-bottom: 0; }
.feedback-composer .flash { margin: 0; font-size: .86rem; }
.feedback-toast { position: fixed; z-index: 550; bottom: max(18px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100vw - 24px); background: #2c190ff5; color: #fff2dc; border: 1px solid #c79b4b; border-radius: 10px; padding: 12px 18px; box-shadow: 0 4px 24px #0008; font: 500 .9rem/1.4 system-ui, sans-serif; text-transform: none; }
.feedback-toast a { color: #ffdc83; }

.admin-feedback .wrap { max-width: 1800px; }
.feedback-board-heading { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 14px; }
.feedback-board-heading h1 { margin: 0; }
.feedback-board-heading p { margin: 6px 0 0; }
.feedback-views { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.feedback-views [aria-current="page"] { border-color: var(--feedback-gold); color: var(--feedback-gold); background: #ffdc8312; }
.feedback-changes-link { margin-left: auto; font-size: .9rem; }
.feedback-filters { display: flex; align-items: end; gap: 10px; flex-wrap: wrap; padding: 14px; border: 1px solid var(--feedback-line); border-radius: 12px; background: var(--feedback-panel); }
.feedback-filters label { margin: 0; min-width: 140px; font-size: .87rem; }
.feedback-filters input, .feedback-filters select { padding: 8px 10px; font-size: .95rem; }
.feedback-search { flex: 1; }
.feedback-reset { padding: 7px 0; font-size: .87rem; }
.feedback-colour-key { display: flex; gap: 8px 14px; flex-wrap: wrap; margin: 14px 0; font-size: .7rem; color: var(--feedback-muted); }
.feedback-key { display: inline-flex; align-items: center; gap: 5px; }
.feedback-key::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--status-edge, #819096); }
.feedback-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 10px; align-items: start; }
.feedback-status-new { --status-edge: #65a8f6; --status-fill: #192b42; --status-badge: #24496f; }
.feedback-status-triaged { --status-edge: #b799f4; --status-fill: #2b213d; --status-badge: #59407b; }
.feedback-status-approved { --status-edge: #65d5c3; --status-fill: #163630; --status-badge: #246052; }
.feedback-status-working { --status-edge: #eeb955; --status-fill: #3b2b13; --status-badge: #735017; }
.feedback-status-resolved { --status-edge: #8acf7c; --status-fill: #223b1d; --status-badge: #355e2b; }
.feedback-status-declined { --status-edge: #fa8d84; --status-fill: #412320; --status-badge: #843f38; }
.feedback-status-duplicate { --status-edge: #afbac4; --status-fill: #2b3035; --status-badge: #525d65; }
.feedback-status-later { --status-edge: #cdad81; --status-fill: #352a22; --status-badge: #6c553b; }
.feedback-card { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: 0; min-width: 0; border: 1px solid var(--status-edge, #819096); border-left-width: 5px; border-radius: 10px; background: var(--status-fill, #26323a); color: #fff2dc; overflow: hidden; box-shadow: 0 3px 10px #0003; text-transform: none; }
.feedback-card:not(:has(.feedback-select)) { grid-template-columns: minmax(0, 1fr) auto; }
.feedback-card:target { outline: 3px solid var(--feedback-gold); outline-offset: 3px; }
.feedback-select { display: flex; justify-content: center; align-items: center; padding: 17px 0 17px 9px; margin: 0; }
.feedback-select input { width: 17px; height: 17px; margin: 0; accent-color: #ffdc83; cursor: pointer; }
.feedback-card-details { min-width: 0; }
.feedback-card-details > summary { list-style: none; cursor: pointer; padding: 11px 9px; min-height: 65px; }
.feedback-card-details > summary::-webkit-details-marker { display: none; }
.feedback-card-details > summary:focus-visible { outline: 2px solid var(--feedback-gold); outline-offset: -2px; border-radius: 5px; }
.feedback-card-subject { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .91rem; font-weight: 650; line-height: 1.35; }
.feedback-card-meta { display: flex; align-items: center; gap: 5px; margin-top: 6px; min-width: 0; color: #e0d1be; font-size: .65rem; white-space: nowrap; }
.feedback-status { border-radius: 5px; padding: 2px 5px; color: #fff; background: var(--status-badge, #52616b); font-size: .61rem; font-weight: 700; }
.feedback-card-user { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.feedback-card-date { margin-left: auto; flex-shrink: 0; }
.feedback-card .feedback-copy { margin: 12px 7px 0 0; font-size: .69rem; padding: 4px 7px; border-radius: 7px; min-height: 31px; color: #fff2dc; }
.feedback-waiting-badge { font-size: .62rem; color: #ffe5a4; }
.feedback-card:has(.feedback-card-details[open]) { grid-column: span 1; }
.feedback-card-content { padding: 0 10px 13px; font-size: .9rem; overflow-wrap: anywhere; }
.feedback-card-content h3 { font: 700 .86rem/1.4 system-ui, sans-serif; margin: 0 0 6px; color: #fff2dc; }
.feedback-card-content details { border-top: 1px solid #ffffff26; margin-top: 12px; padding-top: 10px; }
.feedback-card-content summary { font-size: .8rem; color: #ffe2aa; cursor: pointer; }
.feedback-card-content form { margin-top: 10px; }
.feedback-card-content input, .feedback-card-content textarea, .feedback-card-content select { font-size: max(16px, .9rem); }
.feedback-card-content textarea { resize: vertical; min-height: 72px; }
.feedback-report-body { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; line-height: 1.5; }
.feedback-edited { border-left: 3px solid #e5a0d6; padding-left: 10px; color: #f9ceef; }
.feedback-edited-label { color: #efb8e4 !important; }
.feedback-card-content .note { font-size: .72rem; color: #d6c5af; }
.feedback-original strong { display: block; margin: 9px 0; }
.feedback-context-list, .feedback-notes { margin-top: 14px; }
.feedback-context { border-left: 2px solid #c7ab7d; padding-left: 9px; margin-top: 10px; }
.feedback-context.from-triager { border-left-color: #df9bd0; }
.feedback-context .note, .feedback-note .note { margin: 4px 0 7px; }
.feedback-note { padding: 9px 0; border-top: 1px solid #ffffff20; }
.feedback-note-plan, .feedback-note-review { color: #cde2f5; }
.feedback-note-question, .feedback-questions { color: #ffe3a0; }
.feedback-captured dl { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 6px 10px; font-size: .72rem; }
.feedback-captured dt { color: #d6c5af; }
.feedback-captured dd { margin: 0; }
.feedback-captured pre { white-space: pre-wrap; font-size: .68rem; max-height: 220px; overflow: auto; background: #0003; padding: 9px; border-radius: 6px; }
.feedback-questions { padding: 12px; margin-top: 14px; border: 1px solid #eeb955; border-radius: 9px; background: #291d10; }
.feedback-questions fieldset { margin-bottom: 10px; padding: 8px; }
.feedback-questions legend { font: 650 .8rem/1.45 system-ui, sans-serif; color: #ffe3a0; }
.feedback-choice { display: flex; gap: 8px; align-items: start; margin: 0 0 8px; font-size: .82rem; font-weight: 400; cursor: pointer; }
.feedback-choice input { width: 17px; height: 17px; margin: 2px 0 0; flex: 0 0 17px; accent-color: #ffdc83; }
.feedback-answer-words { font-size: .78rem; margin-bottom: 4px; }
.feedback-json-fallback { display: block; font-size: .8rem; }
.feedback-json-fallback small { display: block; font-weight: 400; }
.feedback-enhanced .feedback-json-fallback { display: none; }
.feedback-report-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 10px; }
.feedback-status-form { display: flex; gap: 6px; min-width: 0; flex: 1 1 100%; }
.feedback-status-form select { min-width: 0; margin: 0; width: auto; flex: 1; }
.feedback-later { border-top: 1px solid var(--feedback-line); padding-top: 18px; margin-top: 24px; }
.feedback-later > summary { color: var(--feedback-gold); cursor: pointer; font-weight: 700; }
.feedback-empty { margin-top: 12px; text-align: center; }
.feedback-empty p { margin: 0; color: var(--feedback-muted); }
.feedback-bulk { display: none; position: fixed; bottom: max(14px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); width: min(1000px, calc(100vw - 28px)); z-index: 110; margin: 0; padding: 14px 18px; border: 1px solid var(--feedback-gold); border-radius: 14px; background: #30180ffb; box-shadow: 0 -10px 36px #0008; }
.feedback-has-selection .feedback-bulk, .feedback-board:has([data-feedback-select]:checked) .feedback-bulk { display: block; }
.feedback-has-selection, .feedback-board:has([data-feedback-select]:checked) { padding-bottom: 180px; }
.feedback-bulk-top, .feedback-bulk-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.feedback-bulk-top { margin-bottom: 10px; font-size: .85rem; }
.feedback-bulk-top strong { margin-right: auto; }
.feedback-bulk .linkish { color: var(--feedback-gold); font-size: .8rem; }
.feedback-bulk select { width: auto; max-width: 230px; min-width: 0; flex: 1; margin: 0; padding: 7px 10px; font-size: .85rem; }
.feedback-delete-confirm { border-top: 1px solid var(--feedback-line); margin-top: 12px; padding-top: 10px; }
.feedback-delete-confirm p { margin: 0 0 8px; }
.feedback-delete-confirm .btn { margin-right: 8px; }
.feedback-clipboard { position: fixed; top: 0; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.feedback-changes-notice > summary { cursor: pointer; color: var(--feedback-gold); font-weight: 700; }
.feedback-change { padding: 16px 0; border-bottom: 1px solid var(--feedback-line); }
.feedback-change h2 { font-size: 1.2rem; margin-bottom: 10px; }
.feedback-change .note { font-size: .8rem; overflow-wrap: anywhere; }
.feedback-change details summary { font-size: .8rem; cursor: pointer; color: var(--feedback-muted); }
.feedback-changes-notice form { margin: 14px 0; }

@media (min-width: 1100px) {
  .feedback-brand-wrap .feedback-bulb { width: auto; padding-inline: 10px; }
  .feedback-brand-wrap .feedback-bulb-label { display: inline; }
}
@media (max-width: 760px) {
  .feedback-bulb { left: calc(100% + 5px); width: 36px; height: 38px; padding: 6px; border-radius: 10px; }
  .feedback-dialog { inset: var(--feedback-vv-top, 0px) 0 auto; margin: 12px auto; width: calc(100vw - 24px); height: min(550px, calc(var(--feedback-vv-height, 100dvh) - 24px)); max-height: calc(var(--feedback-vv-height, 100dvh) - 24px); padding: 16px; }
  .feedback-dialog.is-modeless { inset: var(--feedback-vv-top, 0px) 0 auto; margin: 12px auto; }
  .feedback-dialog-bar { padding-bottom: 10px; }
  .feedback-dialog-bar h2, .feedback-composer-heading { font-size: 1.35rem; }
  .feedback-composer-page .wrap { padding: 12px 12px 18px; }
  .feedback-composer { height: var(--feedback-composer-height, calc(100dvh - 230px)); max-height: none; min-height: 200px; padding: 16px; gap: 10px; }
  .feedback-composer-page .site-version-footer { display: none; }
  .feedback-capture { font-size: .7rem; }
  .feedback-compose-form { gap: 8px; }
  .feedback-compose-actions { gap: 8px; }
  .feedback-compose-actions .btn { padding: 10px 12px; font-size: .9rem; }
  .feedback-filters { gap: 8px; padding: 12px; }
  .feedback-filters label { min-width: 0; }
  .feedback-filters > label:first-of-type { flex: 1; }
  .feedback-filters .feedback-search { flex: 1 1 100%; order: -1; }
  .feedback-views { gap: 6px; }
  .feedback-changes-link { margin-left: 0; }
  .feedback-colour-key { gap: 6px 10px; }
  .feedback-grid { grid-template-columns: minmax(0, 1fr); }
  .feedback-card-date { display: none; }
  .feedback-card-meta { font-size: .64rem; }
  .feedback-bulk { bottom: 0; left: 0; transform: none; width: 100%; padding: 12px 12px calc(12px + env(safe-area-inset-bottom)); border-radius: 14px 14px 0 0; }
  .feedback-bulk-actions { gap: 7px; }
  .feedback-bulk select { max-width: none; flex: 1 1 70%; }
  .feedback-bulk-actions .btn { min-height: 38px; padding: 6px 10px; }
  .feedback-has-selection, .feedback-board:has([data-feedback-select]:checked) { padding-bottom: 240px; }
}
@media (max-height: 500px) {
  .feedback-dialog { padding: 12px; }
  .feedback-dialog .feedback-capture { font-size: .65rem; }
  .feedback-dialog .feedback-dialog-bar { padding-bottom: 6px; }
}
@media (prefers-reduced-motion: reduce) { .feedback-dialog, .feedback-bulb, .feedback-bulk { transition: none; } }
@media print { .feedback-bulb, .feedback-dialog, .feedback-bulk, .feedback-toast { display: none !important; } }
