/* Ballistics solver page. All colors come from the Carbon & Brass tokens in
   dimeshooters/style.css; layout follows the Explorer's input-rail +
   results-card pattern (rules copied, not imported, per per-app-static
   convention). Chart series colors live in solver_page.js. */

.ballistics-page {
    padding-bottom: 3rem;
}

.ballistics-header h1 {
    font-size: 1.6rem;
    margin-bottom: 0.35rem;
}

.ballistics-subtitle {
    color: rgba(26, 23, 20, 0.72);
    max-width: 52rem;
    margin-bottom: 1.25rem;
}

/* ---- Input rail ---- */

.ballistics-input-rail {
    position: sticky;
    top: calc(var(--ds-sticky-nav-height, 60px) + 12px);
    max-height: calc(100vh - var(--ds-sticky-nav-height, 60px) - 24px);
    overflow-y: auto;
    background: var(--ds-white);
    border: 1px solid rgba(26, 23, 20, 0.12);
    border-radius: 0.5rem;
    padding: 0.85rem;
}

.ballistics-rail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.35rem;
}

.ballistics-rail-title {
    font-family: var(--ds-heading-font);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--ds-ink);
}

.ballistics-reset-button {
    color: var(--ds-accent-on-light);
    border: 1px solid transparent;
    padding: 0.1rem 0.5rem;
}

.ballistics-reset-button:hover {
    border-color: var(--ds-accent-on-light);
    color: var(--ds-accent-on-light);
}

.ballistics-input-section {
    border-top: 1px solid rgba(26, 23, 20, 0.1);
    padding: 0.6rem 0;
}

.ballistics-section-title {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: rgba(26, 23, 20, 0.75);
    margin-bottom: 0.45rem;
}

/* Section titles are buttons that fold their section closed. */
.ballistics-section-toggle {
    border: 0;
    background: none;
    padding: 0;
    font: inherit;
    color: inherit;
    text-transform: inherit;
    letter-spacing: inherit;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    cursor: pointer;
}

.ballistics-section-toggle::before {
    content: '▾';
    font-size: 0.6rem;
    line-height: 1;
    transition: transform 0.15s ease;
}

.ballistics-input-section.collapsed .ballistics-section-toggle::before {
    transform: rotate(-90deg);
}

/* A group hiding a missing required value gets a warning dot on its
   title, so a fully folded rail still shows where to type. */
