.file-tool-card{display:grid;gap:18px}.file-tool-card input,.file-tool-card select{max-width:100%;padding:10px}.file-tool-card label{display:grid;gap:8px}.file-tool-card #fileOptions{display:flex;gap:14px;flex-wrap:wrap}.file-tool-card #fileResult{overflow:auto}.file-tool-card canvas,.file-tool-card img{display:block;max-width:100%;height:auto}.file-tool-card pre{white-space:pre-wrap;overflow-wrap:anywhere;max-height:500px;overflow:auto}.file-tool-card a{display:inline-block;margin:8px;padding:10px}.file-tool-card input[type=color]{height:46px;min-width:80px}
.template-options{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));align-items:start}.template-options>label{min-width:0}.template-options textarea,.template-options select,.template-options input:not([type=checkbox]){width:100%;box-sizing:border-box;border:1px solid #cdd5e2;border-radius:8px;background:#fff}.template-options label:has(textarea),.template-actions,.template-geometry,.template-note{grid-column:1/-1}.template-actions{display:flex;flex-wrap:wrap;gap:8px}.template-actions button{padding:9px 12px;border:1px solid #ccd5e1;border-radius:8px;background:white;color:#17243a;cursor:pointer}.template-geometry{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.template-preview{border:1px solid #dce1e9;border-radius:14px;padding:16px;background:#f8fafc}.template-preview h2{font-size:20px;margin:0 0 8px}.template-preview p{color:#566579;font-size:14px}.template-preview canvas{max-width:100%;max-height:600px;width:auto;height:auto;touch-action:none;cursor:move;box-shadow:0 2px 12px #0002;background:repeating-conic-gradient(#eee 0% 25%,#fff 0% 50%) 0/16px 16px}.template-preview[hidden]{display:none}.template-options label:has(input[type=checkbox]){display:flex;align-items:center}.template-options input[type=checkbox]{width:auto}.template-note{font-size:14px;color:#566579}@media(max-width:600px){.template-options{grid-template-columns:1fr}.template-geometry{grid-template-columns:repeat(2,minmax(0,1fr))}.template-preview{padding:10px}.template-preview canvas{max-height:none}}
.png-options{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));width:100%}.png-options>label{min-width:0}.png-options select{width:100%;border:1px solid #cdd5e2;border-radius:8px;background:white}.png-options [hidden]{display:none!important}.png-check{display:flex!important;align-items:center;gap:8px!important}.png-note{grid-column:1/-1;color:#566579;font-size:14px;line-height:1.6}.png-comparison{margin-top:18px}.png-sizes{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.png-sizes p{margin:0;padding:14px;background:#f2f5f9;border-radius:10px;overflow-wrap:anywhere}.png-pair{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin-top:16px}.png-pair figure{margin:0;min-width:0}.png-pair figcaption{font-weight:700;margin-bottom:8px}.png-pair img{width:100%;object-fit:contain;max-height:650px;border:1px solid #dce1e9;border-radius:8px;background:repeating-conic-gradient(#e2e5e9 0% 25%,#fff 0% 50%) 0/16px 16px}.png-pair[data-background=white] img{background:#fff}.png-pair[data-background=black] img{background:#000}@media(max-width:600px){.png-options,.png-sizes,.png-pair{grid-template-columns:1fr}}
body[data-file-tool=optimize-png] .file-tool-card{min-width:0}body[data-file-tool=optimize-png] .file-tool-card>label,body[data-file-tool=optimize-png] #fileOptions,body[data-file-tool=optimize-png] #fileResult{min-width:0}body[data-file-tool=optimize-png] input[type=file]{width:100%;min-width:0;box-sizing:border-box}.png-options input[type=range]{width:100%;min-width:0;box-sizing:border-box;padding:0;margin:0;accent-color:#ff5900}.png-options{box-sizing:border-box}.png-comparison select{box-sizing:border-box;max-width:100%}
.file-tool-card{padding:24px;min-width:0}.file-tool-card [hidden]{display:none!important}.file-tool-card #fileOptions,.file-tool-card #fileResult{min-width:0}.file-tool-card #fileStatus{margin:0;font-size:14px;line-height:1.5;color:#526173;overflow-wrap:anywhere}.file-tool-card #fileStatus:empty{display:none}.file-tool-card .file-drop{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;min-height:230px;padding:26px;border:2px dashed #d2d9e2;border-radius:16px;text-align:center;background:linear-gradient(180deg,#fff,#fafbfe);cursor:pointer;transition:border-color .15s,background .15s}.file-tool-card .file-drop:hover,.file-tool-card .file-drop.dragover,.file-tool-card .file-drop:focus-within{border-color:#ff5a0a;background:#fff8f3}.file-drop strong{font-size:20px;color:#17212b}.file-drop>span:not(.file-drop-icon):not(.file-drop-button){color:#64748b;font-size:14px}.file-drop small{color:#64748b;font-size:12px}.file-drop-icon{display:grid;place-items:center;width:56px;height:56px;border-radius:16px;background:#fff0e7;color:#e65100}.file-drop-icon svg{width:28px;height:28px}.file-drop-button{padding:10px 18px;border-radius:10px;background:#182330;color:#fff;font-weight:750;font-size:14px}.file-tool-card .file-drop input[type=file]{position:absolute;width:1px;height:1px;padding:0;opacity:0;pointer-events:none}.file-drop.busy{opacity:.6;cursor:wait}.file-selection{display:grid;gap:8px;max-height:240px;overflow:auto}.file-selection-row{display:grid;grid-template-columns:44px minmax(0,1fr) auto;align-items:center;gap:12px;padding:12px;border:1px solid #e1e6ed;border-radius:12px;background:#f8fafc}.file-selection-row strong,.file-selection-row small{display:block}.file-selection-row strong{font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.file-selection-row small{margin-top:4px;color:#64748b;font-size:12px}.file-selection-badge{display:grid;place-items:center;width:44px;height:42px;background:#fff0e7;border-radius:10px;color:#c44b12;font-size:11px;font-weight:800}.file-selection-row button{width:32px;height:32px;border:0;border-radius:8px;background:#e9edf2;color:#526173;font-size:20px;cursor:pointer}.file-process-actions{display:flex;gap:10px;align-items:center}.file-process-actions #fileStart{flex:1;min-height:50px}.file-tool-card input[type=color]{padding:4px;min-width:0;border:1px solid #d6deea;border-radius:9px}.file-tool-card input[type=color]::-webkit-color-swatch-wrapper{padding:2px}.file-tool-card input[type=color]::-webkit-color-swatch{border:0;border-radius:5px}
.png-preview-frame{display:flex;align-items:center;justify-content:center;padding:18px;min-height:180px;border:1px solid #dce1e9;border-radius:12px;background:var(--comparison-background)}.file-tool-card .png-preview-frame img{display:block;max-height:600px;max-width:100%;width:auto;min-width:0;border:0;border-radius:0;background:transparent!important}.png-comparison>label{max-width:420px;margin-top:18px}.png-comparison>label select{border:1px solid #d6deea;border-radius:9px;background:white}
.file-tool-card #fileOptions.social-template-options{display:block!important;width:100%}.social-template-shell{display:grid;grid-template-columns:minmax(0,1fr) 320px;grid-template-areas:"toolbar toolbar" "canvas sidebar" "note note";gap:18px;align-items:start}.social-template-toolbar{grid-area:toolbar;display:flex;gap:9px;flex-wrap:wrap;padding-bottom:16px;border-bottom:1px solid #e4e8ee}.social-template-toolbar button,.social-layer-actions button,.social-layer-list button{padding:11px 14px;border:1px solid #d4dce7;border-radius:10px;background:#fff;color:#243248;font:inherit;font-size:13px;font-weight:700;cursor:pointer}.social-template-toolbar #addText,.social-template-toolbar #addImage{background:#fff4ed;border-color:#ffdcc8;color:#b84408}.social-template-toolbar #placeLayer[aria-pressed=true]{background:#17243a;color:#fff;border-color:#17243a}.social-template-shell button:disabled{opacity:.45;cursor:default}.social-template-sidebar{grid-area:sidebar;padding:16px;border:1px solid #dfe5ec;border-radius:14px;background:#fff;min-width:0}.social-template-tabs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:3px;padding:4px;border-radius:10px;background:#eef2f6;margin-bottom:18px}.social-template-tabs button{padding:10px 4px;background:transparent;border:0;border-radius:7px;color:#607087;font:inherit;font-size:12px;font-weight:750;cursor:pointer}.social-template-tabs button[aria-selected=true]{background:#fff;color:#d94d00;box-shadow:0 1px 4px #17243a18}.social-template-sidebar>label{margin-bottom:16px}.social-template-panel{display:grid;gap:16px}.social-template-panel label,.social-template-sidebar>label{font-size:13px;font-weight:700;color:#354155}.social-template-panel input,.social-template-panel select,.social-template-sidebar>label select,.social-template-panel textarea{font:inherit;font-weight:400;padding:10px}.social-template-panel input[type=range]{padding:0;accent-color:#ff5a0a}.social-template-panel textarea{min-height:90px;resize:vertical}.social-format-buttons,.social-preset-buttons{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.social-format-buttons button,.social-preset-buttons button{padding:10px;border:1px solid #d8e0ea;border-radius:9px;background:#fff;color:#4b5b70;font:inherit;font-size:12px;line-height:1.4;cursor:pointer}.social-format-buttons button[aria-pressed=true],.social-preset-buttons button[aria-pressed=true]{border-color:#ff7c38;background:#fff5ef;color:#b74408;box-shadow:0 0 0 1px #ff7c38}.social-preset-buttons{grid-template-columns:1fr}.social-preset-buttons button{display:grid;grid-template-columns:54px minmax(0,1fr);align-items:center;gap:10px;text-align:left}.social-preset-swatch{display:block;width:54px;height:38px;border:1px solid #d4dce5;border-radius:5px;background:linear-gradient(to top,#25344e 28%,transparent 28%),linear-gradient(135deg,#b6d4f3,#72bdb5)}.social-preset-swatch.preset-split{background:linear-gradient(to right,#8abfbd 55%,#f4f6fa 55%)}.social-preset-swatch.preset-minimal{background:linear-gradient(to right,#f4f6fa 62%,#8abfbd 62%)}.social-template-shell .template-preview{grid-area:canvas;width:100%;min-width:0;margin:0;padding:20px;background:#f4f6fa}.social-template-shell .template-preview canvas{display:block;margin:16px auto;max-width:100%;max-height:640px;cursor:move}.social-template-shell .template-preview canvas.placing{cursor:crosshair}.social-template-shell .template-preview h2{font-size:18px}.social-template-shell .template-preview p{font-size:13px;line-height:1.6}.template-interaction-note{grid-area:note;margin:0;padding:12px 16px;border-radius:10px;background:#fff5ed;color:#95501d;font-size:13px;line-height:1.5}.template-editor-empty{grid-area:canvas;display:grid;align-content:center;justify-items:center;gap:12px;text-align:center;min-height:350px;padding:30px;border:1px dashed #cfd8e5;border-radius:14px;background:#f7f9fc}.template-editor-empty strong{font-size:22px;color:#3d4c61}.template-editor-empty p{max-width:320px;color:#718096;font-size:14px;line-height:1.6}.social-layer-list{display:grid;gap:6px}.social-layer-list button{text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.social-layer-list button[aria-pressed=true]{border-color:#ff8a4d;background:#fff5ed;color:#bf490b}.social-layer-actions{display:flex;flex-wrap:wrap;gap:8px}.social-layer-actions #removeLayer{color:#af2634}.file-tool-card .template-file-upload{position:relative;display:flex;align-items:center;flex-direction:column;justify-content:center;gap:8px;min-height:112px;padding:16px;border:1px dashed #cfd8e5;border-radius:12px;text-align:center;background:#f8fafc;cursor:pointer}.template-file-upload>span{font-size:12px;font-weight:400;color:#718096}.file-tool-card .template-file-upload input[type=file]{position:absolute;width:1px;height:1px;padding:0;opacity:0;pointer-events:none}.social-template-panel .template-file-upload{font-size:0}.social-template-panel .template-file-upload strong{font-size:13px}.social-template-panel .template-file-upload:focus-within{outline:2px solid #ff7c38}
@media(max-width:900px){.social-template-shell{grid-template-columns:minmax(0,1fr);grid-template-areas:"toolbar" "canvas" "sidebar" "note"}.social-template-sidebar{padding:16px}.social-template-tabs button{font-size:14px}.social-preset-buttons{grid-template-columns:repeat(3,minmax(0,1fr))}.social-preset-buttons button{grid-template-columns:1fr;justify-items:center;text-align:center}.social-template-shell .template-preview canvas{max-height:560px}}
@media(max-width:600px){.file-tool-card{padding:14px;gap:16px}.file-tool-card .file-drop{padding:20px 14px;min-height:220px}.file-drop strong{font-size:18px}.file-process-actions{flex-wrap:wrap}.file-process-actions #fileCancel{width:100%}.png-preview-frame{padding:14px;min-height:140px}.social-template-toolbar button{flex:1;min-width:110px}.social-template-toolbar #placeLayer{flex-basis:100%}.social-template-shell{gap:12px}.social-template-shell .template-preview{padding:12px}.social-template-shell .template-preview canvas{max-height:none}.social-preset-buttons{grid-template-columns:1fr}.social-preset-buttons button{grid-template-columns:54px minmax(0,1fr);justify-items:start;text-align:left}.social-template-sidebar{padding:12px}.social-template-shell button{min-height:42px}.template-editor-empty{min-height:250px;padding:24px 16px}}
.file-tool-card #fileOptions.photo-template-options{display:block!important;width:100%}.photo-template-shell{display:grid;grid-template-columns:minmax(0,1fr) 360px;gap:20px;align-items:start}.photo-template-shell .template-preview{margin:0;min-width:0;position:sticky;top:100px}.photo-template-shell .template-preview canvas{margin:16px auto;max-height:650px}.photo-template-sidebar{min-width:0;padding:18px;border:1px solid #dce3eb;border-radius:14px;background:#fff;display:grid;gap:18px}.photo-control-group{display:grid;gap:12px}.photo-control-group h3{font-size:15px;margin:0;color:#263549}.photo-control-group label{font-size:13px}.photo-control-group input[type=range]{width:100%;padding:0;accent-color:#ff5a0a}.photo-control-group output,.social-template-panel output{font-size:12px;color:#63738a;text-align:right}.photo-size-controls{grid-template-columns:repeat(2,minmax(0,1fr))}.photo-size-controls h3,.photo-size-controls label:has(#photoSize),.photo-size-controls label:has(#dpi){grid-column:1/-1}.photo-print-options{border-top:1px solid #e4e9ef;padding-top:14px}.photo-print-options summary{cursor:pointer;font-size:14px;font-weight:700}.photo-print-options label{margin-top:14px;font-size:13px}.template-background-note{font-size:12px;line-height:1.6;color:#64748b;margin:0}.template-background-permission{font-size:13px!important;line-height:1.5!important;display:flex!important;gap:10px!important;align-items:flex-start!important}.template-background-permission input{flex:0 0 auto;accent-color:#ff5a0a}.file-tool-card .template-background-color{width:84px;max-width:100%;justify-self:start}.file-tool-card .template-background-color input[type=color]{width:84px;height:38px;min-width:0;padding:3px}.file-tool-card #templateBackgroundStatus{font-size:12px;line-height:1.5;color:#15734c;margin:0}.photo-template-sidebar .template-note{margin:0;font-size:12px}.social-template-panel input[type=range]{width:100%}
@media(max-width:900px){.photo-template-shell{grid-template-columns:minmax(0,1fr)}.photo-template-shell .template-preview{position:static}.photo-template-shell .template-preview canvas{max-height:420px}.photo-template-sidebar{padding:14px}}
.avatar-shape-buttons{display:flex;gap:8px}.avatar-shape-buttons button{flex:1;padding:12px;border:1px solid #d6dfea;border-radius:10px;background:#fff;color:#42526a;cursor:pointer;font:inherit}.avatar-shape-buttons button[aria-pressed=true]{border-color:#ff7c38;background:#fff4ed;color:#bd4708}.social-preset-swatch.preset-grid{background:linear-gradient(90deg,transparent 48%,white 48% 52%,transparent 52%),linear-gradient(transparent 48%,white 48% 52%,transparent 52%),#8abfbd}.social-preset-swatch.preset-feature{background:linear-gradient(90deg,#8abfbd 64%,white 64% 68%,#b6d4f3 68%)}

.background-result{min-width:0;width:100%;padding:16px;border:1px solid #dce3eb;border-radius:16px;background:#fafbfc}.background-result h3{font-size:16px;overflow-wrap:anywhere;margin:0 0 12px}.file-tool-card #fileResult .background-result img{display:block;width:auto;max-width:100%;max-height:480px;margin:0 auto;border:1px solid #dce3eb;border-radius:12px;background:repeating-conic-gradient(#e4e8ee 0% 25%,#fff 0% 50%) 0 0/20px 20px}.background-result p{font-size:13px;color:#63738a}.background-result .btn{max-width:100%;white-space:normal;overflow-wrap:anywhere}
