@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700;800&family=Outfit:wght@500;600;700;800&display=swap');
:root{--red:#c91f36;--red2:#a9142b;--yellow:#ffc928;--ink:#20212a;--muted:#737784;--line:#e8e9ed;--bg:#f5f6f8;--white:#fff}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font-family:'DM Sans',Arial,sans-serif}.topbar{height:76px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;padding:0 max(calc((100vw - 1120px)/2),24px);gap:12px}.brandmark{width:42px;height:42px;border-radius:12px;background:var(--red);color:#fff;font:800 16px Outfit;display:grid;place-items:center;box-shadow:0 5px 12px #c91f362b}.brand{font:800 17px Outfit;letter-spacing:.8px}.subbrand{font-size:9px;letter-spacing:1.4px;color:#8a8d96;font-weight:700;margin-top:2px}.top-pill{margin-left:auto;border:1px solid #f1d8a0;background:#fff9e9;color:#8a5b00;border-radius:30px;padding:8px 13px;font-size:10px;font-weight:800;letter-spacing:.6px}.wrap{max-width:1000px;margin:34px auto 50px;padding:0 20px}.intro{display:flex;justify-content:space-between;align-items:center;margin:0 0 24px;padding:4px 2px}.eyebrow{font-size:10px;letter-spacing:2px;color:var(--red);font-weight:800;margin:0 0 8px}.intro h1{font:800 clamp(27px,4vw,38px) Outfit;margin:0;letter-spacing:-1.2px}.intro h1 span{color:var(--red)}.muted{color:var(--muted);font-size:13px;margin:8px 0 0;max-width:620px;line-height:1.6}.intro-icon{font-size:52px;color:#d7d9df;background:#fff;border:1px solid var(--line);border-radius:20px;width:84px;height:84px;display:grid;place-items:center}.panel{background:#fff;border:1px solid var(--line);border-radius:15px;padding:23px 25px;margin-bottom:16px;box-shadow:0 3px 12px #1d24300a}.section-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:18px}.section-head>div{display:flex;align-items:center;gap:11px}.section-head h2{font:700 17px Outfit;margin:0}.step{width:25px;height:25px;border-radius:8px;background:#fff1f2;color:var(--red);display:grid;place-items:center;font-size:11px;font-weight:800}.hint{font-size:11px;color:#9296a0}.paper-options{display:grid;grid-template-columns:1fr 1fr;gap:13px;margin-bottom:18px}.paper-card{border:1.5px solid var(--line);border-radius:12px;padding:13px;display:flex;align-items:center;gap:13px;cursor:pointer;position:relative;transition:.15s}.paper-card.selected{border-color:var(--red);background:#fffafb}.paper-card input{position:absolute;opacity:0}.paper-preview{display:block;border:1.5px solid #c9cbd2;background:linear-gradient(135deg,#fff,#f4f4f5);box-shadow:2px 3px 5px #00000012}.paper-preview.a4{width:33px;height:46px}.paper-preview.p1218{width:37px;height:46px}.paper-info{display:grid;gap:3px}.paper-info b{font-size:13px}.paper-info small{font-size:11px;color:var(--muted)}.check{margin-left:auto;color:var(--red);font-weight:900;opacity:0}.selected .check{opacity:1}.field-row{display:grid;grid-template-columns:repeat(3,1fr);gap:13px;margin-top:15px}.field-row.compact{margin-top:0}.field-row label,.item-settings label{display:grid;gap:7px;font-size:11px;color:#5d616c;font-weight:700}.field-row input,.field-row select,.item-settings input{width:100%;height:39px;border:1px solid #dfe1e6;border-radius:8px;background:#fff;padding:0 10px;color:#292b33;font:500 12px 'DM Sans';outline:none}.field-row input:focus,.field-row select:focus,.item-settings input:focus{border-color:var(--red);box-shadow:0 0 0 3px #c91f3610}.dropzone{border:1.5px dashed #d3d5dc;border-radius:12px;min-height:145px;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:6px;cursor:pointer;background:#fcfcfd;transition:.15s}.dropzone:hover,.dropzone.dragover{border-color:var(--red);background:#fffafb}.dropzone input{display:none}.upload-icon{width:31px;height:31px;background:#fff0f1;color:var(--red);border-radius:9px;display:grid;place-items:center;font-size:20px;font-weight:700}.dropzone b{font-size:13px}.dropzone span{font-size:11px;color:var(--muted)}.dropzone u{color:var(--red);font-weight:700}.dropzone small{font-size:10px;color:#a0a3ab;margin-top:3px}.file-list{display:grid;gap:8px;margin-top:12px}.empty{font-size:12px;color:#999;padding:13px;text-align:center;border:1px dashed #e3e4e8;border-radius:9px}.file-row{display:grid;grid-template-columns:39px minmax(100px,1fr) minmax(260px,360px) 28px;align-items:center;gap:10px;border:1px solid var(--line);border-radius:10px;padding:9px}.file-type{width:36px;height:36px;border-radius:8px;background:#eaf4ff;color:#2474ba;display:grid;place-items:center;font-size:9px;font-weight:900}.file-type.pdf{background:#fff0f0;color:#c91f36}.file-meta{min-width:0;display:grid;gap:4px}.file-meta b{font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.file-meta small{font-size:10px;color:#999}.item-settings{display:grid;grid-template-columns:repeat(3,1fr);gap:7px}.item-settings label{font-size:9px;gap:4px}.item-settings input{height:31px;padding:0 6px;font-size:11px}.remove{border:0;background:#fff0f1;color:var(--red);width:26px;height:26px;border-radius:7px;font-size:18px;cursor:pointer}.notice{background:#fff9e8;border:1px solid #f4e6bc;border-radius:8px;padding:10px 12px;color:#795f20;font-size:10px;line-height:1.5;margin-top:12px}.toggle-line{display:flex;align-items:center;justify-content:space-between;padding:12px 13px;border:1px solid var(--line);border-radius:9px}.toggle-line b{font-size:12px}.toggle-line small{display:block;color:var(--muted);font-size:10px;margin-top:4px}.switch{position:relative;width:39px;height:22px}.switch input{display:none}.switch span{position:absolute;inset:0;border-radius:20px;background:#d7d9df;cursor:pointer;transition:.2s}.switch span:before{content:'';position:absolute;width:16px;height:16px;left:3px;top:3px;background:#fff;border-radius:50%;transition:.2s}.switch input:checked+span{background:var(--red)}.switch input:checked+span:before{transform:translateX(17px)}.preview-area{display:flex;align-items:center;gap:30px;justify-content:center;min-height:190px;background:#fafbfc;border:1px dashed #e1e3e8;border-radius:10px;padding:18px}.sheet-preview{width:160px;display:grid;place-items:center;color:#a2a5ad;font-size:10px}.mini-sheet{width:100%;background:#fff;border:1px solid #bfc2ca;box-shadow:0 4px 13px #00000012;position:relative;overflow:hidden}.mini-sheet i{position:absolute;border:1px solid #d63a4e;background:#fff0f1;display:flex;align-items:center;justify-content:center;color:#b51e32;font-size:7px;font-style:normal;overflow:hidden}.preview-stats{display:flex;gap:24px}.preview-stats div{display:grid;gap:5px}.preview-stats b{font:700 20px Outfit}.preview-stats small{font-size:10px;color:var(--muted)}.actions{display:flex;justify-content:flex-end;gap:10px;margin:20px 0}.btn{height:45px;padding:0 20px;border-radius:9px;font:700 12px 'DM Sans';cursor:pointer;border:0}.btn-light{background:#fff;border:1px solid var(--line);color:#656975}.btn-primary{background:var(--red);color:#fff;min-width:180px;box-shadow:0 5px 12px #c91f362b}.btn-primary:hover{background:var(--red2)}.btn:disabled{opacity:.65;cursor:wait}.btn-primary span{font-size:17px;margin-left:10px}.status{font-size:12px;min-height:18px;margin:0 0 16px;color:#26834c}.status.error{color:#bd2335}.download-link{display:inline-block;margin-left:6px;color:var(--red);font-weight:800;text-decoration:underline}.spinner{display:inline-block;width:12px;height:12px;border:2px solid #ffffff70;border-top-color:#fff;border-radius:50%;animation:spin .7s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}footer{text-align:center;color:#9a9da5;font-size:10px;letter-spacing:.5px;margin-top:28px}@media(max-width:680px){.wrap{margin-top:22px;padding:0 13px}.topbar{padding:0 15px;height:66px}.top-pill{font-size:8px;padding:7px}.intro-icon{display:none}.panel{padding:17px 14px}.field-row{grid-template-columns:1fr 1fr}.paper-options{gap:8px}.paper-card{padding:10px;gap:8px}.file-row{grid-template-columns:34px minmax(80px,1fr) 28px}.item-settings{grid-column:2/4;grid-row:2}.remove{grid-column:3;grid-row:1}.preview-area{gap:15px;justify-content:space-around}.preview-stats{gap:12px}.preview-stats b{font-size:16px}.hint{display:none}}


/* V2: centered paper preview */
.preview-area {
  align-items: center;
  justify-content: center;
  gap: 28px;
}
.sheet-preview {
  width: min(220px, 42vw);
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 0;
}
.mini-sheet {
  width: 100%;
  margin: 0 auto;
  transform: none;
  transform-origin: center center;
}
.mini-sheet i {
  box-sizing: border-box;
}
.preview-page-note {
  color: var(--muted);
  font-size: 10px;
  text-align: center;
}
@media (max-width: 680px) {
  .preview-area {
    flex-wrap: wrap;
    gap: 16px;
  }
  .sheet-preview {
    width: min(190px, 55vw);
  }
}
