/* The three sub-pages (Friends, Messages, History) dressed as one family with the Profile (the owner's request, 1 November 2026: "positions and sizes
   should be global between the 4 pages"). One file, linked last by all three pages (`<html class="sp">`); the Profile is never touched.
   - The header is the Profile's own: the same nav padding, so the RCADYA logo sits on the Profile's pixel (desktop x48 y30, phone x20 y36), and the
     page name is tucked right under it as one lockup (RCADYA Friends / History / Messages), the same size and place on all three.
   - No Home button here (the logo goes home, and the lower bar comes later) and no Balance chip on Friends and Messages (the owner: too money-focused);
     History keeps its Balance chip, where the list is money.
   - Rows: one rhythm for a friend, a conversation and a match: 48 px picture, 8 px padding, 16 px bold name, 12 px line under it.
   - The cards of Friends and History are held to one 1184 px column; Messages keeps its own sizes (list 380, chat up to 876, 80 px from the page edge). */
html.sp{--mg:48px}

/* header: the Profile's nav padding, and the Profile's height even where there is no chip (24 + 38 + 24; phone 30 + 32 + 12) */
html.sp .nav,html.sp .app:has(.mspage)>.nav{width:auto;max-width:none;margin:0;padding:var(--sp-6) var(--mg);min-height:86px;box-sizing:border-box;align-items:center;justify-content:space-between;gap:0}
html.sp .fdpage,html.sp .thpage,html.sp .mspage{max-width:none;margin-inline:0;padding-inline:var(--mg);box-sizing:border-box;margin-top:-26px}   /* RCADYA to the name: 15.7 px of ink */
html.sp .fdhead h1,html.sp .mshead h1{font-size:38px;line-height:38px}
html.sp .fdhead .pair,html.sp .mshead{gap:5px}   /* the name to the line under it: 15.7 px of ink */
html.sp .mshead p,html.sp .fdhead .mcount{min-height:16px;line-height:16px;font-size:14px}
html.sp .mshead p{height:16px;align-items:center;margin-top:-1px}

/* rows: one rhythm */
html.sp .fdrow{padding:8px}
html.sp .fdrow .fa{width:48px;height:48px;font-size:18px;flex:none}
html.sp .fdrow .fdh b{font-size:16px}
html.sp .convo-card{padding:8px}
html.sp .convo-avatar{width:48px;height:48px}
html.sp .convo-name{font-size:16px}
html.sp .tx{padding:8px}
html.sp .tx .cov{width:48px;height:48px;min-width:48px;border-radius:12px;flex:none}
html.sp .tx .n b{font-size:16px}

/* phones (the site's own phone switch) */
@media (max-width:850px), (pointer:coarse) and (max-width:1399px){
 html.sp{--mg:20px}
 html.sp .nav,html.sp .app:has(.mspage)>.nav{padding:30px var(--mg) var(--sp-3);min-height:74px}
 html.sp .fdpage,html.sp .thpage,html.sp .mspage{margin-top:-13px}
 html.sp .fdhead h1,html.sp .mshead h1{font-size:28px;line-height:32px}
}

/* desktop */
@media (min-width:851px) and (pointer:fine), (min-width:1400px){
 /* Friends and History: the cards stop at 1184 px, centred under the tabs */
 html.sp .thdays,html.sp .fdpage .fdbox{width:100%;max-width:1184px;margin-inline:auto}
 /* Messages: the panes keep their size and their 80 px from the page edge; the logo and the name stay on the shared 48 px edge, the chat runs from the top to the bottom */
 html.sp .mspage{grid-template-columns:minmax(0,1fr) 380px minmax(0,876px) minmax(0,1fr)}
 html.sp .mshead{grid-column:1/3;grid-row:1}
 html.sp .ms-list{grid-column:2;grid-row:2}
 html.sp .ms-chat,html.sp .ms-none{grid-column:3;grid-row:1/-1;margin-top:-11px!important;height:auto!important}   /* the chat starts level with the title, as it did */
}
