/* Isolated native dialog: no theme-button or legacy modal styles leak into it. */
.smo-new-stamp-dialog { box-sizing: border-box; width: min(920px,calc(100vw - 32px)); max-width: none; max-height: calc(100dvh - 32px); margin: auto; padding: 0; overflow: auto; border: 1px solid #dce5f7; border-radius: 24px; background: #fff; color: #183252; box-shadow: 0 28px 100px #0e244f40; font: 14px/1.5 Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; text-align: start; }
.smo-new-stamp-dialog::backdrop { background: #12214280; backdrop-filter: blur(5px); }
.smo-new-stamp-dialog * { box-sizing: border-box; min-width: 0; }
.smo-new-stamp-dialog [hidden] { display: none !important; }
.smo-new-stamp-dialog h2,.smo-new-stamp-dialog p { padding: 0; margin: 0; }
.smo-new-stamp-dialog button { appearance: none; margin: 0; border: 1px solid #d6e1f4; border-radius: 12px; background: #fff; color: #29466c; font: 650 12px/1.3 Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; text-transform: none; letter-spacing: normal; cursor: pointer; box-shadow: none; transition: border-color .15s,background .15s; }
.smo-new-stamp-dialog button:hover { border-color: #8ba5f5; background: #f5f8ff; }
.smo-new-stamp-dialog button:focus-visible,.smo-new-stamp-dialog input:focus-visible { outline: 3px solid #7295ff; outline-offset: 3px; }
.smo-new-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; padding: 24px 28px 18px; border-bottom: 1px solid #e8edf7; }
.smo-new-head h2 { color: #122a4d; font: 800 25px/1.25 Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; letter-spacing: -.6px; }
.smo-new-head p { max-width: 590px; margin-top: 7px; color: #71829c; font-size: 12px; line-height: 1.55; }
.smo-new-stamp-dialog .smo-new-close { flex: 0 0 34px; width: 34px; height: 34px; padding: 0; background: #f3f6fc; border: 0; font-size: 25px; font-weight: 400; }
.smo-new-body { display: grid; grid-template-columns: minmax(0,1.28fr) minmax(0,1fr); }
.smo-new-settings { display: grid; gap: 16px; padding: 20px 28px; }
.smo-new-stamp-dialog fieldset { min-width: 0; padding: 0; margin: 0; border: 0; }
.smo-new-stamp-dialog legend { display: flex; align-items: center; gap: 8px; width: 100%; padding: 0; margin-bottom: 10px; font-size: 13px; font-weight: 750; }
.smo-new-stamp-dialog legend b { display: inline-grid; place-items: center; width: 23px; height: 23px; border-radius: 7px; background: #edf2ff; color: #315efb; font-size: 11px; }
.smo-new-shapes,.smo-new-frames { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; }
.smo-new-shapes button,.smo-new-frames button { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 8px 3px; min-height: 80px; }
.smo-new-shapes svg { width: 57px; height: 44px; color: #315efb; }
.smo-new-shapes span,.smo-new-frames span { overflow-wrap: anywhere; font-size: 10px; }
.smo-new-shapes i { display: none; position: absolute; top: 4px; inset-inline-end: 5px; width: 14px; height: 14px; border-radius: 50%; background: #315efb; color: #fff; font: 700 10px/14px sans-serif; text-align: center; }
.smo-new-stamp-dialog [aria-pressed="true"] { border-color: #5478ff; background: #eef3ff; color: #244ee9; box-shadow: 0 0 0 1px #5478ff; }
.smo-new-shapes [aria-pressed="true"] i { display: block; }
.smo-new-frames button { min-height: 70px; padding: 8px 3px; }
.smo-new-frames svg { width: 43px; height: 33px; }
.smo-new-dimensions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.smo-new-dimensions:has(.smo-new-height[hidden]) { grid-template-columns: minmax(0,1fr); }
.smo-new-dimensions label,.smo-new-name { display: grid; gap: 5px; color: #5a708f; font-size: 11px; font-weight: 650; }
.smo-new-dimensions label > div { position: relative; }
.smo-new-stamp-dialog input:not([type="hidden"]) { display: block; width: 100%; max-width: none; height: 43px; margin: 0; padding: 10px 12px; border: 1px solid #cedbf2; border-radius: 10px; box-shadow: none; background: #fff; color: #183252; font: 650 14px/1.4 Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; }
.smo-new-dimensions input[type="number"] { padding-inline-end: 38px; }
.smo-new-dimensions input[readonly] { background: #f4f7fc; color: #71829c; }
.smo-new-dimensions small { position: absolute; inset-inline-end: 13px; top: 13px; color: #8b9db7; font-size: 10px; pointer-events: none; }
.smo-new-dimensions input[aria-invalid="true"] { border-color: #d33b57; background: #fff3f5; }
.smo-new-presets { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 9px; }
.smo-new-presets button { min-height: 29px; padding: 5px 11px; border-radius: 8px; font-size: 10px; }
.smo-new-stamp-dialog #smo-new-size-error { margin-top: 8px; color: #c62b47; font-size: 11px; }
.smo-new-name input[type="text"] { height: 39px; font-size: 12px; font-weight: 400; }
.smo-new-name input::placeholder { color: #98a8bd; }
.smo-new-preview { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 26px 24px; border-inline-start: 1px solid #e8edf7; background: radial-gradient(ellipse at 50% 40%,#fff 25%,#f1f5ff 100%); text-align: center; }
.smo-new-preview-title { display: flex; align-items: center; gap: 7px; color: #607898; font-size: 10px; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.smo-new-preview-title i { width: 6px; height: 6px; border-radius: 50%; background: #11b484; box-shadow: 0 0 0 3px #11b48418; }
.smo-new-preview-art { position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: 1; max-height: 295px; border: 1px solid #e5ecf9; border-radius: 20px; background: #fff; box-shadow: 0 12px 28px #27468b08; }
.smo-new-preview-art > svg { display: block; width: 100%; height: 100%; max-height: 295px; padding: 18px; }
.smo-new-guide { position: absolute; inset: 30px; display: grid; place-items: center; color: #adbbd4; opacity: .65; pointer-events: none; }
.smo-new-guide svg { width: 90%; height: 90%; stroke-dasharray: 3 4; stroke-width: .8; }
.smo-new-summary { display: block; padding: 7px 10px; border: 1px solid #dce6fc; border-radius: 9px; background: #fff; color: #315592; font-size: 11px; font-weight: 700; overflow-wrap: anywhere; }
.smo-new-preview p { max-width: 230px; color: #667d9e; font-size: 12px; line-height: 1.5; }
.smo-new-preview > small { max-width: 230px; color: #98a6ba; font-size: 10px; line-height: 1.5; }
.smo-new-footer { position: sticky; bottom: 0; display: flex; justify-content: flex-end; gap: 10px; padding: 17px 28px; border-top: 1px solid #e8edf7; background: #fff; }
.smo-new-footer button { min-height: 44px; padding: 11px 22px; }
.smo-new-footer .smo-new-create { display: inline-flex; align-items: center; justify-content: center; gap: 24px; border-color: #315efb; background: #315efb; color: #fff; box-shadow: 0 5px 12px #315efb24; }
.smo-new-footer .smo-new-create:hover { background: #244ee9; border-color: #244ee9; }
.smo-new-create span { font-size: 19px; line-height: 1; }
[dir="rtl"].smo-new-stamp-dialog .smo-new-create span { transform: scaleX(-1); }
@media (max-width:650px) {
  .smo-new-stamp-dialog { width: calc(100vw - 20px); max-height: calc(100dvh - 20px); border-radius: 19px; }
  .smo-new-head { padding: 20px 18px 17px; gap: 8px; }
  .smo-new-head h2 { font-size: 21px; }
  .smo-new-head p { font-size: 11px; }
  .smo-new-body { grid-template-columns: minmax(0,1fr); }
  .smo-new-settings { padding: 19px 18px; gap: 18px; }
  .smo-new-preview { padding: 19px 18px; gap: 10px; border-inline-start: 0; border-top: 1px solid #e8edf7; }
  .smo-new-preview-art { width: min(100%,240px); }
  .smo-new-preview-art > svg { max-height: 240px; padding: 12px; }
  .smo-new-preview p { max-width: none; }
  .smo-new-preview > small { max-width: 280px; }
  .smo-new-footer { padding: 12px 18px; }
  .smo-new-footer .smo-new-create { flex: 1; gap: 12px; }
  .smo-new-footer button { padding: 10px 14px; }
}
@media (prefers-reduced-motion:reduce) { .smo-new-stamp-dialog button { transition: none; } }
