/* 共用表單、按鈕與 FAQ 沿用 site.css。 */
#mm-form [hidden], #mm-preview [hidden] { display: none !important; }
#mm-form .mm-mode { border: 1px solid var(--line); border-radius: 8px; margin: 0 0 16px; padding: 12px; }
#mm-form .mm-mode label, #mm-form .mm-checks label { display: inline-flex; align-items: center; gap: 8px; margin-right: 18px; }
#mm-form input[type=radio], #mm-form input[type=checkbox] { width: 20px; height: 20px; flex: none; }
#mm-form .qr-field input, #mm-form .qr-field textarea { min-width: 0; max-width: 100%; }
#mm-form .mm-row { min-width: 0; border: 1px solid var(--line); border-radius: 8px; padding: 12px; margin: 12px 0; }
#mm-form .mm-row legend { font-weight: 700; padding: 0 6px; }
#mm-form .mm-list-section { margin-bottom: 24px; }
#mm-form .mm-row-controls { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
#mm-form .mm-row-controls .btn { min-height: 44px; }
#mm-preview .mm-bar { display: flex; flex-wrap: wrap; gap: 10px; }
#mm-preview .mm-hint { color: var(--muted); font-size: .95rem; }
#mm-preview .mm-paper-wrap { overflow: hidden; background: #e9ecf1; border: 1px solid var(--line); border-radius: 8px; margin: 12px 0; }
#mm-preview .mm-paper { width: 210mm; min-height: 297mm; box-sizing: border-box; padding: 16mm 18mm; background: #fff; color: #111; transform-origin: 0 0; font-family: "Noto Serif TC", "PMingLiU", serif; font-size: 12pt; line-height: 1.65; }
#mm-paper .mm-title { text-align: center; font-size: 19pt; margin: 0 0 7mm; overflow-wrap: anywhere; }
#mm-paper p { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0 0 2mm; }
#mm-paper .mm-heading { font-weight: 700; border-bottom: 1px solid #999; margin-top: 5mm; break-after: avoid; }
#mm-paper .mm-subheading { font-weight: 700; margin-top: 3mm; break-after: avoid; }
#mm-paper .mm-signature { margin-top: 12mm; break-inside: avoid; }
#mm-paper .mm-table { width: 100%; table-layout: fixed; border-collapse: collapse; margin: 3mm 0; }
#mm-paper .mm-table th, #mm-paper .mm-table td { border: 1px solid #777; padding: 2mm; white-space: pre-wrap; overflow-wrap: anywhere; vertical-align: top; }
#mm-paper .mm-table th:first-child { width: 48%; }
#mm-paper .mm-table tr { break-inside: avoid; }
@media (max-width: 480px) { #mm-preview .mm-bar { display: grid; grid-template-columns: 1fr; } }
@media print {
  @page { size: A4; margin: 16mm 18mm; }
  html, body { background: #fff; }
  .site-header, .site-footer { display: none !important; }
  main.wrap { max-width: none; padding: 0; margin: 0; }
  main.wrap > * { display: none !important; }
  main.wrap > #mm-preview { display: block !important; }
  #mm-preview > * { display: none !important; }
  #mm-preview > #mm-paper-wrap { display: block !important; border: 0; margin: 0; background: none; overflow: visible; height: auto !important; }
  #mm-preview .mm-paper { transform: none !important; width: auto; min-height: 0; padding: 0; }
}
