/* HKGET HF5 cumulative (HF4 print): same 71.5mm text layout on screen and on 80mm paper. No A4, zoom or clipping. */
:root { --hkget-thermal-build: 1.26.6-hf.8; }
.ticket80 {
  box-sizing: border-box !important;
  width: 71.5mm !important; min-width: 0 !important; max-width: 71.5mm !important;
  height: auto !important; min-height: 0 !important; max-height: none !important;
  margin: 16px auto; padding: 0 !important; border: 0 !important;
  background: #fff !important; color: #000 !important;
  font: 10pt/1.42 "Microsoft JhengHei", "PingFang HK", "Noto Sans CJK TC", "Segoe UI", sans-serif;
  overflow: visible !important; overflow-wrap: anywhere; word-break: normal;
  transform: none !important; zoom: 1 !important; text-align: left;
  box-shadow: 0 0 0 1px #ddd; border-radius: 0 !important;
}
.ticket80 *, .ticket80 *::before, .ticket80 *::after {
  box-sizing: border-box; min-width: 0; color: #000 !important;
  text-shadow: none !important; overflow-wrap: anywhere;
}
.ticket80 header, .ticket80 footer, .ticket80 section { width: auto; max-width: 100%; }
.ticket80 header { text-align: center; padding: 0 0 2mm; border-bottom: 0.4mm solid #000; }
.ticket80 .document-logo { display: block; width: 18mm; height: 16mm; max-width: 18mm; max-height: 16mm; object-fit: contain; margin: 0 auto 1mm; }
.ticket80 .receipt-header h1, .ticket80 .thermal-terms-header > strong { margin: 0; font-size: 11.5pt; font-weight: 800; line-height: 1.35; }
.ticket80 .receipt-header p { margin: 1mm 0; font-size: 8pt; line-height: 1.35; }
.ticket80 .receipt-header h2, .ticket80 .thermal-fee-title { margin: 1mm 0; font-size: 13pt; font-weight: 900; letter-spacing: 0; line-height: 1.3; }
.ticket80 .thermal-terms-header { display: grid; gap: 1mm; }
.ticket80 .thermal-terms-header > b { font-size: 16pt; line-height: 1.3; }
.ticket80 .thermal-terms-header > small { font-size: 9pt; }
.ticket80 .receipt-number { display: block; margin: 2mm 0; font-size: 9pt; line-height: 1.45; }
.ticket80 .receipt-number > span { display: block; }
.ticket80 .receipt-grid { display: block; margin: 0; border: 0; }
.ticket80 .ticket-field { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 2mm; padding: 1mm 0; border-bottom: .2mm solid #999; break-inside: avoid; }
.ticket80 .ticket-field > dt, .ticket80 .ticket-field > dd { margin: 0; padding: 0; border: 0; background: transparent; font-size: 10pt; line-height: 1.4; }
.ticket80 .ticket-field > dt { font-weight: 700; }
.ticket80 .ticket-field > dd { text-align: right; }
.ticket80 .ticket-field-wide { display: block; break-inside: auto; }
.ticket80 .ticket-field-wide > dt { margin-bottom: .8mm; }
.ticket80 .ticket-field-wide > dd { text-align: left; }
.ticket80 .ticket-field-student > dd { font-size: 14pt; font-weight: 900; }
.ticket80 .ticket-field > .receipt-amount { font-size: 14pt; font-weight: 900; }
.ticket80 .receipt-course-list { display: block; }
.ticket80 .receipt-course-row { display: block; margin: 0; padding: 1mm 0 1.5mm; border-bottom: .2mm dashed #888; }
.ticket80 .receipt-course-row > div > strong { display: block; font-size: 10pt; line-height: 1.4; }
.ticket80 .receipt-course-row small { display: block; margin-top: .7mm; font-size: 9pt; line-height: 1.4; }
.ticket80 .receipt-course-row > b { display: block; font-size: 10.5pt; text-align: right; margin-top: .8mm; }
.ticket80 .receipt-course-adjustment, .ticket80 .receipt-course-total { display: flex; justify-content: space-between; gap: 2mm; padding: 1mm 0; font-size: 10pt; }
.ticket80 .receipt-course-total { border-top: .3mm solid #000; }
.ticket80 .receipt-course-adjustment strong, .ticket80 .receipt-course-total strong { white-space: nowrap; }
.ticket80 .thermal-course { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .5mm 2mm; padding: 1.5mm 0; border-bottom: .2mm dashed #888; }
.ticket80 .thermal-course > div { display: contents; }
.ticket80 .thermal-course span { grid-column: 1 / -1; font-size: 8.5pt; }
.ticket80 .thermal-course strong { grid-column: 1; font-size: 10.5pt; line-height: 1.4; }
.ticket80 .thermal-course b { grid-column: 2; font-size: 10.5pt; white-space: nowrap; }
.ticket80 .thermal-course small { grid-column: 1 / -1; font-size: 9pt; font-weight: 400; line-height: 1.4; }
.ticket80 .thermal-totals { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 0 2mm; margin: 2mm 0 0; border-top: .4mm solid #000; }
.ticket80 .thermal-totals > dt, .ticket80 .thermal-totals > dd { padding: 1mm 0; margin: 0; font-size: 10pt; border-bottom: .2mm solid #aaa; }
.ticket80 .thermal-totals > dd { text-align: right; white-space: nowrap; }
.ticket80 .thermal-totals .thermal-balance { font-size: 15pt; font-weight: 900; }
.ticket80 .thermal-paid-message, .ticket80 .receipt-paid-message, .ticket80 .receipt-partial-message { font-size: 11pt; font-weight: 800; line-height: 1.4; background: transparent; }
.ticket80 .thermal-paid-message { margin: 2mm 0 0; padding: 1.5mm; border: .35mm solid #000; }
.ticket80 .receipt-notice { margin: 2mm 0 0; padding: 2mm 0 0; background: #fff; border: 0; border-top: .3mm solid #000; break-inside: auto; }
.ticket80 .receipt-notice h3 { margin: 0 0 1mm; font-size: 10pt; }
.ticket80 .receipt-notice div { font-size: 8.5pt; line-height: 1.42; font-weight: 400; }
.ticket80 .thermal-remark, .ticket80 .payment-instructions { margin: 2mm 0 0; padding: 1.5mm 0; border: 0; border-top: .2mm dashed #777; background: #fff; }
.ticket80 .thermal-remark h3, .ticket80 .payment-instructions h3 { margin: 0 0 1mm; font-size: 10pt; }
.ticket80 .thermal-remark p, .ticket80 .payment-instructions p { margin: 0 0 .7mm; font-size: 9pt; line-height: 1.4; }
.ticket80 .final-payment-list { display: block; }
.ticket80 .final-payment-row { gap: 2mm; padding: 1mm 0; break-inside: avoid; }
.ticket80 .final-payment-row strong, .ticket80 .final-payment-row b { font-size: 10pt; }
.ticket80 .final-payment-row small { font-size: 8.5pt; }
.ticket80 .final-payment-total { padding-top: 1mm; gap: 2mm; font-size: 10pt; }
.ticket80 .final-receipt-note { margin: 2mm 0; padding: 1.5mm; font-size: 9pt; line-height: 1.4; }
.ticket80 footer { margin: 2mm 0 0; padding: 1.5mm 0 0; border-top: .2mm dashed #777; text-align: center; font-size: 8.5pt; line-height: 1.4; }
.ticket80 table { width: 100%; table-layout: fixed; }
.ticket80 img { max-width: 100%; }
body.is-thermal-print .receipt-page, body.is-thermal-print .thermal-page { margin: 0; padding-bottom: 200px; }
body.is-thermal-print .receipt-actions { padding: 10px 14px max(10px, env(safe-area-inset-bottom)); }
body.is-thermal-print .thermal-print-guide { width: min(100%, 80mm); margin: 10px auto 14px; font-size: 12px; line-height: 1.5; }
#hkget-print-root { position: absolute; left: -12000px; top: 0; visibility: hidden; width: 71.5mm; height: auto; margin: 0; padding: 0; border: 0; }
#hkget-print-root .ticket80 { margin: 0; box-shadow: none; }
body.hkget-ticket-document { margin: 0 auto; padding: 3mm 4mm; width: 80mm; max-width: 100%; box-sizing: border-box; background: #fff; }
body.hkget-ticket-document > .ticket80 { margin: 0; }
.hkget-ticket-actions { margin: 15px 0; font: 14px/1.4 sans-serif; }
.hkget-ticket-actions button { padding: 10px 12px; min-height: 42px; background: #a62b57; color: #fff; border: 0; border-radius: 6px; }
@media print {
  html.hkget-printing-80, body.hkget-printing-80 { width: auto !important; min-width: 0 !important; max-width: none !important; height: auto !important; min-height: 0 !important; margin: 0 !important; padding: 0 !important; display: block !important; overflow: visible !important; background: #fff !important; }
  body.hkget-printing-80 > :not(#hkget-print-root) { display: none !important; }
  body.hkget-printing-80 #hkget-print-root { display: block !important; position: static !important; visibility: visible !important; inset: auto !important; width: 71.5mm !important; max-width: 71.5mm !important; height: auto !important; min-height: 0 !important; padding: 0 !important; margin: 0 auto !important; border: 0 !important; overflow: visible !important; }
  #hkget-print-root .ticket80 { margin: 0 !important; padding: 0 !important; border: 0 !important; box-shadow: none !important; break-after: auto !important; page-break-after: auto !important; }
  #hkget-print-root * { background: transparent !important; box-shadow: none !important; text-shadow: none !important; }
  #hkget-print-root .no-print, .hkget-ticket-actions { display: none !important; }
  #hkget-print-root .thermal-break-after, #hkget-print-root .thermal-page-one { break-after: auto !important; page-break-after: auto !important; }
}

/* Exact original-number lookup; no invoice state is changed by lookup/printing. */
.thermal-lookup { margin: 14px 0 20px; padding: 16px; border: 1px solid #d9c9ce; border-radius: 12px; background: #fffaf2; }
.thermal-lookup > label { display: block; margin-bottom: 10px; font-weight: 750; }
.thermal-lookup-controls { display: flex; gap: 10px; align-items: stretch; }
.thermal-lookup-controls input { flex: 1; min-width: 0; padding: 10px 12px; border: 1px solid #c9c3c6; border-radius: 8px; font: inherit; }
.thermal-lookup-controls button { white-space: nowrap; }
.thermal-lookup > p { font-size: 13px; line-height: 1.5; margin: 8px 0 0; }
#reprint-invoice-result { color: #93213e; font-weight: 650; }
#reprint-invoice-result:empty { display: none; }
@media(max-width: 540px) { .thermal-lookup-controls { flex-direction: column; } }

/* Internal tuition notice: compact spacing and dates, without shrinking receipts. */
.ticket80.thermal-compact-notice { font-size: 9.5pt; line-height: 1.3; }
.ticket80.thermal-compact-notice header { padding-bottom: 1mm; gap: .5mm; }
.ticket80.thermal-compact-notice .thermal-fee-title { margin: 0; font-size: 11pt; line-height: 1.3; }
.ticket80.thermal-compact-notice header > b { display: block; font-size: 52pt; font-weight: 900; line-height: 1.1; }
.ticket80.thermal-compact-notice header > small { font-size: 8pt; line-height: 1.3; }
.ticket80.thermal-compact-notice .thermal-course { padding: 1mm 0; gap: .5mm 1.5mm; }
.ticket80.thermal-compact-notice .thermal-course strong { grid-column: 1 / -1; font-size: 9.5pt; line-height: 1.3; }
.ticket80.thermal-compact-notice .thermal-course b { grid-column: 1 / -1; display: block; text-align: right; font-size: 40pt; font-weight: 900; line-height: 1.1; white-space: normal; }
.ticket80.thermal-compact-notice .thermal-course small { font-size: 9pt; line-height: 1.35; }
.ticket80.thermal-compact-notice .thermal-totals { display: block; margin-top: 1mm; }
.ticket80.thermal-compact-notice .thermal-totals > dt,
.ticket80.thermal-compact-notice .thermal-totals > dd { padding: .6mm 0; font-size: 9.5pt; line-height: 1.3; }
.ticket80.thermal-compact-notice .thermal-totals > dt { border-bottom: 0; padding-bottom: 0; font-weight: 700; }
.ticket80.thermal-compact-notice .thermal-totals > dd,
.ticket80.thermal-compact-notice .thermal-totals .thermal-balance { display: block; font-size: 40pt; font-weight: 900; line-height: 1.1; white-space: normal; }

/* ipad.1: single CSS identifier; preserves strict same-build verification. */
:root { --hkget-thermal-build-token: hkget-v1_26_6-hf_8; }