.ballistics-input-section.needs-input .ballistics-section-toggle::after {
    content: "";
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 50%;
    background: var(--ds-danger, #a33);
}

.ballistics-input-section.collapsed > :not(.ballistics-section-title) {
    display: none;
}

.ballistics-input-section.collapsed .ballistics-section-title {
    margin-bottom: 0;
}

/* Little "?" circles that open explanatory popovers. */
.ballistics-help {
    flex: 0 0 auto;
    width: 1rem;
    height: 1rem;
    padding: 0;
    border-radius: 50%;
    border: 1px solid rgba(26, 23, 20, 0.3);
    background: none;
    color: rgba(26, 23, 20, 0.55);
    font-size: 0.6rem;
    font-weight: 700;
    line-height: 1;
    vertical-align: text-bottom;
    cursor: pointer;
}

.ballistics-help:hover,
.ballistics-help:focus-visible {
    border-color: var(--ds-accent-on-light);
    color: var(--ds-accent-on-light);
    outline: none;
}

.ballistics-help-popover {
    --bs-popover-max-width: 21rem;
    --bs-popover-font-size: 0.85rem;
}

.ballistics-control {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    margin-bottom: 0.5rem;
}

.ballistics-control > span {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: rgba(26, 23, 20, 0.6);
}

.ballistics-control input,
.ballistics-control select {
    font-variant-numeric: tabular-nums;
}

.ballistics-check {
    margin-bottom: 0.5rem;
}

.ballistics-check .form-check-label {
    font-size: 0.85rem;
}

.ballistics-drag-toggle .btn {
    border: 1px solid rgba(26, 23, 20, 0.18);
    color: var(--ds-ink);
}

.ballistics-drag-toggle .btn.active {
    background: var(--ds-accent-on-light);
    border-color: var(--ds-accent-on-light);
    color: var(--ds-white);
}

/* ---- Wind clock ---- */

.ballistics-wind-clock {
    width: 100%;
    max-width: 150px;
    align-self: center;
    cursor: pointer;
    touch-action: none;  /* keep drags from scrolling the rail on touch */
    border-radius: 50%;
}

.ballistics-wind-clock:focus-visible {
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(201, 162, 39, 0.25);
}

.ballistics-wind-clock-label {
    text-align: center;
    font-size: 0.78rem;
    color: rgba(26, 23, 20, 0.75);
    font-variant-numeric: tabular-nums;
}

/* ---- Advanced section ---- */

.ballistics-hint {
    font-size: 0.78rem;
    color: rgba(26, 23, 20, 0.6);
    margin: 0 0 0.5rem;
}

/* ---- Dope-card designer options ---- */

.ballistics-column-checks {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 0.5rem;
}

.ballistics-column-check {
    margin-bottom: 0.1rem;
    min-height: 0;
}

.ballistics-column-check .form-check-label {
    font-size: 0.8rem;
}

.ballistics-hint-gap {
    margin-top: 0.5rem;
}

/* ---- Quick fill (arsenal + bullet library) ---- */

.ballistics-arsenal-teaser {
    border-left: 2px solid var(--ds-accent-on-light);
    padding-left: 0.5rem;
}

/* ---- Bullet diameter with its unit radios ---- */

.ballistics-diameter-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ballistics-diameter-units {
    display: flex;
    gap: 0.25rem;
    flex: 0 0 auto;
}

.ballistics-diameter-units .form-check {
    margin: 0 0.25rem 0 0;
    min-height: 0;
}

.ballistics-diameter-units .form-check-label {
    font-size: 0.8rem;
}

.ballistics-band-row {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 0.35rem;
    margin-bottom: 0.35rem;
    align-items: center;
}

.ballistics-band-remove {
    border: 0;
    background: none;
    color: var(--ds-accent-on-light);
    font-size: 1rem;
    line-height: 1;
    padding: 0 0.3rem;
}

.ballistics-add-band,
.ballistics-truing-button {
    color: var(--ds-accent-on-light);
    border: 1px solid var(--ds-accent-on-light);
    margin-bottom: 0.35rem;
}

.ballistics-truing-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.ballistics-truing-result,
.ballistics-truing-active {
    font-size: 0.8rem;
    color: rgba(26, 23, 20, 0.75);
    margin: 0.4rem 0 0;
}

.ballistics-truing-clear {
    color: var(--ds-accent-on-light);
    border: 1px solid transparent;
    padding: 0 0.35rem;
}

/* ---- Results ---- */

.ballistics-chart-card {
    background: var(--ds-white);
    border: 1px solid rgba(26, 23, 20, 0.12);
    border-radius: 0.5rem;
    padding: 0.85rem 1rem 0.6rem;
}

/* ---- Sliders (wind ranges, range window) ---- */

/* The mode row keeps the radios left and the one-click calm reset at
   the right edge of the same line, so it adds no vertical space. */
.ballistics-wind-mode {
    display: flex;
    align-items: center;
}

.ballistics-wind-reset {
    margin-left: auto;
    padding: 0 0.4rem;
    font-size: 0.72rem;
    color: var(--ds-accent-on-light);
    border: 1px solid transparent;
}

.ballistics-wind-reset:hover {
    border-color: var(--ds-accent-on-light);
}

.ballistics-slider-boxes {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.ballistics-slider-boxes .form-control {
    min-width: 0;
}

.ballistics-slider-to {
    font-size: 0.72rem;
    color: rgba(26, 23, 20, 0.5);
}

/* Dual-thumb slider: two native range inputs stacked over one shared
   track. The inputs are transparent and ignore the pointer; only their
   thumbs take it, so the pair reads and works as a single control. */
.ballistics-dual-slider {
    position: relative;
    height: 1.1rem;
    margin-top: 0.25rem;
}

.ballistics-dual-slider::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 4px;
    transform: translateY(-50%);
    border-radius: 2px;
    background: rgba(26, 23, 20, 0.15);
}

.ballistics-slider-fill {
    position: absolute;
    top: 50%;
    height: 4px;
    transform: translateY(-50%);
    border-radius: 2px;
    background: var(--ds-accent-on-light);
}

.ballistics-dual-slider input[type="range"] {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    -webkit-appearance: none;
    appearance: none;
    background: none;
}

.ballistics-dual-slider input[type="range"] {
    pointer-events: none;
}

/* A wind component in single mode: one visible thumb, no fill. */
.ballistics-dual-slider.ballistics-slider-single [data-slider-thumb="high"],
.ballistics-dual-slider.ballistics-slider-single .ballistics-slider-fill {
    display: none;
}

.ballistics-dual-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 0.85rem;
    height: 0.85rem;
    border: none;
    border-radius: 50%;
    background: var(--ds-accent-on-light);
    cursor: pointer;
    pointer-events: auto;
}

