/* Trang công khai (/g/, /c/) và trang in tem QR. Dùng chung biến màu của style.css (phong cách POffice). */
body.pub { min-height: 100vh; }
.pub-bar { display: flex; align-items: center; gap: 12px; padding: 16px; max-width: 720px; margin: 0 auto; }
.pub-main { max-width: 720px; margin: 0 auto; padding: 0 16px 24px; display: flex; flex-direction: column; gap: 16px; }
.pub-main h1 { font-size: 22px; }
.facts { display: grid; grid-template-columns: 110px 1fr; gap: 6px 12px; margin-top: 12px; font-size: 14px; }
.facts dt { color: var(--muted); font-weight: 600; font-size: 13px; }
.facts dd { margin: 0; }
.stone { margin-top: 14px; padding: 12px 14px; border-left: 4px solid var(--gold); background: #fffaf0; border-radius: 10px; white-space: pre-line; font-style: italic; color: var(--ink-2); }
.directions { margin-top: 12px; white-space: pre-line; background: var(--surface-2); padding: 10px 12px; border-radius: 10px; }
.pub-actions { margin: 14px 0 6px; }
a.btn.primary-link { background: var(--grad-brand); color: #fff; border-color: transparent; box-shadow: var(--glow); }
.pub-search { margin-top: 8px; }
.hits { list-style: none; } .hits li { border-bottom: 1px solid var(--line); }
.hits li:last-child { border-bottom: 0; }
.hits a { display: block; padding: 10px 2px; text-decoration: none; color: var(--ink); }
.hits a:hover { background: #f5faf6; }
.hits .small { display: block; }
.pub .photos img { height: 120px; }
.pub-foot { text-align: center; color: var(--muted); font-size: 12px; padding: 18px 16px 28px; }

/* Tem QR: lưới 3 cột trên A4 */
.print-page { background: #fff; padding: 16px; }
.print-head { margin-bottom: 16px; }
.labels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.label { display: flex; gap: 8px; align-items: center; border: 1px dashed #9aa; border-radius: 8px; padding: 8px; break-inside: avoid; page-break-inside: avoid; }
.label img { width: 30mm; height: 30mm; flex-shrink: 0; }
.label .lt { min-width: 0; font-size: 11px; line-height: 1.3; }
.label b { font-size: 13px; display: block; }
.label .ln { font-weight: 600; }
.label .ls { color: #555; font-size: 10px; }
/* Tên trang riêng: tem QR in A4, biên nhận in A5, không đè nhau. */
.labels { page: qrsheet; }
@page qrsheet { size: A4; margin: 10mm; }
@media print { .print-page { padding: 0; } }
@media (max-width: 600px) { .labels { grid-template-columns: 1fr 1fr; } .facts { grid-template-columns: 90px 1fr; } }

/* Biên nhận: khổ A5 dọc */
.receipt { position: relative; max-width: 148mm; margin: 0 auto; background: #fff; color: #111; padding: 10mm; border: 1px solid #ccc; font-size: 13px; }
.receipt h1 { text-align: center; font-size: 18px; margin: 14px 0; color: #111; }
.rc-head { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; }
.rc-no { text-align: right; }
.rc-table { box-shadow: none; border-radius: 0; margin: 10px 0; }
.rc-table th, .rc-table td { border: 1px solid #999; padding: 6px 8px; color: #111; background: #fff; text-transform: none; font-size: 12.5px; }
.rc-table .num { text-align: right; white-space: nowrap; }
.rc-sign { display: flex; justify-content: space-around; text-align: center; margin-top: 18px; min-height: 30mm; }
.void-mark { position: absolute; top: 40%; left: 50%; transform: translate(-50%, -50%) rotate(-20deg); font-size: 48px; font-weight: 800; color: rgba(201,42,42,.35); border: 6px solid rgba(201,42,42,.35); padding: 4px 18px; pointer-events: none; }
.void-reason { color: #c92a2a; }
.receipt { page: receipt; }
@page receipt { size: A5; margin: 10mm; }
@media print { .receipt { border: 0; padding: 0; } }
