.detail-article-tool .article-layout {
  margin-top: 0;
}

.qr-wrap {
  max-width: 480px;
  margin: 0 auto;
}

.qr-wrap input,
.qr-wrap select,
.qr-wrap button {
  font: inherit;
}

.qr-label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 13px;
}

.qr-input-row {
  display: flex;
  gap: 8px;
  margin-bottom: 1.25rem;
}

.qr-input-row input {
  min-width: 0;
  flex: 1;
}

.qr-wrap input,
.qr-wrap select {
  width: 100%;
  padding: 10px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--ink);
}

.qr-wrap input[type="color"] {
  height: 40px;
  padding: 3px;
  cursor: pointer;
}

.qr-wrap input[type="range"] {
  padding: 8px 0;
  border: 0;
}

.qr-wrap button {
  padding: 10px 14px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--ink);
  cursor: pointer;
}

#gen-btn {
  color: #fff;
  background: var(--ink);
}

.qr-wrap button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.qr-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 1.5rem;
}

.qr-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.qr-canvas-wrap {
  display: flex;
  min-height: 240px;
  margin-bottom: 1rem;
  padding: 2rem;
  align-items: center;
  justify-content: center;
  background: var(--paper-deep);
  border: 1px solid var(--line);
}

.qr-placeholder {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

#qr-canvas {
  display: none;
  width: auto;
  max-width: 100%;
  height: auto;
}

.qr-error {
  min-height: 18px;
  margin-top: 6px;
  color: #b42318;
  font-size: 13px;
}

.qr-actions {
  display: flex;
  gap: 8px;
}

.qr-actions button {
  min-width: 0;
  flex: 1;
}

#size-out {
  min-width: 40px;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 520px) {
  .qr-options {
    grid-template-columns: 1fr;
  }

  .qr-input-row,
  .qr-actions {
    flex-wrap: wrap;
  }

  .qr-input-row input,
  .qr-input-row button {
    width: 100%;
    flex-basis: 100%;
  }

  .qr-canvas-wrap {
    min-height: 200px;
    padding: 20px;
  }
}