.ballistics-dual-slider input[type="range"]::-moz-range-thumb {
    width: 0.85rem;
    height: 0.85rem;
    border: none;
    border-radius: 50%;
    background: var(--ds-accent-on-light);
    cursor: pointer;
    pointer-events: auto;
}

.ballistics-dual-slider input[type="range"]::-moz-range-track {
    background: none;
}

.ballistics-chart {
    width: 100%;
}

.ballistics-readouts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.ballistics-chart + .ballistics-chart {
    margin-top: 0.4rem;
}

.ballistics-tile {
    background: var(--ds-white);
    border: 1px solid rgba(26, 23, 20, 0.12);
    border-radius: 0.5rem;
    padding: 0.6rem 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.ballistics-tile-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: rgba(26, 23, 20, 0.6);
}

.ballistics-tile-value {
    font-family: var(--ds-heading-font);
    font-weight: 600;
    font-size: 1.15rem;
    line-height: 1.2;
    color: var(--ds-ink);
}

.ballistics-tile-value small {
    font-size: 0.8rem;
    font-weight: 400;
    color: rgba(26, 23, 20, 0.6);
}

.ballistics-tile.warning .ballistics-tile-value {
    color: var(--ds-danger, #a33);
}

/* Stability gauge: unstable to SG 1.0, marginal to 1.5, stable beyond,
   with a marker at the computed value on a 0..3 scale. */
.ballistics-stability-bar {
    position: relative;
    display: flex;
    height: 0.45rem;
    margin-top: 0.45rem;
}

.ballistics-stability-segment {
    height: 100%;
}

.ballistics-stability-segment.unstable {
    background: rgba(163, 51, 51, 0.55);
    border-radius: 0.25rem 0 0 0.25rem;
}

.ballistics-stability-segment.marginal {
    background: rgba(201, 162, 39, 0.6);
}

.ballistics-stability-segment.stable {
    background: rgba(74, 124, 60, 0.5);
    border-radius: 0 0.25rem 0.25rem 0;
}

.ballistics-stability-marker {
    position: absolute;
    top: -0.2rem;
    bottom: -0.2rem;
    width: 2px;
    margin-left: -1px;
    background: var(--ds-ink, #1a1714);
}

.ballistics-caption {
    font-size: 0.8rem;
    color: rgba(26, 23, 20, 0.6);
    margin: 0.4rem 0 0.2rem;
}

/* Fine-print caption under the charts, target-analysis style: the
   details matter but should not be emphasized. */
.ballistics-chart-details {
    font-size: 0.72rem;
    line-height: 1.5;
    color: rgba(26, 23, 20, 0.55);
    margin: 0.5rem 0 0;
}

.ballistics-notice {
    background: rgba(201, 162, 39, 0.12);
    border: 1px solid rgba(138, 109, 20, 0.4);
    border-radius: 0.5rem;
    padding: 0.6rem 0.85rem;
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
}

/* ---- Dope table ---- */

.ballistics-table-frame {
    background: var(--ds-white);
    margin-top: 0.9rem;
}

#ballistics-table {
    margin-bottom: 0;
}

#ballistics-table th {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: rgba(26, 23, 20, 0.65);
    background: var(--ds-light);
    white-space: nowrap;
    text-align: right;
}

