/* =============================================================
   KRGC — print stylesheet
   Wallet cards, target sheets, hide chrome, force black on white
   ============================================================= */

@media print {
  .head,
  .drawer,
  .stickybar,
  .foot,
  .btn,
  .installbar,
  .no-print,
  .tabs,
  .pillrow,
  .burger,
  .skip,
  .pagehead,
  .section-head,
  .safety-note,
  .sim-label,
  .field,
  .form-grid,
  .filters,
  .kbd-hint,
  .offline-list {
    display: none !important;
  }

  @page {
    size: letter portrait;
    margin: 0.4in;
  }

  @page letter-page {
    size: letter portrait;
    margin: 0.4in;
  }

  @page a4-page {
    size: A4 portrait;
    margin: 10mm;
  }

  body.print-letter {
    page: letter-page;
  }

  body.print-a4 {
    page: a4-page;
  }

  html,
  body {
    background: #fff !important;
    color: #000 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .wrap {
    max-width: none;
    padding: 0;
  }

  .section {
    padding: 0;
    border: 0;
  }

  .panel,
  .chart-wrap,
  .target-preview,
  .game-stage,
  .tablewrap {
    border: 0;
    background: #fff;
    box-shadow: none;
  }

  /* ---------- wallet come-up card (3.5 × 2 in) ---------- */
  @page wallet {
    size: 3.5in 2in;
    margin: 0;
  }

  body.print-wallet {
    page: wallet;
  }

  body.print-wallet * {
    visibility: hidden;
  }

  body.print-wallet #walletCard,
  body.print-wallet #walletCard * {
    visibility: visible;
  }

  body.print-wallet #walletCard {
    position: absolute;
    left: 0;
    top: 0;
    width: 3.5in !important;
    height: 2in !important;
    padding: 0.12in 0.14in !important;
    margin: 0;
    border: 1px solid #000;
    background: #fff;
    color: #000;
    box-sizing: border-box;
    overflow: hidden;
  }

  .wallet-card {
    width: 3.5in !important;
    height: 2in !important;
    padding: 0.12in 0.14in !important;
    box-sizing: border-box;
    background: #fff !important;
    color: #000 !important;
    border: 1px solid #000;
    font-family: "DM Mono", ui-monospace, monospace;
    font-size: 7.5pt;
    line-height: 1.25;
    page-break-inside: avoid;
  }

  .wallet-card table {
    width: 100%;
    border-collapse: collapse;
  }

  .wallet-card th,
  .wallet-card td {
    padding: 0 0.08in;
    text-align: right;
    border-bottom: 1px solid #ccc;
    color: #000;
  }

  .wallet-card th:first-child,
  .wallet-card td:first-child {
    text-align: left;
  }

  .wallet-card h1 {
    font-size: 9pt;
    margin: 0 0 0.06in;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #000;
  }

  /* ---------- printable targets ---------- */
  .target-preview {
    background: #fff !important;
    color: #000 !important;
    border: 0;
    border-radius: 0;
    padding: 0;
    overflow: visible;
  }

  .target-sheet {
    width: 100%;
    max-width: none;
    margin: 0 auto;
    color: #000 !important;
    background: #fff !important;
    page-break-after: always;
  }

  .target-sheet:last-child {
    page-break-after: auto;
  }

  .target-sheet svg {
    display: block;
    width: 100%;
    height: auto;
  }

  .cal-square {
    width: 1in !important;
    height: 1in !important;
    border: 2px solid #000 !important;
    box-sizing: border-box;
    background: #fff;
  }

  .cal-label {
    font-family: "DM Mono", ui-monospace, monospace;
    font-size: 8pt;
    color: #000;
    margin-top: 2mm;
  }

  .ink-saver .target-fill {
    fill: none !important;
  }

  .ink-saver .target-stroke {
    stroke-width: 0.5pt !important;
  }

  /* mm-based target geometry prints at true size when scale-exact is on */
  .scale-exact .target-sheet {
    width: 210mm;
  }

  body.print-letter.scale-exact .target-sheet {
    width: 8.5in;
  }

  body.print-a4.scale-exact .target-sheet {
    width: 210mm;
  }

  canvas,
  #trajChart {
    display: none !important;
  }

  #dopeTable {
    display: block !important;
  }

  .tablewrap table {
    min-width: 0;
    color: #000;
  }

  .tablewrap th,
  .tablewrap td {
    color: #000;
    border-color: #ccc;
  }
}
