body {
  margin: 0;
  font-family: system-ui, sans-serif;
  background: #e5e7eb;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 1rem;
}
.print-toolbar {
  max-width: 640px;
  width: 100%;
  text-align: center;
  margin-bottom: 1.5rem;
}
.print-toolbar h1 {
  font-size: 1.25rem;
  margin: 0 0 0.5rem;
}
.print-toolbar p {
  color: #4b5563;
  font-size: 0.9rem;
  margin: 0 0 1rem;
}
.print-limited-note {
  color: #92400e !important;
  background: #fef3c7;
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem !important;
}
.print-sheet {
  background: #fff;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
  /* На узких экранах лист показывается уменьшенным (иначе A4 не влезает в
     телефон), но пропорция страницы сохраняется - размер в миллиметрах
     возвращается ниже, в @media print. */
  width: 100%;
  max-width: 148mm;
}
.print-sheet.a5 {
  aspect-ratio: 148 / 210;
}
.print-sheet.a4 {
  max-width: 210mm;
  aspect-ratio: 210 / 297;
}
.print-sheet img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.print-back {
  max-width: 640px;
  width: 100%;
  margin-top: 1.25rem;
  text-align: center;
}
.print-back a {
  color: #d61f69;
  text-decoration: underline;
}

@media print {
  body {
    background: #fff;
    padding: 0;
  }
  .print-sheet {
    box-shadow: none;
    margin: 0 auto;
    max-width: none;
    aspect-ratio: auto;
  }
  .print-sheet.a5 {
    width: 148mm;
    height: 210mm;
  }
  .print-sheet.a4 {
    width: 210mm;
    height: 297mm;
  }
  .no-print {
    display: none !important;
  }
  @page {
    margin: 0;
  }
}

/* Кнопка печати: в Next-порте она была компонентом, здесь обычная кнопка. */
.print-button {
  background: #d61f69;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.6rem 1.4rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.print-button:hover {
  background: #e74694;
}
