/* ===== Candy Cane Post stationery (rendered at 816 x 1056 = 8.5x11 @ 96dpi, scaled with --s) ===== */
.fit { position: relative; width: 100%; aspect-ratio: 816 / 1056; }
.fit.env-fit { aspect-ratio: 1000 / 460; }
.fit > .sheet, .fit > .envelope {
  position: absolute; top: 0; left: 0; transform-origin: 0 0;
  transform: scale(var(--s, .5));
}
.sheet {
  width: 816px; height: 1056px; background: #fff; overflow: hidden; color: #2a1d17;
  box-shadow: 0 1px 0 rgba(0,0,0,.04);
  --stripe-red: #c0242f; --stripe-green: #2f7a45;
}
.sheet .panel { position: absolute; display: flex; flex-direction: column; }
.sheet.paper-parchment .panel {
  background:
    radial-gradient(ellipse at 20% 15%, rgba(255,255,255,.55), transparent 55%),
    radial-gradient(ellipse at 80% 90%, rgba(176,128,70,.18), transparent 60%),
    radial-gradient(ellipse at 90% 10%, rgba(176,128,70,.12), transparent 45%),
    #f4e7cc;
}
.sheet .p-body { flex: 1; overflow: hidden; position: relative; }
.sheet .p-body .txt p { margin: 0 0 .78em; }
.sheet .p-body .txt p:last-child { margin-bottom: 0; }
.sheet mark { background: transparent; color: inherit; }
.show-marks .sheet mark { background: rgba(255, 214, 92, .55); border-radius: 3px; box-shadow: 0 0 0 2px rgba(255,214,92,.55); }

