/* 手機條碼產生器 */
.mb-preview { display: flex; justify-content: center; margin: 12px 0; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.mb-preview svg { max-width: 100%; height: auto; display: block; }
.mb-preview.empty { min-height: 120px; align-items: center; background: var(--soft); }
.mb-preview.empty::before { content: '條碼會顯示在這裡'; color: var(--muted); font-size: 1rem; }
.status.ok { color: var(--ok); font-weight: 600; }
.mb-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mb-actions .btn { width: 100%; padding: 0 6px; }
.mb-code-input { font-size: 1.4rem !important; letter-spacing: .05em; font-family: ui-monospace, Consolas, monospace; text-transform: none; }
@media (max-width: 480px) { .mb-actions { grid-template-columns: 1fr; } }

/* 全螢幕顯示（結帳掃描用）：白底、條碼放到最大 */
body.mb-locked { overflow: hidden; }
#mb-overlay { position: fixed; inset: 0; z-index: 9999; background: #fff; display: flex; flex-direction: column; }
#mb-overlay[hidden] { display: none; }
.mb-ov-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 14px; background: var(--soft); border-bottom: 1px solid var(--line); font-size: 1rem; }
.mb-ov-bar button { min-height: 44px; padding: 0 18px; border: 2px solid var(--brand); border-radius: 10px; background: #fff; color: var(--brand); font: inherit; font-weight: 600; cursor: pointer; }
.mb-ov-code { flex: 1; display: flex; align-items: center; justify-content: center; padding: 3vmin; background: #fff; }
.mb-ov-code svg { width: 96vw; max-width: 1400px; height: auto; max-height: 80vh; }

/* 列印小卡：只印卡片，約信用卡大小的框 */
#mb-card { display: none; }
@media print {
  body.mb-printing > *:not(#mb-card) { display: none !important; }
  body.mb-printing #mb-card { display: block; padding: 10mm; }
  .mb-card-box { width: 85.6mm; padding: 4mm 5mm; border: 1px dashed #666; box-sizing: border-box; background: #fff; }
  .mb-card-box svg { width: 100%; height: auto; display: block; }
}

/* 來源網址很長，手機寬度要能換行 */
.sources li { overflow-wrap: anywhere; }

/* 全螢幕提示：直式才顯示「橫放」建議 */
.mb-ov-tip { display: none; font-style: normal; margin-top: 2px; font-size: .95rem; color: var(--muted); }
@media (orientation: portrait) { .mb-ov-tip { display: block; } }
