/* scoped styles */
.tmlite-wrap .wrap{max-width:1280px;margin:18px auto;padding:0 14px;font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,"Noto Sans TC","PingFang TC",sans-serif}
.tmlite-wrap .title{font-size:20px;margin:0 0 10px}
.tmlite-wrap .panel{display:grid;grid-template-columns:260px 1fr;gap:12px}
.tmlite-wrap .panel.sub{margin-top:8px}
.tmlite-wrap .card{background:#fafafa;border:1px solid #e5e7eb;border-radius:12px;padding:12px}
.tmlite-wrap .row{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.tmlite-wrap .space-between{justify-content:space-between}
.tmlite-wrap .btn{cursor:pointer;border:0;border-radius:10px;padding:8px 12px;font-weight:700;background:linear-gradient(90deg,#ffb703,#ff7a00);color:#111}
.tmlite-wrap .btn-ghost{background:#f3f4f6;color:#111;border:1px solid #e5e7eb;border-radius:10px;padding:8px 10px}
.tmlite-wrap .small{font-size:12px;opacity:.8}
.tmlite-wrap .canvas{width:100%;height:auto;background:#fff;border:1px solid #e5e7eb;border-radius:12px}
.tmlite-wrap .download-stack{position:absolute;right:12px;bottom:12px;display:flex;gap:6px}
.tmlite-wrap .preview{position:relative}
.tmlite-wrap .bottom{margin-top:12px;display:grid;grid-template-columns:1fr 320px;gap:12px}
.tmlite-wrap .desc{width:100%;min-height:90px;margin:8px 0}
.tmlite-wrap .gallery{display:grid;grid-template-columns:repeat(3,1fr);gap:6px}
.tmlite-wrap .thumb{position:relative;border:1px solid #e5e7eb;border-radius:10px;overflow:hidden;background:#fff}
.tmlite-wrap .thumb img{width:100%;display:block}
.tmlite-wrap .dropbox{border:1px dashed #cbd5e1;border-radius:10px;padding:10px;text-align:center;background:#f8fafc;color:#334155}
.tmlite-wrap .dropbox.dragover{background:#eef2ff;border-color:#818cf8}
.tmlite-wrap .mt8{margin-top:8px}

/* layers list */
.tmlite-wrap .layers{display:flex;flex-direction:column;gap:6px}
.tmlite-wrap .layer-item{display:flex;align-items:center;gap:8px;padding:8px 10px;border:1px dashed #d1d5db;border-radius:10px;background:#fff;user-select:none}
.tmlite-wrap .layer-item[data-type="text"]{background:#fff7ed;border-color:#fdba74}
.tmlite-wrap .layer-item[data-type="template"]{background:#eef2ff;border-color:#c7d2fe}
.tmlite-wrap .layer-item[data-type="image"]{background:#f1f5f9;border-color:#cbd5e1}
.tmlite-wrap .layer-item .preview{flex:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;opacity:.8}
.tmlite-wrap .layer-item.active{outline:2px solid #818cf8}
.tmlite-wrap .handle{width:14px;height:14px;border:1px solid #cbd5e1;border-radius:3px;background:repeating-linear-gradient(90deg,#cbd5e1 0 2px,transparent 2px 4px)}
.tmlite-wrap .pill{margin-left:auto;display:flex;gap:4px}
.tmlite-wrap .iconbtn{border:1px solid #e5e7eb;background:#f3f4f6;border-radius:8px;padding:4px 6px;cursor:pointer}
.tmlite-wrap .canvas.dragging{cursor:grabbing}
.tmlite-wrap .canvas.hover-move{cursor:grab}

/* inspector */
.tmlite-wrap .inspector .group{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin:6px 0}
.tmlite-wrap .headline-hint{padding:10px}
