/* Bản in: xem trước trên màn hình + @media print */
.print-layout { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: var(--sp-5); align-items: start; }
@media (max-width: 1000px) { .print-layout { grid-template-columns: 1fr; } }
.print-ctrl { position: sticky; top: calc(var(--header-h) + 16px); }
.print-preview { overflow: auto; padding: 8px 0 24px; }
.sheet { --paper-w: 210mm; --paper-h: 297mm; width: var(--paper-w); min-height: var(--paper-h); margin: 0 auto; background: #fff; color: #1a1a1a; padding: 16mm 15mm; box-shadow: 0 10px 40px -10px rgba(0,0,0,.35); font-family: var(--font); font-size: 11.5pt; line-height: 1.45; }
.sheet[data-paper="letter"] { --paper-w: 216mm; --paper-h: 279mm; }
@media (max-width: 860px) { .sheet { zoom: .45; } }
.ws-head { display: grid; grid-template-columns: 1fr auto; gap: 6mm; border-bottom: 2px solid #1a1a1a; padding-bottom: 4mm; margin-bottom: 6mm; }
.ws-head h1 { font-size: 18pt; font-weight: 800; }
.ws-head .who { display: grid; gap: 2mm; font-size: 10pt; min-width: 60mm; }
.ws-head .who span { border-bottom: 1px dotted #888; padding-bottom: 1mm; }
.ws-brand { font-size: 8pt; color: #888; margin-top: 1mm; }
.ws-instr { font-style: italic; color: #444; margin-bottom: 5mm; }
.ws-quiz { counter-reset: q; display: grid; gap: 5mm; }
.ws-quiz.cols-2 { grid-template-columns: 1fr 1fr; column-gap: 8mm; }
.ws-q { break-inside: avoid; counter-increment: q; }
.ws-q > p { font-weight: 700; }
.ws-q > p::before { content: counter(q) ". "; }
.ws-q img { max-height: 30mm; margin: 2mm 0; }
.ws-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 1mm 6mm; margin-top: 1.5mm; padding-left: 5mm; }
.ws-opts span.correct { font-weight: 800; text-decoration: underline; text-decoration-thickness: 2px; }
.ws-match { display: grid; grid-template-columns: 1fr 22mm 1fr; gap: 3.5mm 0; align-items: center; }
.ws-match .l, .ws-match .r { border: 1.5px solid #1a1a1a; border-radius: 3mm; padding: 2.5mm 3mm; display: flex; gap: 2mm; align-items: center; min-height: 11mm; break-inside: avoid; }
.ws-match .l img { width: 12mm; height: 12mm; object-fit: cover; border-radius: 2mm; }
.ws-match .dot { width: 3mm; height: 3mm; border-radius: 50%; background: #1a1a1a; margin-left: auto; }
.ws-match .r .dot { margin: 0 2mm 0 0; }
.ws-match .mid { text-align: center; font-size: 8pt; color: #b00; font-weight: 700; }
.ws-key { margin-top: 8mm; padding-top: 4mm; border-top: 1.5px dashed #999; font-size: 10pt; }
.ws-key h2 { font-size: 12pt; margin-bottom: 2mm; }
.ws-words { display: grid; grid-template-columns: repeat(2, 1fr); gap: 3mm 8mm; }
.ws-words div { border-bottom: 1px solid #ccc; padding: 2mm 0; display: flex; gap: 3mm; }
.ws-words .blank { flex: 1; border-bottom: 1px dotted #888; }

@media print {
  @page { size: A4; margin: 0; }
  body { background: #fff !important; }
  .app-header, .print-ctrl, .print-hide, .page-head, .no-print, .toast-wrap, .fab { display: none !important; }
  .app-main { padding: 0 !important; }
  .print-layout { display: block; }
  .print-preview { padding: 0; overflow: visible; }
  .sheet { box-shadow: none; margin: 0; zoom: 1 !important; }
}
