:root{font-family:Segoe UI,PingFang SC,system-ui,-apple-system,sans-serif;line-height:1.5;font-weight:400;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;background:#f1f5f9}*{box-sizing:border-box}body{margin:0;background:#f1f5f9}a{color:inherit}.page{max-width:1200px;margin:0 auto;padding:2rem 1.5rem 4rem;color:#0f172a;font-family:Segoe UI,PingFang SC,system-ui,-apple-system,sans-serif}.header{display:flex;align-items:center;justify-content:space-between;gap:1rem;flex-wrap:wrap;margin-bottom:1.5rem}.eyebrow{font-size:.9rem;color:#2563eb;margin:0 0 .25rem;font-weight:600}h1{margin:0;font-size:1.9rem;font-weight:700}.sub{margin:.35rem 0 0;color:#475569}.actions{display:flex;align-items:center;gap:.75rem}.upload-btn{position:relative;display:inline-flex;align-items:center;gap:.5rem;padding:.65rem 1rem;border:1px dashed #94a3b8;border-radius:10px;cursor:pointer;color:#0f172a;background:#f8fafc;transition:border-color .2s ease,background .2s ease}.upload-btn input{position:absolute;inset:0;opacity:0;cursor:pointer}.upload-btn:hover{border-color:#2563eb;background:#eef2ff}.primary{border:none;background:linear-gradient(120deg,#2563eb,#1d4ed8);color:#fff;padding:.7rem 1.4rem;border-radius:10px;font-weight:600;cursor:pointer;box-shadow:0 8px 24px #2563eb2e;transition:transform .1s ease,box-shadow .1s ease}.primary:hover{transform:translateY(-1px);box-shadow:0 10px 28px #2563eb33}.primary:disabled{opacity:.6;cursor:not-allowed;box-shadow:none;transform:none}.panels{display:grid;gap:1rem;grid-template-columns:minmax(520px,1fr) 360px}.panel{background:#fff;border:1px solid #e2e8f0;border-radius:14px;padding:1rem;box-shadow:0 8px 30px #0f172a0a}.panel-head{display:flex;align-items:flex-start;justify-content:space-between;margin-bottom:.75rem;gap:1rem;flex-wrap:wrap}.panel-head-left{display:flex;flex-direction:column;gap:.25rem;flex:1 1 auto;min-width:0}.panel-head h2{margin:0;font-size:1.1rem}.list-stats{display:flex;gap:.6rem;align-items:center;font-size:.88rem;color:#596675;margin-top:.3rem;line-height:1.1}.list-stats span{white-space:normal}.muted{color:#64748b;margin:.2rem 0 0}.list-body{display:flex;flex-direction:column;gap:.75rem;min-height:160px}.empty{color:#94a3b8;text-align:center;border:1px dashed #e2e8f0;padding:1rem;border-radius:12px}.drop-inline{border:1px dashed #cbd5e1;background:#f8fafc;border-radius:10px;padding:.65rem .9rem;color:#475569;margin-bottom:.75rem}.list-actions{display:flex;gap:.5rem;margin-left:auto}.upload-btn.small{padding:.55rem .9rem}.card{display:grid;grid-template-columns:auto 64px 1fr auto;gap:.75rem;align-items:center;padding:.75rem;border:1px solid #e2e8f0;border-radius:12px;background:#f8fafc;transition:border-color .2s ease,background-color .2s ease}.card.processing{border-color:#3b82f6;background:#eff6ff}.card.error{border-color:#ef4444;background:#fef2f2}.grab{cursor:grab;color:#94a3b8;transition:color .2s ease}.grab.disabled{cursor:not-allowed;color:#cbd5e1}.thumb-container{width:64px;height:64px;display:flex;align-items:center;justify-content:center}.thumb{width:64px;height:64px;object-fit:contain;border-radius:8px;border:1px solid #e2e8f0;background:#fff}.thumb.placeholder{display:flex;align-items:center;justify-content:center;font-size:1.5rem;color:#94a3b8;background:#f1f5f9}.thumb.placeholder.error-thumb{color:#ef4444;background:#fee2e2}.loading-spinner{width:20px;height:20px;border:2px solid #e2e8f0;border-top:2px solid #3b82f6;border-radius:50%;animation:spin 1s linear infinite}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.meta{display:flex;flex-direction:column;gap:.2rem}.name{margin:0;font-weight:600}.info{margin:0;color:#64748b;font-size:.95rem}.info.processing{color:#3b82f6;font-weight:500}.info.error{color:#ef4444;font-weight:500}.actions{display:flex;align-items:center;gap:.5rem}.icon-btn{background:none;border:1px solid #cbd5e1;border-radius:6px;padding:.3rem;cursor:pointer;color:#64748b;display:flex;align-items:center;justify-content:center;transition:all .2s ease}.icon-btn:hover{background:#f1f5f9;border-color:#94a3b8;color:#2563eb}.icon-btn:active{transform:scale(.95)}.link{background:none;border:none;color:#ef4444;cursor:pointer;font-weight:600}.ghost-btn{border:1px solid #cbd5e1;background:#fff;border-radius:10px;padding:.6rem 1rem;cursor:pointer}.layout-options{display:flex;flex-direction:column;gap:.5rem}.layout-row{display:flex;gap:.75rem;align-items:center;margin:.5rem 0}.layout-row input[type=number]{width:90px;padding:.35rem .5rem;border-radius:8px;border:1px solid #cbd5e1}.radio{display:flex;align-items:center;gap:.45rem;color:#0f172a}.radio.inline{display:inline-flex;margin-right:.75rem}.custom-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.5rem;margin-top:.3rem}.custom-grid input{width:80px;padding:.3rem .4rem;border-radius:8px;border:1px solid #cbd5e1}.status{margin:.5rem 0 0;color:#0f172a}.ghost{opacity:.6}.preview-backdrop{position:fixed;inset:0;background:#0f172a59;display:flex;align-items:center;justify-content:center;padding:1rem;z-index:50}.preview-modal{background:#fff;border-radius:14px;padding:1rem;width:min(1060px,100%);max-height:92vh;overflow:hidden;box-shadow:0 20px 60px #00000026;position:relative;padding-bottom:120px;display:flex;flex-direction:column;align-items:center}.preview-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:.5rem;width:100%;max-width:720px}.preview-page{background:#f8fafc;border:1px solid #e2e8f0;border-radius:12px;padding:.75rem;width:min(88vw,820px);max-height:calc(85vh - 160px);overflow:auto;margin:0 auto;position:relative}.preview-page.portrait{max-width:820px}.preview-page.landscape{max-width:920px}.preview-grid{display:grid;gap:.75rem;height:auto;min-height:100%}.preview-toolbar{display:none}.toolbar-btn{width:42px;height:42px;display:inline-flex;align-items:center;justify-content:center;border-radius:10px;background:linear-gradient(180deg,#fff,#fbfdff);border:1px solid #e5e9ef;box-shadow:0 4px 12px #091e420a;cursor:pointer;color:#243447}.toolbar-btn:disabled{opacity:.45;cursor:not-allowed}.toolbar-pager{padding:4px 6px;background:transparent;color:#596675;font-size:.95rem}.toolbar-export{padding:6px 10px;border-radius:8px;background:linear-gradient(120deg,#2563eb,#1d4ed8);color:#fff;font-weight:700;box-shadow:0 8px 18px #2563eb1f}.toolbar-close{background:transparent;border:none;color:#ef4444;font-weight:700;cursor:pointer}.preview-toolbar-bottom{display:flex;justify-content:center;align-items:center;gap:20px;position:absolute;left:50%;bottom:24px;transform:translate(-50%);padding:18px 32px;background:linear-gradient(90deg,#f8fafc,#f1f5f9);border-radius:18px;box-shadow:0 4px 24px #00000014,0 1.5px 4px #0000000a;min-width:320px;max-width:90vw;width:fit-content;margin-left:auto;margin-right:auto;transition:box-shadow .2s,background .2s;z-index:100}.preview-toolbar-bottom button{margin:0 2px;border-radius:8px;border:none;background:#fff;color:#334155;font-weight:500;font-size:16px;padding:8px 18px;box-shadow:0 1px 4px #0000000a;transition:background .18s,color .18s,box-shadow .18s;cursor:pointer;outline:none;display:flex;align-items:center;gap:6px}.preview-toolbar-bottom button:active{background:#e2e8f0}.preview-toolbar-bottom button:focus{box-shadow:0 0 0 2px #60a5fa,0 1px 4px #0000000a}.preview-toolbar-bottom button:hover{background:#f1f5f9;color:#2563eb}.preview-toolbar-bottom .primary{background:linear-gradient(90deg,#2563eb,#60a5fa);color:#fff;font-weight:600;box-shadow:0 2px 8px #2563eb14}.preview-toolbar-bottom .primary:hover{background:linear-gradient(90deg,#1d4ed8,#38bdf8);color:#fff}.preview-toolbar-bottom .icon-btn{padding:8px 10px;background:transparent;color:#64748b;box-shadow:none}.preview-toolbar-bottom .icon-btn:hover{background:#e0e7ef;color:#2563eb}.preview-toolbar-bottom svg{width:22px;height:22px;vertical-align:middle}@media(max-width:720px){.preview-toolbar{display:none}.preview-modal{padding-bottom:72px}}.preview-slot{display:flex;gap:.5rem;align-items:center}.slot-frame{position:relative;border:1px dashed #cbd5e1;width:100%;height:100%;display:flex;align-items:center;justify-content:center;background:#fff;overflow:hidden}.preview-pager{min-width:90px;text-align:center}.nav-btn{width:36px;height:36px;display:inline-flex;align-items:center;justify-content:center;border-radius:8px;background:#fff;border:1px solid #e2e8f0;font-weight:700;cursor:pointer}.nav-btn:disabled{opacity:.5;cursor:not-allowed}.preview-actions-right{margin-left:.6rem;display:flex;gap:.5rem;align-items:center}.export-btn{padding:.45rem .9rem}.close-btn{padding:.45rem .6rem}.slot-border{position:absolute;inset:6px;border:1px dashed #cbd5e1;pointer-events:none}.slot-frame img{max-width:100%;max-height:100%;object-fit:contain}.slot-placeholder{color:#94a3b8}.slot-badge{position:absolute;top:6px;right:6px;background:transparent;color:#0f172a;padding:0;border-radius:6px;font-size:14px;font-weight:700;line-height:1;display:inline-flex;align-items:center;justify-content:center}.slot-badge{z-index:5;background:#fffc;padding:4px 8px;border-radius:10px;box-shadow:0 2px 6px #0000000f}.slot-frame img{z-index:1}@media(max-width:720px){.card{grid-template-columns:auto 48px 1fr;grid-template-rows:auto auto}.link{grid-column:3;justify-self:end}}