/* Every column is numeric with a fixed decimal count, so right alignment
   plus tabular figures lines the decimal points up within each column. */
#ballistics-table td {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    text-align: right;
}

#ballistics-table tr.transonic td {
    background: rgba(201, 162, 39, 0.08);
}

.ballistics-print-hint {
    margin-top: 0.5rem;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.75rem;
}

/* Second header row of the on-screen table: the units, small and muted,
   so the label row above can stay short. */
#ballistics-table thead tr.ballistics-table-units th {
    font-size: 0.68rem;
    font-weight: 400;
    color: rgba(26, 23, 20, 0.55);
    padding-top: 0;
    border-bottom-width: 2px;
}

#ballistics-table thead tr:first-child th {
    border-bottom: none;
    padding-bottom: 0;
}

.ballistics-design-link {
    font-size: 0.85rem;
    margin-right: 0.75rem;
    color: var(--ds-accent-on-light);
}

/* The designer rail has no header row above its first section. */
.ballistics-first-section {
    border-top: none;
    padding-top: 0.2rem;
}

.ballistics-radio-row {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0.4rem;
}

/* The designer rail shows only the controls for the chosen layout. */
#ballistics-designer-rail:not(.ballistics-layout-grid) .ballistics-grid-only {
    display: none;
}

#ballistics-designer-rail.ballistics-layout-grid .ballistics-list-only {
    display: none;
}

.ballistics-print-button {
    color: var(--ds-accent-on-light);
    border: 1px solid var(--ds-accent-on-light);
}

/* ---- The DOPE card (print artifact + designer preview) ---- */

/* On the solver page the card lives off-screen but laid out, so the
   auto-fit font can measure it; print CSS brings it onto the page. The
   designer shows the identical markup as a live preview in the backdrop. */
.ballistics-card-offscreen {
    position: absolute;
    left: -300in;
    top: 0;
    width: 7.5in;  /* letter paper minus typical margins */
}

