/* ===================== 📖 Κόμικ ===================== */
/* Χρησιμοποιεί το πλαίσιο της Ζωγραφικής (.pt-*) και το παράθυρο κειμένου textDialog (draw.js) */

.cm-page-box {
  flex: 1; min-width: 0; min-height: 0; position: relative; overflow: hidden; border-radius: 16px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding-top: 4px;
  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);
}
.cm-svg { display: block; touch-action: none; font-family: var(--font); box-shadow: 0 6px 22px rgba(0,0,0,.25); background: #fff; }
.cm-svg text { user-select: none; -webkit-user-select: none; pointer-events: none; }
.cm-item { cursor: move; }
.cm-handle { cursor: nwse-resize; }
.cm-handle[data-handle=delete] { cursor: pointer; }
.cm-selring { animation: mm-march 1.2s linear infinite; }
[data-cell] { cursor: pointer; }
[data-cap], [data-title] { cursor: text; }

/* Πάνελ: ήρωες, σκηνικά, εκφράσεις, πόζες, διατάξεις */
.cm-chars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.cm-char-btn, .cm-scene-btn {
  font-family: inherit; font-size: 11px; font-weight: 700; color: #37474f; background: #fff; border: 2px solid #cfd8dc; border-radius: 10px;
  padding: 3px 2px 2px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 1px; min-width: 0;
}
.cm-char-btn span, .cm-scene-btn span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.cm-char-btn:hover, .cm-scene-btn:hover { border-color: #ffb74d; transform: scale(1.04); }
.cm-char-btn.sel, .cm-scene-btn.sel { border-color: #ff9800; background: #ffe082; }
.cm-char-btn svg { display: block; }
.cm-scenes { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.cm-scene-btn svg { border-radius: 6px; width: 100%; height: auto; }
.cm-grid6 { grid-template-columns: repeat(6, 1fr); }
.cm-grid4 { grid-template-columns: repeat(4, 1fr); }
.cm-grid6 .pt-opt, .cm-grid4 .pt-opt { min-width: 0; padding: 0; font-size: 19px; }
.cm-props { max-height: 260px; }
.pt-opt.cm-layout { flex: 1; font-size: 12px; line-height: 1; min-width: 0; padding: 0 2px; height: 44px; }
.pt-opt[disabled] { opacity: .4; pointer-events: none; }

/* Τα κουμπιά εργαλείων χωρούν πάντα σε 2 στήλες */
.cm-wrap .pt-tools { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cm-wrap .pt-tool { min-width: 0; }
.cm-wrap .pt-tool .n { white-space: normal; text-align: center; font-size: 11px; }

/* Καρτέλες σελίδων (φυλλάδιο) */
.cm-pages { display: flex; align-items: center; justify-content: center; gap: 5px; flex-wrap: wrap; flex: none; z-index: 1; }
.cm-pages-l { font-size: 18px; margin-right: 2px; }
.cm-page-tab { min-width: 34px; height: 32px; border-radius: 10px; border: 2px solid #b0bec5; background: #fff; color: #37474f; font-family: inherit; font-weight: 900; font-size: 15px; cursor: pointer; padding: 0 8px; }
.cm-page-tab:hover { border-color: #ff9800; }
.cm-page-tab.sel { background: #ff9800; border-color: #ff9800; color: #fff; box-shadow: 0 2px 0 #e65100; }
.cm-page-tab.add { border-style: dashed; color: #43a047; border-color: #a5d6a7; font-size: 20px; line-height: 1; }
.cm-pages-n { font-size: 12px; font-weight: 700; color: #78909c; margin-left: 6px; }
/* Εκτύπωση: μία σελίδα ανά φύλλο ή φυλλάδιο (2 ανά φύλλο) */
.cm-pr { width: 210mm; height: 297mm; box-sizing: border-box; padding: 10mm; background: #fff; }
.cm-pr.landscape { width: 297mm; height: 210mm; }
.cm-pr-one { width: 100%; height: 100%; }
.cm-pr-two { display: flex; width: 100%; height: 100%; gap: 0; }
.cm-pr-half { flex: 1; min-width: 0; height: 100%; position: relative; padding: 4mm; box-sizing: border-box; }
.cm-pr-half + .cm-pr-half { border-left: 1px dashed #bbb; }
.cm-pr-half i { position: absolute; bottom: 1mm; left: 0; right: 0; text-align: center; font-style: normal; font-size: 9pt; color: #999; }
