/* Shared corner system, loaded last on every public and portal page.
   Only corner geometry is normalized. Keep existing overflow, positioning,
   touch targets, focus rings, PDF fields, and native map controls unchanged. */
:root {
  --radius-frame: 12px;
  --radius-control: 8px;
  --radius-inset: 6px;
}

/* Named surfaces only: never round the page shell or every descendant. */
:is(
  .card, .portal-panel, .application-section, .detail-summary,
  .detail-location, .detail-retailers, .inbox-row, .privacy-content,
  .property-brief, .space-card, .plan-card, .detail-photo,
  .geo-card, .geo-listing, .geo-case-facts, .geo-contact,
  .geo-metrics > div, .home-resource-links > a, .server-property,
  .tenant-tool, .tenant-help, .plan-panel, .plan-saved-card,
  .plan-export, .application-next-steps, .docusign-start, .pdf-editor,
  .pdf-application dialog, #filter-panel, #property-map, #coverage-map,
  .detail-map, .maplibregl-popup-content, .property-map-tag,
  .coverage-apple-popup
) {
  border-radius: var(--radius-frame) !important;
}

/* A single modest shape for rectangular actions and form controls. The explicit
   list excludes map pins, circular popup dismiss buttons and numbered steps. */
:is(
  .portal-button, .application-primary, .application-link,
  .browse-toolbar > button, #done-filters, .location-tools button,
  .vector-map-tools button, .business-planner button, .open-draft,
  .gallery-control, .property-lightbox-button, .gallery-thumbnail,
  .site-nav a, .geo-nav a, .tenant-tool-nav a, .property-back,
  .pdf-toolbar button, .pdf-toolbar select, .recipient button,
  .geo-contact-links a:first-child, .tenant-help > a,
  .search-input-wrap, .browse-toolbar .view-toggle,
  .theme-control select, .theme-control.theme-icon-control,
  .filter-bar select, .location-controls input,
  .portal-field input:not([type="checkbox"]):not([type="radio"]),
  .portal-field textarea, .portal-field select, .portal-code,
  .plan-field input, .plan-field textarea, .plan-field select,
  .plan-money-grid input, .docusign-start select,
  .application-context input, .application-context select, #field-value,
  .portal-banner, .portal-error, #plan-error, #pdf-error,
  .location-tools, .detail-spaces, .plan-budget > div,
  .site-skip-map, .geo-skip
) {
  border-radius: var(--radius-control) !important;
}

/* Inset controls fit their parent frames without becoming tiny capsules. */
html[data-theme] .listings-page .browse-toolbar .view-toggle button,
:is(.availability-kind, .map-thumbnail, .gallery-thumbnail img) {
  border-radius: var(--radius-inset) !important;
}

/* Notes keep the straight edge that carries their accent rule. */
.plan-note {
  border-radius: 0 var(--radius-control) var(--radius-control) 0;
}

/* Match inset focus outlines to the card and photo corners. */
.listings-page .card-body:focus-visible {
  border-radius: 0 0 var(--radius-frame) var(--radius-frame);
}
.gallery-edge:focus-visible {
  border-radius: var(--radius-frame);
}
