
/* Keep full photographs visible in banners, cards and listing galleries. */
body :is(.mini-photo,.empty-photo,.welcome-photo,.hero-art img,.picture-card img,.market-hero img,.tour-hero>img,.tour-grid img,.diary-hero img,.project-file-gallery img,.property-photos img) {
  display: block;
  max-width: 100%;
  height: auto;
  min-height: 0;
  max-height: 30rem;
  object-fit: contain;
  object-position: center;
}
body .welcome-photo { align-self: center; }
body .hero-art { min-width: 0; }
body .property-photos img { height: 100%; }
body .property-photos button { min-width: 0; }

/* Let fields shrink with their grid columns, including native Safari pickers. */
body .form-grid { grid-template-columns: repeat(2,minmax(0,1fr)); align-items: start; }
body .form-grid > .field { align-content: start; }
body :is(.form-grid,.filter-row,.field,.table-wrap,.build-table) > * { min-inline-size: 0; }
body :is(.field,.form-grid,.filter-row,.table-wrap,.build-table) :is(input,select,textarea) {
  box-sizing: border-box;
  min-inline-size: 0;
  max-inline-size: 100%;
}
body :is(.field,.form-grid,.filter-row) :is(input[type="date"],input[type="datetime-local"],input[type="time"],input[type="month"]) {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 44px;
  margin-inline: 0;
}
body input::-webkit-date-and-time-value { min-width: 0; margin: 0; text-align: start; }
body :is(.form-grid,.filter-row) label { overflow-wrap: anywhere; }
@media (max-width: 700px) {
  body .form-grid { grid-template-columns: minmax(0,1fr); }
}

/* Wide tables scroll within their panel and retain their column headers. */
body :is(.table-wrap,.build-table,.ken-table-scroll) {
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
}
body :is(.table-wrap,.build-table,.ken-table-scroll) table {
  border-collapse: collapse;
  height: auto;
}
body :is(.table-wrap,.build-table,.ken-table-scroll) :is(th,td) {
  overflow-wrap: anywhere;
  vertical-align: top;
}
.ken-table-scroll { margin-block: .75rem; }
.ken-table-scroll:focus-visible { outline: 2px solid currentColor; outline-offset: -2px; }
