/* 快捷报错 dialog (js/tibiu_quick_report.js). Self-contained: used on the
   work detail page and in the reader, which have different base styles. */
.tqr {
  --tqr-bg: #fff;
  --tqr-fg: #1f2329;
  --tqr-muted: #6b7280;
  --tqr-line: #e5e7eb;
  --tqr-chip: #f3f4f6;
  --tqr-accent: #2196f3;
  --tqr-accent-fg: #fff;
  --tqr-error: #d93025;
  --tqr-ok: #188038;
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  font-size: 14px;
  line-height: 1.5;
  color: var(--tqr-fg);
}
.tqr[hidden] { display: none; }
@media (prefers-color-scheme: dark) {
  .tqr {
    --tqr-bg: #1f2024;
    --tqr-fg: #eceef1;
    --tqr-muted: #a0a4ab;
    --tqr-line: #34363c;
    --tqr-chip: #2b2d32;
    --tqr-error: #ff8a80;
    --tqr-ok: #81c995;
  }
}
html.tqr-open, html.tqr-open body { overflow: hidden; }
.tqr-shade {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .45);
}
.tqr-sheet {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  background: var(--tqr-bg);
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -8px 24px rgba(0, 0, 0, .18);
}
@media (min-width: 640px) {
  .tqr { align-items: center; }
  .tqr-sheet { border-radius: 16px; padding-bottom: 16px; }
}
.tqr-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.tqr-title { font-size: 17px; font-weight: 600; }
.tqr-x {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--tqr-muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.tqr-target {
  margin: 6px 0 12px;
  color: var(--tqr-muted);
  overflow-wrap: anywhere;
}
.tqr-reasons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.tqr-chip {
  min-height: 34px;
  padding: 6px 12px;
  border: 1px solid transparent;
  border-radius: 17px;
  background: var(--tqr-chip);
  color: var(--tqr-fg);
  font-size: 13px;
  cursor: pointer;
}
.tqr-chip[aria-checked="true"] {
  border-color: var(--tqr-accent);
  color: var(--tqr-accent);
  background: transparent;
  font-weight: 600;
}
.tqr-field { display: block; }
.tqr-label { display: block; margin-bottom: 6px; font-weight: 600; }
.tqr-text {
  box-sizing: border-box;
  display: block;
  width: 100%;
  min-height: 84px;
  padding: 10px 12px;
  border: 1px solid var(--tqr-line);
  border-radius: 10px;
  background: var(--tqr-bg);
  color: var(--tqr-fg);
  font: inherit;
  font-size: 16px; /* no zoom on iOS focus */
  resize: vertical;
}
.tqr-text:focus { outline: 2px solid var(--tqr-accent); outline-offset: 0; border-color: transparent; }
.tqr-msg { min-height: 20px; margin: 8px 0 0; font-size: 13px; color: var(--tqr-muted); }
.tqr-msg.is-error { color: var(--tqr-error); }
.tqr-msg.is-ok { color: var(--tqr-ok); }
.tqr-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}
.tqr-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--tqr-line);
  border-radius: 21px;
  background: var(--tqr-bg);
  color: var(--tqr-fg);
  font-size: 15px;
  text-decoration: none;
  cursor: pointer;
}
.tqr-btn-primary {
  border-color: var(--tqr-accent);
  background: var(--tqr-accent);
  color: var(--tqr-accent-fg);
  font-weight: 600;
}
.tqr-btn:disabled { opacity: .6; cursor: default; }