/* ---------- CLASSIC: candy stripe w/ green pin-stripe, blackletter header, SC seal ---------- */
.sheet.classic {
  background: repeating-linear-gradient(-45deg,
    var(--stripe-red) 0 20px, #fff 20px 30px, var(--stripe-green) 30px 37px, #fff 37px 47px,
    var(--stripe-red) 47px 67px, #fff 67px 87px);
}
.sheet.classic::before { /* dark red frame line */
  content: ""; position: absolute; inset: 0; border: 7px solid #9c1b25; pointer-events: none; z-index: 2;
}
.sheet.classic .panel {
  inset: 38px; background: #fff; outline: 3px solid #9c1b25; outline-offset: -12px;
  padding: 46px 70px 44px;
}
.sheet.classic .hd { text-align: center; color: #1d1714; }
.sheet.classic .hd small {
  display: block; font: 600 13px/1 "Cormorant Garamond", Georgia, serif; letter-spacing: .18em; text-transform: uppercase;
}
.sheet.classic .hd small::before, .sheet.classic .hd small::after { content: ""; display: inline-block; width: 26px; height: 1px; background: currentColor; vertical-align: middle; margin: 0 10px 3px; }
.sheet.classic .hd .bl { display: block; font: 400 64px/1.05 "UnifrakturMaguntia", serif; margin-top: 6px; letter-spacing: .01em; }
.sheet.classic .hd svg { width: 250px; height: 40px; margin-top: -2px; color: #1d1714; }
.sheet.classic .p-body { margin-top: 22px; font-family: "Cormorant Garamond", Georgia, serif; font-weight: 500; font-size: 20px; line-height: 1.42; }
.sheet.classic .sig { position: relative; padding-top: 10px; min-height: 120px; font-family: "Cormorant Garamond", Georgia, serif; font-size: 20px; }
.sheet.classic .sig .close { font-style: italic; }
.sheet.classic .sig .script { font: 400 64px/1 "Mrs Saint Delafield", cursive; color: #1b2a4a; margin-top: 2px; margin-left: 10px; }
.sheet.classic .seal { position: absolute; right: -14px; bottom: -10px; width: 132px; height: 132px; transform: rotate(-9deg); color: #a3202a; opacity: .92; }

/* ---------- MODERN: wide candy stripe, rounded card, gold sparkles, condensed SANTA: ---------- */
.sheet.modern {
  background: repeating-linear-gradient(-45deg, #c8202f 0 46px, #fff 46px 92px);
}
.sheet.modern .panel {
  inset: 40px; background: #fff; border-radius: 30px; outline: 3px solid #c8202f; outline-offset: -14px;
  padding: 52px 74px 46px;
}
.sheet.modern .hd { text-align: center; position: relative; }
.sheet.modern .hd small { display: block; font: 500 21px/1 "Figtree", system-ui, sans-serif; color: #4b8b3b; letter-spacing: .02em; text-transform: uppercase; }
.sheet.modern .hd .big { display: block; font: 900 92px/.95 "Playfair Display", Georgia, serif; color: #c8202f; letter-spacing: .02em; margin-top: 4px; transform: scaleX(.86); }
.sheet.modern .hd .stars { position: absolute; top: -18px; width: 140px; height: 130px; color: #d2a33b; }
.sheet.modern .hd .stars.l { left: -14px; }
.sheet.modern .hd .stars.r { right: -14px; transform: scaleX(-1); }
.sheet.modern .p-body { margin-top: 30px; font-family: "Figtree", system-ui, sans-serif; font-size: 18px; line-height: 1.55; color: #2b2522; }
.sheet.modern .sig { position: relative; padding-top: 12px; min-height: 130px; }
.sheet.modern .sig .close { font: 500 22px/1.2 "Figtree", sans-serif; color: #4b8b3b; }
.sheet.modern .sig .script { font: 400 70px/1 "Mrs Saint Delafield", cursive; color: #1d1714; margin: 4px 0 0 30px; }
.sheet.modern .seal { position: absolute; right: -10px; bottom: -6px; width: 190px; height: 130px; color: #2b2522; transform: rotate(-6deg); opacity: .85; }

/* ---------- NICE LIST CERTIFICATE ---------- */
.sheet.cert { background: #f3e5c6; }
.sheet.cert .panel {
  inset: 34px; border: 3px solid #b48a3c; outline: 1px solid #b48a3c; outline-offset: -12px; padding: 70px 70px 50px;
  align-items: center; text-align: center;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(255,255,255,.6), transparent 60%),
    radial-gradient(ellipse at 100% 100%, rgba(150,100,40,.2), transparent 55%), #f6ead0;
}
.sheet.cert .corner { position: absolute; width: 70px; height: 70px; color: #b48a3c; }
.sheet.cert .corner.tl { top: 18px; left: 18px; } .sheet.cert .corner.tr { top: 18px; right: 18px; transform: scaleX(-1); }
.sheet.cert .corner.bl { bottom: 18px; left: 18px; transform: scaleY(-1); } .sheet.cert .corner.br { bottom: 18px; right: 18px; transform: scale(-1); }
.sheet.cert .k { font: 600 15px/1 "Cormorant Garamond", serif; letter-spacing: .36em; text-transform: uppercase; color: #7b5a22; }
.sheet.cert h3 { font: 400 104px/1 "UnifrakturMaguntia", serif; color: #9c1b25; margin: 18px 0 6px; }
.sheet.cert .yr { font: 700 18px/1 "Figtree", sans-serif; letter-spacing: .5em; color: #1f4d36; }
.sheet.cert .c1 { font: italic 500 26px/1.3 "Cormorant Garamond", serif; margin-top: 60px; color: #3b2a1c; }
.sheet.cert .nm { font: italic 600 76px/1.1 "Fraunces", Georgia, serif; color: #1f4d36; margin: 14px 0 0; padding: 0 20px 10px; border-bottom: 2px solid #b48a3c; min-width: 70%; }
.sheet.cert .c2 { font: 500 24px/1.45 "Cormorant Garamond", serif; margin-top: 26px; color: #3b2a1c; max-width: 560px; }
.sheet.cert .cfoot { margin-top: auto; width: 100%; display: flex; justify-content: space-between; align-items: flex-end; }
.sheet.cert .sg { width: 220px; text-align: center; }
.sheet.cert .sg .script { font: 400 54px/1 "Mrs Saint Delafield", cursive; color: #1b2a4a; }
.sheet.cert .sg .ln { border-top: 1px solid #7b5a22; padding-top: 6px; font: 600 13px/1 "Cormorant Garamond", serif; letter-spacing: .2em; text-transform: uppercase; color: #7b5a22; }
.sheet.cert .gold { width: 170px; height: 170px; }

/* ---------- ENVELOPE ---------- */
.envelope {
  width: 1000px; height: 460px; position: relative; overflow: hidden;
  background:
    radial-gradient(ellipse at 20% 15%, rgba(255,255,255,.55), transparent 55%),
    radial-gradient(ellipse at 80% 90%, rgba(176,128,70,.18), transparent 60%),
    radial-gradient(ellipse at 90% 10%, rgba(176,128,70,.12), transparent 45%),
    #f4e7cc; color: #2a1d17;
  font-family: "Cormorant Garamond", Georgia, serif;
}
.envelope .ret { position: absolute; top: 46px; left: 52px; font-size: 21px; line-height: 1.3; }
.envelope .ret b { font: 400 30px/1 "UnifrakturMaguntia", serif; display: block; margin-bottom: 4px; }
.envelope .stamp { position: absolute; top: 40px; right: 52px; width: 112px; height: 136px; }
.envelope .pm { position: absolute; top: 52px; right: 128px; width: 230px; height: 120px; color: #3a2c28; opacity: .78; transform: rotate(-8deg); }
.envelope .to { position: absolute; left: 380px; top: 210px; font: 500 30px/1.32 "Cormorant Garamond", serif; }
.envelope .to .n { font: italic 600 40px/1.2 "Fraunces", Georgia, serif; color: #9c1b25; }
.envelope mark { background: transparent; color: inherit; }
.show-marks .envelope mark { background: rgba(255,214,92,.55); border-radius: 3px; box-shadow: 0 0 0 2px rgba(255,214,92,.55); }
/* parchment always wins over the design's white panel */
.sheet.paper-parchment.classic .panel, .sheet.paper-parchment.modern .panel {
  background:
    radial-gradient(ellipse at 20% 15%, rgba(255,255,255,.55), transparent 55%),
    radial-gradient(ellipse at 80% 90%, rgba(176,128,70,.18), transparent 60%),
    radial-gradient(ellipse at 90% 10%, rgba(176,128,70,.12), transparent 45%),
    #f4e7cc;
}
