:root{--bg:#f7f7fb;--card:#ffffff;--text:#1f2937;--muted:#6b7280;--primary:#2563eb;--primary-600:#1e40af;--border:#e5e7eb}
*{box-sizing:border-box}
html,body{height:100%}
body{margin:0;background:var(--bg);color:var(--text);font:14px system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial}
.container{max-width:1080px;margin:0 auto;padding:24px}
.card{background:var(--card);border:1px solid var(--border);border-radius:12px;box-shadow:0 4px 12px rgba(0,0,0,0.06)}
.header{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px}
.title{font-size:18px;font-weight:600}
.muted{color:var(--muted)}
.grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}
@media(max-width:900px){.grid{grid-template-columns:1fr}}
.section{padding:16px}
.drop{display:flex;align-items:center;justify-content:center;height:180px;border:2px dashed var(--border);border-radius:12px;background:#fafafa}
.drop.drag{border-color:var(--primary)}
.files{margin-top:12px;max-height:120px;overflow:auto;border:1px dashed var(--border);border-radius:8px;padding:8px;background:#fafafa}
.row{display:flex;gap:12px;flex-wrap:wrap}
.btn{height:36px;padding:0 14px;border:1px solid var(--border);border-radius:10px;background:var(--card);cursor:pointer}
.btn.primary{background:var(--primary);border-color:var(--primary);color:#fff}
.btn.primary:hover{background:var(--primary-600)}
.btn.copy{background:#111827;color:#fff}
.field{display:flex;flex-direction:column;gap:6px;margin-bottom:12px}
.field label{font-size:12px;color:var(--muted)}
.field input,.field select{height:36px;border:1px solid var(--border);border-radius:8px;padding:0 10px;background:#fff}
.field input,.field select{transition:border-color .2s, box-shadow .2s}
.field input:hover,.field select:hover{border-color:#cbd5e1;background:#fcfcff}
.field input::placeholder{color:#9ca3af}
.field input:focus,.field select:focus{outline:none;border-color:var(--primary);box-shadow:0 0 0 3px rgba(37,99,235,.15)}
.field input[type=checkbox]{height:auto}
.field input[type=number]{-moz-appearance:textfield}
.field input[type=number]::-webkit-outer-spin-button,.field input[type=number]::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}
.field select{appearance:none;background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24'><path fill='%236b7280' d='M7 10l5 5 5-5z'/></svg>");background-position:right 10px center;background-repeat:no-repeat;padding-right:28px}
.field input[type=color]{padding:0;width:48px}
.field input[type=file]{padding:0}
.field input[type=file]::file-selector-button{height:32px;margin-right:10px;padding:0 12px;border:1px solid var(--border);border-radius:8px;background:var(--card);color:var(--text);cursor:pointer;transition:background-color .2s,border-color .2s}
.field input[type=file]::file-selector-button:hover{background:var(--bg);border-color:#cbd5e1}
.field input[type=color]{border:1px solid var(--border);border-radius:8px;background:#fff}
.field input[type=color]::-webkit-color-swatch-wrapper{padding:0}
.field input[type=color]::-webkit-color-swatch{border:none;border-radius:6px}
.switch{position:relative;display:inline-block;width:46px;height:24px}
.switch input{opacity:0;width:0;height:0}
.slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background:#d1d5db;border-radius:999px;transition:.2s}
.slider:before{content:"";position:absolute;height:18px;width:18px;left:3px;top:3px;background:#fff;border-radius:50%;transition:.2s}
.switch input:checked + .slider{background:var(--primary)}
.switch input:checked + .slider:before{transform:translateX(22px)}
.result{margin-top:16px}
.card2{border:1px solid var(--border);border-radius:12px;background:#fff}
.imggrid{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.imggrid img{width:100%;height:auto;border-radius:8px;background:#f0f0f0}
.links{display:flex;gap:8px;flex-wrap:wrap;margin-top:8px}
.toast{position:fixed;left:50%;top:24px;transform:translateX(-50%);background:#111827;color:#fff;padding:8px 12px;border-radius:8px;opacity:0;transition:opacity .2s}
.toast.show{opacity:1}
.gate{max-width:520px;margin:6vh auto;padding:24px}
.hidden{display:none}
