/* Printable pages: 8.5 x 11 in. Fonts are loaded by the host page. */
.page { position: relative; width: 8.5in; height: 11in; overflow: hidden; background: #fbf4e4; color: #3a2a1a; box-sizing: border-box; }
.page .frame { position: absolute; inset: 0; width: 100%; height: 100%; }
.page-inner { position: relative; padding: 0.9in 0.95in 0.75in; height: 100%; box-sizing: border-box; }
.letter p { font-family: 'Kalam', 'Segoe Print', cursive; font-size: var(--fs, 15.5pt); line-height: 1.42; margin: 0 0 0.55em; }
.lh { text-align: center; margin-bottom: 0.15in; }
.lh-title { font-family: 'Mountains of Christmas', Georgia, serif; font-weight: 700; font-size: 34pt; color: #b3202a; line-height: 1; }
.lh-sub { font-family: Georgia, serif; font-size: 10pt; letter-spacing: 0.25em; text-transform: uppercase; color: #2f6b3a; margin-top: 4px; }
.date { text-align: right; font-family: 'Kalam', cursive; font-size: 12pt; margin-bottom: 0.12in; }
.signoff { font-family: 'Kalam', cursive; font-size: 15pt; margin-top: 0.1in; }
.signature { font-family: 'Great Vibes', 'Brush Script MT', cursive; font-size: 46pt; color: #b3202a; line-height: 1.1; }
.ps { font-family: 'Kalam', cursive; font-size: 12pt; margin-top: 0.08in; color: #4a3a2a; }
.sigrow { display: flex; align-items: center; justify-content: space-between; gap: 0.2in; }
.letter .seal { flex: none; width: 1.1in; height: 1.1in; transform: rotate(-12deg); }

.cert-inner { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 1.2in; }
.cert-kicker, .cert-body { font-family: Georgia, serif; font-size: 16pt; font-style: italic; color: #2f6b3a; }
.cert-name { font-family: 'Great Vibes', cursive; font-size: 66pt; color: #b3202a; line-height: 1.15; margin: 0.15in 0; border-bottom: 2px solid #d9b86a; padding: 0 0.4in; max-width: 100%; overflow-wrap: anywhere; }
.cert-title { font-family: 'Mountains of Christmas', Georgia, serif; font-weight: 700; font-size: 48pt; color: #b3202a; margin-top: 0.1in; line-height: 1.05; }
.cert-year { font-family: Georgia, serif; font-size: 18pt; letter-spacing: 0.2em; text-transform: uppercase; color: #2f6b3a; margin-top: 0.1in; }
.cert-note { font-family: Georgia, serif; font-size: 13pt; max-width: 5in; margin: 0.3in auto 0.2in; color: #4a3a2a; }
.cert .seal { width: 1.5in; height: 1.5in; }
.cert-sigs { display: flex; gap: 0.8in; margin-top: 0.25in; }
.cert-sigs > div { display: flex; flex-direction: column; align-items: center; }
.cert-sigs .sig { font-family: 'Great Vibes', cursive; font-size: 28pt; color: #3a2a1a; }
.cert-sigs .line { border-top: 1px solid #3a2a1a; font-family: Georgia, serif; font-size: 10pt; padding-top: 4px; width: 2.3in; }

.envs { background: #fff; }
.envs .page-inner { padding: 0.6in; display: flex; flex-direction: column; gap: 0.3in; }
.env-help { font-family: Georgia, serif; font-size: 11pt; color: #555; text-align: center; }
.env { position: relative; height: 3.1in; border: 2px dashed #bbb; background: #fbf4e4; }
.env-from { position: absolute; left: 0.3in; top: 0.25in; font-family: 'Kalam', cursive; font-size: 11.5pt; line-height: 1.3; color: #b3202a; }
.env .stamp { position: absolute; right: 0.3in; top: 0.2in; width: 0.8in; height: 1in; }
.postmark { position: absolute; right: 1.3in; top: 0.35in; border: 2px solid #2f6b3a; color: #2f6b3a; border-radius: 50%; padding: 0.12in 0.18in; font: 700 8pt Georgia, serif; text-align: center; transform: rotate(-14deg); opacity: 0.8; }
.env-to { position: absolute; left: 2.6in; top: 1.35in; font-family: 'Great Vibes', cursive; font-size: 34pt; line-height: 1.1; color: #3a2a1a; }

@media print {
  @page { size: letter; margin: 0; }
  html, body { background: #fff !important; margin: 0 !important; padding: 0 !important; }
  .no-print { display: none !important; }
  .wrap { padding: 0 !important; max-width: none !important; }
  .ws { display: block !important; padding: 0 !important; }
  #kit .page:last-child { break-after: auto !important; page-break-after: auto !important; }
  #kit, #kit .scaler { transform: none !important; width: auto !important; height: auto !important; zoom: 1 !important; margin: 0 !important; padding: 0 !important; }
  #kit .page { zoom: 1 !important; break-after: page; page-break-after: always; box-shadow: none !important; margin: 0 !important; }
  .page, .page * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
