.customori-canvas-preview{position:relative;display:grid;gap:14px;margin-top:20px;padding:16px;border:1px solid rgba(31,31,31,.14);border-radius:18px;background:#fff}
.customori-canvas-preview__close{display:none;position:absolute;top:12px;right:12px;z-index:3;width:42px;height:42px;padding:0;border:1px solid rgba(31,31,31,.18);border-radius:50%;background:#fff;color:#171717;font:inherit;font-size:1.55rem;line-height:1;cursor:pointer;place-items:center;box-shadow:0 4px 14px rgba(31,31,31,.12)}
.customori-canvas-preview__close:hover{border-color:#171717}
.customori-canvas-preview__close:focus-visible{outline:3px solid rgba(18,103,214,.25);outline-offset:2px}
.customori-canvas-preview__header{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start;gap:6px 12px}
.customori-canvas-preview__header h3{margin:0;font-size:1.05rem}
.customori-canvas-preview__header p{grid-column:1/-1;margin:0;color:#6c6c6c;font-size:.86rem}
.customori-canvas-preview__badge{padding:5px 8px;border-radius:999px;background:#fff2c7;color:#634c00;font-size:.68rem;font-weight:700;letter-spacing:.04em;text-transform:uppercase}
.customori-canvas-preview__stage{position:relative;width:100%;max-width:560px;margin-inline:auto;overflow:hidden;border-radius:16px;background:#f5f2ec;box-shadow:inset 0 0 0 1px rgba(31,31,31,.08);touch-action:none}
.customori-canvas-preview canvas{display:block;width:100%;aspect-ratio:1;cursor:grab;outline:none}
.customori-canvas-preview canvas:active{cursor:grabbing}
.customori-canvas-preview canvas:focus-visible{box-shadow:inset 0 0 0 3px #1267d6}
.customori-canvas-preview__ai-result{display:block;width:100%;height:auto;aspect-ratio:1;object-fit:contain;background:#f5f2ec}
.customori-canvas-preview__ai-result[hidden]{display:none}
.customori-canvas-preview.has-ai-result .customori-canvas-preview__controls{display:none}
.customori-canvas-preview__controls{display:flex;flex-wrap:wrap;gap:10px;justify-content:center}
.customori-canvas-preview__controls button{display:grid;place-items:center;width:46px;height:46px;min-width:46px;padding:0;border:1px solid rgba(31,31,31,.2);border-radius:50%;background:#fff;color:#171717;cursor:pointer;transition:border-color .18s ease,background-color .18s ease,transform .18s ease}
.customori-canvas-preview__controls button svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;pointer-events:none}
.customori-canvas-preview__controls button:hover{border-color:#171717;background:#f7f5f1;transform:translateY(-1px)}
.customori-canvas-preview__controls button:active{transform:translateY(0)}
.customori-canvas-preview__controls button:focus-visible{outline:3px solid rgba(18,103,214,.25);outline-offset:2px}
.customori-canvas-preview__final-button{max-width:560px;margin-inline:auto}
.customori-canvas-preview__final-button svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.customori-canvas-preview__status{min-height:1.35em;margin:0;text-align:center;color:#646464;font-size:.82rem}
.customori-canvas-preview__status[data-state=loading]{color:#7a5800}
.customori-canvas-preview__status[data-state=success]{color:#16703a}
.customori-canvas-preview__status[data-state=error]{color:#a01d1d}
.customori-canvas-preview[hidden]{display:none}
.tracker-main__media.is-canvas-mode>.customori-canvas-preview{width:100%;margin-top:0;box-sizing:border-box}
.tracker-main__media.is-canvas-mode .customori-canvas-preview__close{display:grid}
.tracker-main__media.is-canvas-mode .customori-canvas-preview__header{padding-right:48px}
.tracker-main__media.is-canvas-mode .customori-canvas-preview__stage{max-width:none}
.customori-final-preview{position:fixed;inset:0;width:100vw;height:100dvh;max-width:none;max-height:none;margin:0;padding:0;border:0;border-radius:0;background:#141614;color:#fff;overflow:hidden}
.customori-final-preview::backdrop{background:rgba(10,11,10,.9);backdrop-filter:blur(4px)}
.customori-final-preview__shell{display:grid;grid-template-rows:minmax(0,1fr) auto;width:100%;height:100%}
.customori-final-preview__stage{display:grid;place-items:center;min-height:0;padding:28px 28px 12px;overflow:auto}
.customori-final-preview__stage img{display:block;width:auto;height:auto;max-width:min(100%,1100px);max-height:calc(100dvh - 130px);object-fit:contain;border-radius:12px;background:#f5f2ec;box-shadow:0 24px 70px rgba(0,0,0,.35)}
.customori-final-preview__close{position:fixed;top:max(18px,env(safe-area-inset-top));right:max(18px,env(safe-area-inset-right));z-index:2;display:grid;place-items:center;width:52px;height:52px;padding:0;border-radius:50%;background:#fff;color:#171717;box-shadow:0 8px 28px rgba(0,0,0,.24)}
.customori-final-preview__close svg{width:25px;height:25px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round}
.customori-final-preview__footer{display:flex;justify-content:center;padding:12px max(20px,env(safe-area-inset-right)) max(20px,env(safe-area-inset-bottom));background:#141614}
.customori-final-preview__order{width:min(100%,320px);max-width:320px;margin:0;background:var(--color-accent);color:#fff;font-size:18px}
.customori-final-preview__order:hover{background:#fff;color:#171717}
@media(max-width:749px){.customori-canvas-preview{padding:12px;border-radius:14px}.customori-canvas-preview__controls{gap:8px}.customori-canvas-preview__controls button{width:44px;height:44px;min-width:44px}.tracker-main__media.is-canvas-mode .customori-canvas-preview__header{padding-right:44px}.customori-final-preview__stage{padding:68px 12px 8px}.customori-final-preview__stage img{max-height:calc(100dvh - 150px);border-radius:8px}.customori-final-preview__close{width:46px;height:46px}.customori-final-preview__footer{padding-inline:12px}.customori-final-preview__order{width:min(100%,280px);font-size:17px}}
@media(prefers-reduced-motion:reduce){.customori-canvas-preview *{scroll-behavior:auto!important}.customori-canvas-preview__controls button{transition:none}}
