/* ===================== 💌 Κάρτες & προσκλήσεις ===================== */
/* Χρησιμοποιεί το πλαίσιο της Ζωγραφικής (.pt-*), τις λαβές/δακτύλιο του Κόμικ (.cm-selring) και το textDialog */

.cd-center { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: 6px; }
.cd-tabs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: center; }
.cd-tab {
  font-family: inherit; font-size: 14px; font-weight: 700; color: #546e7a; background: #fff; border: 2px solid #cfd8dc; border-radius: 16px;
  padding: 5px 12px; cursor: pointer;
}
.cd-tab.sel { background: #ec407a; border-color: #ec407a; color: #fff; }
.cd-layout-name { font-size: 13px; font-weight: 700; color: #78909c; margin-left: 8px; }
.cd-box {
  flex: 1; min-height: 0; position: relative; display: flex; align-items: center; justify-content: center; border-radius: 16px;
  background: #eceff1 repeating-linear-gradient(45deg, transparent 0 14px, rgba(255,255,255,.5) 14px 28px);
  box-shadow: inset 0 0 0 4px #fff, 0 8px 24px rgba(0,0,0,.14);
}
.cd-svg { display: block; touch-action: none; font-family: var(--font); background: #fff; box-shadow: 0 6px 22px rgba(0,0,0,.25); }
.cd-svg text { user-select: none; -webkit-user-select: none; pointer-events: none; }
.cd-item { cursor: move; }
.cd-handle { cursor: nwse-resize; }
.cd-handle[data-handle=delete] { cursor: pointer; }

/* Πάνελ: φόντα, διατάξεις */
.cd-themes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.cd-theme {
  font-family: inherit; font-size: 11px; font-weight: 700; color: #37474f; border: 2px solid #cfd8dc; border-radius: 10px; padding: 4px 2px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 1px; min-width: 0; text-shadow: 0 0 3px #fff, 0 0 3px #fff;
}
.cd-theme-e { font-size: 22px; }
.cd-theme:hover { transform: scale(1.04); border-color: #ffb74d; }
.cd-theme.sel { border-color: #ff9800; box-shadow: 0 0 0 2px #ffe082; }
.pt-opt.cd-lo { flex-direction: column; align-items: flex-start; height: auto; padding: 6px 10px; line-height: 1.15; }
.pt-opt.cd-lo small { font-size: 11px; font-weight: 600; color: #78909c; }
.cd-wrap .pt-tools { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cd-wrap .pt-tool { min-width: 0; }
.cd-wrap .pt-tool .n { white-space: normal; text-align: center; font-size: 11px; }

/* ---- Σελίδες εκτύπωσης (προεπισκόπηση στο παράθυρο & πραγματική εκτύπωση) ---- */
.pr-preview { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin: 8px 0; }
.pr-page { position: relative; background: #fff; overflow: hidden; box-shadow: 0 4px 16px rgba(0,0,0,.25); flex: none; }
.pr-cell { position: absolute; overflow: hidden; }
.pr-cell svg { display: block; }
.pr-line { position: absolute; pointer-events: none; }
.pr-line.v { top: 0; bottom: 0; width: 0; border-left: 1px dashed #b0bec5; }
.pr-line.h { left: 0; right: 0; height: 0; border-top: 1px dashed #b0bec5; }
.pr-line.cut.v { border-left-style: dotted; border-left-color: #90a4ae; }
.pr-line.cut.h { border-top-style: dotted; border-top-color: #90a4ae; }
.pr-line.cut span { position: absolute; font-size: 10px; line-height: 1; background: #fff; border-radius: 50%; }
.pr-line.cut.v span { left: -6px; top: 2px; }
.pr-line.cut.h span { top: -6px; left: 2px; }
#print-root { display: none; }

@media print {
  body > #app, body > #overlay, body > #confetti, body > #hints, body > #music-toast { display: none !important; }
  html, body { height: auto !important; overflow: visible !important; background: #fff !important; }
  #print-root { display: block; }
  .pr-page { box-shadow: none; break-after: page; page-break-after: always; }
  .pr-page.portrait { page: cd-portrait; }
  .pr-page.landscape { page: cd-landscape; }
  .pr-line { display: block; }
  .pr-line.cut span { font-size: 4mm; }
}
@page { margin: 0; }
@page cd-portrait { size: A4 portrait; margin: 0; }
@page cd-landscape { size: A4 landscape; margin: 0; }
