/* QR tool styles: preview stage, settings, actions. */
.qr-preview-panel {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}
.qr-settings {
  position: sticky;
  top: 16px;
  align-self: start;
}
.qr-settings details {
  margin-top: 4px;
}
.qr-settings textarea {
  display: block;
  width: 100%;
  resize: vertical;
  min-height: 92px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  font-size: 16px;
  line-height: 1.4;
  margin-top: 10px;
}
.qr-settings input[type="text"] {
  display: block;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  font-size: 16px;
  margin-top: 10px;
}
.qr-settings .field {
  margin: 16px 0;
}
.qr-settings details > .field {
  margin: 16px 0;
}
.qr-settings input[type="file"] {
  display: block;
  width: 100%;
  margin-top: 10px;
  font-size: 13px;
}
.qr-settings output {
  display: inline-block;
  margin-top: 6px;
}

/* Section: preview stage */
.qr-preview-panel #qr-stage {
  min-height: 440px;
  display: grid;
  place-items: center;
  background: rgba(148, 151, 169, 0.04);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  margin-bottom: 12px;
  overflow: hidden;
}
.qr-preview-panel canvas {
  display: block;
  width: min(100%, 420px);
  height: auto;
  aspect-ratio: 1;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

/* Section: actions */
.qr-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 18px;
}
.qr-actions .primary {
  margin: 0;
  flex: 1;
  justify-content: center;
}
.qr-actions .secondary {
  white-space: nowrap;
}
.qr-page .settings-panel h2 {
  font-size: 20px;
  color: var(--text);
  font-weight: 600;
  margin-bottom: 6px;
}
.qr-page .action-dock .qr-actions {
  margin-top: 0;
}
@media (max-width: 768px) {
  .qr-settings {
    position: static;
  }
  .qr-preview-panel #qr-stage {
    min-height: 320px;
    padding: 20px;
  }
}
@media (max-width: 425px) {
  .qr-actions {
    flex-direction: column;
  }
  .qr-actions .primary,
  .qr-actions .secondary {
    width: 100%;
    text-align: center;
  }
  .qr-preview-panel #qr-stage {
    min-height: 280px;
    padding: 16px;
  }
}
