/* 打印小票：58mm 热敏纸，只输出 #print-root，其余页面内容全部隐藏 */
@page { size: 58mm auto; margin: 0; }

@media print {
  html, body { background: #fff !important; margin: 0 !important; padding: 0 !important; }
  body > *:not(#print-root) { display: none !important; }

  #print-root {
    display: block !important;
    width: 48mm;
    margin: 0 auto;
    padding: 3mm 0 8mm;
    color: #000;
    font: 12px/1.45 "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  #print-root * { box-sizing: border-box; }

  .rc-shop { text-align: center; font-size: 17px; font-weight: 700; letter-spacing: 1px; }
  .rc-sub { text-align: center; font-size: 11px; margin-top: 1px; }
  .rc-hr { border-top: 1px dashed #000; margin: 2.2mm 0; }
  .rc-no-label { text-align: center; font-size: 11px; }
  .rc-no { text-align: center; font: 800 44px/1.1 "DIN Alternate", "Bahnschrift", Menlo, Consolas, monospace; letter-spacing: 2px; }
  .rc-row { font-size: 12px; word-break: break-all; }
  .rc-row b { font-size: 14px; }
  .rc-item { display: grid; grid-template-columns: 1fr auto auto; gap: 0 6px; margin-bottom: 1.4mm; align-items: start; }
  .rc-name { font-weight: 700; font-size: 13px; word-break: break-all; }
  .rc-spec { display: block; font-weight: 400; font-size: 11px; }
  .rc-qty, .rc-amt { white-space: nowrap; font-family: Menlo, Consolas, monospace; }
  .rc-amt { min-width: 11mm; text-align: right; }
  .rc-line { display: flex; justify-content: space-between; font-size: 12px; }
  .rc-total { font-size: 15px; font-weight: 800; margin-top: 1mm; }
  .rc-remark { border: 1.5px solid #000; padding: 1.2mm 1.6mm; font-size: 13px; font-weight: 700; word-break: break-all; }
  .rc-small { font-size: 10px; word-break: break-all; }
  .rc-foot { text-align: center; font-size: 11px; margin-top: 3mm; }
}
