body { background: #f8fafc; }
.tool-card { transition: transform .15s ease, box-shadow .15s ease; }
.tool-card:hover { transform: translateY(-3px); box-shadow: 0 .5rem 1rem rgba(0,0,0,.1) !important; }

#dropZone.dragover { background: #e7f1ff; border-color: #0d6efd !important; }


/* ================= Print tool UI ================= */
.dps-thumb{position:relative;width:84px;height:84px;border:1px solid #dee2e6;border-radius:8px;overflow:hidden;cursor:grab;background:#fff}
.dps-thumb img{width:100%;height:100%;object-fit:cover}
.dps-thumb.is-primary{outline:2px solid #f5b301}
.dps-thumb.is-selected{outline:2px solid #0d6efd}
.dps-thumb.dragging{opacity:.4}
.dps-thumb-actions{position:absolute;inset:auto 0 0 0;display:flex;justify-content:center;flex-wrap:wrap;background:rgba(0,0,0,.6);padding:1px 0}
.dps-thumb-actions button{border:0;background:transparent;color:#fff;font-size:.72rem;padding:2px 4px}
.dps-slot{position:relative;height:110px;border:2px dashed #adb5bd;border-radius:10px;display:flex;align-items:center;justify-content:center;cursor:pointer;background:#fff;overflow:hidden}
.dps-slot.dragover,#dropZone.dragover{background:#e7f1ff;border-color:#0d6efd}
.dps-slot img{max-width:100%;max-height:100%;object-fit:contain}
.dps-slot-empty{text-align:center;color:#6c757d}
#previewArea{background:#e9ecef;border-radius:10px;padding:12px;max-height:80vh;overflow:auto}
.dps-frame{margin:0 auto 18px;width:max-content;max-width:100%}
.dps-cap{font-size:.75rem;color:#6c757d;margin-bottom:4px}
.dps-zoom{zoom:var(--dps-zoom,1);box-shadow:0 2px 10px rgba(0,0,0,.2);background:#fff;width:max-content}
.dps-manual-able .dps-cell{cursor:pointer}

/* sheets (shared by preview and the hidden print copy) */
.dps-sheet{position:relative;background:#fff;overflow:hidden;box-sizing:border-box;-webkit-print-color-adjust:exact;print-color-adjust:exact}
.dps-cell{position:absolute;box-sizing:border-box;overflow:hidden;display:flex;align-items:center;justify-content:center}
.dps-cell img{width:100%;height:100%;display:block;max-width:none;user-select:none}
.dps-ph{border:1px dashed #adb5bd;background:repeating-linear-gradient(45deg,#f8f9fa,#f8f9fa 6px,#eef0f2 6px,#eef0f2 12px);color:#8a939b;font-size:.8rem}
.dps-guides{position:absolute;left:0;top:0;pointer-events:none}

/* the print copy lives in <body> but is never shown on screen */
#printRoot{display:none}

/* ================= PRINT =================
   Everything except #printRoot is removed from layout (display:none, NOT visibility),
   so ads, header, footer, sticky bars and AdSense overlays cannot add blank pages. */
@media print{
  html,body{margin:0!important;padding:0!important;height:auto!important;min-height:0!important;background:#fff!important;overflow:visible!important}
  body.dps-print-tool > *:not(#printRoot){display:none!important}
  body.dps-print-tool #printRoot{display:block!important;position:static!important;margin:0!important;padding:0!important}
  .dps-ad,ins.adsbygoogle,iframe,.google-auto-placed,#stickyAdBar{display:none!important}
  #printRoot .dps-sheet{margin:0!important;box-shadow:none!important;page-break-inside:avoid;break-inside:avoid}
  #printRoot .dps-sheet + .dps-sheet{page-break-before:always;break-before:page}
}
