/* Letter + certificate sheets. Fixed pixel sizes: 816x1056 = US Letter at 96dpi.
   Kept to CSS that both browsers' print and html2canvas render the same way. */
.sheet {
  --paper: #fbf3df;
  --paper-edge: #ecd5a8;
  --body-size: 22px;
  position: relative;
  width: 816px;
  height: 1056px;
  box-sizing: border-box;
  overflow: hidden;
  color: var(--ink);
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.sheet.cert { width: 1056px; height: 816px; }
.sheet *, .sheet *::before, .sheet *::after { box-sizing: border-box; }

.sheet.theme-snowy { --paper: #f7fafd; --paper-edge: #d9e6f3; }
.sheet.theme-candy { --paper: #fffbf7; --paper-edge: #f5e2d8; }

.sheet .paper {
  position: absolute;
  inset: 0;
  background-color: var(--paper);
  background-image: radial-gradient(ellipse at 50% 45%, var(--paper) 52%, var(--paper-edge) 100%);
}

.sheet .frame-outer { position: absolute; inset: 22px; border: 2px solid var(--gold); }
.sheet .frame-inner { position: absolute; inset: 30px; border: 1px solid var(--accent); opacity: .75; }

.sheet.theme-candy .frame-outer {
  inset: 18px;
  border: none;
  background-image: var(--stripes);
  background-size: 28px 28px;
}
.sheet.theme-candy .frame-inner {
  inset: 32px;
  border: none;
  opacity: 1;
  background-color: var(--paper);
  background-image: radial-gradient(ellipse at 50% 45%, var(--paper) 52%, var(--paper-edge) 100%);
}

.sheet .corner { position: absolute; width: 130px; height: 130px; }
.sheet .corner-tl { left: 10px; top: 10px; }
.sheet .corner-tr { right: 10px; top: 10px; }
.sheet .corner-bl { left: 10px; bottom: 10px; }
.sheet .corner-br { right: 10px; bottom: 10px; }

.sheet .content { position: absolute; }

/* ---------- letter ---------- */
.letter .postmark { position: absolute; right: 50px; top: 104px; width: 132px; height: 132px; }
.letter .content { inset: 66px 84px 54px; display: flex; flex-direction: column; }

.letter .lh { text-align: center; flex: 0 0 auto; }
.letter .lh-small { font-style: italic; font-size: 21px; letter-spacing: .03em; opacity: .85; }
.letter .lh-title {
  font-family: 'Mountains of Christmas', 'Cormorant Garamond', serif;
  font-weight: 700;
  font-size: 68px;
  line-height: 1;
  color: var(--accent);
  margin-top: 2px;
}
.letter .lh-addr {
  font-size: 13px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--leaf);
  margin-top: 10px;
  font-weight: 600;
}
.letter .lh-rule { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 14px auto 0; width: 62%; }
.letter .lh-rule span { flex: 1; height: 1px; background: var(--gold); }
.letter .lh-rule svg { flex: 0 0 auto; }

.letter .lt-date { text-align: right; font-style: italic; font-size: 18px; margin-top: 18px; padding-right: 4px; flex: 0 0 auto; }

.letter .lt-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  margin-top: 6px;
  font-size: var(--body-size);
  line-height: 1.4;
}
.letter .lt-body p { margin: 0 0 .6em; }
.letter .lt-body .salute { font-weight: 700; margin-bottom: .5em; }
.letter .lt-body .closing-line { margin: .2em 0 0; }
.letter .lt-body .sig {
  font-family: 'Great Vibes', cursive;
  font-size: calc(var(--body-size) * 2.45);
  line-height: 1.15;
  color: var(--accent);
  margin: 0 0 .25em .3em;
}
.letter .lt-body .ps { font-style: italic; font-size: .95em; }

.letter.font-hand .lt-body { font-family: 'Caveat', cursive; font-weight: 500; line-height: 1.28; }
.letter.font-hand .lt-body .ps { font-style: normal; }

.letter .lt-foot { flex: 0 0 auto; height: 112px; position: relative; }
.letter .wax { position: absolute; left: -6px; bottom: 6px; width: 100px; height: 100px; }
.letter .wax svg { position: absolute; left: 0; top: 0; }
.letter .wax-mark {
  position: absolute; left: 0; top: 0; width: 100px; height: 100px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Great Vibes', cursive; font-size: 50px; color: #f5d9b0; line-height: 1; padding-top: 4px;
}
.letter .np-stamp {
  position: absolute; right: 6px; bottom: 26px;
  transform: rotate(-8deg);
  border: 4px double var(--stamp);
  border-radius: 8px;
  color: var(--stamp);
  padding: 7px 18px 8px;
  text-align: center;
  opacity: .85;
  font-family: 'Inter', Arial, sans-serif;
  text-transform: uppercase;
}
.letter .np-stamp-big { display: block; font-weight: 800; font-size: 22px; letter-spacing: .16em; line-height: 1.1; }
.letter .np-stamp-small { display: block; font-weight: 600; font-size: 11px; letter-spacing: .24em; margin-top: 3px; }

/* ---------- certificate ---------- */
.cert .content { inset: 64px 96px 56px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.cert .c-top { font-size: 13px; letter-spacing: .26em; text-transform: uppercase; color: var(--leaf); font-weight: 700; margin-top: 4px; }
.cert .c-official { font-size: 22px; letter-spacing: .5em; text-transform: uppercase; margin-top: 16px; padding-left: .5em; font-weight: 600; }
.cert .c-title { font-family: 'Mountains of Christmas', serif; font-weight: 700; font-size: 104px; line-height: .95; color: var(--accent); margin-top: 2px; }
.cert .c-kind { font-size: 20px; letter-spacing: .55em; text-transform: uppercase; margin-top: 6px; padding-left: .55em; font-weight: 600; color: var(--leaf); }
.cert .c-certify { font-style: italic; font-size: 24px; margin-top: 18px; }
.cert .c-name {
  font-family: 'Great Vibes', cursive;
  line-height: 1.2;
  color: var(--ink);
  border-bottom: 1.5px solid var(--gold);
  padding: 0 40px 2px;
  min-width: 56%;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  margin-top: 2px;
}
.cert .c-text { font-size: 21px; line-height: 1.4; max-width: 640px; margin-top: 14px; }
.cert .c-sigs { display: flex; align-items: flex-end; justify-content: space-between; width: 100%; margin-top: auto; padding: 0 10px; }
.cert .c-sig { width: 270px; text-align: center; }
.cert .c-sig-name { font-family: 'Great Vibes', cursive; font-size: 38px; line-height: 1.1; color: var(--accent); white-space: nowrap; overflow: hidden; }
.cert .c-sig-line { height: 1px; background: var(--ink); opacity: .6; margin: 2px 10px 6px; }
.cert .c-sig-title { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; font-weight: 700; color: var(--leaf); }
.cert .gold-seal { position: relative; width: 132px; height: 165px; margin-bottom: -26px; }
.cert .gold-seal svg { position: absolute; left: 0; top: 0; }
.cert .gold-seal-text {
  position: absolute; left: 0; top: 0; width: 132px; height: 124px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: #6b4f14; line-height: 1;
}
.cert .gold-seal-text b { font-family: 'Inter', Arial, sans-serif; font-weight: 800; font-size: 20px; letter-spacing: .14em; padding-left: .14em; }
.cert .gold-seal-text i { font-family: 'Cormorant Garamond', serif; font-style: italic; font-weight: 700; font-size: 18px; margin-top: 4px; }
.cert .c-serial { margin-top: 12px; font-size: 11px; letter-spacing: .22em; text-transform: uppercase; opacity: .7; font-family: 'Inter', Arial, sans-serif; }

/* ---------- preview watermark (removed after purchase) ---------- */
.sheet.watermark::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='380' height='240'%3E%3Ctext x='190' y='130' text-anchor='middle' transform='rotate(-28 190 120)' font-family='Arial, Helvetica, sans-serif' font-size='30' font-weight='700' letter-spacing='6' fill='rgba(150,25,25,0.17)'%3EPREVIEW%3C/text%3E%3C/svg%3E");
  background-size: 380px 240px;
}
