dialog.stamp-designer {
  width:min(720px,calc(100% - 28px));
  max-height:min(94svh,760px);
  padding:25px;
  overflow:auto;
}
.stamp-designer-head,.stamp-designer-actions {display:flex;align-items:center;justify-content:space-between;gap:12px}
.stamp-designer-head {margin-bottom:20px}
.stamp-designer-head h2 {font:480 30px/1.1 var(--serif);letter-spacing:-.03em}
.stamp-close {font:28px/1 var(--sans);color:#657168;width:32px;height:32px;border-radius:5px}
.stamp-close:hover {background:#edf1eb}
.stamp-designer-content {display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:24px}
.stamp-fields {display:grid;gap:14px;align-content:start}
.stamp-fields label {display:grid;gap:6px;color:#515d52;font-size:.8rem}
.stamp-fields input:not([type=color]),.stamp-fields select {width:100%;height:40px;border:1px solid #cbd5c8;border-radius:6px;background:white;padding:0 10px;font-size:.9rem}
.stamp-fields input[type=color] {width:62px;height:36px;padding:3px;border:1px solid #cbd5c8;border-radius:6px;background:white;cursor:pointer}
.stamp-pair {display:grid;grid-template-columns:80px minmax(0,1fr);gap:10px}
.stamp-preview {background:#e9ede5;border:1px solid #d8ded4;border-radius:8px;padding:12px;min-height:250px;display:flex;flex-direction:column;justify-content:space-between}
.stamp-preview>span {font-size:.75rem;color:#647064}
.stamp-preview canvas {display:block;width:100%;height:auto;margin:auto}
.stamp-upload-line {display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;color:#5b695b;font-size:.79rem}
.stamp-upload-button,.stamp-use-design {color:#345b41;text-decoration:underline;text-underline-offset:3px;font-size:.8rem}
.stamp-upload-name {margin:0!important;color:#657168;font-size:.78rem;line-height:1.4}
.stamp-upload-name:empty {display:none}
.stamp-use-design {justify-self:start}
.stamp-designer-actions {justify-content:flex-end;margin-top:22px}
.stamp-cancel,.stamp-apply {border-radius:6px;min-height:40px;padding:0 16px;font-size:.875rem}
.stamp-cancel {border:1px solid #cbd5c8;background:white}
.stamp-apply {background:#304f3f;color:white}
.stamp-cancel:hover {background:#eef2ec}
.stamp-apply:hover {background:#233e30}
@media(max-width:620px) {
  dialog.stamp-designer {padding:20px}
  .stamp-designer-content {grid-template-columns:1fr;gap:16px}
  .stamp-preview {grid-row:1;min-height:150px}
  .stamp-preview canvas {max-height:150px;object-fit:contain}
}
