dialog.photo-editor{position:fixed;inset:0;margin:auto;box-sizing:border-box;width:min(1180px,calc(100vw - 48px));height:min(860px,92dvh);max-width:100vw;max-height:100dvh;padding:0;border:1px solid #cbd5e1;border-radius:26px;background:#fff;color:#1e293b;box-shadow:0 24px 100px #0f172a55;overflow:hidden}.photo-editor::backdrop{background:#0f172ab8;backdrop-filter:blur(5px)}.photo-editor[open]{display:flex;flex-direction:column}.photo-editor-head{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:22px 26px;border-bottom:1px solid #e2e8f0;flex:none}.photo-editor-head h2{margin:0;font-size:21px;font-weight:650;letter-spacing:.02em}.photo-editor-subtitle{margin:5px 0 0;font-size:12px;line-height:1.5;color:#475569}.photo-editor button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:9px 14px;font:inherit;font-size:13px;font-weight:550;border:1px solid #cbd5e1;border-radius:9999px;background:#fff;color:#334155;cursor:pointer;transition:background .12s,border-color .12s}.photo-editor button:hover:not(:disabled){background:#eef2ff;border-color:#c7d2fe}.photo-editor button:disabled{opacity:.4;cursor:default}.photo-editor :focus-visible{outline:3px solid #4f46e5;outline-offset:3px}.photo-editor button[aria-pressed=true]{background:#eef2ff;border-color:#4f46e5;color:#3730a3;box-shadow:inset 0 0 0 1px #4f46e5}.photo-editor-body{display:grid;grid-template-columns:minmax(0,1fr) 310px;flex:1;min-height:0}.photo-editor-image-pane{display:flex;flex-direction:column;min-width:0;min-height:0;background:#f1f5f9}.photo-editor-viewport{display:flex;flex:1;min-height:0;min-width:0;overflow:auto;padding:22px;background-image:radial-gradient(#d3c6b570 .8px,transparent 0);background-size:14px 14px}.photo-editor-stage{position:relative;flex:none;margin:auto;line-height:0;box-shadow:0 6px 28px #26211d24;border-radius:2px;overflow:hidden}.photo-editor-stage canvas{display:block;width:100%;height:auto;touch-action:none;cursor:crosshair}.photo-editor-stage .photo-editor-original,.photo-editor-stage .photo-editor-overlay{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}.photo-editor-stage .photo-editor-original{z-index:3;-o-object-fit:contain;object-fit:contain;background:#f1f5f9}.photo-editor-view-tools{display:flex;align-items:center;justify-content:center;gap:7px;flex:none;padding:13px 16px;border-top:1px solid #e2e8f0;background:#f8fafc}.photo-editor-view-tools button{min-height:36px;padding:7px 12px;font-size:12px;background:#ffffffa8}.photo-editor-sidebar{box-sizing:border-box;min-height:0;padding:22px 20px;overflow:auto;border-left:1px solid #e2e8f0;background:#fff}.photo-editor-section-title{font-size:11px;letter-spacing:.12em;color:#334155;font-weight:600;margin:0 0 14px}.photo-editor-tools{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.photo-editor-tools button{justify-content:flex-start;min-height:50px;padding:11px 10px;font-size:12px;white-space:normal;text-align:left;line-height:1.3}.photo-editor-tools svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round;flex:none}.photo-editor-hint{font-size:12px;line-height:1.7;margin:15px 0;color:#475569;min-height:40px}.photo-editor-settings{display:flex;align-items:center;flex-wrap:wrap;gap:12px;padding:16px 0;border-top:1px solid #f1f5f9}.photo-editor-settings label{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;font-size:12px;font-weight:500;margin:0;color:#334155}.photo-editor-settings input{box-sizing:border-box;min-height:40px;font:inherit;font-size:14px;color:#0f172a;border:1px solid #cbd5e1;border-radius:8px;background:#fff;padding:8px;margin:0;max-width:100%}.photo-editor-settings input[type=color]{width:44px;height:40px;padding:4px}.photo-editor-settings input[type=number]{width:80px}.photo-editor-settings input[type=range]{width:150px;min-height:28px;accent-color:#4f46e5;padding:0;border:0;background:transparent}.photo-editor-settings input[type=text]{width:100%}.photo-editor-clear,.photo-editor-history{display:flex;flex-wrap:wrap;gap:7px;margin-top:12px}.photo-editor-clear button,.photo-editor-history button{min-height:36px;font-size:11px;padding:7px 9px;background:transparent}.photo-editor-history{padding-top:16px;border-top:1px solid #f1f5f9;margin-top:18px}.photo-selection-note{font-size:11px;line-height:1.8;color:#475569;margin:0 0 14px}.photo-editor-foot{margin:0;flex-wrap:nowrap;display:flex;align-items:center;justify-content:space-between;gap:22px;padding:18px 26px;border-top:1px solid #e2e8f0;background:#fff;flex:none}.photo-editor-foot p{margin:0;font-size:11px;line-height:1.7;max-width:700px;color:#475569}.photo-editor button.photo-editor-apply{min-width:150px;min-height:46px;background:linear-gradient(135deg,#6366f1,#4f46e5);color:#fff;border-color:#4f46e5;flex:none}.photo-editor button.photo-editor-apply:hover{background:linear-gradient(135deg,#4f46e5,#3730a3)}.photo-editor [hidden]{display:none!important}@media (max-width:760px){dialog.photo-editor{width:100vw;height:100dvh;max-height:100dvh;border:0;border-radius:0;margin:0;overflow:auto}.photo-editor-head{padding:max(16px,env(safe-area-inset-top)) 18px 16px}.photo-editor-head h2{font-size:19px}.photo-editor-body{display:flex;flex-direction:column;flex:none;min-height:auto}.photo-editor-image-pane{flex:none}.photo-editor-viewport{height:38dvh;min-height:220px;flex:none;padding:16px;box-sizing:border-box}.photo-editor-view-tools{padding:10px;gap:6px}.photo-editor-sidebar{overflow:visible;min-height:auto;padding:18px;border-left:0;border-top:1px solid #e2e8f0}.photo-editor-tools{grid-template-columns:repeat(4,minmax(0,1fr));gap:7px}.photo-editor-tools button{min-height:64px;flex-direction:column;justify-content:center;gap:6px;padding:8px 2px;font-size:10px}.photo-editor-hint{min-height:0;margin:12px 0}.photo-editor-settings{padding:12px 0}.photo-editor-settings label{width:auto;flex:1;min-width:190px}.photo-editor-clear,.photo-editor-history{margin-top:10px}.photo-editor-history{padding-top:12px}.photo-selection-note{margin:0 0 12px}.photo-editor-foot{position:sticky;bottom:0;z-index:5;gap:12px;padding:12px 18px max(12px,env(safe-area-inset-bottom));box-shadow:0 -4px 18px #26211d14}.photo-editor-foot p{font-size:10px}.photo-editor button.photo-editor-apply{min-width:100px;padding:10px 12px}}@media (prefers-reduced-motion:reduce){.photo-editor button{transition:none}.photo-editor::backdrop{backdrop-filter:none}}.photo-editor-sidebar>.photo-selection-note{margin:16px 0 0}.photo-editor-opening-body{display:flex;flex:1;flex-direction:column;align-items:center;justify-content:center;gap:16px;min-height:220px;background:#f8fafc;color:#475569;font-size:13px}.photo-editor-opening-spinner{width:28px;height:28px;border:2px solid #e0e7ff;border-top-color:#4f46e5;border-radius:50%;animation:photo-editor-opening-turn .8s linear infinite}@keyframes photo-editor-opening-turn{to{transform:rotate(1turn)}}@media (prefers-reduced-motion:reduce){.photo-editor-opening-spinner{animation:none;border-color:#c7d2fe}}.photo-editor-prompt{display:block;font-size:11px;color:#475569;margin:0 0 20px}.photo-editor-prompt textarea{width:100%;box-sizing:border-box;min-height:96px;max-height:180px;margin-top:8px;padding:10px 12px;font:inherit;font-size:13px;line-height:1.6;border:1px solid #cbd5e1;border-radius:16px;background:#fff;resize:vertical}.photo-editor-prompt textarea::-moz-placeholder{font-size:12px;color:#64748b}.photo-editor-prompt textarea::placeholder{font-size:12px;color:#64748b}.photo-editor-head{padding:10px 14px}.photo-editor-head h2{font-size:17px}.photo-editor-subtitle{display:none}.photo-editor-viewport{padding:0;background-image:none;background-color:transparent}.photo-editor-stage{border-radius:0;box-shadow:none}.photo-editor-sidebar{display:flex;flex-direction:column;padding:0;overflow:hidden}.photo-editor-sidebar-content{flex:1;min-height:0;overflow:auto;padding:52px 16px 16px;position:relative}.photo-editor button.photo-editor-dismiss{position:absolute;top:6px;right:8px;z-index:4;width:32px;min-height:32px;padding:0;border:0;background:transparent;box-shadow:none;font-size:24px;font-weight:400;line-height:1;color:#475569}.photo-editor button.photo-editor-dismiss:hover{background:#f1f5f9;color:#0f172a}.photo-editor-opening>.photo-editor-dismiss{top:10px;right:12px}.photo-editor-sidebar .photo-editor-view-tools{display:grid;grid-template-columns:1fr 1fr;padding:14px 0 0;margin-top:14px;background:transparent}.photo-editor-sidebar .photo-editor-foot{padding:12px 16px;gap:0;box-shadow:none;flex:none}.photo-editor-sidebar .photo-editor-foot p{display:none}.photo-editor-sidebar .photo-editor-apply{width:100%;min-width:0}@media (max-width:760px){.photo-editor-head{padding-top:max(10px,env(safe-area-inset-top))}.photo-editor-viewport{min-height:0;padding:0}.photo-editor-sidebar{overflow:visible}.photo-editor-sidebar-content{overflow:visible;flex:none}.photo-editor-sidebar .photo-editor-foot{position:static;padding-bottom:max(12px,env(safe-area-inset-bottom))}}.photo-editor-sidebar .photo-editor-submit-alert{width:100%;margin:0 0 10px;padding:12px;border:1px solid #fecaca;border-radius:8px;background:#fef2f2;color:#991b1b;font-size:14px;font-weight:600;line-height:1.6}.photo-editor-opening{height:min(280px,90dvh)!important;width:min(360px,90vw)!important}.photo-editor-sidebar .photo-editor-foot{flex-direction:column}.photo-editor button.photo-editor-dismiss{width:44px;min-height:44px}.photo-editor-viewport{overscroll-behavior:contain}.photo-editor-viewport canvas:focus-visible{outline-offset:-3px}@media (hover:hover) and (pointer:fine){.free-image-media:not(:hover):not(:focus-within) .free-image-media-actions{opacity:0;pointer-events:none}}.free-image-workspace{container:free-image-workspace/inline-size}.free-image-task-grid,.free-image-workspace-layout{display:grid;grid-template-columns:minmax(0,1fr);align-items:start}.free-image-workspace-layout{gap:1.5rem}.free-image-gallery{container:free-image-gallery/inline-size}.free-image-task-grid{gap:.875rem}@media (prefers-reduced-motion:no-preference){.free-image-task-grid>article[data-generating]:after{content:"";position:absolute;inset-inline:1rem;bottom:.25rem;height:3px;border-radius:9999px;pointer-events:none;background:#eef2ff linear-gradient(90deg,transparent,var(--brand),transparent) no-repeat;background-size:35% 100%;animation:free-image-generation-sweep 1.8s linear infinite}@keyframes free-image-generation-sweep{0%{background-position:-55% 0}to{background-position:155% 0}}}@container free-image-workspace (min-width: 45rem){.free-image-workspace-layout{grid-template-columns:minmax(18rem,.9fr) minmax(0,1.1fr)}}@container free-image-workspace (min-width: 56rem){.free-image-workspace-layout{grid-template-columns:clamp(19rem,31%,25rem) minmax(0,1fr)}}@container free-image-gallery (min-width: 34rem){.free-image-task-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}