/* Santa's stationery. One sheet = US Letter (8.5in x 11in = 612pt x 792pt at 72dpi; on screen 612px x 792px).
   Themes: holly (traditional red/green), snow (icy blue + red), star (Christian navy/gold), baby (soft pastel). */
.sheet { --accent: #b3122e; --accent2: #1d5b3a; --frame: #c9a24a; --paper1: #fffdf6; --paper2: #f6ecd7;
  width: 612px; aspect-ratio: 8.5 / 11; position: relative; color: #2b1d16; font-family: 'Kalam', 'Segoe Print', cursive;
  background:
    radial-gradient(120% 80% at 50% 0%, var(--paper1) 0%, var(--paper2) 100%);
  padding: 28px; }
.sheet::before { /* paper fibre */
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .35; mix-blend-mode: multiply;
  background-image: repeating-linear-gradient(0deg, rgba(120, 90, 50, .05) 0 1px, transparent 1px 3px), repeating-linear-gradient(90deg, rgba(120, 90, 50, .04) 0 1px, transparent 1px 4px); }
.sheet-frame { position: relative; height: 100%; border: 2px solid var(--frame); outline: 1px solid var(--frame); outline-offset: 5px;
  padding: 34px 44px 30px; display: flex; flex-direction: column; }
/* corner sprigs */
.sheet-frame::before, .sheet-frame::after { content: ''; position: absolute; width: 92px; height: 92px; background: var(--corner) no-repeat center / contain; }
.sheet-frame::before { top: -22px; left: -22px; }
.sheet-frame::after { bottom: -22px; right: -22px; transform: rotate(180deg); }

.sheet-head { text-align: center; margin-bottom: 18px; }
.sheet-crest { width: 46px; height: 46px; margin: 0 auto 10px; background: var(--crest) no-repeat center / contain; }
.sheet-from { font: 600 9px/1 'Inter', sans-serif; letter-spacing: .3em; text-transform: uppercase; color: var(--accent2); margin: 0; }
.sheet-santa { font: 400 46px/1 'Great Vibes', cursive; color: var(--accent); margin: 2px 0 0; }
.sheet-place { font: 600 8.5px/1 'Inter', sans-serif; letter-spacing: .28em; text-transform: uppercase; color: #8b7a66; margin: 6px 0 0;
  padding-bottom: 12px; border-bottom: 1px solid color-mix(in srgb, var(--frame) 60%, transparent); }

