:root{color:#0d0d0d;background:#fff;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;--ink: #0d0d0d;--muted: #5f6368;--subtle: #8f949a;--line: #e3e3e3;--line-strong: #cfcfcf;--surface: #ffffff;--surface-soft: #f7f7f5;--surface-muted: #f1f1ef;--openai-green: #10a37f;--openai-green-dark: #0c8065;--warning: #8a5a00;--danger: #a31616;--shadow-soft: 0 18px 60px rgba(0, 0, 0, .08);--shadow-focus: 0 0 0 4px rgba(16, 163, 127, .16)}*{box-sizing:border-box}body{margin:0;min-width:320px;min-height:100vh}button,input,textarea{font:inherit}button,a{-webkit-tap-highlight-color:transparent}.app-shell{min-height:100vh;padding:28px;background:linear-gradient(180deg,#fff,#f7f7f5)}.studio-shell{display:grid;gap:20px;width:min(1280px,100%);margin:0 auto}.studio-header{display:flex;align-items:center;justify-content:space-between;gap:18px;min-height:64px}.workspace{display:grid;grid-template-columns:minmax(340px,440px) minmax(0,1fr);gap:16px;min-height:calc(100vh - 140px)}.control-panel,.result-panel{border:1px solid var(--line);background:var(--surface)}.control-panel{display:flex;flex-direction:column;gap:18px;align-self:start;min-height:100%;padding:20px;border-radius:8px;box-shadow:var(--shadow-soft)}.brand-row{display:flex;align-items:center;gap:12px}.brand-mark{display:grid;place-items:center;width:42px;height:42px;flex:0 0 42px;border-radius:8px;color:#fff;background:var(--ink)}.eyebrow,.meta-label{margin:0;color:var(--muted);font-size:11px;font-weight:650;letter-spacing:0;text-transform:uppercase}h1,h2{margin:0;color:var(--ink);letter-spacing:0}h1{font-size:clamp(24px,3vw,34px);line-height:1.05;font-weight:650}h2{font-size:24px;line-height:1.2}.field{display:grid;gap:10px}.field-label,.choice-group legend{color:var(--ink);font-size:14px;font-weight:650}textarea{width:100%;min-height:220px;resize:vertical;border:1px solid var(--line);border-radius:8px;padding:14px;color:var(--ink);background:var(--surface-soft);line-height:1.55;outline:none;transition:border-color .16s ease,box-shadow .16s ease}input{width:100%;min-height:44px;border:1px solid var(--line);border-radius:8px;padding:0 12px;color:var(--ink);background:var(--surface-soft);outline:none;transition:border-color .16s ease,box-shadow .16s ease,background .16s ease}input:focus{border-color:var(--openai-green);background:#fff;box-shadow:var(--shadow-focus)}textarea:focus{border-color:var(--openai-green);box-shadow:var(--shadow-focus)}textarea::placeholder{color:var(--subtle)}.choice-group{display:grid;gap:9px;min-width:0;margin:0;padding:0;border:0}.segmented-grid{display:grid;gap:8px}.ratio-grid,.quality-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.segment{appearance:none;-webkit-appearance:none;min-height:42px;border:1px solid var(--line);border-radius:8px;color:var(--muted);background:var(--surface-soft);cursor:pointer;line-height:1;outline:none;text-align:center;-webkit-user-select:none;user-select:none;transition:color .16s ease,background .16s ease,border-color .16s ease,box-shadow .16s ease}.segment:hover:not(:disabled){border-color:var(--line-strong);background:#fff}.segment:focus{color:var(--muted);background:var(--surface-soft);border-color:var(--line);box-shadow:none}.segment:focus-visible{color:var(--muted);background:var(--surface-soft);border-color:var(--openai-green);box-shadow:var(--shadow-focus)}.segment:active:not(:disabled):not(.active){color:var(--muted);background:#fff;border-color:var(--line-strong)}.segment.active{color:#fff;border-color:var(--ink);background:var(--ink)}.segment.active:hover:not(:disabled),.segment.active:focus,.segment.active:active:not(:disabled){color:#fff;border-color:var(--ink);background:var(--ink)}.segment.active:focus-visible{color:#fff;border-color:var(--ink);background:var(--ink);box-shadow:var(--shadow-focus)}.alert{display:grid;grid-template-columns:auto 1fr;gap:9px;align-items:start;border:1px solid #f2b8b5;border-radius:8px;padding:12px;color:var(--danger);background:#fff6f6;line-height:1.45}.primary-action,.download-action,.open-action,.ghost-action{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:46px;border-radius:8px;font-weight:780;text-decoration:none}.primary-action{width:100%;border:0;color:#fff;background:var(--ink);cursor:pointer;transition:background .16s ease,transform .16s ease,opacity .16s ease}.primary-action:hover:not(:disabled){background:#2a2a2a}.primary-action.compact{width:auto;min-width:112px;padding:0 18px}button:disabled{cursor:not-allowed;opacity:.56}.security-note{margin:-6px 0 0;color:var(--warning);font-size:13px;line-height:1.45}.result-panel{display:grid;min-height:620px;border-radius:8px;overflow:hidden;box-shadow:var(--shadow-soft)}.empty-state,.result-card{min-height:100%}.empty-state{display:grid;place-items:center;align-content:center;gap:12px;padding:28px;text-align:center;background:linear-gradient(180deg,#fff,#f7f7f5),repeating-linear-gradient(45deg,rgba(13,13,13,.035) 0 1px,transparent 1px 18px)}.empty-state p{max-width:420px;margin:0;color:var(--muted);line-height:1.5}.empty-icon{display:grid;place-items:center;width:72px;height:72px;border:1px solid var(--line);border-radius:8px;color:var(--openai-green);background:var(--surface)}.busy{color:var(--openai-green)}.result-card{display:flex;flex-direction:column;background:#fff}.image-frame{position:relative;display:grid;place-items:start stretch;flex:1 0 auto;min-height:0;padding:0;overflow:hidden;background:#fff}.image-frame img{display:block;width:100%;height:auto;max-height:none;border-radius:0;object-fit:contain;transform-origin:center;transition:transform .18s ease;box-shadow:none}.image-preview-button{appearance:none;-webkit-appearance:none;display:block;width:100%;max-height:none;border:0;border-radius:0;padding:0;background:transparent;cursor:zoom-in;line-height:0;outline:none}.image-preview-button:focus-visible{box-shadow:var(--shadow-focus)}.zoom-action,.zoom-value{appearance:none;-webkit-appearance:none;display:inline-flex;align-items:center;justify-content:center;min-width:32px;height:30px;border:0;border-radius:6px;color:var(--ink);background:transparent;cursor:pointer;font-size:13px;font-weight:700;outline:none;transition:background .16s ease,color .16s ease,opacity .16s ease,box-shadow .16s ease}.zoom-value{min-width:54px;color:var(--muted)}.zoom-action:hover:not(:disabled),.zoom-value:hover{background:var(--surface-muted)}.zoom-action:focus-visible,.zoom-value:focus-visible{box-shadow:var(--shadow-focus)}.result-meta{display:grid;grid-template-columns:minmax(0,1fr) auto;flex:0 0 auto;gap:12px;align-items:center;padding:14px;border-top:1px solid var(--line);background:#fff}.meta-cluster,.result-actions{display:flex;align-items:center;gap:12px}.meta-cluster{min-width:0;flex-wrap:wrap}.meta-cluster>div{min-width:92px;padding-right:10px;border-right:1px solid var(--line)}.meta-cluster>div:last-child{border-right:0}.meta-value{margin:2px 0 0;color:var(--ink);font-weight:760}.download-action{border:0;padding:0 16px;color:#fff;background:var(--openai-green);cursor:pointer;transition:background .16s ease,opacity .16s ease}.download-action:hover:not(:disabled){background:var(--openai-green-dark)}.open-action,.ghost-action{min-height:46px;padding:0 14px;border:1px solid var(--line);color:var(--ink);background:var(--surface-soft);cursor:pointer}.open-action:hover,.ghost-action:hover:not(:disabled){border-color:var(--line-strong);background:#fff}.endpoint-pill{display:inline-flex;align-items:center;gap:8px;max-width:min(360px,44vw);min-height:34px;padding:0 12px;border:1px solid var(--line);border-radius:999px;color:var(--muted);background:var(--surface)}.endpoint-pill span{width:7px;height:7px;flex:0 0 7px;border-radius:999px;background:var(--subtle)}.endpoint-pill.configured span{background:var(--openai-green)}.endpoint-pill p{overflow:hidden;margin:0;font-size:13px;font-weight:600;text-overflow:ellipsis;white-space:nowrap}.submit-row{margin-top:auto}.header-actions{display:flex;align-items:center;gap:10px}.settings-action,.icon-action{appearance:none;-webkit-appearance:none;display:inline-flex;align-items:center;justify-content:center;border:1px solid var(--line);border-radius:8px;color:var(--ink);background:var(--surface);cursor:pointer;outline:none;transition:background .16s ease,border-color .16s ease,box-shadow .16s ease}.settings-action{gap:7px;min-height:34px;padding:0 12px;font-size:13px;font-weight:700}.icon-action{width:36px;height:36px;flex:0 0 36px}.settings-action:hover,.icon-action:hover{border-color:var(--line-strong);background:var(--surface-soft)}.settings-action:focus-visible,.icon-action:focus-visible{box-shadow:var(--shadow-focus)}.settings-backdrop{position:fixed;inset:0;z-index:20;display:grid;place-items:center;padding:18px;background:#0d0d0d4d;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}.settings-panel{display:grid;gap:20px;width:min(520px,100%);border:1px solid var(--line);border-radius:8px;padding:20px;background:#fff;box-shadow:0 24px 90px #0000002e}.settings-header{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.settings-form{display:grid;gap:16px}.settings-note{margin:-4px 0 0;color:var(--muted);font-size:13px;line-height:1.45}.settings-actions{display:flex;justify-content:flex-end;gap:10px}.fullscreen-preview{position:fixed;inset:0;z-index:30;display:grid;background:radial-gradient(circle at 50% 0%,rgba(255,255,255,.1),transparent 32%),#0a0a0af0}.fullscreen-stage{display:grid;place-items:center;min-width:0;min-height:0;padding:72px 24px 28px;overflow:hidden;cursor:default;touch-action:none;-webkit-user-select:none;user-select:none}.fullscreen-stage.draggable{cursor:grab}.fullscreen-stage.draggable:active{cursor:grabbing}.fullscreen-stage img{display:block;max-width:min(100%,1600px);max-height:calc(100vh - 110px);border-radius:8px;object-fit:contain;transform-origin:center;transition:transform .12s ease;will-change:transform;box-shadow:0 28px 90px #0000006b,0 0 0 1px #ffffff24}.fullscreen-toolbar{position:fixed;top:max(16px,env(safe-area-inset-top));right:max(16px,env(safe-area-inset-right));z-index:31;display:inline-flex;align-items:center;gap:5px;min-height:42px;padding:5px;border:1px solid rgba(255,255,255,.16);border-radius:8px;background:#ffffffeb;box-shadow:0 18px 60px #00000040;-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px)}.fullscreen-toolbar .zoom-action,.fullscreen-toolbar .zoom-value,.fullscreen-toolbar .preview-close-action{height:32px}.fullscreen-toolbar .preview-close-action{width:32px;min-height:32px;flex:0 0 32px;border:0;background:transparent}.fullscreen-toolbar .preview-close-action:hover{background:var(--surface-muted)}.spin{animation:spin .92s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}@media(max-width:920px){.app-shell{padding:18px}.studio-header{align-items:flex-start;flex-direction:column}.header-actions{width:100%;justify-content:space-between}.workspace{grid-template-columns:1fr;min-height:auto}.control-panel{position:static}.result-panel{min-height:520px}.result-meta{grid-template-columns:1fr}.result-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}}@media(max-width:560px){.app-shell{padding:12px}.control-panel{padding:16px}h1{font-size:26px}.quality-grid,.ratio-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.endpoint-pill{max-width:100%}.header-actions,.settings-actions{align-items:stretch;flex-direction:column}.endpoint-pill,.settings-action,.settings-actions .ghost-action,.settings-actions .primary-action{width:100%}.result-panel{min-height:440px}.result-meta,.result-actions{gap:10px}.meta-cluster{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));width:100%}.meta-cluster>div{min-width:0;padding-right:0;border-right:0}.download-action,.open-action,.ghost-action{width:100%}.image-frame{align-content:start}.fullscreen-stage{padding:70px 10px 18px}.fullscreen-stage img{max-width:100%;max-height:calc(100vh - 96px)}.fullscreen-toolbar{left:max(10px,env(safe-area-inset-left));right:max(10px,env(safe-area-inset-right));justify-content:center}}@media(max-width:430px){.brand-row{align-items:flex-start}.meta-cluster,.result-actions{grid-template-columns:1fr}.result-meta{padding:12px}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}}
