@page { size: A4; margin: 0; }

header, footer, .dossier-bar, .page-title, .page-lede, .page-steps, .toolbar, #dropzone, #editor-view, .print-hint { display: none !important; }
html, body { margin: 0 !important; padding: 0 !important; background: #fff !important; }
main { padding: 0 !important; }
#print-view { position: static !important; left: 0 !important; }

.print-sheet {
    width: 210mm; height: 297mm; margin: 0 !important; padding: 13.5mm 17.5mm !important;
    box-shadow: none !important; page-break-after: always; page-break-inside: avoid;
    display: grid; grid-template-columns: repeat(9, 15mm); grid-template-rows: repeat(11, 20mm);
    gap: 0; overflow: hidden !important;
}
.print-sheet:last-child { page-break-after: auto; }

.print-card-wrapper { 
    width: 15mm; height: 20mm; position: relative; overflow: visible; 
    display: flex; justify-content: center; align-items: center; 
}

.print-card.is-default {
    width: 15mm; height: 15mm; outline: 0.1px solid #e8e8e8; overflow: hidden;
}
.print-card-square-image { width: 100%; height: 100%; background-color: #eee; overflow: hidden; }
.print-card-square-image img { width: 100%; height: 100%; object-fit: cover; }

.print-card.is-custom {
    width: 15mm; height: 20mm; background: #fff; border: none;
    position: relative; overflow: visible; display: flex; flex-direction: column;
    outline: 0.1px solid #e8e8e8;
}
.print-card-image { flex: 1; width: 100%; background-color: #eee; position: relative; overflow: hidden; }
.print-card-image img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; }

.print-card-text-custom {
    flex-shrink: 0; padding: 0.5mm 0.8mm; display: flex; flex-direction: column;
    align-items: center; text-align: center; gap: 0.2mm; justify-content: flex-end;
}

/* --- ВИЗУАЛЬНОЕ РАЗДЕЛЕНИЕ ТЕКСТА В ПЕЧАТИ --- */

/* Заполненный заголовок */
.print-card-title.is-filled {
    font-weight: bold; font-size: 3.5pt; line-height: 1.1; width: 100%; color: #333;
    overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}

/* Пустой заголовок */
.print-card-title.is-empty {
    font-weight: normal; font-size: 3.5pt; line-height: 1.1; width: 100%; color: #bbb;
    overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}

/* Заполненный комментарий */
.print-card-comment.is-filled {
    font-size: 2.5pt; color: #555; width: 100%; white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis;
}

/* Пустой комментарий */
.print-card-comment.is-empty {
    font-size: 2.5pt; color: #bbb; width: 100%; white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis;
}

.print-card-bottom {
    display: flex; justify-content: space-between; align-items: flex-end;
    font-size: 2pt; width: 100%; margin-top: auto; flex-shrink: 0;
}
.print-card-bottom.center-single { justify-content: center; }

/* Заполненная дата */
.print-card-date.is-filled { color: #555; font-family: 'Courier New', Courier, monospace; font-size: 2.8pt; }

/* Пустая дата */
.print-card-date.is-empty { color: #bbb; font-family: 'Courier New', Courier, monospace; font-size: 2.8pt; }

.print-card-rating { display: inline-block; vertical-align: middle; flex-shrink: 0; }
.print-crop-marks { display: none !important; }

* { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; color-adjust: exact !important; }