dialog.kzto-scheme-dialog {
 box-sizing:border-box; position:fixed; inset:0; width:min(1000px,calc(100vw - 40px)); max-width:none;
 max-height:90dvh; margin:auto; padding:0; border:1px solid #e2e9e7; border-radius:12px;
 background:#fff; color:#1d302b; box-shadow:0 24px 80px rgb(0 0 0 / 24%); overflow:hidden;
}
.kzto-scheme-dialog::backdrop { background:rgb(11 24 23 / 62%); }
.kzto-scheme-dialog .kzto-scheme-header { position:relative; padding:24px 56px 18px; border-bottom:1px solid #edf1ef; }
.kzto-scheme-dialog .kzto-scheme-heading { margin:0; padding:0; text-align:center; font-size:22px; line-height:1.3; font-weight:600; }
.kzto-scheme-dialog .kzto-scheme-close { position:absolute; right:12px; top:8px; display:flex; align-items:center; justify-content:center; width:40px; height:40px; padding:0; border:0; border-radius:5px; background:transparent; color:#53646b; box-shadow:none; font:400 30px/40px Arial,sans-serif; cursor:pointer; }
.kzto-scheme-dialog .kzto-scheme-close:hover { background:#f1f5f4; color:#20332f; }
.kzto-scheme-dialog .kzto-scheme-view { box-sizing:border-box; display:flex; align-items:center; justify-content:center; padding:24px; max-height:calc(90dvh - 145px); min-height:140px; overflow:auto; overscroll-behavior:contain; background:#fff; }
.kzto-scheme-dialog .kzto-scheme-image { display:block; width:auto; height:auto; max-width:100%; max-height:calc(90dvh - 193px); object-fit:contain; border:0; margin:0; }
.kzto-scheme-dialog .kzto-scheme-view.is-zoomed { display:block; }
.kzto-scheme-dialog .kzto-scheme-view.is-zoomed .kzto-scheme-image { max-width:none; max-height:none; width:auto; height:auto; }
.kzto-scheme-dialog .kzto-scheme-footer { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:14px 24px; border-top:1px solid #edf1ef; }
.kzto-scheme-dialog .kzto-scheme-zoom { margin:0; padding:8px 13px; border:1px solid #d9e4e0; border-radius:5px; color:#007f79; background:#fff; font-family:inherit; font-size:13px; font-weight:500; line-height:1.4; cursor:pointer; }
.kzto-scheme-dialog .kzto-scheme-zoom:hover { background:#f2f8f6; }
.kzto-scheme-dialog .kzto-scheme-original { color:#007f79; font-size:13px; text-decoration:none; }
.kzto-scheme-dialog .kzto-scheme-original:hover { text-decoration:underline; }
.kzto-scheme-dialog :is(button,a):focus-visible { outline:2px solid #009e97; outline-offset:3px; }
.kzto-scheme-dialog .kzto-scheme-error { margin:0; color:#697873; font-size:14px; text-align:center; }
@media(max-width:600px) {
 dialog.kzto-scheme-dialog { width:calc(100vw - 24px); max-height:92dvh; border-radius:10px; }
 .kzto-scheme-dialog .kzto-scheme-header { padding:24px 46px 18px 18px; }
 .kzto-scheme-dialog .kzto-scheme-heading { font-size:18px; }
 .kzto-scheme-dialog .kzto-scheme-view { padding:14px; max-height:calc(92dvh - 160px); }
 .kzto-scheme-dialog .kzto-scheme-image { max-height:calc(92dvh - 188px); }
 .kzto-scheme-dialog .kzto-scheme-footer { padding:12px 14px; gap:10px; }
}

.kzto-scheme-dialog [hidden] { display:none !important; }

/* One quiet magnifier control replaces text actions. */
.kzto-scheme-dialog .kzto-scheme-footer { justify-content:center; }
.kzto-scheme-dialog .kzto-scheme-zoom { display:inline-flex; align-items:center; justify-content:center; width:40px; height:40px; padding:0; border:0; border-radius:50%; background:#f2f6f5; color:#405c54; }
.kzto-scheme-dialog .kzto-scheme-zoom:hover { background:#e8f1ee; color:#007f79; }
.kzto-scheme-dialog .kzto-scheme-zoom svg { display:block; pointer-events:none; }
.kzto-scheme-dialog .kzto-scheme-zoom[aria-pressed="true"] .kzto-scheme-plus { display:none; }

/* Zoom factors are relative to the fitted drawing, not its natural pixel size. */
.kzto-scheme-dialog .kzto-scheme-scale { min-width:40px; font-size:12px; line-height:1.4; color:#697873; font-variant-numeric:tabular-nums; }
.kzto-scheme-dialog .kzto-scheme-zoom[aria-pressed="true"] .kzto-scheme-plus { display:block; }
.kzto-scheme-dialog .kzto-scheme-zoom[data-reset="true"] .kzto-scheme-plus { display:none; }
.kzto-scheme-dialog .kzto-scheme-zoom:disabled { opacity:.4; cursor:wait; }
