:root{--accent: #55d6a4;--accent-strong: #79e6bb;--accent-soft: rgba(85, 214, 164, .12);--app-bg: #101211;--danger: #ff8a78;--line: #2e3733;--line-strong: #43514b;--muted: #98a59e;--muted-strong: #c4cec8;--panel: #181b1a;--panel-raised: #202522;--panel-soft: #151817;--shadow: 0 24px 70px rgba(0, 0, 0, .38);--text: #edf3ef;color:var(--text);background:var(--app-bg);color-scheme:dark;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;-moz-osx-font-smoothing:grayscale}body{min-width:320px;min-height:100vh;margin:0;background:var(--app-bg)}button,label,select,input{-webkit-tap-highlight-color:transparent}button,input,select{font:inherit}button:focus-visible,label:focus-within,select:focus-visible,input:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.app-shell{min-height:100vh;padding:32px;box-sizing:border-box}.app-shell.is-empty{display:grid;place-items:center;padding:40px}.empty-upload-shell{display:grid;gap:18px;width:min(100%,720px)}.loaded-shell{max-width:1280px;margin:0 auto}.app-toolbar{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin-bottom:22px;padding-bottom:18px;border-bottom:1px solid var(--line)}.eyebrow{margin:0 0 8px;color:var(--accent);font-size:.75rem;font-weight:800;text-transform:uppercase}h1{margin:0;color:#fff;font-size:1.75rem;line-height:1.1}p{margin:0;color:var(--muted);font-size:1rem;line-height:1.55}.file-actions{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:14px;min-width:0}.current-file{max-width:min(42vw,440px);min-width:0;overflow-wrap:anywhere;color:var(--muted-strong);font-size:.9375rem;text-align:right}.upload-panel{width:100%;max-width:720px}.drop-zone{display:flex;align-items:center;justify-content:space-between;gap:24px;min-height:210px;aspect-ratio:2.35 / 1;padding:32px;border:1px dashed var(--line-strong);border-radius:8px;background:var(--panel);box-shadow:inset 0 1px #ffffff0a,0 18px 48px #00000038;box-sizing:border-box;transition:border-color .16s ease,background-color .16s ease,box-shadow .16s ease}.empty-upload-shell .drop-zone{min-height:260px;aspect-ratio:2.05 / 1;padding:40px}.drop-zone.is-dragging{border-color:var(--accent);background:var(--panel-raised);box-shadow:inset 0 0 0 1px #55d6a447,0 24px 70px #00000052}.upload-copy{min-width:0}.upload-copy h2{margin:0 0 10px;color:#fff;font-size:1.5rem;line-height:1.15}.upload-copy p{max-width:420px}.file-button{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;min-width:112px;min-height:44px;padding:0 18px;border:1px solid transparent;border-radius:8px;background:var(--accent);color:#07120d;cursor:pointer;font-weight:800;box-sizing:border-box;transition:background-color .14s ease,transform .14s ease}.file-button:hover{background:var(--accent-strong)}.file-button:active{transform:translateY(1px)}.file-button input{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap}.status{max-width:760px;margin:16px 0 0;color:var(--muted-strong)}.empty-upload-shell .status{margin:0;text-align:center}.status.error{color:var(--danger)}.open-file-button{min-height:40px;padding:0 14px;border:1px solid var(--line-strong);border-radius:8px;background:var(--panel-raised);color:var(--text);cursor:pointer;font-weight:800;white-space:nowrap;box-sizing:border-box;transition:border-color .14s ease,background-color .14s ease}.open-file-button:hover,.open-file-button:focus-visible{border-color:var(--accent);background:#27312d}.workbench{display:grid;align-items:start;grid-template-columns:minmax(0,1fr);gap:22px}.workbench.has-controls{grid-template-columns:minmax(0,1fr) minmax(300px,360px)}.preview-panel{min-width:0}.canvas-frame{position:relative;width:100%;min-height:360px;max-height:min(68vh,680px);aspect-ratio:var(--preview-aspect-ratio, 1.6);overflow:hidden;border:1px solid var(--line);border-radius:8px;background:var(--panel-soft);box-shadow:inset 0 1px #ffffff0a,var(--shadow)}.canvas-frame canvas{position:absolute;top:0;right:0;bottom:0;left:0;display:block;width:100%;height:100%}.preview-error{position:absolute;top:0;right:0;bottom:0;left:0;display:grid;place-items:center;padding:24px;background:#151817eb;color:var(--danger);font-weight:800;text-align:center;box-sizing:border-box;z-index:1}.canvas-frame.has-error canvas{opacity:.16}.file-overlay{position:fixed;top:0;right:0;bottom:0;left:0;z-index:10;display:grid;place-items:center;padding:32px;background:#040605b8;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);box-sizing:border-box}.file-dialog{position:relative;width:min(100%,720px)}.file-dialog .upload-panel{max-width:none}.file-dialog .drop-zone{box-shadow:var(--shadow)}.close-button{position:absolute;top:12px;right:12px;z-index:1;display:inline-grid;place-items:center;width:32px;height:32px;border:1px solid transparent;border-radius:8px;background:#ffffff0a;color:var(--muted);cursor:pointer;font-weight:800;line-height:1;opacity:.78;transition:background-color .14s ease,color .14s ease,opacity .14s ease}.close-button:hover,.close-button:focus-visible{background:#ffffff14;color:var(--text);opacity:1}.controls-panel{padding:20px;border:1px solid var(--line);border-radius:8px;background:var(--panel);box-shadow:inset 0 1px #ffffff0a,0 18px 48px #00000038}.controls-header{margin-bottom:18px}.controls-header h2{margin:0 0 4px;color:#fff;font-size:1.125rem;line-height:1.2}.controls-header p{overflow-wrap:anywhere;color:var(--muted);font-size:.9375rem}.field-group{display:grid;gap:8px;margin-bottom:16px}.field-group label,.number-control>label{color:var(--muted-strong);font-size:.8125rem;font-weight:800}.field-group select,.number-control input[type=number]{width:100%;min-height:40px;border:1px solid var(--line-strong);border-radius:6px;background:var(--panel-raised);color:var(--text);box-sizing:border-box}.field-group select,.number-control input[type=number]{padding:0 10px}.mode-toggle{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin-bottom:16px}.mode-toggle button,.trigger-button{min-height:40px;border:1px solid var(--line-strong);border-radius:6px;background:var(--panel-raised);color:var(--text);cursor:pointer;font-weight:800;transition:border-color .14s ease,background-color .14s ease,color .14s ease}.mode-toggle button:hover,.trigger-button:hover{border-color:var(--accent)}.mode-toggle button.active,.trigger-button:active{border-color:#55d6a4b8;background:var(--accent-soft);color:#fff}.mode-toggle button:disabled,.field-group select:disabled{cursor:not-allowed;opacity:.48}.empty-controls{padding:14px;border:1px solid var(--line);border-radius:8px;background:var(--panel-soft);color:var(--muted)}.input-list{display:grid;gap:12px}.switch-row{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:44px;padding:10px 0;color:var(--text);font-weight:800}.switch-row input{width:44px;height:24px;accent-color:var(--accent)}.number-control{display:grid;gap:8px}.number-control div{display:grid;grid-template-columns:minmax(0,1fr) 84px;gap:8px}.number-control input[type=range]{width:100%;min-width:0;accent-color:var(--accent)}.trigger-button{width:100%}@media(max-width:980px){.workbench.has-controls{grid-template-columns:1fr}.canvas-frame{min-height:320px}}@media(max-width:760px){.app-shell,.app-shell.is-empty{padding:20px}.app-toolbar{align-items:stretch;flex-direction:column;gap:16px}.file-actions{align-items:center;justify-content:flex-start;gap:12px;width:100%}.current-file{flex:0 1 auto;max-width:min(100%,360px);text-align:left}h1{font-size:1.5rem}.drop-zone,.empty-upload-shell .drop-zone{align-items:stretch;flex-direction:column;justify-content:center;min-height:220px;aspect-ratio:auto;padding:26px}.file-button{width:min(100%,220px)}.workbench,.workbench.has-controls{grid-template-columns:1fr}.canvas-frame{height:clamp(280px,56vh,430px);min-height:0;max-height:none;aspect-ratio:auto}.file-overlay{padding:20px}.close-button{top:10px;right:10px}}@media(max-width:480px){.app-shell,.app-shell.is-empty{padding:16px}.file-actions{align-items:stretch;flex-direction:column}.open-file-button,.file-button{width:100%}.drop-zone,.empty-upload-shell .drop-zone{min-height:208px;padding:24px}.upload-copy h2{font-size:1.375rem}.number-control div{grid-template-columns:1fr}}
