/* Mobile layout and touch accessibility shared by public and private screens. */
@media (max-width: 750px) {
  body.panel-page .content.panel-content { padding: 20px 14px; min-width: 0; }
  body.panel-page .page-heading h1 { font-size: clamp(21px, 5.5vw, 28px); overflow-wrap: anywhere; }
  body.panel-page .panel-view { min-width: 0; }
  body.panel-page input:not([type=checkbox]):not([type=radio]):not([type=hidden]),
  body.panel-page select, body.panel-page textarea,
  body input[type=email], body input[type=password], body input[type=tel] {
    font-size: 16px !important; max-width: 100%; box-sizing: border-box;
  }
  body.panel-page input[type=file] { width: 100%; min-width: 0; }
  body.panel-page .panel-view button,
  body.panel-page dialog button,
  body .bn-toggle, body .bn-close, body .ci-public-toggle, body .ci-public-close {
    min-height: 44px;
  }
  body .bn-close, body .ci-public-close { min-width: 44px; }
  body .bn-account-links a { min-height: 44px; display: inline-flex; align-items: center; }
  body .bn-mobile.resident-short-menu { grid-template-columns: repeat(auto-fit,minmax(70px,1fr)); }
  body .bn-mobile.resident-short-menu a {
    font-size: 12px; line-height: 1.3; min-height: 48px;
    padding: 6px 4px; display: flex; align-items: center; justify-content: center;
    white-space: normal; text-align: center;
  }
  body .panel-view .rt-list .rt-table { width: 100%; min-width: 0; }
  body .panel-view .rt-list .rt-row { grid-template-columns: repeat(2,minmax(0,1fr)); }
  body .panel-view .rt-list .rt-row > td { min-width: 0; overflow-wrap: anywhere; }
  body .panel-view .rt-list .rt-row > td:nth-child(4) { grid-column: auto; }
  body .panel-view .rt-list .rt-row > td:nth-child(5),
  body .panel-view .rt-list .rt-row > td:nth-child(6),
  body .panel-view .rt-list .rt-row > td:last-child { grid-column: 1 / -1; }
  body .panel-view .rt-list .rt-row-decisions { display: flex; flex-wrap: wrap; gap: 8px; }
  body .panel-view .rt-list .rt-row-decisions button { flex: 1 1 120px; white-space: normal; width: auto; }
  body .panel-view .rt-list .rt-detail-icon { min-width: 44px; min-height: 44px; }
  body .rt-fixed-table-head { display: none !important; }
  body .rt-modal, body .br-edit-dialog {
    width: calc(100vw - 24px); max-width: calc(100vw - 24px);
    max-height: calc(100dvh - 24px); box-sizing: border-box;
    overflow-y: auto; overscroll-behavior: contain;
  }
  body .rt-modal header button { min-width: 44px; min-height: 44px; }
  body .rt-combo button { min-width: 44px; }
  body .rt-availability-modal .rt-time-range { flex-wrap: wrap; }
  body .rt-availability-modal .rt-time-range > * { min-width: 0; }
  body .br-live-preview { position: static; margin: 0 auto 16px; }
  body .br-card-actions { flex-wrap: wrap; gap: 8px; }
  body .br-card-actions button, body .br-card-actions a { min-height: 44px; }
  body .swal2-popup { width: min(32em,calc(100vw - 24px)); box-sizing: border-box; }
  body .swal2-title { font-size: 24px; }
  body .swal2-html-container { overflow-wrap: anywhere; }
  body .swal2-actions { flex-wrap: wrap; gap: 8px; }
  body .swal2-actions button { min-height: 44px; }
  body .ci-public-topbar .ci-public-actions { gap: 6px; flex-wrap: wrap; }
  body .ci-public-topbar .ci-public-actions a { min-height: 44px; box-sizing: border-box; }
}
@media (max-width: 580px) {
  body .br-live-layout { grid-template-columns: minmax(0,1fr); }
  body .br-edit-dialog { padding: 16px; }
}
@media (max-width: 360px) {
  body .panel-view .rt-stages.rt-widgets { grid-template-columns: minmax(0,1fr); }
  body .panel-view .rt-stages.rt-widgets > button { min-height: 125px; }
}
@media (max-width: 1050px) {
  body.ci-public-menu-open { overflow: hidden; }
  body .ci-public-header { max-height: 100dvh; overscroll-behavior: contain; }
}
@media (prefers-reduced-motion: reduce) {
  body .rt-modal, body .br-edit-dialog, body .ci-public-header { scroll-behavior: auto; }
}