*{box-sizing:border-box}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,PingFang SC,Microsoft YaHei,sans-serif;color:#1e293b;background:linear-gradient(135deg,#eff6ff,#faf5ff)}button,input,select{font-family:inherit}button{cursor:pointer}button:disabled{opacity:.6;cursor:not-allowed}.app{min-height:100vh;display:flex;flex-direction:column}.topbar{background:linear-gradient(90deg,#3b82f6,#8b5cf6);color:#fff;box-shadow:0 2px 10px #4f46e533;position:sticky;top:0;z-index:20}.topbar-inner{max-width:1440px;margin:0 auto;padding:12px 20px;display:flex;align-items:center;gap:28px}.brand{display:flex;align-items:center;gap:10px;color:#fff;text-decoration:none;font-size:19px;font-weight:700;white-space:nowrap}.topbar nav{display:flex;gap:18px}.topbar nav button{background:transparent;border:0;color:#fff;font-size:14px;font-weight:500;padding:6px 2px}.topbar nav button:hover{color:#fef08a}.export-bar{margin-left:auto;display:flex;gap:8px}.export-bar button{background:#ffffff29;border:1px solid rgba(255,255,255,.5);color:#fff;border-radius:8px;padding:7px 13px;font-size:13px;transition:background .15s}.export-bar button:hover{background:#ffffff4d}.layout{flex:1;width:100%;max-width:1440px;margin:0 auto;padding:20px;display:grid;grid-template-columns:350px minmax(0,1fr);gap:20px;align-items:start}.controls{background:#fff;border-radius:14px;padding:18px;box-shadow:0 4px 18px #6366f114;max-height:calc(100vh - 110px);overflow-y:auto;position:sticky;top:82px}.panel-section{padding-bottom:16px;margin-bottom:16px;border-bottom:1px solid #eef2f7}.panel-section h3{margin:0 0 12px;font-size:14px;color:#4338ca}.field{margin-bottom:12px}.field:last-child{margin-bottom:0}.field-head{display:flex;justify-content:space-between;align-items:baseline;margin-bottom:5px}.field-head label{font-size:13px;font-weight:500}.hint{font-size:12px;color:#94a3b8}input[type=text],input[type=number],select{width:100%;padding:8px 10px;border:1px solid #dbe3ef;border-radius:8px;background:#fff;font-size:13px;color:#1e293b}input[type=color]{width:100%;height:36px;padding:2px;border:1px solid #dbe3ef;border-radius:8px;background:#fff}input[type=range]{width:100%;accent-color:#6366f1}.row{display:grid;grid-template-columns:1fr 1fr;gap:10px}.row.row-3{grid-template-columns:repeat(3,1fr)}.row.row-4{grid-template-columns:repeat(4,1fr)}.row-4 .field-head label{font-size:12px}.swatches{display:flex;gap:10px;align-items:flex-start}.swatches>input[type=color]{width:40px;height:40px;flex:none;padding:2px}.swatch-grid{flex:1;display:grid;grid-template-columns:repeat(7,1fr);gap:4px}.swatch-grid button{border:1px solid #dbe3ef;border-radius:5px;aspect-ratio:1;padding:0}.swatch-grid button.active{outline:2px solid #6366f1;outline-offset:1px}.decoration-panel{padding:10px;margin-top:8px;border:1px solid #fde68a;border-radius:8px;background:#fffbeb}.recommend-button{width:100%;margin-bottom:10px;border:0;border-radius:8px;padding:8px;background:#f59e0b;color:#fff;font-size:12px}.recommend-button:hover{background:#d97706}.sides-grid{display:grid;grid-template-columns:1fr 1fr;gap:4px 10px}.sides-grid .check{margin-bottom:0}.align-end{align-items:flex-end;padding-bottom:8px}.hint-block{margin:6px 0 0;font-size:12px;color:#64748b;line-height:1.6}.choice{display:flex;gap:6px;flex-wrap:wrap}.choice button{border:1px solid #dbe3ef;background:#fff;color:#475569;border-radius:8px;padding:6px 11px;font-size:12px}.choice button.active{background:#6366f1;border-color:#6366f1;color:#fff}.check{display:flex;align-items:center;gap:8px;font-size:13px;margin-bottom:10px}.check input{accent-color:#6366f1}.button-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.button-grid button{border:0;background:#f1f5f9;color:#334155;border-radius:8px;padding:9px;font-size:12px}.button-grid button:hover{background:#e0e7ff;color:#4338ca}.link-button{border:0;background:transparent;color:#6366f1;font-size:12px;padding:10px 0 0}.tips{font-size:12px;color:#64748b}.tips h3{font-size:13px;color:#4338ca;margin:0 0 6px}.tips p{margin:4px 0;line-height:1.6}.preview-area{background:#fff;border-radius:14px;padding:16px;box-shadow:0 4px 18px #6366f114;min-height:600px;overflow:auto}.preview-meta{display:flex;justify-content:space-between;font-size:13px;color:#64748b;margin-bottom:14px}.preview-meta span:first-child{font-weight:600;color:#4338ca}.paper-stack{display:flex;flex-direction:column;align-items:center;gap:20px}.paper-stack svg{max-width:794px;background:#fff;box-shadow:0 3px 14px #0f172a24;border:1px solid #e2e8f0}footer{background:#fff;border-top:1px solid #e2e8f0;padding:20px;text-align:center;font-size:12px;color:#64748b;display:flex;flex-direction:column;gap:8px;align-items:center}footer strong{color:#4338ca;margin-right:10px}.footer-links{display:flex;gap:16px}.footer-links button{border:0;background:transparent;color:#6366f1;font-size:12px}.modal-mask{position:fixed;top:0;right:0;bottom:0;left:0;background:#0f172a73;display:flex;align-items:center;justify-content:center;z-index:50;padding:20px}.modal{background:#fff;border-radius:16px;width:min(680px,100%);max-height:80vh;overflow:auto;box-shadow:0 20px 60px #0f172a4d}.modal-head{display:flex;justify-content:space-between;align-items:center;padding:18px 22px;border-bottom:1px solid #eef2f7}.modal-head h2{margin:0;font-size:18px;color:#4338ca}.modal-head button{border:0;background:transparent;font-size:24px;color:#94a3b8;line-height:1}.modal-body{padding:20px 22px 26px;font-size:14px;line-height:1.7;color:#475569}.modal-lead{margin-top:0}.template-tabs{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:10px}.template-tabs button{padding:5px 11px;border:1px solid #d8dce8;border-radius:999px;background:#fff;color:#475569;font-size:12px;cursor:pointer}.template-tabs button.active{background:#6366f1;border-color:#6366f1;color:#fff}.template-search{width:100%;margin-bottom:6px}.template-count{font-size:12px;color:#94a3b8;margin:0 0 12px}.template-empty{grid-column:1 / -1;color:#94a3b8}.template-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:10px}.template-card{border:1px solid #dbe3ef;background:#f8fafc;border-radius:10px;padding:12px;text-align:left}.template-card:hover{border-color:#6366f1;background:#eef2ff}.template-card span{display:block;font-weight:600;color:#334155;font-size:13px}.template-card small{display:block;color:#94a3b8;margin-top:4px;font-size:11px}.guide{padding-left:20px}.guide li{margin-bottom:6px}.modal-body h4{margin:18px 0 4px;color:#4338ca}.toast{position:fixed;right:24px;bottom:24px;background:#1e293b;color:#fff;padding:10px 18px;border-radius:10px;font-size:13px;z-index:80;box-shadow:0 8px 24px #0f172a40}@media (max-width: 960px){.topbar-inner{flex-wrap:wrap;gap:12px}.export-bar{margin-left:0;width:100%}.layout{grid-template-columns:1fr}.controls{position:static;max-height:none}}
