body {
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
}
@page {
  size: A4;
  margin: 0;
}
.a4-container {
  width: 210mm;
  height: 297mm;
  position: relative;
  border: 0.2mm dashed #000;
}
.a4-container-horizontal {
  width: 210mm;
  height: 297mm;
  position: relative;
  border: 0.2mm dashed #000;
  padding: 40mm;
  box-sizing: border-box;
  writing-mode: vertical-rl;
}
.a5-container-horizontal {
  border: 0.2mm solid #ccc;
  width: 100%;
  max-width: 210mm; /* A5 width */
  height: 148.3mm; /* half of A4 height */
  box-sizing: border-box;
  padding: 20mm; /* adjust this for your desired margins */
  padding-top: 15mm;
}
.cut-line {
  border-top: 3px dashed #000;
  position: absolute;
  top: 148.5mm;
  width: 200mm;
  margin-left: 7mm;
}
.cut-line:before {
  content: "\2702"; /* This is the HTML entity for scissors */
  position: absolute;
  top: -23px;
  left: -20px;
  font-size: 30px;
}
@media print {
  .a4-container {
    page-break-after: always;
    border: none;
  }
  .a4-container-horizontal {
    page-break-after: always;
    border: none;
  }
  .a5-container-horizontal {
    border: none;
  }
}
