*{box-sizing:border-box}body{margin:0;font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif;background:#f4f5f7;color:#111827}.app{max-width:1100px;margin:0 auto;padding:1rem}.header h1{margin:0;font-size:1.6rem}.header p{margin:.25rem 0 1rem;color:#4b5563}.error{background:#fee2e2;color:#991b1b;padding:.75rem 1rem;border-radius:.5rem;margin-bottom:1rem}.drop{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.5rem;min-height:14rem;border:2px dashed #9ca3af;border-radius:1rem;background:#fff;cursor:pointer;text-align:center;padding:1rem}.drop:hover{border-color:#2563eb}.drop-title{font-size:1.2rem;font-weight:700}.drop-hint{color:#6b7280}.editor{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(0,1fr);gap:1rem;align-items:start}.preview,.panel{background:#fff;border-radius:1rem;padding:1rem}.preview canvas{width:100%;height:auto;display:block;border-radius:.5rem;touch-action:none;cursor:move;background:repeating-conic-gradient(#e5e7eb 0,#e5e7eb 25%,#fff 0,#fff 50%) 0 0 / 16px 16px}.toolbar,.add-row{display:flex;flex-wrap:wrap;gap:.5rem;align-items:center;margin-top:.75rem}.add-row{margin-top:0}.meta{margin-left:auto;color:#6b7280;font-size:.85rem}.btn{min-height:44px;padding:0 1rem;border:0;border-radius:.5rem;background:#e5e7eb;font:inherit;font-weight:600;cursor:pointer;display:inline-flex;align-items:center}.btn:hover{background:#d1d5db}.btn-ghost{background:transparent;border:1px solid #d1d5db}.btn-small{min-height:44px;padding:0 .75rem}.btn-primary{width:100%;background:#2563eb;color:#fff;margin-top:1rem;justify-content:center}.btn-primary:hover{background:#1d4ed8}.btn:disabled{opacity:.6;cursor:progress}.panel h2{font-size:1rem;margin:1rem 0 .5rem}.muted{color:#6b7280;font-size:.9rem}.list{list-style:none;margin:0;padding:0;display:grid;gap:.5rem}.item{border:1px solid #e5e7eb;border-radius:.5rem;padding:.5rem .75rem}.item.selected{border-color:#2563eb;box-shadow:0 0 0 2px #bfdbfe}.item-head{display:flex;justify-content:space-between;align-items:center}.field{display:grid;gap:.25rem;margin-top:.5rem;font-size:.85rem;color:#4b5563;flex:1}.field textarea{min-height:44px;padding:.6rem .75rem;border:1px solid #d1d5db;border-radius:.5rem;font:inherit;resize:vertical}.field input[type=text]{min-height:44px;padding:0 .75rem;border:1px solid #d1d5db;border-radius:.5rem;font:inherit}.field input[type=color]{width:100%;height:44px;padding:2px;border:1px solid #d1d5db;border-radius:.5rem;background:#fff}.field input[type=range]{width:100%;height:44px}.field-row{display:flex;gap:.75rem}.progress{height:8px;background:#e5e7eb;border-radius:4px;overflow:hidden;margin-top:.5rem}.progress div{height:100%;background:#2563eb;transition:width .1s}.notice{background:#dcfce7;color:#166534;padding:.75rem 1rem;border-radius:.5rem;margin-bottom:1rem}.btn-block{width:100%;justify-content:center;margin-top:.5rem}.gallery{margin-top:1.5rem}.gallery h2{font-size:1.1rem}.thumbs{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:.75rem}.thumb{background:#fff;border-radius:.75rem;padding:.5rem;display:grid;gap:.25rem}.thumb-img{aspect-ratio:1 / 1;display:flex;align-items:center;justify-content:center;background:#f3f4f6;border-radius:.5rem;overflow:hidden}.thumb-img img{max-width:100%;max-height:100%}.thumb-name{font-weight:600;font-size:.85rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@media (max-width: 800px){.editor{grid-template-columns:1fr}}
