/* Mom & Calm — print. Only #print-root prints; the app is hidden. */

#print-root { display: none; }

@media print {
  body.printing > *:not(#print-root) { display: none !important; }
  body.printing { background: #fff !important; }
  body.printing::before { display: none !important; }
  #print-root { display: block; color: #2E1E28; font-family: var(--font-body); font-size: 11pt; line-height: 1.45; }
  #print-root * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .print-mono, .print-mono * { color: #000 !important; background: #fff !important; border-color: #000 !important; box-shadow: none !important; filter: grayscale(1); }

  .print-sheet h1 { font-family: var(--font-display); font-variation-settings: 'SOFT' 100; font-size: 24pt; font-weight: 500; margin: 0; }
  .print-sheet h2 { font-family: var(--font-display); font-variation-settings: 'SOFT' 100; font-size: 14pt; font-weight: 500; margin: 14pt 0 6pt; color: #5B2F4A; }
  .print-head { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 2pt solid #C8607A; padding-bottom: 6pt; margin-bottom: 8pt; }
  .print-head p { margin: 0; color: #5E4D57; }
  .print-alert { margin: 8pt 0; padding: 8pt 10pt; border-radius: 8pt; background: #F6E3E7; font-weight: 600; }
  .print-table { width: 100%; border-collapse: collapse; }
  .print-table th, .print-table td { text-align: left; vertical-align: top; padding: 5pt 6pt; border-bottom: 0.75pt solid #E6DBD0; }
  .print-table th { width: 32%; color: #5E4D57; font-weight: 500; }
  .print-table thead th { width: auto; font-weight: 600; color: #2E1E28; border-bottom-width: 1.5pt; }
  .print-phone { font-weight: 600; white-space: nowrap; }
  .print-foot { margin-top: 16pt; font-size: 8pt; color: #8A7882; text-align: right; }
  #print-root[data-size="A5"] { font-size: 9.5pt; }
  #print-root[data-size="A5"] .print-sheet h1 { font-size: 18pt; }
  .print-sheet h2, .print-table tr { break-inside: avoid; }

  /* printables library */
  .p-box { display: inline-block; width: 11pt; height: 11pt; border: 1pt solid #5E4D57; border-radius: 3pt; vertical-align: -2pt; }
  .p-line { height: 18pt; border-bottom: 0.75pt solid #D6C7B8; }
  .p-line-sm { height: 14pt; }
  .p-dot { display: inline-block; width: 7pt; height: 7pt; border-radius: 50%; background: var(--m, #8A7882); margin-right: 3pt; vertical-align: 0; }
  .p-item { margin: 0 0 2pt; font-size: 9.5pt; line-height: 1.3; }
  .p-num { color: #C8607A; }
  .p-week { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8pt; }
  .p-week-compact { grid-template-columns: repeat(4, 1fr); margin: 8pt 0; }
  .p-day { border: 1pt solid #E6DBD0; border-radius: 8pt; padding: 6pt 8pt; min-height: 120pt; break-inside: avoid; }
  .p-week-compact .p-day { min-height: 70pt; }
  .p-day h2 { margin: 0 0 4pt !important; font-size: 11pt !important; }
  .p-board td { vertical-align: top; height: 52pt; }
  .p-person { font-weight: 600; }
  .p-month td { vertical-align: top; height: 70pt; width: 14.28%; padding: 3pt 4pt !important; }
  .p-wall td { height: 92pt; }
  .p-mcell .p-mnum { font-weight: 600; }
  .p-out { color: #B8A9B2; }
  .p-stickers { font-size: 11pt; }
  .p-dots .p-dot { margin-right: 2pt; }
  .p-year { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8pt; }
  .p-year-list { grid-template-columns: repeat(3, 1fr); }
  .p-ymonth { border: 0.75pt solid #E6DBD0; border-radius: 8pt; padding: 5pt 7pt; break-inside: avoid; }
  .p-ymonth h2 { margin: 0 0 3pt !important; font-size: 10.5pt !important; }
  .p-mini { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; font-size: 7pt; gap: 1pt; margin-bottom: 3pt; }
  .p-mini-h { color: #8A7882; }
  .p-mark { background: #F6E3E7; border-radius: 50%; font-weight: 700; }
  .p-kid { break-inside: avoid; margin-bottom: 10pt; }
  .p-school td { vertical-align: top; }
  .p-routine td { height: 40pt; text-align: center; vertical-align: middle; }
  .p-routine td:first-child { text-align: left; }
  .p-step { display: flex; align-items: center; gap: 8pt; font-size: 13pt; font-weight: 500; }
  .p-step-emoji { font-size: 22pt; }
  .p-star { font-size: 18pt; color: #E8B949; }
  .p-check { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 18pt; }
  .p-check li { display: flex; align-items: center; gap: 8pt; min-height: 20pt; border-bottom: 0.75pt solid #E6DBD0; break-inside: avoid; }
  .p-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12pt; }
  .p-cols .p-check { columns: 1; }
  .p-habits th, .p-habits td { padding: 2pt !important; font-size: 7pt; text-align: center; width: 2.6%; }
  .p-habits td:first-child, .p-habits th:first-child { width: 22%; text-align: left; font-size: 9pt; }
  .p-reading td { height: 20pt; }
  #print-root[data-size="A5"] .p-week, #print-root[data-size="A5"] .p-cols { grid-template-columns: 1fr; }
  #print-root[data-size="A5"] .p-check { columns: 1; }
  #print-root[data-size="A5"] .p-year { grid-template-columns: repeat(2, 1fr); }
}
