/* Local-first issue reporting. Components use the existing Fret Master theme tokens. */
.bug-report-launcher {
  position: fixed; right: calc(18px + env(safe-area-inset-right, 0px)); bottom: calc(18px + env(safe-area-inset-bottom, 0px)); z-index: 48;
  display: flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 16px;
  border: 1px solid rgba(255,180,84,.62); border-radius: 999px;
  background: linear-gradient(180deg,rgba(255,255,255,.08),transparent),#202638; color: var(--text);
  font: 700 13px/1 "Segoe UI Variable","Segoe UI","Microsoft JhengHei",sans-serif;
  box-shadow: 0 8px 24px rgba(0,0,0,.42); cursor: pointer; transition: transform .16s,border-color .16s,background .16s;
}
.bug-report-launcher:hover { transform: translateY(-2px); border-color: var(--accent2); background: #293044; }
.bug-report-launcher:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.bug-report-launcher>span:first-child { color: var(--accent2); font-size: 17px; }
.bug-report-count { display: grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--bad); color: #fff; font-size: 11px; font-variant-numeric: tabular-nums; }
.modal-card:has(.br-panel) { width: min(780px,94vw); max-height: 92dvh; padding: 26px 30px; }
.br-panel { max-width: 760px; margin: auto; }
.br-heading { display:flex; align-items:center; justify-content:space-between; gap:14px; margin:0 0 8px; }
.br-heading h2 { margin:0; }
.br-kicker { margin:0 0 5px!important; color:var(--accent2); font-size:10px!important; font-weight:800; letter-spacing:.08em; }
.br-lead { margin:0 0 18px!important; color:var(--muted); }
.br-field { display:grid; gap:6px; margin:0 0 13px; color:var(--text); font-size:12.5px; font-weight:650; }
.br-field b { color:var(--accent2); }
.br-field input,.br-field select,.br-field textarea { width:100%; min-height:42px; padding:10px 12px; border:1px solid var(--border-hi); border-radius:9px; background:var(--panel2); color:var(--text); font:400 13px/1.5 "Segoe UI Variable","Segoe UI","Microsoft JhengHei",sans-serif; }
.br-field textarea { min-height:76px; resize:vertical; }
.br-field input::placeholder,.br-field textarea::placeholder { color:#778294; }
.br-field :focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
.br-two-col { display:grid; grid-template-columns:1fr 1fr; gap:13px; }
.br-capture { margin:17px 0; padding:14px; border:1px solid var(--border); border-radius:12px; background:rgba(255,255,255,.025); }
.br-capture h3 { margin:0 0 5px; color:var(--text); font-size:13px; }
.br-capture h3::before,.br-report-copy h3::before { display:none; }
.br-capture p,.br-export-help { margin:0 0 11px!important; color:var(--muted); font-size:11.5px!important; line-height:1.6!important; }
.br-capture-actions,.br-export-actions { display:flex; gap:8px; flex-wrap:wrap; }
.br-capture-actions button,.br-report-actions button { min-height:40px; }
.br-attachments { display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:10px; margin-top:12px; }
.br-attachment { min-width:0; padding:8px; border:1px solid var(--border); border-radius:10px; background:rgba(0,0,0,.14); }
.br-attachment-preview { display:grid; place-items:center; min-height:92px; max-height:220px; overflow:hidden; border-radius:7px; background:#090b10; }
.br-preview-media { display:block; max-width:100%; max-height:210px; object-fit:contain; }
.br-attachment-meta { display:grid; gap:5px; margin-top:7px; color:var(--muted); font-size:10.5px; overflow-wrap:anywhere; }
.br-link { padding:5px 7px; border:0; background:transparent; color:var(--accent); font:600 12px/1.4 "Segoe UI Variable","Segoe UI","Microsoft JhengHei",sans-serif; text-align:left; cursor:pointer; }
.br-link:hover { text-decoration:underline; }
.br-link.danger { color:#ff8585; }
.br-empty { margin:0!important; color:var(--muted); font-size:11px!important; }
.br-environment { margin:13px 0; color:var(--muted); font-size:11px; }
.br-environment summary { color:var(--text); font-weight:650; cursor:pointer; }
.br-environment p { margin:7px 0!important; font-size:11px!important; line-height:1.55!important; }
.br-environment code { display:block; overflow-wrap:anywhere; color:var(--accent2); font:11px/1.55 ui-monospace,Consolas,monospace; }
.br-actions { display:flex; justify-content:space-between; align-items:center; gap:10px; margin-top:16px; }
.br-actions .primary-btn { min-height:44px; padding:10px 16px; }
.br-private-note { margin:8px 0 0!important; color:var(--muted); font-size:10.5px!important; line-height:1.5!important; }
.br-status { margin:10px 0; padding:10px 12px; border:1px solid rgba(90,141,255,.35); border-radius:9px; background:rgba(90,141,255,.08); color:var(--text); font-size:12px; line-height:1.5; }
.br-status[data-kind="error"] { border-color:rgba(232,80,79,.45); background:rgba(232,80,79,.09); }
.br-export-help { margin:8px 0 13px!important; }
.br-report-list { display:grid; gap:8px; max-height:42dvh; overflow:auto; }
.br-report-row { display:flex; justify-content:space-between; align-items:center; gap:14px; padding:12px; border:1px solid var(--border); border-radius:11px; background:rgba(255,255,255,.025); }
.br-report-copy { min-width:0; }
.br-report-center { min-height:40px; white-space:nowrap; }
.br-report-copy h3 { display:block; margin:6px 0 3px; color:var(--text); font-size:13px; overflow-wrap:anywhere; }
.br-report-copy p { margin:0!important; color:var(--muted); font-size:11px!important; }
.br-report-date { margin-left:8px; color:var(--muted); font-size:10px; }
.br-state { padding:3px 7px; border-radius:999px; background:rgba(255,180,84,.1); color:var(--accent2); font-size:10px; }
.br-state.done { background:rgba(62,196,109,.1); color:var(--good); }
.br-report-actions { display:flex; align-items:center; gap:5px; flex:none; }
.br-empty-state { display:grid; gap:5px; place-items:center; padding:30px 14px; border:1px dashed var(--border-hi); border-radius:12px; color:var(--muted); text-align:center; font-size:12px; }
.br-empty-state strong { color:var(--text); font-size:14px; }
@media(max-width:620px) {
  .bug-report-launcher { right:calc(10px + env(safe-area-inset-right,0px)); bottom:calc(70px + env(safe-area-inset-bottom,0px)); min-height:44px; padding:0 13px; }
  .modal-card:has(.br-panel) { width:calc(100vw - 16px); max-height:calc(94dvh - env(safe-area-inset-top,0px)); padding:22px 16px; }
  .br-two-col { grid-template-columns:1fr; gap:0; }
  .br-heading { align-items:flex-start; }
  .br-heading .primary-btn { padding:8px 10px; }
  .br-report-row { align-items:flex-start; flex-direction:column; gap:8px; }
  .br-report-actions { width:100%; justify-content:flex-end; }
  .br-capture-actions button { flex:1 1 42%; font-size:11px; }
  .br-actions { align-items:stretch; flex-direction:column-reverse; }
  .br-actions>* { text-align:center; }
  .br-actions .primary-btn { width:100%; }
}
@media(max-height:500px) and (orientation:landscape) {
  .bug-report-launcher { right:10px; bottom:10px; min-height:40px; }
  .br-report-list { max-height:32dvh; }
  .modal-card:has(.br-panel) { max-height:96dvh; padding-top:18px; padding-bottom:18px; }
}
@media(max-width:600px) {
  body.modern-practice .bug-report-launcher { top:calc(60px + env(safe-area-inset-top,0px)); right:calc(10px + env(safe-area-inset-right,0px)); bottom:auto; width:40px; min-height:40px; padding:0; justify-content:center; }
  body.modern-practice .bug-report-launcher-label { display:none; }
}
@media(max-height:480px) and (min-width:601px) and (max-width:920px) {
  body.modern-practice .bug-report-launcher { top:calc(4px + env(safe-area-inset-top,0px)); left:calc(145px + env(safe-area-inset-left,0px)); right:auto; bottom:auto; width:40px; min-height:40px; padding:0; justify-content:center; }
  body.modern-practice .bug-report-launcher-label { display:none; }
}
@media(prefers-reduced-motion:reduce) { .bug-report-launcher { transition:none; } }
