body {
  margin: 0;
  padding: 20px;
  font-family: Arial, sans-serif;
  background: linear-gradient(to right, #f3f4f6, #e0e7ef);
  color: #2c3e50;
  display: flex;
  flex-direction: column;
  align-items: center;
}
header h1 {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  font-size: 36px;
  font-weight: 600;
  margin-bottom: 30px;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}
textarea {
  background: #fdfdfd;
  width: 80%;
  height: 200px;
  font-size: 16px;
  margin-bottom: 20px;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
  resize: vertical;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
button {
  padding: 10px 20px;
  letter-spacing: 0.4px;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  background: #0070f3;
  color: white;
  border: none;
  border-radius: 5px;
  margin: 5px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: background 0.3s, transform 0.2s;
}
button:hover {
  background: #0055cc;
  transform: scale(1.05);
}
.page-count-display {
  margin-top: 30px;
  font-size: 20px;
  font-weight: 500;
  font-family: "Segoe UI", sans-serif;
  color: #555;
}
.container {
  width: 100%;
  display: flex;
  justify-content: center;
  overflow: auto;
  margin-top: 0;
  margin-bottom: 0;
}
.page {
  width: 2480px;
  height: 3508px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  page-break-after: always;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: repeat(13, 1fr);
  gap: 15px;
  padding: 80px 150px 50px 160px;
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
  transform-origin: top center;
  margin-bottom: -30px;
}
.entry {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow-wrap: break-word;
  word-break: break-word;
  width: 100%;
  height: 100%;
}
#output {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
}
.page.deceased {
  background-image: url("Deceased.jpg");
}
.page.regular {
  background-image: url("Lamp.jpg");
}
.name-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 0;
}
.deceased-label {
  font-size: 50px;
  font-weight: bold;
  margin: 0;
  padding-bottom: 5px;
  line-height: 1;
}
.name {
  font-size: 70px;
  margin: 0;
  padding: 0;
  line-height: 1.2;
  word-break: break-word;
  margin-bottom: 3px;
}
.number {
  margin-top: 5px;
  font-size: 38px;
  color: #333;
}
