.cd-photo-preview{box-sizing:border-box;width:fit-content;max-width:min(96vw,1100px);max-height:94dvh;margin:auto;padding:0;border:1px solid var(--cd-night-edge,#ddd);border-radius:16px;background:var(--cd-night-paper,#fff);color:var(--cd-night-ink,#333)}
.cd-photo-preview::backdrop{background:rgb(0 0 0 / .72)}
.cd-photo-preview header{display:flex;align-items:center;justify-content:flex-end;padding:8px 12px}
.cd-photo-preview header button{flex:none;font-size:24px;line-height:1;min-width:44px;min-height:44px;padding:0}
.cd-photo-stage{display:grid;place-items:center;min-width:min(76vw,320px);min-height:96px}
.cd-photo-stage p{padding:0 16px}
.cd-photo-stage img{max-width:100%;max-height:calc(92dvh - 72px);object-fit:contain}
.qc-photo-links,.qc-photo-tools{display:flex;align-items:center;flex-wrap:wrap;gap:8px}
.qc-photo-links button{max-width:100%;overflow-wrap:anywhere}
.qc-photo-list{display:grid;gap:8px}
.qc-photo-list div{display:flex;align-items:center;justify-content:space-between;gap:8px}
.qc-photo-list span{min-width:0;overflow-wrap:anywhere}
.qc-photo-field{display:grid;gap:8px}
.qc-photo-field small{font-weight:400}
.qc-fields{border:0;padding:0;margin:0;min-width:0;display:grid;gap:16px}
.tech-dialog-backdrop[data-tech-modal="quality-rework"]{z-index:75}
.pulse-rework-dialog{max-height:calc(100dvh - 36px);overflow-y:auto;overscroll-behavior:contain}

/* Chief technician · quality review */
.tech-dialog.pulse-rework-dialog {
  --qc-gutter:24px;
  --qc-line:var(--cd-night-edge,#e7e7e7);
  display:flex;
  flex-direction:column;
  width:min(100%,520px);
  padding:0;
  overflow:hidden;
}
.qc-dialog-head,.qc-dialog-actions {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:20px var(--qc-gutter);
}
.qc-dialog-head {border-bottom:1px solid var(--qc-line)}
.qc-dialog-head h2 {margin:0;line-height:1.22;letter-spacing:-.02em}
.qc-dialog-head #qc-order-label {margin:5px 0 0;font-size:13px;line-height:1.4;overflow-wrap:anywhere}
.qc-dialog-head .tech-dialog-close {
  position:static;flex:none;display:grid;place-items:center;
  width:40px;height:40px;padding:0;border-radius:8px;
}
.pulse-rework-dialog #quality-rework-form {
  display:flex;flex-direction:column;min-height:0;gap:0;
}
.pulse-rework-dialog .qc-fields {
  grid-template-columns:minmax(0,1fr);
  min-height:0;overflow-y:auto;overscroll-behavior:contain;
  padding:20px var(--qc-gutter);gap:18px;
}
.pulse-rework-dialog .qc-fields label {gap:7px}
.pulse-rework-dialog .qc-fields :is(select,textarea,.down-select-trigger) {
  box-sizing:border-box;width:100%;font-size:14px;font-weight:500;
}
.pulse-rework-dialog .qc-fields textarea {min-height:86px;padding:11px 12px;line-height:1.45;resize:vertical}
.pulse-rework-dialog .qc-photo-field {
  gap:10px;padding:14px 16px;border:1px solid var(--qc-line);
  border-radius:10px;background:var(--cd-night-soft,#fafafa);
}
.qc-photo-heading {display:flex;align-items:baseline;gap:8px;flex-wrap:wrap}
.qc-photo-heading strong {font-size:14px}
.qc-photo-field small {color:var(--cd-night-secondary,#717171);font-size:12px;line-height:1.45}
.pulse-rework-dialog .qc-photo-tools .btn {display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:36px;width:auto;padding:6px 12px}
.qc-dialog-actions {justify-content:flex-end;flex-shrink:0;border-top:1px solid var(--qc-line);padding-block:14px}
.qc-dialog-actions .btn {min-height:42px}
@media(max-width:600px){
  .tech-dialog.pulse-rework-dialog {--qc-gutter:16px;max-height:calc(100dvh - 24px)}
  .qc-dialog-head {padding-block:16px}
  .pulse-rework-dialog .qc-photo-field {padding:12px}
  .pulse-rework-dialog .qc-photo-tools {display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
  .pulse-rework-dialog .qc-photo-tools .btn {padding-inline:6px;white-space:normal}
  .qc-dialog-head .tech-dialog-close,.qc-dialog-actions .btn,.pulse-rework-dialog .qc-photo-tools .btn {min-height:44px}
  .pulse-rework-dialog .qc-fields :is(select,textarea) {font-size:16px}
  .qc-dialog-actions {display:grid;grid-template-columns:auto minmax(0,1fr);gap:8px}
  .qc-dialog-actions .btn {width:100%;padding-inline:12px}
}
