:root{
  --bg:#f3f5f8;
  --panel:#fff;
  --ink:#111827;
  --muted:#6b7280;
  --line:#e5e7eb;
  --accent:#111827;
  --accent-2:#4f46e5;
  --soft:#eef2ff;
  --ok:#0f766e;
  --danger:#b91c1c;
  --radius:20px;
  --shadow:0 16px 45px rgba(17,24,39,.07);
}
*{box-sizing:border-box}
html,body{margin:0;min-height:100%;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--ink);background:var(--bg)}
button,input,select{font:inherit}
button{cursor:pointer}
.app-shell{min-height:100vh}
.topbar{height:78px;background:#111827;color:#fff;display:flex;align-items:center;justify-content:space-between;padding:0 30px;position:sticky;top:0;z-index:20;box-shadow:0 10px 35px rgba(0,0,0,.12)}
.brand{display:flex;align-items:center;gap:12px}
.brand-mark{width:44px;height:44px;border-radius:13px;background:#fff;color:#111827;display:grid;place-items:center;font-weight:900;letter-spacing:-.04em}
.brand strong{display:block;font-size:18px;line-height:1.05}.brand span{display:block;font-size:12px;color:#cbd5e1;margin-top:4px}
.status-pill{display:flex;align-items:center;gap:8px;border:1px solid rgba(255,255,255,.18);border-radius:999px;padding:8px 12px;font-size:12px;color:#d1fae5}.status-pill.bad{color:#fecaca}.dot{width:8px;height:8px;border-radius:50%;background:#34d399}.bad .dot{background:#f87171}
.workspace{display:grid;grid-template-columns:minmax(330px,390px) minmax(0,1fr);gap:22px;padding:22px;max-width:1700px;margin:0 auto}
.panel{background:var(--panel);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow)}
.controls-panel{overflow:hidden;align-self:start;position:sticky;top:100px;max-height:calc(100vh - 122px);overflow-y:auto}
.control-section{padding:22px;border-bottom:1px solid var(--line)}.control-section:last-child{border-bottom:0}
.section-title-row{display:flex;align-items:start;justify-content:space-between;gap:12px}.count-badge{min-width:30px;height:30px;padding:0 10px;border-radius:999px;background:#111827;color:white;display:grid;place-items:center;font-weight:800;font-size:12px}
.eyebrow{font-size:11px;letter-spacing:.14em;font-weight:800;color:#6366f1;margin:0 0 6px}.control-section h2,.export-panel h2,.preview-toolbar h1{margin:0;font-size:20px;letter-spacing:-.025em}.preview-toolbar h1{font-size:24px}
.dropzone{margin-top:16px;border:1.5px dashed #c7cbd4;border-radius:16px;padding:22px 14px;text-align:center;display:flex;flex-direction:column;align-items:center;gap:5px;background:#fafafa;transition:.2s}.dropzone:hover,.dropzone.drag{border-color:#6366f1;background:#f7f7ff}.upload-icon{width:44px;height:44px;border-radius:50%;display:grid;place-items:center;background:#111827;color:white;font-size:25px;margin-bottom:5px}.dropzone strong{font-size:14px}.dropzone span{font-size:11px;color:var(--muted);max-width:260px;line-height:1.45}
.sticker-list{display:grid;gap:9px;margin-top:12px}.sticker-item{display:grid;grid-template-columns:48px 1fr 68px 30px;align-items:center;gap:9px;border:1px solid var(--line);border-radius:12px;padding:8px;background:#fff}.sticker-thumb{width:48px;height:48px;border-radius:9px;object-fit:contain;background:linear-gradient(45deg,#eee 25%,transparent 25%),linear-gradient(-45deg,#eee 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#eee 75%),linear-gradient(-45deg,transparent 75%,#eee 75%);background-size:10px 10px;background-position:0 0,0 5px,5px -5px,-5px 0}.sticker-meta{min-width:0}.sticker-meta strong{display:block;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.sticker-meta span{font-size:10px;color:var(--muted)}.qty-input{width:68px;border:1px solid var(--line);border-radius:9px;padding:7px 8px}.remove-btn{border:0;background:#f3f4f6;color:#4b5563;border-radius:8px;width:30px;height:30px;font-size:18px}.remove-btn:hover{background:#fee2e2;color:#b91c1c}
.size-presets{display:grid;grid-template-columns:repeat(5,1fr);gap:7px;margin-top:14px}.size-presets button{border:1px solid var(--line);background:#fff;border-radius:10px;padding:9px 3px;font-weight:750;font-size:12px}.size-presets button.active{background:#111827;color:#fff;border-color:#111827}
.two-col{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:14px}.compact-top{margin-top:10px}.field{display:flex;flex-direction:column;gap:6px}.field>span{font-size:11px;color:#4b5563;font-weight:650}.field input,.field select{width:100%;border:1px solid #d8dbe2;background:#fff;border-radius:10px;padding:10px 11px;outline:none;color:#111827}.field input:focus,.field select:focus{border-color:#818cf8;box-shadow:0 0 0 3px #eef2ff}
.check-row{display:flex;gap:9px;align-items:flex-start;margin-top:12px;font-size:12px;color:#4b5563}.check-row input{margin-top:1px;accent-color:#111827}.hidden{display:none!important}
.primary-btn{width:100%;margin-top:17px;border:0;border-radius:12px;padding:13px 15px;background:#111827;color:#fff;font-weight:850;box-shadow:0 8px 18px rgba(17,24,39,.12)}.primary-btn:hover{transform:translateY(-1px)}
.preview-area{min-width:0;display:flex;flex-direction:column;gap:16px}.preview-toolbar{padding:18px 22px;display:flex;align-items:center;justify-content:space-between;gap:20px}.toolbar-stats{display:flex;gap:24px}.toolbar-stats div{text-align:right}.toolbar-stats strong{display:block;font-size:18px}.toolbar-stats span{display:block;font-size:10px;color:var(--muted);text-transform:uppercase;letter-spacing:.08em;margin-top:1px}
.canvas-stage{min-height:610px;padding:28px;background:linear-gradient(180deg,#fdfdfd,#f7f8fa);overflow:auto}.empty-state{min-height:540px;border:1.5px dashed #d7dae0;border-radius:18px;display:grid;place-content:center;text-align:center;padding:30px;color:#6b7280}.empty-state h3{margin:10px 0 6px;color:#111827;font-size:20px}.empty-state p{margin:0;max-width:460px;line-height:1.55;font-size:13px}.empty-illustration{width:64px;height:64px;border-radius:18px;background:#eef2ff;color:#4f46e5;display:grid;place-items:center;margin:0 auto;font-size:30px}
.pages-wrap{display:flex;flex-wrap:wrap;align-items:flex-start;justify-content:center;gap:28px}.page-card{display:flex;flex-direction:column;gap:8px;align-items:center}.page-label{font-size:11px;font-weight:750;color:#6b7280}.sheet-canvas{background:#fff;box-shadow:0 14px 35px rgba(17,24,39,.14);border:1px solid #d7dae0;max-width:min(100%,820px);height:auto}
.export-panel{padding:18px 22px;display:flex;align-items:center;justify-content:space-between;gap:20px}.helper{margin:7px 0 0;color:var(--muted);font-size:12px}.export-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}.export-actions button{border:1px solid #d8dbe2;background:#fff;border-radius:11px;padding:11px 14px;font-weight:750;color:#111827}.export-actions button:hover:not(:disabled){background:#111827;color:#fff;border-color:#111827}.export-actions button:disabled{opacity:.4;cursor:not-allowed}
.footer-note{text-align:center;color:#6b7280;font-size:11px;padding:4px 20px 24px}.toast{position:fixed;left:50%;bottom:24px;transform:translate(-50%,18px);background:#111827;color:white;border-radius:12px;padding:11px 15px;font-size:12px;opacity:0;pointer-events:none;transition:.22s;z-index:50;box-shadow:0 10px 30px rgba(0,0,0,.2)}.toast.show{opacity:1;transform:translate(-50%,0)}
@media(max-width:1000px){.workspace{grid-template-columns:1fr}.controls-panel{position:static;max-height:none}.preview-toolbar,.export-panel{align-items:flex-start;flex-direction:column}.toolbar-stats{width:100%;justify-content:space-between}.toolbar-stats div{text-align:left}.export-actions{justify-content:flex-start}}
@media(max-width:620px){.topbar{padding:0 14px;height:68px}.brand span,.status-pill{display:none}.workspace{padding:10px;gap:10px}.control-section{padding:17px}.two-col{grid-template-columns:1fr}.size-presets{grid-template-columns:repeat(5,1fr)}.canvas-stage{padding:12px;min-height:420px}.empty-state{min-height:390px}.toolbar-stats{gap:8px}.preview-toolbar,.export-panel{padding:16px}.export-actions{display:grid;grid-template-columns:1fr;width:100%}.export-actions button{width:100%}}
