
  .layout { display:grid; grid-template-columns: 300px 1fr; gap:16px; padding:16px; max-width:1300px; margin:0 auto; }
  @media (max-width: 800px) { .layout { grid-template-columns: 1fr; } }
  .panel { background:var(--card); border:1px solid var(--line); border-radius:10px; padding:14px; align-self:start; }
  .step { margin-bottom:16px; }
  .step h2 { font-size:13px; margin:0 0 8px; text-transform:uppercase; letter-spacing:.04em; color:var(--mute); }
  .step h2 b { color:var(--accent); }
  input[type=file] { width:100%; font-size:13px; }
  button { font:inherit; font-size:14px; padding:8px 12px; border-radius:8px; border:1px solid var(--line); background:#fff; cursor:pointer; }
  button:hover:not(:disabled) { background:#f6efe3; }
  button:disabled { opacity:.45; cursor:not-allowed; }
  button.primary { background:var(--accent); color:#fff; border-color:var(--accent); width:100%; padding:11px; font-weight:600; }
  button.primary:hover:not(:disabled) { background:#9a3412; }
  .row { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
  .hint { font-size:12.5px; color:var(--mute); margin-top:6px; line-height:1.4; }
  label.chk { display:flex; gap:6px; align-items:center; font-size:13px; margin-top:8px; }
  #sigList { display:flex; flex-direction:column; gap:6px; margin-top:8px; }
  .sigItem { position:relative; border:2px solid var(--line); border-radius:8px; padding:6px; cursor:pointer;
             background-image: linear-gradient(45deg,#eee 25%,transparent 25%),linear-gradient(-45deg,#eee 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#eee 75%),linear-gradient(-45deg,transparent 75%,#eee 75%);
             background-size:12px 12px; background-position:0 0,0 6px,6px -6px,-6px 0; }
  .sigItem.active { border-color:var(--accent); box-shadow:0 0 0 2px rgba(194,65,12,.2); }
  .sigItem img { display:block; max-width:100%; max-height:60px; margin:0 auto; }
  .sigItem .rm { position:absolute; top:-8px; right:-8px; width:20px; height:20px; border-radius:50%; background:#b91c1c; color:#fff; text-align:center; line-height:20px; font-size:13px; }
  .stage { overflow:auto; background:#d8dbe0; border-radius:10px; padding:16px; text-align:center; min-height:300px; }
  .pagewrap { position:relative; display:inline-block; box-shadow:0 2px 12px rgba(0,0,0,.2); background:#fff; line-height:0; }
  canvas#pdfCanvas { display:block; }
  #overlay { position:absolute; inset:0; cursor:crosshair; touch-action:none; }
  .box { position:absolute; border:2px solid var(--accent); background:rgba(194,65,12,.08); display:flex; align-items:center; justify-content:center; overflow:hidden; }
  .box img { max-width:100%; max-height:100%; pointer-events:none; }
  .box { cursor:move; touch-action:none; overflow:visible; }
  .box.selected { box-shadow:0 0 0 2px rgba(194,65,12,.35); }
  .box .handle { position:absolute; width:14px; height:14px; background:#fff; border:2px solid var(--accent); border-radius:50%; touch-action:none; z-index:2; }
  .handle.tl { left:-8px; top:-8px; cursor:nwse-resize; } .handle.br { right:-8px; bottom:-8px; cursor:nwse-resize; }
  .handle.tr { right:-8px; top:-8px; cursor:nesw-resize; } .handle.bl { left:-8px; bottom:-8px; cursor:nesw-resize; }
  .box .x { top:-26px !important; right:auto !important; left:50%; margin-left:-10px; border-radius:50%; }
  .box.draft { border-style:dashed; }
  .box .x { position:absolute; top:0; right:0; width:20px; height:20px; line-height:18px; text-align:center; font-size:14px;
            background:var(--accent); color:#fff; cursor:pointer; line-height:20px; }
  .pager { display:flex; justify-content:center; align-items:center; gap:10px; margin-bottom:12px; font-size:14px; }
  .empty { color:var(--mute); padding:80px 20px; font-size:14px; line-height:1.5; }
  #status { font-size:13px; margin-top:8px; min-height:18px; }
  .err { color:#b91c1c; } .ok { color:#15803d; }
