/* Shared extras for the printables (loaded from each page's META "head"):
   the Save as PDF button, the envelope sheet, and the sheets for the warning letter,
   letter to Santa template, elf letters, Santa key tags and reindeer food labels.
   pages.css still owns the base sheet and print rules; this file only adds to them. */

/* ---------- Save as PDF ---------- */
.btn-pdf {
  font: 800 1.05rem var(--body); cursor: pointer; border-radius: 12px; padding: 0.75rem 1.3rem;
  background: transparent; color: var(--gold-soft); border: 2px solid var(--gold);
}
.btn-pdf:hover, .btn-pdf:focus-visible { background: rgba(245, 197, 66, 0.14); }
.tool .pdf-hint { flex-basis: 100%; }
.tool .pdf-hint.flash { color: var(--gold-soft); }
.tool .what { max-width: 320px; }

/* ---------- envelope (SVG drawn by printables.js, units are mm) ---------- */
.sheet.env { background: #fff; }
.sheet.env svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.env .cut { fill: #fffaf0; stroke: #2b2340; stroke-width: 0.35; }
.env .fold { stroke: #8a7fa8; stroke-width: 0.3; stroke-dasharray: 1.2 1.2; fill: none; }
.env .tip { font: 600 2.6px "Nunito", sans-serif; fill: #8a7fa8; }
.env .glue { font: 700 3px "Nunito", sans-serif; fill: #b9b0d0; letter-spacing: 0.4px; }
.env .to-label { font: 700 3.6px "Nunito", sans-serif; fill: #6a6085; letter-spacing: 0.6px; }
.env .to-name { font: italic 700 9px "Fraunces", serif; fill: #7a1f2b; }
.env .addr { font: 600 5px "Fraunces", serif; fill: #2b2340; }
.env .line { stroke: #b9b0d0; stroke-width: 0.35; }
.env .kick { font: 800 3.4px "Nunito", sans-serif; fill: #1f6b47; letter-spacing: 0.9px; }
.env .kick2 { font: italic 600 3.4px "Fraunces", serif; fill: #6a6085; }
.env .stamp { fill: #f3d27a; stroke: #fff; stroke-width: 0.8; stroke-dasharray: 1 0.8; }
.env .stamp-in { fill: none; stroke: #c99a2e; stroke-width: 0.35; }
.env .stamp-star { font: 900 9px "Fraunces", serif; fill: #7a1f2b; }
.env .stamp-txt { font: 700 2.1px "IBM Plex Mono", monospace; fill: #5a3d06; letter-spacing: 0.3px; }
.env .stamp-box { fill: none; stroke: #8a7fa8; stroke-width: 0.35; stroke-dasharray: 1 1; }
.env .pm { fill: none; stroke: #1d2f63; stroke-width: 0.45; opacity: 0.7; }
.env .pm-txt { font: 700 1.9px "IBM Plex Mono", monospace; fill: #1d2f63; opacity: 0.75; letter-spacing: 0.3px; }
.env .back { font: 600 4.2px "Fraunces", serif; fill: #2b2340; }
.env .site { font: 600 2.4px "IBM Plex Mono", monospace; fill: #8a7fa8; letter-spacing: 0.3px; }
.sheet.ink-saver.env .cut { fill: #fff; }
.sheet.ink-saver.env .to-name, .sheet.ink-saver.env .kick, .sheet.ink-saver.env .stamp-star { fill: #111; }
.sheet.ink-saver.env .stamp { fill: #fff; stroke: #333; }
.sheet.ink-saver.env .stamp-txt { fill: #111; }

/* ---------- shared letter extras ---------- */
.letter .lh .stampbox {
  font-family: var(--mono); font-size: 1.7cqw; font-weight: 600; letter-spacing: 0.18em; color: #1f6b47;
  border: 0.35cqw double #1f6b47; border-radius: 1cqw; padding: 0.8cqw 1.4cqw; transform: rotate(-4deg);
  text-align: center; line-height: 1.4; align-self: center;
}
.letter .task {
  border: 0.35cqw dashed #b8862b; border-radius: 1.6cqw; padding: 2cqw 2.6cqw; margin: 0 0 2.6cqw;
  background: #fff6dc;
}
.letter .task p { margin: 0 0 1.2cqw; }
.letter .task .label { font-family: var(--body); font-weight: 800; font-size: 0.62em; letter-spacing: 0.12em; text-transform: uppercase; color: #8a6a2a; margin: 0 0 0.6cqw; }
.letter .ticks { display: flex; flex-wrap: wrap; gap: 1.6cqw; margin-top: 1.2cqw; }
.letter .ticks span { width: 5cqw; height: 5cqw; border: 0.4cqw solid #1f6b47; border-radius: 1cqw; background: #fff; display: inline-block; }
.letter.elf .lh { border-color: #1f6b47; }
.letter.elf .lh .from { color: #1f6b47; }
.letter .body ul.rules li { margin-bottom: 1.2cqw; }
.sheet.ink-saver .letter .lh .stampbox { color: #111; border-color: #333; }
.sheet.ink-saver .letter .task { background: #fff; border-color: #555; }
.sheet.ink-saver .letter .task .label { color: #333; }
.sheet.ink-saver .letter .ticks span { border-color: #333; }
.sheet.ink-saver .letter.elf .lh .from { color: #111; }
.sheet .site-foot {
  position: absolute; bottom: 2.2cqw; left: 0; right: 0; text-align: center;
  font-family: var(--mono); font-size: 1.2cqw; color: #9a91b5; letter-spacing: 0.15em;
}

/* ---------- letter to Santa template ---------- */
.lts { position: absolute; inset: 0; padding: 7cqw 8cqw 7cqw; display: flex; flex-direction: column; color: #2b2340; }
.lts .deco { width: 100%; height: 13cqw; flex: none; }
.lts .deco.bottom { height: 9cqw; margin-top: auto; }
.lts .deco .f-red { fill: #c8323f; } .lts .deco .f-green { fill: #1f6b47; } .lts .deco .f-gold { fill: #e9b949; }
.lts .deco .f-brown { fill: #8a5a2b; } .lts .deco .f-white { fill: #fff; }
.lts .deco * { stroke: #2b2340; stroke-width: 0.6; stroke-linejoin: round; }
.sheet.colour-in .lts .deco * { fill: #fff; stroke: #111; stroke-width: 0.9; }
.lts h3 {
  font-family: var(--display); font-weight: 900; font-style: italic; font-size: 7.4cqw; line-height: 1.1;
  color: #7a1f2b; margin: 2cqw 0 2.4cqw;
}
.sheet.colour-in .lts h3 { color: #fff; -webkit-text-stroke: 0.25cqw #111; paint-order: stroke fill; }
.lts .rule { border-bottom: 0.25cqw solid #b9b0d0; height: 6.6cqw; flex: none; }
.lts .prompt { font-family: var(--display); font-size: 3.1cqw; line-height: 1.3; margin: 0; padding-top: 2.4cqw; color: #2b2340; font-weight: 500; }
.lts .prompt .blank { display: inline-block; min-width: 26cqw; border-bottom: 0.25cqw solid #b9b0d0; }
.lts .prompt .blank.s { min-width: 10cqw; }
.lts .prompt .filled { font-style: italic; font-weight: 700; color: #7a1f2b; border-bottom: 0.25cqw solid #b9b0d0; padding: 0 1cqw; }
.lts .wish-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2.6cqw; margin-top: 2cqw; }
.lts .wish { border: 0.35cqw dashed #b9b0d0; border-radius: 2cqw; height: 34cqw; display: flex; flex-direction: column; justify-content: flex-end; padding: 1.6cqw; }
.lts .wish span { border-bottom: 0.25cqw solid #b9b0d0; height: 5cqw; display: block; }
.lts .wish em { font-family: var(--body); font-style: normal; font-size: 1.9cqw; font-weight: 700; color: #9a91b5; margin-bottom: auto; }
.lts .love { font-family: var(--display); font-size: 3.4cqw; margin: 3cqw 0 0; font-weight: 600; color: #2b2340; }
.lts .love .filled { font-style: italic; font-weight: 700; color: #7a1f2b; }
.lts .lead { font-family: var(--display); font-size: 3.1cqw; margin: 0; color: #2b2340; font-weight: 500; }
.sheet.colour-in .lts .prompt .filled, .sheet.colour-in .lts .love .filled { color: #111; }

/* ---------- Santa key tags (two per A4 portrait) ---------- */
.keytags { position: absolute; inset: 0; display: grid; grid-template-rows: 1fr 1fr; }
.keytag { position: relative; padding: 6cqw 6cqw 5cqw 13cqw; display: flex; flex-direction: column; border-bottom: 0.3cqw dashed #b9b0d0; }
.keytag:last-child { border-bottom: none; }
.keytag .hole { position: absolute; left: 5cqw; top: 50%; width: 4.4cqw; height: 4.4cqw; margin-top: -2.2cqw; border-radius: 50%; border: 0.35cqw dashed #8a7fa8; }
.keytag .k-title { font-family: var(--display); font-weight: 900; font-size: 5.6cqw; color: #7a1f2b; line-height: 1.05; display: flex; align-items: center; gap: 2cqw; }
.keytag .k-title svg { width: 12cqw; height: 5cqw; flex: none; }
.keytag .k-title svg path, .keytag .k-title svg circle { fill: none; stroke: #c99a2e; stroke-width: 2.2; stroke-linecap: round; }
.keytag .verses { display: grid; grid-template-columns: 1fr 1fr; gap: 0 4cqw; margin-top: 3cqw; }
.keytag .verses p { font-family: var(--display); font-size: 2.5cqw; line-height: 1.55; white-space: nowrap; color: #2b2340; margin: 0 0 2.2cqw; font-weight: 500; }
.keytag .k-foot { margin-top: auto; font-family: var(--display); font-style: italic; font-size: 3cqw; color: #1d2f63; font-weight: 700; }
.keytag .k-foot .blank { display: inline-block; min-width: 30cqw; border-bottom: 0.25cqw solid #b9b0d0; }
.sheet.ink-saver .keytag .k-title, .sheet.ink-saver .keytag .k-foot { color: #111; }
.sheet.ink-saver .keytag .k-title svg path, .sheet.ink-saver .keytag .k-title svg circle { stroke: #333; }

/* ---------- reindeer food labels ---------- */
.rf-grid { position: absolute; inset: 0; }
.rf-label {
  position: absolute; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; border: 0.25cqw dashed #d6cfe6; border-radius: 2cqw; padding: 2cqw 3cqw; overflow: hidden;
}
.rf-label .r-title { font-family: var(--display); font-weight: 900; font-size: 3.7cqw; white-space: nowrap; color: #7a1f2b; line-height: 1.05; }
.rf-label .r-sub { font-family: var(--body); font-weight: 800; font-size: 1.5cqw; letter-spacing: 0.2em; color: #1f6b47; text-transform: uppercase; margin: 0.6cqw 0 1.2cqw; }
.rf-label .r-poem { font-family: var(--display); font-size: 2.05cqw; line-height: 1.38; color: #2b2340; margin: 0; font-weight: 500; }
.rf-label .r-poem + .r-poem { margin-top: 1.2cqw; }
.rf-label .r-by { font-family: var(--display); font-style: italic; font-weight: 700; font-size: 2.2cqw; color: #1d2f63; margin-top: 1.4cqw; }
.rf-label .r-by .blank { display: inline-block; min-width: 18cqw; border-bottom: 0.25cqw solid #b9b0d0; }
.rf-label .r-stars { color: #c99a2e; font-size: 2cqw; letter-spacing: 0.6em; }
.rf-grid.tags .rf-label .r-title { font-size: 3.9cqw; }
.rf-grid.tags .rf-label .r-poem { font-size: 2.2cqw; white-space: nowrap; }
.rf-grid.tags .rf-label .hole { width: 3.6cqw; height: 3.6cqw; border-radius: 50%; border: 0.3cqw dashed #8a7fa8; margin-bottom: 1.6cqw; }
.sheet.ink-saver .rf-label .r-title, .sheet.ink-saver .rf-label .r-sub, .sheet.ink-saver .rf-label .r-by, .sheet.ink-saver .rf-label .r-stars { color: #111; }

@media print {
  .sheet-wrap[hidden] { display: none !important; }
  .page.np-both .sheet-wrap[data-np-part="env"] { break-before: page; page-break-before: always; }
  .sheet.env { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .sheet .site-foot { color: #9a91b5; }
}
