/* Printable sheets. Sized in mm so the preview on screen is the real thing. */
.sheets { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.sheet {
  box-sizing: border-box;
  width: var(--pw); height: var(--ph); overflow: hidden; position: relative;
  background: var(--paper); color: var(--ink); font-family: var(--font-body);
  page-break-after: always; break-after: page;
}
.sheet:last-child { page-break-after: auto; break-after: auto; }
.sheet svg { display: block; width: 100%; height: 100%; }
.pfoot { position: absolute; bottom: 5mm; left: 0; right: 0; text-align: center; font-size: 7.5pt; opacity: 0.65; letter-spacing: 0.04em; }

/* Cover / instructions */
.cover { display: grid; place-items: center; }
.cover-inner { width: 72%; text-align: center; }
.cover-motif { width: 34mm; height: 34mm; margin: 0 auto 6mm; }
.cover h1 { font-family: var(--theme-font); font-size: 30pt; color: var(--ink); margin-bottom: 3mm; }
.cover-sub { font-size: 13pt; color: var(--accent2); font-weight: 800; margin-bottom: 12mm; }
.cover-how { text-align: left; background: var(--soft); border-radius: 6mm; padding: 6mm 9mm 3mm; }
.cover-how h2 { font-family: var(--theme-font); font-size: 15pt; margin-bottom: 2mm; }
.cover-how ol { padding-left: 5mm; font-size: 11pt; line-height: 1.5; }
.cover-how li { margin-bottom: 1.5mm; }
.cover-safety { font-size: 8.5pt; opacity: 0.75; margin-top: 8mm; }
.cover-code { margin-top: 6mm; font-size: 10pt; border: 0.5mm dashed var(--accent); border-radius: 4mm; padding: 4mm; }
.cover-code b { font-size: 13pt; letter-spacing: 0.08em; white-space: nowrap; }
.cover-code .the-code { display: inline-block; margin-top: 1.5mm; }

/* Fold-over cards: 2 × 2 per page. Top half (activity) is printed upside down so
   that after a mountain fold both sides read the right way up. */
.fold-sheet { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; padding: 6mm; }
.fcard { position: relative; display: grid; grid-template-rows: 1fr 1fr; border: 0.25mm dashed rgba(0, 0, 0, 0.35); }
[data-dark='1'] .fcard { border-color: rgba(255, 255, 255, 0.4); }
.fcard-inside {
  transform: rotate(180deg); padding: 5mm 7mm 4mm; display: flex; flex-direction: column; overflow: hidden;
  border-top: 0.3mm dotted rgba(0, 0, 0, 0.45);
}
[data-dark='1'] .fcard-inside { border-top-color: rgba(255, 255, 255, 0.5); }
.fi-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 7.5pt; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent2); margin-bottom: 1.5mm; }
.fi-date { text-transform: none; letter-spacing: 0; font-weight: 700; opacity: 0.8; color: var(--ink); }
.fi-body { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.fi-emoji { font-size: 19pt; line-height: 1.1; }
.fcard h3 { font-family: var(--theme-font); font-size: 14pt; line-height: 1.15; margin: 1mm 0 1.8mm; color: var(--ink); }
.fcard p { font-size: 9.6pt; line-height: 1.38; margin: 0 0 1.4mm; }
.fi-need { font-size: 8.2pt !important; opacity: 0.85; }
.fi-note { font-family: var(--font-display); font-style: italic; color: var(--accent2); font-size: 9pt !important; }
.fcard-front { position: relative; display: grid; place-items: center; overflow: hidden; background: var(--soft); }
.fcard:nth-child(2n) .fcard-front { background: var(--paper); }
.ff-motif { position: absolute; width: 30mm; height: 30mm; left: 5mm; top: 5mm; opacity: 0.9; transform: rotate(-10deg); }
.fcard:nth-child(2n) .ff-motif { left: auto; right: 5mm; transform: rotate(10deg); }
.ff-n { font: 800 64pt/1 var(--theme-font); color: var(--accent2); position: relative; text-shadow: 0 0.8mm 0 var(--paper); }
.ff-name { position: absolute; bottom: 9mm; font: 700 10pt var(--theme-font); color: var(--ink); opacity: 0.75; font-style: italic; }
.ff-foot { position: absolute; bottom: 2.5mm; font-size: 6pt; opacity: 0.55; letter-spacing: 0.05em; }

/* Envelope inserts: 3 × 4 per page */
.insert-sheet { display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(4, 1fr); padding: 6mm; }
.icard { border: 0.25mm dashed rgba(0, 0, 0, 0.35); padding: 4mm 5mm; display: flex; flex-direction: column; overflow: hidden; }
[data-dark='1'] .icard { border-color: rgba(255, 255, 255, 0.4); }
.ic-top { display: flex; justify-content: space-between; align-items: center; }
.ic-n { font: 800 26pt/1 var(--theme-font); color: var(--accent2); }
.ic-motif { width: 10mm; height: 10mm; }
.ic-emoji { font-size: 16pt; margin-top: 1.5mm; }
.icard h3 { font-family: var(--theme-font); font-size: 12pt; line-height: 1.15; margin: 1mm 0 1.5mm; }
.icard p { font-size: 8.4pt; line-height: 1.35; margin: 0; }
.ic-extra { margin-top: 1mm !important; font-weight: 700; }
.ic-note { font-family: var(--font-display); font-style: italic; color: var(--accent2); }

/* Poster */
.poster { padding: 12mm 12mm 14mm; display: flex; flex-direction: column; }
.poster-head { display: flex; align-items: center; justify-content: center; gap: 6mm; text-align: center; margin-bottom: 6mm; }
.poster-head h1 { font-family: var(--theme-font); font-size: 24pt; margin: 0; color: var(--ink); }
.poster-head p { margin: 1mm 0 0; font-size: 10.5pt; color: var(--accent2); font-weight: 800; }
.poster-motif { width: 18mm; height: 18mm; flex: none; }
.poster-grid { flex: 1; display: grid; grid-template-columns: repeat(var(--cols), 1fr); gap: 3mm; }
.pcell { border-radius: 3.5mm; background: var(--soft); padding: 2.5mm 3mm; display: flex; flex-direction: column; overflow: hidden; }
.pc-top { display: flex; justify-content: space-between; align-items: center; }
.pc-n { font: 800 15pt/1 var(--theme-font); color: var(--accent2); }
.pc-tick { width: 5.5mm; height: 5.5mm; border-radius: 1.5mm; border: 0.5mm solid var(--accent); background: var(--paper); }
.pc-e { font-size: 15pt; margin: 1.5mm 0 0.5mm; }
.pc-t { font-weight: 800; font-size: 8.4pt; line-height: 1.2; }
.pc-m { font-size: 7pt; opacity: 0.7; margin-top: auto; }

@media print {
  html, body { background: none !important; }
  body { display: block; }
  .no-print, .site-head, .site-foot, .toast, dialog, .celebrate { display: none !important; }
  main { padding: 0; }
  .preview { margin: 0 !important; padding: 0 !important; max-width: none !important; }
  .preview .sheets { display: block !important; zoom: 1 !important; gap: 0; }
  .preview .sheet { box-shadow: none !important; }
}

/* Blank "write your own" cards */
.write-lines { display: grid; gap: 7mm; padding: 4mm 0 2mm; }
.write-lines span { border-bottom: 0.3mm solid currentColor; opacity: 0.35; }
