/* Gallery additions and viewport containment; canonical v3 layout retained. */
html {overflow-x:clip;}
.work-photo img { object-fit:contain; }
.work-card:hover .work-photo img {transform:none;}
.work-card .work-body p {min-height:0;margin-bottom:14px;}
/* Soft segmented control: consistent footprint on paired and single-result cards. */
.work-compare {display:flex;align-items:stretch;gap:3px;padding:3px;background:#EDE6DE;border:1px solid #E1D7CD;border-radius:10px;width:100%;max-width:220px;}
.work-compare button {flex:1;min-width:0;min-height:44px;padding:9px 7px;border:0;border-radius:7px;background:transparent;color:#665B57;font-size:12px;line-height:1.2;font-weight:500;letter-spacing:.02em;transition:background-color .18s ease,color .18s ease;cursor:pointer;}
.work-compare button[aria-pressed="true"] {background:#8F3449;color:#fff;}
@media (hover:hover) {.work-compare button:not(:disabled):not([aria-pressed="true"]):hover {background:#E1D6CE;color:#362E2C;}}
@media (prefers-reduced-motion:reduce) {.work-compare button {transition:none;}}
.work-compare button:focus-visible,.filter:focus-visible,#show-more:focus-visible,.work-card:focus-visible {outline:2px solid var(--wine);outline-offset:4px;}
.gallery-pagination {display:flex;justify-content:center;margin-top:33px;}
/* Screen-reader-only live announcements; no metadata in the visible layout. */
.gallery-status {position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;}
@media(min-width:1101px) {.works .work-grid {grid-template-columns:repeat(4,minmax(0,1fr));}}
@media(max-width:1100px) {.works .work-grid {grid-template-columns:repeat(2,minmax(0,1fr));}}

/* Consistent gallery card height: controls stay at the same baseline in each row. */
.works .work-grid { align-items:stretch; }
.works .work-card { display:flex; flex-direction:column; height:100%; }
.works .work-card .work-photo { flex:0 0 auto; }
.works .work-card .work-body { display:flex; flex-direction:column; flex:1 1 auto; min-width:0; }
.works .work-card .work-body h3 { overflow-wrap:break-word; }
.works .work-card .work-compare { margin-top:auto; }
.works .work-compare button:disabled {background:transparent;color:#A79A92;opacity:1;cursor:not-allowed;}
