:root {
  --qc-ink: #1d2430;
  --qc-muted: #6f7785;
  --qc-paper: #fffdf8;
  --qc-panel: #f8f5ed;
  --qc-line: #d9d1c1;
  --qc-accent: #b3343a;
  --qc-blue: #285c9f;
  --qc-green: #4e7b55;
  --qc-shadow: 0 18px 55px rgba(22, 28, 38, 0.18);
}

.qc-root,
.qc-root * {
  box-sizing: border-box;
}

.qc-toggle {
  align-items: center;
  background: var(--qc-ink);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  bottom: 22px;
  box-shadow: var(--qc-shadow);
  color: #fff;
  display: inline-flex;
  font: 700 14px/1.1 ui-serif, Georgia, serif;
  gap: 8px;
  min-height: 42px;
  padding: 0 15px;
  position: fixed;
  right: 22px;
  z-index: 2147482500;
}

.qc-toggle:hover {
  background: #111722;
}

.qc-root.is-panel-open .qc-toggle {
  display: none;
}

.qc-count {
  background: var(--qc-accent);
  border-radius: 999px;
  color: #fff;
  font: 700 12px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  min-width: 22px;
  padding: 5px 7px;
  text-align: center;
}

.qc-panel {
  background: var(--qc-paper);
  border-left: 1px solid var(--qc-line);
  bottom: 0;
  box-shadow: var(--qc-shadow);
  color: var(--qc-ink);
  display: grid;
  grid-template-rows: auto auto 1fr;
  max-width: min(440px, calc(100vw - 22px));
  position: fixed;
  right: 0;
  top: 0;
  transform: translateX(104%);
  transition: transform 180ms ease;
  width: 420px;
  z-index: 2147482400;
}

.qc-panel.is-open {
  transform: translateX(0);
}

.qc-header {
  align-items: center;
  border-bottom: 1px solid var(--qc-line);
  display: flex;
  gap: 12px;
  padding: 18px;
}

.qc-title {
  flex: 1;
  font: 700 21px/1.05 ui-serif, Georgia, serif;
  letter-spacing: 0;
}

