    
        /* Image Gallery Responsive Grid System - Final Optimized */
        .image-gallery {
            display: grid;
            gap: 20px;
            padding: 20px;
            width: 100%;
            max-width: 100%;
        }

        /* 1 column: screens 0px - 599px */
        @media (max-width: 599px) {
            .image-gallery {
                grid-template-columns: 1fr;
                gap: 15px;
                padding: 15px;
            }
            /* Spacing only. Font size is container-keyed on .image-text and
               needs no per-breakpoint override; the !important flags that
               used to sit here existed solely to outrank the base rule. */
            .image-text {
                gap: 8px;
                padding: 12px;
            }
        }

        /* 2 columns: screens 600px - 889px */
        @media (min-width: 600px) and (max-width: 889px) {
            .image-gallery {
                grid-template-columns: repeat(2, 1fr);
                gap: 20px;
                padding: 20px;
            }
        }

        /* 3 columns: screens 890px - 1400px */
        @media (min-width: 890px) and (max-width: 1400px) {
            .image-gallery {
                grid-template-columns: repeat(3, 1fr);
                gap: 20px;
                padding: 20px;
            }
        }

        /* 4 columns: screens 1401px - 1920px */
        @media (min-width: 1401px) and (max-width: 1920px) {
            .image-gallery {
                grid-template-columns: repeat(4, 1fr);
                gap: 25px;
                padding: 25px;
            }
        }

        /* 6 columns: screens 1921px+ */
        @media (min-width: 1921px) {
            .image-gallery {
                grid-template-columns: repeat(6, 1fr);
                gap: 30px;
                padding: 30px;
                max-width: 1800px;
                margin: 0 auto;
            }
        }

        /* Ultra-wide: screens 2500px+ */
        @media (min-width: 2500px) {
            .image-gallery {
                max-width: 2200px;
                gap: 40px;
                padding: 40px;
            }
        }

        .image-container {
            position: relative;
            background: white;
            box-shadow: 0 4px 8px rgba(0,0,0,0.1);
            transition: all 0.3s ease;
            overflow: hidden;
            /* Establishes the card as a query container so .image-text can be
               sized in cqi (1% of this element's inline size). Card width and
               viewport width move in opposite directions in this grid — the
               column count climbs faster than the window widens, so a card is
               narrowest at the 6-column breakpoint. Viewport units sized the
               text largest exactly where the card was smallest. */
            container-type: inline-size;
        }

        .image-container img.main-image {
            width: 100%;
            height: auto;
            display: block;
            position: relative;
            z-index: 1;
        }

        .image-container a.crop-guide-link {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            z-index: 2;
            pointer-events: auto;
        }

        .image-container a.crop-guide-link img {
            width: 100%;
            height: auto;
            display: block;
        }

        .image-text {
            padding: 15px;
            color: #333;
            line-height: 1.2;
            display: grid;
            /* Column 1: minmax(0,1fr) — without the 0 floor the track defaults
               to a min-content floor, so a long filename widens column 1 and
               shoves column 2 (the score) outside the card.
               Column 2: auto — collapses to nothing when its cell is empty and
               sizes to its content (score, ⊕) when it isn't, so a lone
               left-hand item is no longer capped at half the card width.
               The 6px gap stays reserved either way, keeping rows aligned. */
            grid-template-columns: minmax(0, 1fr) auto;
            gap: 6px;
            min-height: 80px;
            /* Single sizing knob for every row in the card; children inherit.
               5.5cqi = 5.5% of the card's own width, so a ~265px card lands
               near 15px and a ~450px card near 20px at every breakpoint,
               with no per-breakpoint overrides. */
            font-size: clamp(12px, 5.5cqi, 20px);
            font-weight: 500;
        }

        .text-left {
            grid-column: 1;
            text-align: left;
            min-width: 0;
            overflow-wrap: anywhere;
        }

        /* Left-aligned single-item row spanning both tracks. Use instead of
           .text-left + an empty .text-right when nothing sits on the right. */
        .text-full {
            grid-column: 1 / -1;
            text-align: left;
            min-width: 0;
            overflow-wrap: anywhere;
        }

        /* Reason rows invert the card's usual shape: a short fixed label on the
           left, long variable text on the right. Reusing .text-left +
           .text-right puts the long text in the `auto` track, which then takes
           the width it wants and squeezes column 1 down to its 0 floor — at
           which point .text-left's overflow-wrap: anywhere splits the label
           mid-word ("reas / on:"). Spanning both tracks and flexing instead
           lets the label hold its width and the detail absorb the remainder. */
        .reason-row {
            grid-column: 1 / -1;
            display: flex;
            justify-content: space-between;
            gap: 8px;
            min-width: 0;
        }

        .reason-row .reason-label {
            flex: 0 0 auto;
            white-space: nowrap;
        }

        .reason-row .reason-detail {
            min-width: 0;
            text-align: right;
            /* break-word, not anywhere: only words that genuinely cannot fit
               are broken, rather than any word at any point. */
            overflow-wrap: break-word;
        }

        .reason-trigger {
            position: relative;
            cursor: pointer;
        }

        .reason-trigger .tooltip-box {
            display: none;
            position: absolute;
            bottom: calc(100% + 6px);
            right: 0;
            background: #fff;
            border: 1px solid #ccc;
            border-radius: 6px;
            padding: 6px 10px;
            white-space: nowrap;
            box-shadow: 0 3px 10px rgba(0,0,0,0.15);
            color: #e74c3c;
            font-size: clamp(12px, 1.8vw, 16px);
            font-weight: 600;
            z-index: 10;
            pointer-events: none;
        }

        .reason-trigger:hover .tooltip-box {
            display: block;
        }

        .text-right {
            grid-column: 2;
            justify-self: end;
            text-align: right;
            min-width: 0;
            overflow-wrap: anywhere;
        }

        .text-center {
            grid-column: 1 / -1;
            text-align: center;
        }

        /* Status sits in column 1 so a trailing .text-right (the score)
           lands beside it on the same row rather than wrapping below. */
        .text-status {
            grid-column: 1;
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            min-width: 0;
        }

        /* No score sibling? Let the status reclaim the full width. */
        .text-status:last-child {
            grid-column: 1 / -1;
        }

        .status-score {
            flex-shrink: 0;
            margin-left: 8px;
        }

        .border-green { 
            border: 5px solid #2ecc71; 
        }
        .border-orange { 
            border: 5px solid #f39c12; 
        }
        .border-red { 
            border: 5px solid #e74c3c; 
        }
        .border-blue { 
            border: 5px solid #5bc0de; 
        }
	.border-lavender { 
       	    border: 5px solid #e2d1f9;
	}
        .border-yellow   { 
	    border: 5px solid #dbca69; 
       }
        .border-white   {
            border: 5px solid #ffffff;
       }


        .image-container:hover {
            box-shadow: 0 8px 25px rgba(0,0,0,0.15);
        }

        .image-container.border-red:hover { 
            border-color: #c0392b; 
            box-shadow: 0 8px 25px rgba(231,76,60,0.4); 
        }

        .image-container.border-blue:hover { 
            border-color: #31b0d5; 
            box-shadow: 0 8px 25px rgba(91,192,222,0.4); 
        }

        .image-container.border-green:hover { 
            border-color: #27ae60; 
            box-shadow: 0 8px 25px rgba(46,204,113,0.4); 
        }

        .image-container.border-orange:hover { 
            border-color: #e67e22; 
            box-shadow: 0 8px 25px rgba(243,156,18,0.4); 
        }

        .border-green .text-status {
            color: #2ecc71;
        }

        .border-orange .text-status {
            color: #f39c12;
        }

        .border-red .text-status {
            color: #e74c3c;
        }

        .border-blue .text-status {
            color: #5bc0de;
        }
    
        /* ── Summary Bar ── */
        .summary-bar {
            display: grid;
            grid-template-columns: repeat(5, 1fr);
            gap: 16px;
            padding: 20px 20px 10px 20px;
        }

        .summary-cell {
            background: #ffffff;
            border: 1px solid #e9ecef;
            border-radius: 16px;
            padding: 14px 18px;
            display: flex;
            flex-direction: row;
            align-items: center;
            gap: 14px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.06);
            transition: transform 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
        }

        .summary-cell:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 16px rgba(0,0,0,0.12);
        }

        .summary-icon {
            width: 52px;
            height: 52px;
            border-radius: 14px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 1.4rem;
            flex-shrink: 0;
        }

        .summary-icon.icon-blue  { background-color: #3B82F6; }
        .summary-icon.icon-green { background-color: #16A34A; }
        .summary-icon.icon-amber { background-color: #F59E0B; }
        .summary-icon.icon-red   { background-color: #EF4444; }

        .summary-text {
            display: flex;
            flex-direction: column;
            gap: 2px;
        }

        .summary-label {
            font-size: clamp(10px, 1.2vw, 13px);
            font-weight: 600;
            color: #94a3b8;
            text-transform: uppercase;
            letter-spacing: 0.05em;
        }

        .summary-value {
            font-size: clamp(14px, 1.8vw, 20px);
            font-weight: 700;
            color: #1e293b;
            line-height: 1.1;
        }

        @media (max-width: 599px) {
            .summary-bar {
                grid-template-columns: 1fr;
                gap: 10px;
                padding: 14px;
            }
            .summary-cell-transmit {
                grid-column: 1 / -1;
            }
        }

        .summary-cell-transmit {
            background: #ffffff;
            border-radius: 10px;
            padding: 14px 18px;
            display: flex;
            flex-direction: row;
            align-items: center;
            gap: 12px;
            box-shadow: 0 2px 6px rgba(0,0,0,0.1);
            cursor: pointer;
        }

        .summary-cell-transmit:hover {
            box-shadow: 0 4px 12px rgba(0,0,0,0.18);
        }

        .summary-cell-transmit img {
            height: 60px;
            width: auto;
            flex-shrink: 0;
        }

        .summary-cell-transmit .transmit-label {
            font-size: clamp(12px, 1.4vw, 16px);
            font-weight: 700;
            color: var(--dark-grey);
            text-transform: uppercase;
            letter-spacing: 0.05em;
        }

        .checkbox-row {
            grid-column: 1 / -1;
            display: flex;
            gap: 20px;
            align-items: center;
            padding: 2px 0;
            font-size: clamp(12px, 2vw, 18px);
        }
        .checkbox-row label {
            display: flex;
            align-items: center;
            gap: 5px;
            cursor: pointer;
            font-weight: 500;
        }
        .checkbox-row input[type="checkbox"] {
            width: 16px;
            height: 16px;
            cursor: pointer;
            accent-color: var(--dull-blue);
        }

        /* ── Per-mark Accept Rows ── */
        /* forms/pvi-accept-checkbox.html (photo-review.pl v1.26)
           One row per marked detail: [x] Accept – Smiling
           Variables only, per pvi-project-instructions §6/§10. No hex here. */

        /* Full-card span is the load-bearing declaration. .image-text is a
           two-track grid (minmax(0,1fr) auto); without an explicit column the
           mark rows auto-place one per track, so mark 1 lands in column 1,
           mark 2 beside it in column 2, and mark 3 wraps to a new row. Column 1
           is then crushed to its 0 floor and its label breaks mid-phrase
           ("Accept – / Smiling") while column 2 reads normally — the stacking.
           Spanning 1 / -1 puts every mark on its own full-width row, matching
           .checkbox-row and .reason-row.

           Grid rather than flex inside the row so the label text of every mark
           on a cell starts at the same x — with flex, a checkbox that renders a
           pixel wider on one browser ragged the whole stack. */
        .pvi-accept-mark {
            grid-column: 1 / -1;
            display: grid;
            grid-template-columns: auto 1fr;
            align-items: center;
            column-gap: 0.4rem;
            padding: 0.15rem 0;
            min-width: 0;
            line-height: 1.3;
        }

        /* Hairline separator between consecutive marks, so two or three marks
           read as distinct decisions rather than one wrapped sentence.
           Adjacent-sibling rather than :not(:first-child): these rows are
           children of .image-text, not of a wrapper of their own, so the first
           mark is never the first child of its parent (the filename row is) and
           :not(:first-child) drew a stray rule above it. + only fires when a
           mark actually follows another mark. */
        .pvi-accept-mark + .pvi-accept-mark {
            border-top: 1px solid var(--light-grey);
        }

        .pvi-accept-mark-box {
            margin: 0;
            cursor: pointer;
        }

        /* The whole label is the hit target — on a phone the box alone is a
           ~13px tap area, and these cells are dense. min-width: 0 lets the
           label shrink inside the 1fr track instead of pushing the row wider
           than the card. */
        .pvi-accept-mark-label {
            margin: 0;
            cursor: pointer;
            display: flex;
            align-items: baseline;
            column-gap: 0.3rem;
            flex-wrap: wrap;
            min-width: 0;
        }

        .pvi-accept-mark-verb {
            font-weight: 600;
            color: var(--dark-grey);
            white-space: nowrap;
        }

        .pvi-accept-mark-dash {
            color: var(--mid-grey);
        }

        /* The mark itself is the information the reviewer is scanning for, so
           it is the one part that is not muted. break-word, not anywhere: only
           a mark name that genuinely cannot fit the card gets split. */
        .pvi-accept-mark-detail {
            color: var(--dark-grey);
            min-width: 0;
            overflow-wrap: break-word;
        }

        /* Ticked state: green, matching the palette's "positive result" role,
           and shown on the verb only so the mark name does not change color as
           boxes are clicked. :has() is used so no JS is needed to style the row
           from its input; the rule is additive, so on a browser without :has()
           the box still works and simply does not tint. */
        .pvi-accept-mark:has(.pvi-accept-mark-box:checked) .pvi-accept-mark-verb {
            color: var(--green);
        }

        /* Keyboard focus must stay visible — these are the only controls on the
           page that write anything. */
        .pvi-accept-mark-box:focus-visible {
            outline: 2px solid var(--dull-blue);
            outline-offset: 1px;
        }

        /* ── Save Section ── */
        /* .save-section / .save-btn now live in pvi-master-frame.css §7.
           Only the page's own spacing is kept here. */
        .save-section {
            padding: 1.25rem 20px 20px;
        }



/* ============================================================
   Verdict selection boxes + confirm screen   (v1.34)
   Append to pvi-gallery.css
   ============================================================
   Two blocks: the confirm screen's table (pages/pvi-dyk-summary.html) and the
   per-cell boxes (forms/pvi-dyk-checkboxes.html). Both use the existing variable
   vocabulary -- no hex, no new tokens -- so a spoke that restyles --mid-grey
   restyles these too.

   The buttons on both pages are .save-section / .save-btn, which already exist
   above; nothing here touches them. */

/* ------------------------------------------------------------
   Confirm screen table
   ------------------------------------------------------------
   CENTERED BY `margin: ... auto` ON THE TABLE, not by text-align on a wrapper.
   A table is not an inline element, so text-align:center on the parent moves the
   text inside the cells and leaves the table itself hard against the left edge --
   which is what the unstyled page was doing.

   width: min(680px, 92%) keeps it readable on a 2560px monitor without needing a
   media query on a phone. */
.pvi-summary-table {
    width: min(680px, 92%);
    margin: 2rem auto;
    border-collapse: collapse;
    background: var(--white);
    border: 1px solid var(--mid-grey);
}

.pvi-summary-table thead th {
    padding: 0.6rem 0.9rem;
    background: var(--light-grey);
    color: var(--dark-grey);
    border-bottom: 1px solid var(--mid-grey);
    text-align: center;
}

/* The title row spans all three columns; it carries the page's one heading. */
.pvi-summary-table thead tr:first-child th {
    font-size: 1.15rem;
    letter-spacing: 0.02em;
}

.pvi-summary-table td {
    padding: 0.5rem 0.9rem;
    border-bottom: 1px solid var(--light-grey);
    text-align: center;
    color: var(--dark-grey);
}

/* Labels read left, numbers read centered -- a column of right-aligned words and
   a column of centered digits is harder to scan than either alone. */
.pvi-summary-table .pvi-summary-label {
    text-align: left;
    width: 55%;
}

.pvi-summary-table .pvi-summary-total td {
    font-weight: 600;
    background: var(--light-grey);
}

/* The two dropped-image rows. Muted, because they are almost always 0 and must
   not compete with the counts the reviewer is approving -- but PRESENT, because a
   silently dropped image is the one thing this screen must never hide. */
.pvi-summary-table .pvi-summary-note td {
    color: var(--mid-grey);
    font-size: 0.9rem;
}

/* ------------------------------------------------------------
   Per-cell verdict boxes
   ------------------------------------------------------------
   One row per offered verdict, stacked by .pvi-accept-mark-stack (already
   defined above for the per-mark path, reused by name). */
.pvi-dyk-box {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.15rem 0;
    cursor: pointer;
}

.pvi-dyk-check {
    flex: 0 0 auto;
    margin: 0;
    cursor: pointer;
}

.pvi-dyk-label {
    font-size: 0.85rem;
    letter-spacing: 0.03em;
    color: var(--dark-grey);
}

/* Per-verdict tint on the WORD only, matching the cell's own status colors so a
   KEEP box reads as the same decision the cell label shows. The box itself is
   left alone: a recolored checkbox is a custom control, and this page has no JS
   to make one behave. */
.pvi-dyk-box-Y .pvi-dyk-label { color: var(--green); }
.pvi-dyk-box-K .pvi-dyk-label { color: var(--dull-red); }
.pvi-dyk-box-D .pvi-dyk-label { color: var(--dull-blue); }

/* ── Yes / No / Acceptable radio row ──
   Modifier on .checkbox-row, so the shared rule (and every other checkbox row
   on the site) is untouched. The base rule sizes text in vw, which grows with
   the window while the card shrinks as columns are added, so at 6 columns the
   row overflowed the card. Here the size is keyed to the card (cqi; the
   .image-container is already a query container) and the row may wrap as a
   last resort instead of spilling past the border. */
.checkbox-row.pvi-yna-row {
    font-size: clamp(12px, 5cqi, 18px);
    gap: 0.4em 0.9em;
    flex-wrap: wrap;
    justify-content: space-between;
    min-width: 0;
}

.checkbox-row.pvi-yna-row label {
    gap: 0.3em;
    white-space: nowrap;   /* a radio never separates from its word */
}

.checkbox-row.pvi-yna-row input[type="radio"] {
    margin: 0;
    cursor: pointer;
    accent-color: var(--dull-blue);
}

.checkbox-row.pvi-yna-row input[type="radio"]:focus-visible {
    outline: 2px solid var(--dull-blue);
    outline-offset: 1px;
}
