/* Phone layout (< 744px) for the person screens — see the mobile handoff. */
@media (max-width:743.98px){
  /* The record sheet (personSheet adds .mrecord on a phone). Nothing in it may
     be wider than the screen: every block can shrink, and long values wrap. */
  .sheet.mrecord .sheet-body{gap:14px;overflow-x:hidden}
  .sheet.mrecord .sheet-body > *{min-width:0;max-width:100%;margin-bottom:0!important}

  /* Details: one white card of label / value rows. */
  .mrec-facts{background:var(--surface);border:1px solid var(--line-2);border-radius:16px;overflow:hidden}
  .mrec-row,.mrec-photo{display:flex;justify-content:space-between;align-items:center;gap:12px;
    padding:12px 14px;min-height:48px;border-top:1px solid #EDF0EC}
  .mrec-facts > :first-child{border-top:0}
  .mrec-k{flex:none;max-width:42%;font-size:14px;color:#5C6D64}
  .mrec-v{flex:1;min-width:0;text-align:end;font-size:16px;color:var(--ink);overflow-wrap:anywhere}
  .mrec-v .remarkcell{display:inline}
  .mrec-v .remark-i{min-width:32px;min-height:32px}
  /* The photograph and its upload controls sit at the head of the card. */
  .mrec-photo{align-items:flex-start;flex-wrap:wrap}
  .mrec-photo .imgfield{flex-wrap:wrap;justify-content:flex-end;min-width:0}
  .mrec-photo .imgfield-actions .btn{min-height:44px;font-size:14px}

  /* Actions: two columns of 48px buttons, icon then label. */
  .mrec-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .mrec-actions .btn{width:100%;min-width:0;min-height:48px;margin:0;padding:8px 12px;
    justify-content:flex-start;text-align:start;background:var(--surface);border-radius:12px}
  .mrec-actions .btn > svg{flex:none}
  .mrec-actions .btn > span{margin-left:2px!important;min-width:0;line-height:1.2;overflow-wrap:anywhere}
  .mrec-actions .btn.mrec-danger{color:var(--rose,#9C332B);border-color:var(--rose,#9C332B)}

  /* Guardians and history panels: the panel is already the card, so its rows
     are divided lines rather than cards inside a card. */
  .sheet.mrecord .panel{border-radius:16px}
  .sheet.mrecord .panel > header{font-size:16px;font-weight:600}
  .sheet.mrecord .panel > header .bar{display:flex;background:none;border:0;padding:0;
    width:auto;margin-left:auto}
  .sheet.mrecord .panel > header .bar > *{width:auto}
  .sheet.mrecord .panel > header .linkbtn{min-height:44px;display:inline-flex;align-items:center}
  .sheet.mrecord .panel .tablewrap.stack tr{border:0;border-top:1px solid #EDF0EC;border-radius:0;margin:0}
  .sheet.mrecord .panel .tablewrap.stack tr:first-child{border-top:0}
  .sheet.mrecord .panel .rowacts{display:inline-flex;gap:4px}
  .sheet.mrecord .panel .rowacts .iconbtn{min-width:44px;min-height:44px}

  /* An academic-history row is titled "From → To". */
  .mrec-move{display:inline-flex;align-items:center;gap:8px;flex-wrap:wrap}
  .mrec-arrow{color:#5C6D64}
}
