*{box-sizing:border-box}
.tool-hero{text-align:center;padding:22px 0 16px}.badge{display:inline-block;padding:6px 11px;border-radius:99px;background:#eff6ff;color:#2563eb;font-size:11px;font-weight:800}.tool-hero h1{margin:9px 0 7px;font-size:clamp(31px,4vw,45px);color:#0f172a;font-weight:900}.tool-hero p{margin:0;color:#64748b;font-size:16px;line-height:1.55}
.section{padding:8px 0 26px}.card{max-width:1050px;margin:auto;padding:20px;background:#fff;border:1.5px solid #dbe3ec;border-radius:18px;box-shadow:0 8px 25px rgba(15,23,42,.06)}.card h2{margin:0 0 16px;color:#0f172a;font-size:20px}
.upload{min-height:210px;border:2px dashed #bfdbfe;border-radius:15px;background:#f8fbff;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:18px;transition:.2s}.upload.drag{border-color:#2563eb;background:#eff6ff}.upload>i{font-size:42px;color:#2563eb}.upload img{display:none;max-width:100%;max-height:180px;object-fit:contain;border-radius:10px}.upload h3{margin:10px 0;color:#0f172a}.upload p{color:#64748b;font-size:13px;line-height:1.7}.choose,.eye-dropper,.reset{min-height:44px;padding:0 18px;border:0;border-radius:10px;color:#fff;font-weight:850;cursor:pointer;font-family:inherit;font-size:14px}.choose{background:#2563eb}.eye-dropper{background:#7c3aed}.reset{background:#fff5f5;border:1px solid #fecaca;color:#dc2626}.file-input{position:absolute!important;width:1px!important;height:1px!important;opacity:0!important;pointer-events:none!important}
.picker-area{display:none;margin-top:16px}.canvas-wrap{position:relative;width:100%;border:1px solid #dbe3ec;border-radius:14px;background:#f1f5f9;overflow:auto;text-align:center;padding:8px}.canvas-wrap canvas{display:block;max-width:100%;height:auto;margin:auto;cursor:crosshair;touch-action:none}.magnifier{display:none;position:absolute;width:76px;height:76px;border:3px solid #fff;border-radius:50%;box-shadow:0 2px 12px rgba(0,0,0,.35);pointer-events:none;background-repeat:no-repeat;background-color:#fff;z-index:3}.hint{text-align:center;color:#64748b;font-size:12px;margin:8px 0 0}
.picker-result{display:grid;grid-template-columns:100px 1fr;gap:12px;margin-top:14px}.swatch{min-height:100px;border-radius:13px;border:1px solid #dbe3ec;background:#fff;box-shadow:inset 0 0 0 1px rgba(0,0,0,.03)}.color-values{display:grid;grid-template-columns:repeat(3,1fr);gap:9px}.value{min-width:0;padding:13px;text-align:left;border:1px solid #dbe3ec;border-radius:11px;background:#f8fafc;cursor:pointer;font-family:inherit}.value:hover{border-color:#2563eb;background:#eff6ff}.value span{display:block;color:#64748b;font-size:10px;font-weight:800}.value b{display:block;margin-top:5px;color:#0f172a;font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.status{margin-top:12px;padding:10px;border:1px solid #dbeafe;border-radius:10px;background:#eff6ff;color:#64748b;font-size:12px;text-align:center}.actions{display:flex;gap:9px;margin-top:10px}.actions button{flex:1}
.content{padding:30px 0}.content>div>h2{text-align:center;color:#0f172a;font-size:28px;margin:0 0 18px}.grid,.steps{display:grid;grid-template-columns:repeat(3,1fr);gap:13px;margin-bottom:32px}.grid article,.steps article{padding:18px;border:1.5px solid #dbeafe;border-radius:14px;background:linear-gradient(145deg,#fff,#f8fbff);text-align:center}.grid article>b{font-size:24px}.grid h3,.steps h3{margin:7px 0 5px;color:#0f172a;font-size:16px}.grid p,.steps p{margin:0;color:#64748b;font-size:12px;line-height:1.6}.steps article>b{display:grid;place-items:center;width:31px;height:31px;margin:auto;border-radius:50%;background:#2563eb;color:#fff}.faq{max-width:900px;margin:auto;border:1.5px solid #dbe3ec;border-radius:15px;overflow:hidden;background:#fff}.faq details{border-bottom:1px solid #e5e7eb}.faq details:last-child{border:0}.faq summary{padding:16px;font-size:14px;font-weight:850;color:#0f172a;cursor:pointer}.faq p{padding:0 16px 16px;margin:0;color:#64748b;font-size:12px;line-height:1.7}
body.dark .card,body.dark .grid article,body.dark .steps article,body.dark .faq{background:#111827;border-color:#334155}body.dark .card h2,body.dark .upload h3,body.dark .value b,body.dark .grid h3,body.dark .steps h3,body.dark .content>div>h2,body.dark .faq summary{color:#f8fafc}body.dark .upload{background:#0f172a;border-color:#3b82f6}body.dark .value{background:#0f172a;border-color:#334155}body.dark .value:hover{background:#172554;border-color:#3b82f6}body.dark .swatch{border-color:#334155}body.dark .canvas-wrap{background:#0f172a;border-color:#334155}
@media(max-width:700px){.page-offset{padding-top:62px!important}.tool-hero{padding:18px 0 13px}.tool-hero h1{font-size:30px}.tool-hero p{font-size:14px}.card{padding:16px;border-radius:17px}.upload{min-height:230px}.picker-result{grid-template-columns:1fr}.swatch{min-height:75px}.color-values{grid-template-columns:1fr}.actions{flex-direction:column}.content{padding:24px 0}.content>div>h2{font-size:24px}.grid,.steps{grid-template-columns:1fr}.faq summary{font-size:15px}.faq p{font-size:13px}}

/* Three compact tool boxes stacked like the Image Compress layout */
.tool-stack{display:flex;flex-direction:column;gap:16px;max-width:900px;margin:auto}
.tool-card{width:100%;max-width:none}
.tool-card h2{font-size:18px;margin-bottom:13px}
.empty-preview{min-height:220px;border:1px solid #dbe3ec;border-radius:14px;background:#f8fafc;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;color:#94a3b8}
.empty-preview i{font-size:42px;margin-bottom:8px}.empty-preview b{color:#64748b;font-size:13px}.empty-preview span{font-size:11px;margin-top:4px}
#pickerArea{margin-top:0}
#pickerArea .canvas-wrap{max-height:430px}
@media(max-width:700px){
 .tool-stack{gap:13px}
 .tool-card{padding:15px}
 .empty-preview{min-height:210px}
}

/* Desktop: three main tool cards in one row */
.tool-stack{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:16px!important;max-width:1100px!important}
.tool-card{min-width:0!important;height:100%}
@media(max-width:850px){
 .tool-stack{grid-template-columns:1fr!important}
}

/* Image preview zoom controls */
.preview-toolbar{display:flex;align-items:center;justify-content:center;gap:8px;margin-bottom:8px}
.preview-toolbar button{min-width:38px;height:36px;padding:0 10px;border:1px solid #dbe3ec;border-radius:9px;background:#fff;color:#334155;font-size:18px;font-weight:900;cursor:pointer}
.preview-toolbar button:hover{border-color:#2563eb;background:#eff6ff;color:#2563eb}
#zoomValue{min-width:58px;text-align:center;font-size:12px;font-weight:850;color:#475569}
.canvas-wrap{max-height:420px;overflow:auto!important;position:relative}
.canvas-stage{position:relative;width:max-content;min-width:100%;margin:auto}
.canvas-stage canvas{display:block;max-width:none!important;height:auto!important;cursor:crosshair;touch-action:none}
body.dark .preview-toolbar button{background:#0f172a;color:#e2e8f0;border-color:#334155}
body.dark #zoomValue{color:#cbd5e1}
