/* 圣诞老人的回信（2026-11-26）：打印面板、三种信纸（Snowy pine / Candy stripe / Starry night）、Letter / A4、打印规则；正文里的示例信。
 * 面板本身照全站近黑 + 橙。信纸是要打在纸上的东西，用纸色 + 一种墨色 + 线稿装饰（实色，不用渐变、阴影、发光、动画）：
 * 这是任务说明要的「北极信纸样式」，只在这一页的信纸预览和打印出来的纸上，别处不用。
 * 打印：只有点了 Print letter（<html> 带 santa-printing）才只打印信纸；直接 Ctrl+P 照常打印整页。纸张大小由 gizmo.js 换一条 @page。 */

/* ---------- 面板 ---------- */
.santa-print { margin-top: 16px; padding: 16px 18px; background: var(--bg); border: 1px solid var(--line); border-radius: 14px; }
.santa-print[hidden] { display: none; }
.santa-print-title { margin: 0 0 10px; font-weight: 800; font-size: 1.1rem; color: var(--ink); }
.santa-pick { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 0 0 10px; color: var(--ink); }
.santa-pick label { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; cursor: pointer; }
.santa-pick input { width: 18px; height: 18px; accent-color: var(--accent); }

/* ---------- 信纸（屏幕上的预览：按纸张比例，所有尺寸按纸宽的百分比（cqw）走，打印时纸宽变了版面照样，和打出来的一致）。
 * 正文字号乘 --fit：gizmo.js 在预览里量，信长放不下就逐级缩小（最小 0.62），打印用同一个值，落款不会被裁掉 ---------- */
.santa-sheet-wrap { margin-top: 14px; container-type: inline-size; max-width: 560px; }
.santa-sheet {
  --paper: #fffaf0; --ink-l: #1e2a22; --accent-l: #1f5c3a;
  position: relative; box-sizing: border-box; width: 100%; aspect-ratio: 8.5 / 11; overflow: hidden;
  padding: 9cqw 10cqw 8cqw; background: var(--paper); color: var(--ink-l);
  font-family: Georgia, "Times New Roman", Times, serif; font-size: calc(2.55cqw * var(--fit, 1)); line-height: 1.55; border-radius: 4px;
}
.santa-sheet.p-a4 { aspect-ratio: 210 / 297; }
.santa-sheet::before { content: ""; position: absolute; inset: 3.2cqw; border: .5cqw double var(--accent-l); border-radius: 2px; pointer-events: none; }
.santa-deco { position: absolute; left: 4cqw; right: 4cqw; top: 3.6cqw; width: 92cqw; height: auto; fill: none; stroke: var(--accent-l); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; display: none; }
.santa-head { position: relative; margin: 0; text-align: center; font-size: 6cqw; font-style: italic; font-weight: 700; letter-spacing: .02em; color: var(--accent-l); }
.santa-sub { position: relative; margin: .4cqw 0 4cqw; text-align: center; font-size: 2.1cqw; letter-spacing: .18em; text-transform: uppercase; color: var(--accent-l); }
.santa-body p { margin: 0 0 1.05em; }
.santa-body .santa-greet { font-weight: 700; }
.santa-body .santa-ps { font-style: italic; }
.santa-body .santa-sign { margin-top: -.6em; font-size: 2.1em; font-style: italic; font-weight: 700; color: var(--accent-l); }

/* 1. Snowy pine：象牙色纸、墨绿，两角松枝 */
.santa-sheet.d-pine .deco-pine { display: block; }
.santa-sheet.d-pine .santa-head { margin-top: 3cqw; }
/* 2. Candy stripe：白纸、红色斜纹上下两道，单线框 */
.santa-sheet.d-candy { --paper: #ffffff; --ink-l: #2a1414; --accent-l: #b3261e; }
.santa-sheet.d-candy::before { border-style: solid; border-width: .35cqw; }
.santa-sheet.d-candy .deco-candy { display: block; top: 4.6cqw; stroke-width: 3; }
.santa-sheet.d-candy .santa-head { margin-top: 7cqw; }
/* 3. Starry night：淡蓝纸、藏青，星星和雪花 */
.santa-sheet.d-night { --paper: #eef3fa; --ink-l: #14213d; --accent-l: #1d3557; }
.santa-sheet.d-night::before { border-style: solid; border-width: .25cqw; }
.santa-sheet.d-night .deco-night { display: block; }
.santa-sheet.d-night .santa-head { margin-top: 6cqw; }

/* ---------- 正文里的示例信 ---------- */
.example-input { color: var(--muted); font-size: .92rem; }
.santa-example { margin: 0 0 24px; padding: 16px 20px; background: var(--card); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 12px; }
.santa-example p { margin: 0 0 .8em; }
.santa-example p:last-child { margin-bottom: 0; }

/* ---------- 打印：只打印信纸 ---------- */
@media print {
  /* 信纸以外的一律不占位置（只设 visibility 的话整页高度还在，会多出几张空白页） */
  html.santa-printing body > :not(main), html.santa-printing main > :not(#tool),
  html.santa-printing #tool > :not(#santa-print), html.santa-printing #santa-print > :not(.santa-sheet-wrap) { display: none !important; }
  html.santa-printing body, html.santa-printing main, html.santa-printing #tool, html.santa-printing #santa-print, html.santa-printing .santa-sheet-wrap {
    margin: 0 !important; padding: 0 !important; border: 0 !important; background: #fff !important; max-width: none !important; width: auto !important; min-height: 0 !important; box-shadow: none !important;
  }
  /* 版面和屏幕预览一样按纸宽算（cqw），只是纸宽换成整页；高度 = 整页（@page 无边距，纸张比例和预览一样） */
  html.santa-printing #santa-sheet { width: 100%; height: 100vh; aspect-ratio: auto; border-radius: 0; margin: 0; break-inside: avoid; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