.ballistics-card {
    background: var(--ds-white, #fff);
    color: #000;
    /* Shading and the transonic tint are data, not decoration: print them. */
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}

/* Middle band: table frame plus the optional blank writable block
   (wrist-coach dry erase, plain white so marker ink on the clear vinyl
   above it reads clearly). The notes position class on the card turns the
   band into a row (left/right) or reorders the column (top). */
.ballistics-card-middle {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.ballistics-card-middle .ballistics-card-table-frame {
    flex: 1 1 auto;
    min-height: 0;
    min-width: 0;
}

.ballistics-card-notes {
    flex: 0 0 auto;
    height: var(--ballistics-card-notes-size, 0);
}

.ballistics-card-notes-top .ballistics-card-notes {
    order: -1;
}

.ballistics-card-notes-left .ballistics-card-middle,
.ballistics-card-notes-right .ballistics-card-middle {
    flex-direction: row;
}

.ballistics-card-notes-left .ballistics-card-notes,
.ballistics-card-notes-right .ballistics-card-notes {
    height: auto;
    width: var(--ballistics-card-notes-size, 0);
    align-self: stretch;
}

.ballistics-card-notes-left .ballistics-card-notes {
    order: -1;
}

/* The card never scrolls: the font auto-fits, and anything that still
   cannot fit at the minimum size is clipped and flagged in the designer.
   The frame is a flex row so wide (landscape) cards can lay the ranges
   out as side-by-side stacks instead of one long column. */
.ballistics-card-table-frame {
    overflow: hidden;
    display: flex;
    gap: 0.14in;
    align-items: flex-start;
    justify-content: center;
}

/* Compact columns: tables take their natural width instead of stretching
   whitespace between columns; extra card width goes to more stacks. */
.ballistics-card-table-frame .ballistics-card-table {
    flex: 0 0 auto;
    width: auto;
}

/* Card dimensions become a dashed cut guide, clipped to size so the card
   stays the size of its carrier; the footer pins to the bottom edge. */
.ballistics-card-sized {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    width: var(--ballistics-card-width, auto);
    height: var(--ballistics-card-height, auto);
    overflow: hidden;
    border: 1px dashed rgba(26, 23, 20, 0.6);
    padding: 0.1in;
}

.ballistics-card-sized .ballistics-card-middle {
    flex: 1 1 auto;
    min-height: 0;
}

.ballistics-card-title {
    margin: 0 0 0.04in;
    font-size: 9pt;
    font-weight: 600;
    color: #000;
}

.ballistics-card-table {
    margin-bottom: 0;
    font-size: var(--ballistics-card-font-size, 9pt);
}

.ballistics-card-table th {
    font-size: inherit;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #000;
    white-space: nowrap;
    text-align: right;
    padding: 0.1rem 0.3rem;
}

/* Right alignment plus tabular figures lines the decimal points up. */
.ballistics-card-table td {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    text-align: right;
    color: #000;
    padding: 0.1rem 0.3rem;
}

/* Grid layout centers everything: row-label column, offset headers, and
   hold cells. */
.ballistics-card-grid .ballistics-card-table th,
.ballistics-card-grid .ballistics-card-table td {
    text-align: center;
}

/* Optional shading keeps rows or columns visually distinguished on the
   printed card; the transonic tint is re-stated below so it wins. */
.ballistics-card-shade-rows .ballistics-card-table tbody tr:nth-child(even) th,
.ballistics-card-shade-rows .ballistics-card-table tbody tr:nth-child(even) td {
    background: #edeae2;
}

.ballistics-card-shade-columns .ballistics-card-table tbody td:nth-child(even),
.ballistics-card-shade-columns .ballistics-card-table thead th:nth-child(even) {
    background: #edeae2;
}

.ballistics-card .ballistics-card-table tr.transonic td,
.ballistics-card .ballistics-card-table td.transonic {
    background: rgba(201, 162, 39, 0.16);
}

.ballistics-grid-elevation {
    display: block;
}

.ballistics-grid-wind {
    display: block;
    font-size: 0.75em;
    color: #555;
}

/* Fixed tiny footer: fine print on the left, a tiny QR restore code, and
   the lockup in the bottom-right corner, matching every downloadable
   plot. Sizes are deliberately not tied to the auto-fitted table font. */
.ballistics-card-footer {
    display: flex;
    align-items: flex-end;
    gap: 0.1in;
    margin-top: 0.05in;
}

.ballistics-card-lockup {
    display: flex;
    align-items: center;
    gap: 0.24em;
    font-family: var(--ds-wordmark-font);
    font-weight: 600;
    font-size: 7pt;
    text-transform: lowercase;
    letter-spacing: -0.01em;
    color: var(--ds-ink);
    white-space: nowrap;
}

.ballistics-card-lockup img {
    height: 1em;
    width: auto;
}

.ballistics-card-lockup .ds-wordmark-accent {
    color: var(--ds-accent-on-light);
}

.ballistics-card-fine-print {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    font-size: 5pt;
    line-height: 1.4;
    color: #444;
}

/* Same height as the lockup beside it, so the footer reads as one thin
   strip; the version-1 short-URL code keeps the modules as coarse as
   possible, and the typed URL in the fine print is the fallback when a
   camera cannot resolve something this small. */
.ballistics-card-qr {
    flex: 0 0 auto;
    width: 0.12in;
    height: 0.12in;
}

/* Designer preview: gray desk, white paper, pan/zoom viewport (wheel =
   zoom at cursor, drag = pan, double-click = fit; same idiom as the
   target designer). */
.ballistics-card-preview-backdrop {
    position: relative;
    background: var(--ds-light, #efece6);
    border: 1px solid rgba(26, 23, 20, 0.12);
    border-radius: 0.5rem;
    height: 70vh;
    min-height: 420px;
    overflow: hidden;
    cursor: grab;
}

.ballistics-card-preview-backdrop.dragging {
    cursor: grabbing;
}

.ballistics-card-zoom {
    position: absolute;
    top: 0;
    left: 0;
    width: max-content;
    transform-origin: 0 0;
}

.ballistics-card-preview-backdrop .ballistics-card {
    box-shadow: 0 1px 4px rgba(26, 23, 20, 0.18);
}

.ballistics-card-preview-backdrop .ballistics-card:not(.ballistics-card-sized) {
    width: 7.5in;
    padding: 0.3in;
}

.ballistics-zoom-hint {
    margin-right: auto;
    font-size: 0.78rem;
    color: rgba(26, 23, 20, 0.55);
}

/* Print-copies container: screen never shows it; with more than one copy
   the print pulls the tiled clones from here instead of the single card. */
.ballistics-card-copies {
    display: none;
}

@media (max-width: 991.98px) {
    .ballistics-input-rail {
        position: static;
        max-height: none;
        margin-bottom: 1rem;
    }
}

/* ---- Dope card printing: only the designed card comes off the printer,
   on the solver page and the designer page alike ---- */

@media print {
    nav,
    footer,
    .ballistics-header,
    .ballistics-input-rail,
    .ballistics-chart-card,
    .ballistics-notice,
    .ballistics-table-frame,
    .ballistics-print-hint {
        display: none !important;
    }

    .ballistics-body > aside {
        display: none !important;
    }

    /* Center the card region on the sheet, with real margins on every
       side; a full-page card stretches to the sheet width instead. */
    .ballistics-body > section {
        width: 100% !important;
        flex: 0 0 100% !important;
        max-width: 100% !important;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        min-height: 95vh;
        padding: 0.4in 0;
    }

    .ballistics-card:not(.ballistics-card-sized) {
        align-self: stretch;
    }

    /* The solver page keeps its card off-screen; printing brings it back
       into the flow at real size. */
    .ballistics-card-offscreen {
        position: static;
        width: auto;
    }

    /* The designer's desk backdrop, paper shadow, and pan/zoom transform
       are screen dressing; paper gets the card at real size. */
    .ballistics-card-preview-backdrop {
        background: none;
        border: none;
        padding: 0;
        height: auto;
        min-height: 0;
        overflow: visible;
    }

    .ballistics-card-zoom {
        position: static;
        width: auto;
        transform: none !important;
    }

    .ballistics-card-preview-backdrop .ballistics-card {
        box-shadow: none;
        margin: 0;
    }

    .ballistics-card-preview-backdrop .ballistics-card:not(.ballistics-card-sized) {
        width: auto;
        padding: 0;
    }

    .ballistics-card-table-frame {
        overflow: visible;
    }

    .ballistics-card-table tr {
        page-break-inside: avoid;
    }

    /* More than one copy: hide the single preview/off-screen card and tile
       the clones instead. */
    .ballistics-print-copies-active .ballistics-card-preview-backdrop,
    .ballistics-print-copies-active .ballistics-card-offscreen {
        display: none !important;
    }

    .ballistics-card-copies {
        display: flex;
        flex-wrap: wrap;
        gap: 0.25in;
        align-items: flex-start;
        justify-content: center;
        align-self: stretch;
    }

    .ballistics-card-copies .ballistics-card {
        page-break-inside: avoid;
    }
}
