.ph-root{display:grid;grid-template-columns:210px 1fr 290px;grid-template-areas:"tools stage inspector";grid-gap:12px;gap:12px;min-height:calc(100vh - 168px);max-width:100%}.ph-tools{grid-area:tools;padding:14px;border-radius:14px;display:flex;flex-direction:column;gap:6px;max-height:calc(100vh - 200px);overflow-y:auto}.ph-inspector h3,.ph-sheet-body h3,.ph-tools h3{margin:0 0 4px;font-size:11px;text-transform:uppercase;letter-spacing:.08em;color:var(--text-muted);font-weight:600}.ph-tool{all:unset;box-sizing:border-box;display:flex;align-items:center;gap:10px;padding:9px 10px;border-radius:8px;background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.08);cursor:pointer;font-size:12.5px;color:var(--text-secondary);transition:background .12s ease,border-color .12s ease,color .12s ease}.ph-tool:hover:not([disabled]){background:rgba(139,92,246,.1);color:var(--text-primary);border-color:rgba(139,92,246,.3)}.ph-tool:focus-visible{outline:2px solid var(--acc-ring);outline-offset:2px}.ph-tool.is-on{background:rgba(139,92,246,.22);border-color:rgba(139,92,246,.55);color:#ddd6fe}.ph-tool[disabled]{opacity:.4;cursor:not-allowed}.ph-tool-glyph{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:6px;background:rgba(99,102,241,.18);color:var(--accent-violet);flex:0 0 auto}.ph-tool-pair{display:grid;grid-template-columns:1fr 1fr;grid-gap:6px;gap:6px}.ph-tool-pair .ph-tool{gap:7px}.ph-tool-divider{height:1px;background:rgba(255,255,255,.06);margin:6px 0 4px}.ph-quality{display:flex;flex-direction:column;gap:4px;font-size:12px;color:var(--text-secondary);margin-top:2px}.ph-quality-head{display:flex;justify-content:space-between;align-items:baseline}.ph-quality input[type=range]{width:100%}.ph-stage{grid-area:stage;position:relative;border-radius:14px;background:radial-gradient(circle at 50% 30%,rgba(99,102,241,.1),transparent 60%),#0a0b12;border:1px solid rgba(255,255,255,.06);min-height:480px;justify-content:center;overflow:hidden;padding:18px}.ph-stage,.ph-stage-head{display:flex;align-items:center}.ph-stage-head{position:absolute;top:8px;left:12px;right:12px;z-index:5;pointer-events:none}.ph-stage-head>*{pointer-events:auto}.ph-stage-inner{position:relative;display:flex;align-items:center;justify-content:center}.ph-canvas,.ph-stage-inner{max-width:100%;max-height:calc(100vh - 240px)}.ph-canvas{display:block;box-shadow:0 10px 40px rgba(0,0,0,.45),0 0 0 1px rgba(255,255,255,.06);border-radius:4px}.ph-stage-meta{position:absolute;bottom:10px;left:14px;color:var(--text-muted);font-size:11px;font-family:ui-monospace,SF Mono,Menlo,monospace;background:rgba(0,0,0,.35);padding:4px 8px;border-radius:6px;pointer-events:none}.ph-empty{width:100%;height:100%;min-height:440px;border:2px dashed rgba(139,92,246,.45);border-radius:12px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;color:var(--text-secondary);cursor:pointer;transition:background .12s ease,border-color .12s ease;text-align:center;padding:24px}.ph-empty.is-drag,.ph-empty:hover{background:rgba(139,92,246,.08);border-color:rgba(139,92,246,.75);color:var(--text-primary)}.ph-empty:focus-visible{outline:2px solid var(--acc-ring);outline-offset:4px}.ph-empty-glyph{color:var(--accent-violet)}.ph-empty-title{font-size:15px;font-weight:600}.ph-empty-sub{font-size:12px;color:var(--text-muted)}.ph-inspector{grid-area:inspector;padding:14px;border-radius:14px;display:flex;flex-direction:column;gap:10px;max-height:calc(100vh - 200px);overflow-y:auto}.ph-adj-head{display:flex;align-items:baseline;justify-content:space-between}.ph-adj-head h3{margin:0}.ph-reset-link{all:unset;cursor:pointer;font-size:11px;color:var(--accent-violet);padding:2px 6px;border-radius:5px}.ph-reset-link:hover:not([disabled]){background:rgba(139,92,246,.14)}.ph-reset-link[disabled]{opacity:.4;cursor:not-allowed}.ph-slider-row{display:grid;grid-template-columns:1fr;grid-gap:4px;gap:4px;font-size:12px;color:var(--text-secondary)}.ph-slider-row-head{display:flex;justify-content:space-between;align-items:center;gap:6px}.ph-slider-row-head>span:first-child{font-weight:600}.ph-slider-row-end{display:inline-flex;align-items:center;gap:3px}.ph-slider-num{width:44px;background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.1);color:var(--text-primary);padding:2px 4px;border-radius:4px;font:inherit;font-size:11px;font-family:ui-monospace,SF Mono,Menlo,monospace;text-align:right;outline:none;-moz-appearance:textfield}.ph-slider-num::-webkit-inner-spin-button,.ph-slider-num::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.ph-slider-num:focus{border-color:rgba(139,92,246,.55)}.ph-slider-num:disabled{opacity:.4}.ph-slider-suffix{color:var(--text-muted);font-size:10px;min-width:8px}.ph-slider-reset{all:unset;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;border-radius:4px;color:var(--text-muted)}.ph-slider-reset:hover:not([disabled]){color:var(--accent-violet);background:rgba(139,92,246,.14)}.ph-slider-reset:focus-visible{outline:2px solid var(--acc-ring);outline-offset:1px}.ph-slider-reset[disabled]{opacity:.25;cursor:default}.ph-slider-val{font-family:ui-monospace,SF Mono,Menlo,monospace;color:var(--text-muted);font-size:11px}.ph-quality input[type=range],.ph-slider-row input[type=range]{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:100%;height:4px;border-radius:999px;background:linear-gradient(90deg,rgba(139,92,246,.55),rgba(56,189,248,.45));outline:none;cursor:pointer}.ph-quality input[type=range]::-webkit-slider-thumb,.ph-slider-row input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:16px;height:16px;border-radius:50%;background:var(--accent-violet);border:2px solid #1a1b25;cursor:-webkit-grab;cursor:grab}.ph-quality input[type=range]::-moz-range-thumb,.ph-slider-row input[type=range]::-moz-range-thumb{width:16px;height:16px;border-radius:50%;background:var(--accent-violet);border:2px solid #1a1b25;cursor:grab}.ph-quality input[type=range]:focus-visible,.ph-slider-row input[type=range]:focus-visible{outline:2px solid var(--acc-ring);outline-offset:3px}.ph-name-input{background:rgba(10,11,18,.66);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);border:1px solid rgba(255,255,255,.1);color:var(--text-primary);padding:6px 10px;border-radius:7px;font:inherit;font-size:12.5px;font-weight:600;outline:none;max-width:240px;width:min(240px,60%)}.ph-name-input:focus{border-color:rgba(139,92,246,.55)}.ph-presets{display:grid;grid-template-columns:repeat(2,1fr);grid-gap:5px;gap:5px}.ph-preset{all:unset;box-sizing:border-box;text-align:center;padding:7px 6px;border-radius:7px;font-size:11.5px;font-weight:600;color:var(--text-secondary);background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.08);cursor:pointer;transition:background .12s ease,color .12s ease,border-color .12s ease}.ph-preset:hover:not([disabled]){background:rgba(139,92,246,.12);color:var(--text-primary)}.ph-preset:focus-visible{outline:2px solid var(--acc-ring);outline-offset:2px}.ph-preset.is-on{background:rgba(139,92,246,.24);border-color:rgba(139,92,246,.55);color:#ddd6fe}.ph-preset[disabled]{opacity:.4;cursor:not-allowed}.ph-crop-overlay{position:absolute;inset:0;pointer-events:none}.ph-crop-overlay.is-active{pointer-events:auto}.ph-crop-rect{border:1.5px solid var(--accent-violet);box-shadow:0 0 0 9999px rgba(8,9,16,.55);cursor:move}.ph-crop-handle,.ph-crop-rect{position:absolute;touch-action:none}.ph-crop-handle{width:16px;height:16px;background:white;border:2px solid var(--accent-violet);border-radius:3px}.ph-crop-handle.nw{left:-9px;top:-9px;cursor:nwse-resize}.ph-crop-handle.ne{right:-9px;top:-9px;cursor:nesw-resize}.ph-crop-handle.sw{left:-9px;bottom:-9px;cursor:nesw-resize}.ph-crop-handle.se{right:-9px;bottom:-9px;cursor:nwse-resize}.ph-crop-handle.n{top:-9px}.ph-crop-handle.n,.ph-crop-handle.s{left:50%;transform:translateX(-50%);cursor:ns-resize}.ph-crop-handle.s{bottom:-9px}.ph-crop-handle.w{left:-9px}.ph-crop-handle.e,.ph-crop-handle.w{top:50%;transform:translateY(-50%);cursor:ew-resize}.ph-crop-handle.e{right:-9px}.ph-crop-toolbar{position:absolute;bottom:12px;left:50%;transform:translateX(-50%);display:flex;flex-direction:column;gap:8px;background:rgba(15,16,24,.85);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);border:1px solid rgba(255,255,255,.08);padding:8px;border-radius:10px;z-index:6;max-width:calc(100% - 24px)}.ph-crop-aspects{gap:4px;flex-wrap:wrap}.ph-crop-actions,.ph-crop-aspects{display:flex;justify-content:center}.ph-crop-actions{gap:8px}.ph-aspect{all:unset;box-sizing:border-box;cursor:pointer;padding:4px 9px;min-height:28px;display:inline-flex;align-items:center;border-radius:6px;font-size:11.5px;font-weight:600;color:var(--text-secondary);background:rgba(255,255,255,.05);border:1px solid rgba(255,255,255,.08);transition:background .12s ease,border-color .12s ease,color .12s ease}.ph-aspect:hover{background:rgba(139,92,246,.12);color:var(--text-primary)}.ph-aspect:focus-visible{outline:2px solid var(--acc-ring);outline-offset:2px}.ph-aspect.is-on{background:rgba(139,92,246,.24);border-color:rgba(139,92,246,.55);color:#ddd6fe}.ph-crop-handle:focus-visible{outline:2px solid var(--acc-ring);outline-offset:2px}.ph-crop-rect:focus-visible{outline:2px solid var(--acc-ring);outline-offset:0}.ph-foot{grid-column:1/-1;padding:0 6px;font-family:ui-monospace,SF Mono,Menlo,monospace;display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap}.ph-foot,.ph-muted{color:var(--text-muted);font-size:12px}.ph-layers-head{display:flex;align-items:center;justify-content:space-between;gap:8px}.ph-layers-head h3{margin:0}.ph-layer-add{all:unset;cursor:pointer;display:inline-flex;align-items:center;gap:3px;padding:4px 9px;border-radius:6px;font-size:11px;color:#ddd6fe;background:rgba(139,92,246,.18);border:1px solid rgba(139,92,246,.4);transition:background .12s ease,border-color .12s ease}.ph-layer-add:hover{background:rgba(139,92,246,.3);border-color:rgba(139,92,246,.6)}.ph-layer-add:focus-visible{outline:2px solid var(--acc-ring);outline-offset:2px}.ph-layer-list{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:4px;max-height:300px;overflow-y:auto}.ph-layer-row{display:grid;grid-template-columns:16px 20px 40px 1fr auto;align-items:center;grid-gap:6px;gap:6px;padding:6px;border-radius:8px;background:rgba(255,255,255,.03);border:1px solid rgba(255,255,255,.06);cursor:pointer;transition:background .12s ease,border-color .12s ease}.ph-layer-row:hover{background:rgba(139,92,246,.08);border-color:rgba(139,92,246,.25)}.ph-layer-row.is-active{background:rgba(139,92,246,.18);border-color:rgba(139,92,246,.55)}.ph-layer-row.is-hidden{opacity:.55}.ph-layer-grip{cursor:-webkit-grab;cursor:grab;color:var(--text-muted);display:inline-flex;align-items:center;justify-content:center;touch-action:none}.ph-layer-grip:active{cursor:-webkit-grabbing;cursor:grabbing}.ph-layer-eye{all:unset;cursor:pointer;color:var(--accent-violet);display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;border-radius:4px}.ph-layer-eye:hover{color:#ddd6fe;background:rgba(139,92,246,.14)}.ph-layer-eye:focus-visible{outline:2px solid var(--acc-ring);outline-offset:1px}.ph-layer-thumb{width:40px;height:40px;border-radius:4px;background:repeating-conic-gradient(rgba(255,255,255,.06) 0 25%,transparent 0 50%) 50% /8px 8px,#14151c;border:1px solid rgba(255,255,255,.1);overflow:hidden;display:flex;align-items:center;justify-content:center}.ph-layer-thumb img{max-width:100%;max-height:100%;display:block}.ph-layer-thumb-fallback{width:14px;height:14px;border-radius:50%;background:rgba(139,92,246,.4)}.ph-layer-body{display:flex;flex-direction:column;gap:3px;min-width:0}.ph-layer-name{all:unset;cursor:text;font-size:12px;color:var(--text-primary);font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ph-layer-name:focus-visible{outline:2px solid var(--acc-ring);outline-offset:1px;border-radius:3px}.ph-layer-name-input{background:rgba(255,255,255,.08);border:1px solid rgba(139,92,246,.55);color:var(--text-primary);padding:2px 6px;border-radius:4px;font:inherit;font-size:12px;outline:none;width:100%;box-sizing:border-box}.ph-layer-controls{display:grid;grid-template-columns:1fr 1fr auto;grid-gap:4px;gap:4px;align-items:center}.ph-layer-blend{background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.1);color:var(--text-secondary);padding:2px 4px;border-radius:4px;font-size:10.5px;outline:none;min-width:0}.ph-layer-blend:focus{border-color:rgba(139,92,246,.55)}.ph-layer-controls input[type=range]{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:100%;height:3px;border-radius:999px;background:linear-gradient(90deg,rgba(139,92,246,.55),rgba(56,189,248,.45));outline:none;cursor:pointer}.ph-layer-controls input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:12px;height:12px;border-radius:50%;background:var(--accent-violet);border:2px solid #1a1b25;cursor:-webkit-grab;cursor:grab}.ph-layer-controls input[type=range]::-moz-range-thumb{width:12px;height:12px;border-radius:50%;background:var(--accent-violet);border:2px solid #1a1b25;cursor:grab}.ph-layer-pct{font-family:ui-monospace,SF Mono,Menlo,monospace;font-size:10px;color:var(--text-muted);min-width:30px;text-align:right}.ph-layer-actions{display:flex;flex-direction:column;gap:3px}.ph-layer-act{all:unset;cursor:pointer;color:var(--text-muted);display:inline-flex;align-items:center;justify-content:center;border-radius:4px;width:20px;height:20px}.ph-layer-act:hover{color:var(--text-primary);background:rgba(255,255,255,.1)}.ph-layer-act:focus-visible{outline:2px solid var(--acc-ring);outline-offset:1px}.ph-layer-del:hover{color:#fca5a5;background:rgba(239,68,68,.15)}.ph-modal-scrim{position:fixed;inset:0;background:rgba(8,9,16,.55);-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);z-index:70;display:flex;align-items:center;justify-content:center;padding:20px;animation:ph-fade .16s var(--ease)}.ph-modal{width:min(380px,100%);border-radius:14px;padding:16px;display:flex;flex-direction:column;gap:12px}.ph-modal-head{display:flex;align-items:center;justify-content:space-between}.ph-modal-head h3{margin:0;font-size:14px;font-weight:600;color:var(--text-primary);text-transform:none;letter-spacing:0}.ph-modal-close{all:unset;cursor:pointer;width:30px;height:30px;display:inline-flex;align-items:center;justify-content:center;border-radius:8px;color:var(--text-secondary)}.ph-modal-close:hover{background:rgba(255,255,255,.08);color:var(--text-primary)}.ph-modal-close:focus-visible{outline:2px solid var(--acc-ring);outline-offset:1px}.ph-resize-grid{display:grid;grid-template-columns:1fr auto 1fr;grid-gap:10px;gap:10px;align-items:end}.ph-field{display:flex;flex-direction:column;gap:4px;font-size:12px;color:var(--text-secondary)}.ph-field>span{font-weight:600}.ph-field input{background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.1);color:var(--text-primary);padding:7px 9px;border-radius:7px;font:inherit;font-size:13px;outline:none}.ph-field input:focus{border-color:rgba(139,92,246,.55)}.ph-lock{all:unset;cursor:pointer;width:32px;height:32px;margin-bottom:2px;display:inline-flex;align-items:center;justify-content:center;border-radius:8px;color:var(--text-muted);background:rgba(255,255,255,.05);border:1px solid rgba(255,255,255,.1)}.ph-lock:hover{color:var(--text-primary)}.ph-lock.is-on{color:#ddd6fe;background:rgba(139,92,246,.22);border-color:rgba(139,92,246,.55)}.ph-lock:focus-visible{outline:2px solid var(--acc-ring);outline-offset:2px}.ph-resize-scales{display:flex;gap:5px;flex-wrap:wrap}.ph-modal-actions{display:flex;gap:8px;justify-content:flex-end;margin-top:2px}@media (max-width:760px){.ph-modal{width:100%}.ph-field input,.ph-slider-num{font-size:16px}}.ph-toast{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);padding:9px 16px;border-radius:999px;font-size:13px;background:rgba(20,20,32,.92);color:white;border:1px solid rgba(255,255,255,.1);-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px);box-shadow:0 8px 24px rgba(0,0,0,.5);z-index:60;pointer-events:none}.ph-mobilebar,.ph-sheet-scrim{display:none}@media (max-width:760px){.ph-root{grid-template-columns:1fr;grid-template-areas:"mobilebar" "stage" "foot";gap:10px;min-height:auto}.ph-inspector,.ph-tools{display:none}.ph-mobilebar{grid-area:mobilebar;display:flex;gap:6px;align-items:center;overflow-x:auto;padding:2px 0;-webkit-overflow-scrolling:touch;scrollbar-width:none}.ph-mobilebar::-webkit-scrollbar{display:none}.ph-mb-btn{all:unset;box-sizing:border-box;display:inline-flex;align-items:center;gap:6px;min-height:42px;padding:0 12px;border-radius:10px;background:var(--glass-fill-2);border:1px solid var(--glass-border);color:var(--text-primary);font-size:13px;font-weight:600;cursor:pointer;white-space:nowrap;flex:0 0 auto}.ph-mb-btn[aria-pressed=true]{background:rgba(139,92,246,.24);border-color:rgba(139,92,246,.55);color:#ddd6fe}.ph-mb-btn[disabled]{opacity:.4}.ph-mb-btn:focus-visible{outline:2px solid var(--acc-ring);outline-offset:2px}.ph-stage{grid-area:stage;min-height:56vh;padding:12px}.ph-canvas,.ph-stage-inner{max-height:60vh}.ph-foot{grid-area:foot;font-size:11px}.ph-foot-tip{display:none}.ph-sheet-scrim{display:block;position:fixed;inset:0;background:rgba(8,9,16,.55);-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);z-index:50;animation:ph-fade .16s var(--ease)}.ph-sheet{position:fixed;left:0;right:0;bottom:0;max-height:78vh;border-radius:18px 18px 0 0;padding:8px 16px max(16px,env(safe-area-inset-bottom));display:flex;flex-direction:column;animation:ph-slide-up .22s var(--ease)}.ph-sheet-grip{width:40px;height:4px;border-radius:999px;background:rgba(255,255,255,.25);margin:4px auto 8px;flex:0 0 auto}.ph-sheet-close{all:unset;position:absolute;top:10px;right:14px;width:32px;height:32px;display:inline-flex;align-items:center;justify-content:center;border-radius:8px;color:var(--text-secondary);cursor:pointer}.ph-sheet-close:hover{background:rgba(255,255,255,.08);color:var(--text-primary)}.ph-sheet-body{overflow-y:auto;display:flex;flex-direction:column;gap:6px;padding-bottom:8px}.ph-sheet-body .ph-tool{min-height:42px}.ph-layer-list{max-height:none}.ph-layer-blend,.ph-layer-name-input,.ph-name-input{font-size:16px}}@media (max-width:560px){.ph-presets{grid-template-columns:repeat(2,1fr)}.ph-mb-btn{padding:0 10px;font-size:12.5px}}@keyframes ph-fade{0%{opacity:0}to{opacity:1}}@keyframes ph-slide-up{0%{transform:translateY(100%)}to{transform:translateY(0)}}@media (prefers-reduced-motion:reduce){.ph-sheet,.ph-sheet-scrim{animation:none}}