.letter-body { font-size: 14.2px; line-height: 1.55; flex: 1; }
.letter-body p, .letter-ps p { margin: 0 0 .75em; }
.letter-body p:first-child { font-size: 15.5px; }
.sheet mark { background: color-mix(in srgb, var(--accent) 14%, transparent); color: inherit; border-radius: 3px; padding: 0 .15em; box-shadow: 0 1.5px 0 color-mix(in srgb, var(--accent) 55%, transparent); }
.sheet mark.ph { background: #fff2b8; box-shadow: 0 1.5px 0 #e0b200; color: #8a6d00; }
.letter-sign { margin-top: 4px; }
.letter-sign .signature { margin-top: 10px; }
.letter-sign .closing { margin: 0; font-size: 14.5px; }
.signature { font: 400 44px/1 'Great Vibes', cursive; color: var(--accent); margin: 0; transform: rotate(-4deg); transform-origin: left; }
.signature.small { font-size: 30px; }
.letter-ps { font-size: 13px; margin-top: 10px; color: #4a3a30; }
.sheet-seal { position: absolute; right: 26px; bottom: 26px; width: 74px; height: 74px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, #e0bf6a, #b8902f 60%, #8e6a1a); box-shadow: 0 0 0 4px rgba(184, 144, 47, .35), 0 6px 12px rgba(0, 0, 0, .25);
  color: #fff8e1; font: 700 11px/1.05 'Fraunces', serif; text-transform: uppercase; letter-spacing: .08em; text-align: center; transform: rotate(-10deg); }
.sheet-seal::before { content: ''; position: absolute; inset: 6px; border-radius: 50%; border: 1.5px dashed rgba(255, 248, 225, .7); }
.sheet-seal.big { position: relative; right: auto; bottom: auto; width: 110px; height: 110px; font-size: 16px; }

/* Theme art (inline SVG data URIs, no external images) */
.theme-holly, .cert {
  --corner: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cg fill='%231d5b3a'%3E%3Cpath d='M50 50c-8-14-26-18-38-12 6 2 6 8 2 11 8-1 12 4 10 10 8-6 18-6 26-9z'/%3E%3Cpath d='M50 50c14-8 18-26 12-38-2 6-8 6-11 2 1 8-4 12-10 10 6 8 6 18 9 26z'/%3E%3C/g%3E%3Cg fill='%23b3122e'%3E%3Ccircle cx='50' cy='50' r='7'/%3E%3Ccircle cx='60' cy='58' r='6'/%3E%3Ccircle cx='58' cy='44' r='5'/%3E%3C/g%3E%3Cg fill='%23fff' opacity='.6'%3E%3Ccircle cx='48' cy='47' r='2'/%3E%3Ccircle cx='58' cy='55' r='1.6'/%3E%3C/g%3E%3C/svg%3E");
  --crest: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath fill='%231d5b3a' d='M50 8 24 52h12L18 80h64L64 52h12z'/%3E%3Crect x='44' y='80' width='12' height='12' fill='%236b3e1f'/%3E%3Cpath fill='%23c9a24a' d='m50 0 3 7h8l-6 5 2 8-7-5-7 5 2-8-6-5h8z'/%3E%3Cg fill='%23b3122e'%3E%3Ccircle cx='40' cy='45' r='3'/%3E%3Ccircle cx='60' cy='60' r='3'/%3E%3Ccircle cx='36' cy='70' r='3'/%3E%3Ccircle cx='62' cy='38' r='2.5'/%3E%3C/g%3E%3C/svg%3E"); }
.theme-snow { --accent: #b3122e; --accent2: #2c5d8a; --frame: #9cb9d4; --paper1: #ffffff; --paper2: #eef4fa;
  --corner: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cg stroke='%237fa3c6' stroke-width='3' stroke-linecap='round' fill='none'%3E%3Cpath d='M50 20v60M24 35l52 30M24 65l52-30'/%3E%3Cpath d='M42 24l8 8 8-8M42 76l8-8 8 8M22 44l11-3-3-11M78 56l-11 3 3 11M22 56l11 3-3 11M78 44l-11-3 3-11'/%3E%3C/g%3E%3C/svg%3E");
  --crest: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath fill='%232c5d8a' d='M10 78h80l-8-14H18z'/%3E%3Cpath fill='%23fff' stroke='%232c5d8a' stroke-width='3' d='M22 64V40l28-20 28 20v24z'/%3E%3Cpath fill='%23b3122e' d='M14 42 50 14l36 28-6 6-30-22-30 22z'/%3E%3Crect x='44' y='46' width='12' height='18' fill='%23c9a24a'/%3E%3C/svg%3E"); }
.theme-star { --accent: #1f3a6b; --accent2: #8a6a1a; --frame: #c9a24a; --paper1: #fffdf6; --paper2: #f3ead6;
  --corner: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath fill='%23c9a24a' d='m50 14 6 28 28 8-28 8-6 28-6-28-28-8 28-8z'/%3E%3Ccircle cx='50' cy='50' r='4' fill='%23fff'/%3E%3C/svg%3E");
  --crest: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath fill='%23c9a24a' d='m50 4 7 33 33 13-33 13-7 33-7-33-33-13 33-13z'/%3E%3Cpath stroke='%23c9a24a' stroke-width='2' d='M50 63v35'/%3E%3C/svg%3E"); }
.theme-baby { --accent: #c2577a; --accent2: #4f7f9c; --frame: #e6b9c8; --paper1: #fffefc; --paper2: #fbf0f2;
  --corner: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cg fill='%23f2c6d4'%3E%3Cpath d='m30 20 4 9 10 1-7 7 2 10-9-5-9 5 2-10-7-7 10-1z'/%3E%3Cpath d='m66 52 3 6 6 1-4 4 1 7-6-3-6 3 1-7-4-4 6-1z' fill='%23b9d6e6'/%3E%3C/g%3E%3Ccircle cx='54' cy='30' r='3' fill='%23f2c6d4'/%3E%3C/svg%3E");
  --crest: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath fill='%23f2c6d4' d='M60 18a32 32 0 1 0 22 52A26 26 0 1 1 60 18z'/%3E%3Cpath fill='%23c9a24a' d='m30 22 3 6 7 1-5 5 1 7-6-3-6 3 1-7-5-5 7-1z'/%3E%3C/svg%3E"); }

/* Certificate */
.cert { --accent: #b3122e; --accent2: #1d5b3a; --frame: #c9a24a; text-align: center; }
.cert .sheet-frame { justify-content: center; align-items: center; border-width: 6px; border-style: double; }
.cert-kicker { font: 600 11px 'Inter', sans-serif; letter-spacing: .35em; text-transform: uppercase; color: var(--accent2); margin: 0; }
.cert-title { font: 400 92px/1 'Great Vibes', cursive; color: var(--accent); margin: 10px 0 24px; }
.cert-line { font: 15px/1.5 'Fraunces', serif; max-width: 360px; margin: 0 auto 10px; }
.cert-name { font: 400 58px/1.1 'Great Vibes', cursive; color: #2b1d16; border-bottom: 1.5px solid var(--frame); padding: 0 30px 8px; margin: 8px auto 18px; }
.cert-foot { display: flex; justify-content: space-between; align-items: center; width: 100%; margin-top: 40px; }
.cert-sm { font: 11px 'Inter', sans-serif; color: #7a6a5a; margin: 6px 0 0; letter-spacing: .1em; text-transform: uppercase; }

/* #10 envelope: 9.5in x 4.125in */
.envelope { width: 9.5in; height: 4.125in; background: #fff; position: relative; box-shadow: 0 6px 20px rgba(0, 0, 0, .15); font-family: 'Kalam', cursive; color: #2b1d16; }
.env-from { position: absolute; left: .4in; top: .35in; font-size: 13px; line-height: 1.35; color: var(--red, #b3122e); }
.env-to { position: absolute; left: 4.1in; top: 1.7in; font-size: 19px; line-height: 1.35; }
.env-ref { position: absolute; left: .4in; bottom: .25in; font: 8px 'Inter', sans-serif; color: #bbb; }

@media print {
  @page { size: letter; margin: 0; }
  @page envelope { size: 9.5in 4.125in; margin: 0; }
  body.admin { background: #fff; }
  .no-print { display: none !important; }
  .print-stack { display: block; padding: 0; }
  .print-stack .sheet { width: 612px; height: 792px; aspect-ratio: auto; zoom: 1.3333; break-after: page; box-shadow: none; }
  .print-stack .envelope { page: envelope; break-after: page; box-shadow: none; }
  .sheet { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* Background-art papers (watermark behind the text, laser-printable) */
.sheet-frame { background: var(--bg-art, none) no-repeat var(--bg-pos, center 62%) / var(--bg-size, 78% auto); }

.theme-tree { --accent: #b3122e; --accent2: #1d5b3a; --frame: #1d5b3a; --paper1: #fffdf6; --paper2: #f1ead8;
  --corner: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath fill='%23c9a24a' d='m50 18 5 12 13 1-10 8 4 13-12-7-12 7 4-13-10-8 13-1z'/%3E%3C/svg%3E");
  --crest: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath fill='%23b3122e' d='M20 40h60v44H20z'/%3E%3Cpath fill='%23c9a24a' d='M46 40h8v44h-8zM20 56h60v8H20z'/%3E%3Cpath fill='none' stroke='%23c9a24a' stroke-width='5' d='M50 40c-10-18-28-12-20 0M50 40c10-18 28-12 20 0'/%3E%3C/svg%3E");
  --bg-art: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 520'%3E%3Cg opacity='.09'%3E%3Cpath fill='%231d5b3a' d='M200 40 120 170h40L80 290h50L40 430h320L270 290h50L240 170h40z'/%3E%3Crect x='175' y='430' width='50' height='60' fill='%236b3e1f'/%3E%3C/g%3E%3Cg opacity='.22'%3E%3Cpath fill='%23c9a24a' d='m200 8 9 22 24 2-18 15 6 23-21-13-21 13 6-23-18-15 24-2z'/%3E%3Cg fill='%23b3122e'%3E%3Ccircle cx='170' cy='150' r='9'/%3E%3Ccircle cx='230' cy='200' r='9'/%3E%3Ccircle cx='140' cy='260' r='10'/%3E%3Ccircle cx='250' cy='300' r='10'/%3E%3Ccircle cx='110' cy='390' r='11'/%3E%3Ccircle cx='290' cy='400' r='11'/%3E%3Ccircle cx='200' cy='350' r='10'/%3E%3C/g%3E%3Cg fill='%23c9a24a'%3E%3Ccircle cx='210' cy='120' r='7'/%3E%3Ccircle cx='180' cy='230' r='8'/%3E%3Ccircle cx='230' cy='260' r='8'/%3E%3Ccircle cx='160' cy='330' r='9'/%3E%3Ccircle cx='250' cy='380' r='9'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  --bg-size: 70% auto; }
.theme-snowman { --accent: #b3122e; --accent2: #2c5d8a; --frame: #9cb9d4; --paper1: #ffffff; --paper2: #eef4fa;
  --corner: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cg stroke='%237fa3c6' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M50 25v50M28 38l44 24M28 62l44-24'/%3E%3C/g%3E%3C/svg%3E");
  --crest: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Ccircle cx='50' cy='70' r='22' fill='%23fff' stroke='%232c5d8a' stroke-width='3'/%3E%3Ccircle cx='50' cy='36' r='15' fill='%23fff' stroke='%232c5d8a' stroke-width='3'/%3E%3Cpath fill='%232b1d16' d='M36 22h28v4H36zM41 4h18v18H41z'/%3E%3Cpath fill='%23e07a1f' d='m50 37 10 3-10 2z'/%3E%3Cpath fill='%23b3122e' d='M36 48h28v6H36z'/%3E%3C/svg%3E");
  --bg-art: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 520'%3E%3Cg fill='%239cb9d4' opacity='.35'%3E%3Ccircle cx='40' cy='60' r='4'/%3E%3Ccircle cx='120' cy='30' r='3'/%3E%3Ccircle cx='330' cy='80' r='5'/%3E%3Ccircle cx='260' cy='150' r='3'/%3E%3Ccircle cx='70' cy='200' r='4'/%3E%3Ccircle cx='360' cy='240' r='3'/%3E%3Ccircle cx='180' cy='110' r='3'/%3E%3Ccircle cx='30' cy='320' r='3'/%3E%3C/g%3E%3Cg opacity='.2'%3E%3Cellipse cx='320' cy='500' rx='120' ry='18' fill='%239cb9d4'/%3E%3Ccircle cx='320' cy='430' r='62' fill='%23fff' stroke='%232c5d8a' stroke-width='5'/%3E%3Ccircle cx='320' cy='330' r='44' fill='%23fff' stroke='%232c5d8a' stroke-width='5'/%3E%3Cpath fill='%232b1d16' d='M282 290h76v10h-76zM296 236h48v56h-48z'/%3E%3Cpath fill='%23b3122e' d='M286 366h68v14h-68zM330 376h14v40h-14z'/%3E%3Ccircle cx='306' cy='322' r='5' fill='%232b1d16'/%3E%3Ccircle cx='334' cy='322' r='5' fill='%232b1d16'/%3E%3Cpath fill='%23e07a1f' d='m320 332 30 8-30 6z'/%3E%3Ccircle cx='320' cy='410' r='5' fill='%232b1d16'/%3E%3Ccircle cx='320' cy='440' r='5' fill='%232b1d16'/%3E%3Cpath stroke='%236b3e1f' stroke-width='6' stroke-linecap='round' d='M262 420l-50-30M378 420l46-34'/%3E%3C/g%3E%3C/svg%3E");
  --bg-pos: right bottom; --bg-size: 64% auto; }