.qc-subtitle {
  color: var(--qc-muted);
  font: 500 12px/1.35 ui-monospace, SFMono-Regular, Menlo, monospace;
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.qc-icon-button {
  align-items: center;
  background: transparent;
  border: 1px solid var(--qc-line);
  border-radius: 7px;
  color: var(--qc-ink);
  display: inline-flex;
  font: 700 17px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.qc-icon-button:hover {
  background: var(--qc-panel);
}

.qc-filter {
  align-items: center;
  background: var(--qc-panel);
  border-bottom: 1px solid var(--qc-line);
  display: flex;
  gap: 8px;
  padding: 10px 18px;
}

.qc-filter button {
  background: transparent;
  border: 1px solid var(--qc-line);
  border-radius: 999px;
  color: var(--qc-ink);
  font: 700 12px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  min-height: 30px;
  padding: 0 11px;
}

.qc-filter button.is-active {
  background: var(--qc-ink);
  border-color: var(--qc-ink);
  color: #fff;
}

.qc-list {
  overflow: auto;
  padding: 14px 18px 90px;
}

.qc-empty {
  border: 1px dashed var(--qc-line);
  border-radius: 8px;
  color: var(--qc-muted);
  font: 500 14px/1.5 ui-serif, Georgia, serif;
  padding: 18px;
}

.qc-card {
  background: #fff;
  border: 1px solid var(--qc-line);
  border-radius: 8px;
  margin-bottom: 12px;
  padding: 13px;
}

.qc-card.is-resolved {
  opacity: 0.62;
}

.qc-card.is-focused {
  border-color: var(--qc-accent);
  box-shadow: 0 0 0 2px rgba(179, 52, 58, 0.14);
}

.qc-card-meta {
  align-items: center;
  color: var(--qc-muted);
  display: flex;
  font: 700 11px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
  gap: 8px;
  margin-bottom: 8px;
}

.qc-card-status {
  border: 1px solid var(--qc-line);
  border-radius: 999px;
  padding: 3px 7px;
}

.qc-card-text {
  font: 500 15px/1.45 ui-serif, Georgia, serif;
  white-space: pre-wrap;
}

.qc-card-quote {
  border-left: 3px solid var(--qc-blue);
  color: var(--qc-muted);
  font: 500 12px/1.35 ui-serif, Georgia, serif;
  margin: 10px 0 0;
  padding-left: 9px;
}

.qc-card-actions {
  display: flex;
  gap: 7px;
  justify-content: flex-end;
  margin-top: 12px;
}

.qc-card-actions button,
.qc-form-actions button {
  border: 1px solid var(--qc-line);
  border-radius: 7px;
  font: 700 12px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  min-height: 32px;
  padding: 0 10px;
}

.qc-card-actions button {
  background: #fff;
  color: var(--qc-ink);
}

.qc-primary {
  background: var(--qc-accent);
  border-color: var(--qc-accent);
  color: #fff;
}

.qc-secondary {
  background: #fff;
  color: var(--qc-ink);
}

.qc-marker {
  align-items: center;
  background: var(--qc-accent);
  border: 2px solid #fff;
  border-radius: 999px;
  box-shadow: 0 6px 18px rgba(78, 35, 32, 0.24);
  color: #fff;
  display: inline-flex;
  font: 800 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  height: 24px;
  justify-content: center;
  min-width: 24px;
  padding: 0 7px;
  position: absolute;
  right: -34px;
  top: 0;
  z-index: 5;
}

.qc-commentable {
  position: relative;
}

.qc-commentable.qc-has-comments {
  outline: 1px solid rgba(179, 52, 58, 0.16);
  outline-offset: 5px;
}

.qc-highlight {
  background: rgba(255, 214, 80, 0.58);
  border-radius: 4px;
  box-shadow: inset 0 -2px 0 rgba(179, 52, 58, 0.42);
  padding: 0 1px;
}

.qc-add-inline {
  align-items: center;
  background: var(--qc-ink);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font: 800 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  height: 23px;
  justify-content: center;
  opacity: 0;
  position: absolute;
  right: -64px;
  top: 0;
  transition: opacity 130ms ease;
  width: 23px;
  z-index: 4;
}

.qc-commentable:hover > .qc-add-inline,
.qc-add-inline:focus {
  opacity: 1;
}

.qc-popover {
  background: var(--qc-ink);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  box-shadow: var(--qc-shadow);
  color: #fff;
  display: none;
  gap: 8px;
  padding: 8px;
  position: fixed;
  z-index: 2147482600;
}

.qc-popover.is-visible {
  display: flex;
}

.qc-popover button {
  background: #fff;
  border: 0;
  border-radius: 6px;
  color: var(--qc-ink);
  font: 800 12px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  min-height: 30px;
  padding: 0 10px;
}

.qc-form {
  background: var(--qc-paper);
  border-top: 1px solid var(--qc-line);
  bottom: 0;
  display: none;
  left: 0;
  padding: 14px 18px 18px;
  position: absolute;
  right: 0;
}

.qc-form.is-open {
  display: block;
}

.qc-form label {
  color: var(--qc-muted);
  display: block;
  font: 800 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  margin-bottom: 7px;
  text-transform: uppercase;
}

.qc-form textarea,
.qc-form input {
  background: #fff;
  border: 1px solid var(--qc-line);
  border-radius: 7px;
  color: var(--qc-ink);
  display: block;
  font: 500 14px/1.4 ui-serif, Georgia, serif;
  padding: 10px;
  width: 100%;
}

.qc-form textarea {
  min-height: 110px;
  resize: vertical;
}

.qc-form input {
  margin-bottom: 10px;
}

.qc-form-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 10px;
}

@media (max-width: 900px) {
  .qc-marker {
    position: static;
    margin-left: 6px;
    vertical-align: text-top;
  }

  .qc-add-inline {
    right: 0;
    top: -28px;
  }
}
