/* Scoped phone layouts. Tables remain scrollable, never clipped by the page. */
.fc-table-scroll { display: contents; }
@media (max-width: 900px) {
  body.fc-review-responsive { min-width: 0; }
  .fc-review-responsive .box, .fc-review-responsive .card,
  .fc-review-responsive .grid > *, .fc-review-responsive .form-grid > *,
  .fc-review-responsive .g2 > * { min-width: 0; }
  .fc-review-responsive .box, .fc-review-responsive .card { max-width: 100%; box-sizing: border-box; }
  .fc-review-responsive .fc-table-scroll {
    display: block; width: 100%; max-width: 100%; min-width: 0;
    overflow-x: auto; overscroll-behavior-x: contain;
  }
  .fc-review-responsive input, .fc-review-responsive select,
  .fc-review-responsive textarea { max-width: 100%; box-sizing: border-box; }
  .fc-review-responsive .tabs { flex-wrap: wrap; }
  .fc-review-responsive .split { grid-template-columns: minmax(0, 1fr); }
  .fc-review-responsive .dc .g2 { grid-template-columns: minmax(0, 1fr); }
  .fc-review-responsive .add-options { grid-template-columns: minmax(0, 1fr); }
  /* Admin-only chips and long change summaries must fit too. */
  .fc-review-responsive .b2 .chips { flex-wrap: wrap; max-width: 100%; min-width: 0; }
  .fc-review-responsive .uc .chg-card { height: auto; flex-direction: column; align-items: stretch; white-space: normal; }
  .fc-review-responsive .uc .chg-card > * { min-width: 0; max-width: 100%; overflow-wrap: anywhere; white-space: normal; }
  .fc-review-responsive .uc .chg-line { flex: 0 1 auto; }
  .fc-review-responsive .uc .chg-when { margin-left: 0; }
  /* Follow-up pages: constrain grid items, wrap controls, and retain table scrolling. */
  .fc-review-responsive fieldset { min-width: 0; max-width: 100%; box-sizing: border-box; }
  .fc-review-responsive .kp > *, .fc-review-responsive .g3 > *, .fc-review-responsive .g4 > *,
  .fc-review-responsive .act-grid > *, .fc-review-responsive .b2 .bar > * { min-width: 0; max-width: 100%; }
  .fc-review-responsive .b2 .kp { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fc-review-responsive .b2 .g3, .fc-review-responsive .b2 .g4,
  .fc-review-responsive .act-grid, .fc-review-responsive .b2 .form { grid-template-columns: minmax(0, 1fr); }
  .fc-review-responsive .b2 .form .wide, .fc-review-responsive .b2 .form .w2,
  .fc-review-responsive .b2 .form .w4 { grid-column: 1 / -1; }
  .fc-review-responsive .b2 .kp > * { overflow-wrap: anywhere; }
  .fc-review-responsive .b2 .info { grid-template-columns: minmax(0, 1fr); }
  .fc-review-responsive .b2 .info div { white-space: normal; overflow-wrap: anywhere; }
  .fc-review-responsive .b2 .it { grid-template-columns: 22px minmax(0, 1fr) auto; }
  .fc-review-responsive .b2 .it > * { min-width: 0; }
  .fc-review-responsive .b2 .it .tx, .fc-review-responsive .b2 .it .mt { overflow-wrap: anywhere; }
  .fc-review-responsive .b2 .it .rt { flex-wrap: wrap; }
  .fc-review-responsive .bs label { white-space: normal; }
  .fc-review-responsive .bs .row, .fc-review-responsive .act-tabs { flex-wrap: wrap; }
  .fc-review-responsive .act-filters > * { min-width: 0; max-width: 100%; }
  .fc-review-responsive .secret-line input { min-width: 0; }
  .fc-review-responsive .mechanic-shop, .fc-review-responsive .mechanic-shop section,
  .fc-review-responsive .mechanic-shop header, .fc-review-responsive .mechanic-shop button { min-width: 0; max-width: 100%; box-sizing: border-box; }
  .fc-review-responsive .mechanic-shop form { display: grid; grid-template-columns: minmax(0, 1fr); }
  .fc-review-responsive .mechanic-shop label { display: flex; min-width: 0; max-width: 100%; margin: 8px 0; }
  .fc-review-responsive .mechanic-shop textarea { min-width: 0; width: 100%; }
  .fc-review-responsive .mechanic-shop .shop-card { margin-left: 0; margin-right: 0; overflow-wrap: anywhere; }
  .fc-review-responsive .mechanic-shop #detail p { overflow-wrap: anywhere; }
}

/* Narrow labels and compact HR fields must not set the page's minimum width. */
@media (max-width: 900px) {
  .fc-review-responsive .bs label { min-width: 0; max-width: 100%; flex-direction: column; align-items: flex-start; }
  .fc-review-responsive .bs label input,
  .fc-review-responsive .bs label select { min-width: 0; max-width: 100%; }
  .fc-review-responsive.fc-review-associates .compact-row { grid-template-columns: minmax(0, 1fr); }
  .fc-review-responsive.fc-review-associates .compact-row label { min-width: 0; text-align: left; }
  .fc-review-responsive.fc-review-associates .compact-row input,
  .fc-review-responsive.fc-review-associates .compact-row select,
  .fc-review-responsive.fc-review-associates .compact-row textarea { min-width: 0; width: 100%; }
}
