/* The phone (html[data-mobile] only): social. Owner 2026-11-17: "these uis are clearly not tested ... refine every single one of them". Loaded after phone.css (NOTES 680). */
/* ==========================================================================================================
   The phone's social screens: the Leaderboard and Friends, plus the sign-in card's close.
   A phone's rem sits at 10 px (ui.css html{font-size:clamp(10px,...)}), so every size a screen is judged by here is in
   px: the older sheets' rem text (--t-sm 9.4 px, --t-xs 8.1 px) read as fine print on a phone.
   The look is unchanged: the rows keep ua-views.css's pseudo-elements (::before = the skewed white face, ::after = the ink
   drop plate), the neon ring on you, the :active squash and the .uv-hot / .ae-sel lifts. What changes is the space around
   them: a scroller with no room past its last row cut every drop off at the right and the bottom, so both lists now carry
   the drop's offset (~5 px) plus the ring's (2.6 px) as padding, and the two screens fill the height they are given.
   1. the Leaderboard: the panel as a column (portrait), its rows, the You card, the switch, landscape
   2. Friends: the search, the scroller, the rows and their buttons, the empty state, the lock plate, landscape
   3. the sign-in card's close
   ========================================================================================================== */

/* ======================================================= 1. THE LEADERBOARD ======================================================= */
/* The panel: a flex column whose height is the screen less its own top (header 64 + the body's 15 + its 6 = 85 px) and the
   16 px the owner wants kept above the screen's foot. Before this the list was capped at ui.css's max-height:24rem (240 px),
   so five rows sat in a 743 px column and 310 px of sky showed under the panel. Now the LIST is the one thing that gives. */
html[data-mobile] #screen-lobby #lobby-leaderboard{display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;
  gap:8px!important;padding:10px!important;width:calc(100% - 2px);margin:6px 1px 0;max-height:calc(100dvh - 101px);min-height:0;text-align:left}
html[data-mobile] #screen-lobby #lobby-leaderboard .lb-scope{flex:none;align-self:flex-start;max-width:100%;gap:6px;padding:5px 10px 5px 8px;
  font-size:13px;line-height:1.3;text-transform:none;letter-spacing:0;white-space:normal}      /* (Global: no tracked all-caps; the line wraps rather than run past the pill) */
html[data-mobile] #screen-lobby #lobby-leaderboard .lb-scope b{font-size:13px;text-transform:none;letter-spacing:0}
html[data-mobile] #screen-lobby #lobby-leaderboard .lb-globe{width:14px;height:14px}

/* the three tabs on ONE line at 360 px: equal thirds of 98 px, 14 px text ("Longest rally" is ~85 px), 2 px of side padding
   (the 15 px font and 14 px padding of the older sheets wrapped two of the three onto a second line) */
html[data-mobile] #screen-lobby #lobby-leaderboard .lb-tabs{flex:none;align-self:stretch;display:flex;flex-wrap:nowrap;
  gap:6px;width:auto;max-width:none;margin:0;padding:0;border:0;background:none;box-shadow:none}
html[data-mobile] #screen-lobby #lobby-leaderboard .lb-tabs .seg-opt{flex:1 1 auto;width:auto;height:44px;min-height:44px;min-width:0;padding:0 10px;font-size:14px;
  white-space:nowrap;text-align:center}

/* the list: the one part that shrinks (flex:0 1 auto, min-height:0) and scrolls. Its padding is the room the rows' ink drops
   need: right and bottom >= the drop (4.7 / 5.3 px) plus the skew's own lean (tan 6 deg x half a row, 2.7 px) and the neon
   ring (2.6 px) = 10 on you, so 12; a little on the left and the top for the ring and a focus glow. */
html[data-mobile] #screen-lobby #lobby-leaderboard .lb-wrap{flex:0 1 auto;min-height:0;width:auto;display:flex;flex-direction:column}
html[data-mobile] #screen-lobby #lobby-leaderboard .lb-wrap:has(#lb-list:empty){min-height:78px}      /* an empty board keeps the room its plate (lb-state) is drawn in */
html[data-mobile] #screen-lobby #lobby-leaderboard #lb-list{flex:0 1 auto;min-height:0;height:auto;max-height:none;overflow-y:auto;overscroll-behavior:contain;
  margin:0;padding:6px 12px 12px 6px;gap:8px;width:auto;display:flex;flex-direction:column;list-style:none}

/* a row: the chip / name / value columns are 60 | rest | auto on the rows AND on the You card, so the three line up; 52 px tall
   (a finger), 8 px between them (the drop is 5.3) */
html[data-mobile] #screen-lobby #lobby-leaderboard .lb-item{flex:none;display:block}
html[data-mobile] #screen-lobby #lobby-leaderboard .lb-row{grid-template-columns:44px minmax(0,1fr) auto;align-items:center;gap:6px;min-height:52px;padding:8px 10px 8px 8px}
html[data-mobile] #screen-lobby #lobby-leaderboard .lb-row .lb-who{gap:4px}
html[data-mobile] #screen-lobby #lobby-leaderboard .lb-row .lb-name{font-size:15px}
html[data-mobile] #screen-lobby #lobby-leaderboard .lb-row .lb-v{font-size:12px}
html[data-mobile] #screen-lobby #lobby-leaderboard .lb-row .lb-v b{font-size:17px}
html[data-mobile] #screen-lobby #lobby-leaderboard .lb-row .lb-v small{font-size:12px}
html[data-mobile] #screen-lobby #lobby-leaderboard .lb-row .lb-rank{justify-self:center;min-width:36px;height:26px;padding:0 5px;font-size:14px;line-height:1}      /* "#4321" fits: 5 glyphs + 6 px each side */

/* the You card: the rows' own box (same width, margins, padding, columns), so chip, name and value stand in the rows' columns;
   it and the switch never shrink, so they stay under the list and are never scrolled away */
html[data-mobile] #screen-lobby #lobby-leaderboard .lb-you{flex:none;width:auto;grid-template-columns:44px minmax(0,1fr) auto;align-items:center;gap:6px;
  min-height:56px;margin:0 12px 0 6px;padding:8px 10px 8px 8px}
html[data-mobile] #screen-lobby #lobby-leaderboard .lb-you .lb-rank{justify-self:start;min-width:36px;height:26px;padding:0 4px;font-size:13px;line-height:1}
html[data-mobile] #screen-lobby #lobby-leaderboard .lb-you .lb-v:empty{display:none}      /* (no value: no empty track pushing the button off the card) */
html[data-mobile] #screen-lobby #lobby-leaderboard .lb-you .lb-v{font-size:12px}
html[data-mobile] #screen-lobby #lobby-leaderboard .lb-you .lb-v b{font-size:17px}
html[data-mobile] #screen-lobby #lobby-leaderboard .lb-you .lb-v small{font-size:12px}
html[data-mobile] #screen-lobby #lobby-leaderboard .lb-you-text b{font-size:16px}
html[data-mobile] #screen-lobby #lobby-leaderboard .lb-you-text #lb-you-cap{font-size:13px;white-space:normal}
/* a guest (no chip, no value): the words take the whole card and the button sits with 14 px of card to its right, so the
   button's own ink drop (2.4 px) still ends inside the card's face instead of merging with the card's drop */
html[data-mobile] #screen-lobby #lobby-leaderboard .lb-you:not(.is-on){grid-template-columns:minmax(0,1fr) auto;padding-left:14px;padding-right:14px}
html[data-mobile] #screen-lobby #lobby-leaderboard .lb-you:not(.is-on) .lb-you-text{grid-column:auto}
html[data-mobile] #screen-lobby #lobby-leaderboard .lb-you-go{height:auto;min-height:44px;padding:0 12px;font-size:15px;white-space:nowrap}

/* the switch under the list: the rows' width, 44 px tall, its words at 13 */
html[data-mobile] #screen-lobby #lobby-leaderboard .lb-show{flex:none;width:auto;min-height:44px;margin:0 12px 0 6px;padding:4px 10px 4px 8px;gap:8px}
html[data-mobile] #screen-lobby #lobby-leaderboard #tog-lb-show span{font-size:13px;white-space:normal}

/* a phone on its side (844x390): two columns, the left one a stack from the top (chip, tabs, You, switch), the right one the
   list at the panel's full height, so no row is cut in half under the You card. The panel fills to 16 px above the foot
   (its top there is 67 px: the 52 px header + the body's 15). */
@media (orientation:landscape){
  html[data-mobile] #screen-lobby #lobby-leaderboard{display:grid;grid-template-columns:minmax(0,45fr) minmax(0,55fr);grid-template-rows:auto auto auto 1fr;
    grid-template-areas:"scope list" "tabs list" "you list" "show list";align-content:stretch;gap:8px 12px!important;
    flex:1 1 auto;min-height:0;width:min(100%,64rem);max-width:100%;max-height:none;margin:0 auto}      /* flex:1: it fills the body's leftover, so the foot's 15 px is all that is left under it, whatever the header's height */
  html[data-mobile] #screen-lobby #lobby-leaderboard .lb-scope{grid-area:scope;justify-self:start;align-self:start}
  html[data-mobile] #screen-lobby #lobby-leaderboard .lb-tabs{grid-area:tabs;align-self:start}
  html[data-mobile] #screen-lobby #lobby-leaderboard .lb-tabs .seg-opt{font-size:13px;padding:0 8px}      /* 13: the 45% column is 274 px, three tabs 87 each ("Longest rally" is 79 px at 13) */
  html[data-mobile] #screen-lobby #lobby-leaderboard .lb-you{grid-area:you;align-self:start;margin:0}
  html[data-mobile] #screen-lobby #lobby-leaderboard .lb-show{grid-area:show;align-self:start;margin:0}
  html[data-mobile] #screen-lobby #lobby-leaderboard .lb-wrap{grid-area:list;align-self:stretch;min-height:0}
  html[data-mobile] #screen-lobby #lobby-leaderboard .lb-wrap:has(#lb-list:empty){min-height:0}
}

/* ======================================================= 2. FRIENDS ======================================================= */
/* The panel: the search on top, then ONE scroller; content-sized when the lists are short (the old min-height:26rem left
   ~100 px of sky under "No friends yet"), and capped so that with many friends it reaches 16 px above the screen's foot
   (its top is the leaderboard's 85 px). */
html[data-mobile] #screen-lobby #lobby-friends{display:flex;flex-direction:column;align-items:stretch;gap:8px;
  padding:10px;width:calc(100% - 2px);margin:6px 1px 0;max-height:calc(100dvh - 101px);min-height:0;text-align:left}
html[data-mobile] #screen-lobby #lobby-friends .fr-panel{flex:0 1 auto;min-height:0;display:flex;flex-direction:column;gap:10px;text-align:left}
html[data-mobile] #screen-lobby #lobby-friends .fr-gate{flex:none}
html[data-mobile] #screen-lobby #lobby-friends .fr-gate-t{font-size:16px}
html[data-mobile] #screen-lobby #lobby-friends .fr-gate-s{font-size:13px}
html[data-mobile] #screen-lobby #lobby-friends .fr-gate-b{min-height:44px;font-size:15px}

/* the search: a 48 px field (it was 30). The X keeps its 28 px circle but takes a 44 x 44 tap area: the circle is a ::before
   in the middle of the button (whose box was 20 x 20), the icon above it. */
html[data-mobile] #screen-lobby #lobby-friends .fr-search{flex:none}
html[data-mobile] #screen-lobby #lobby-friends .fr-search > svg{left:14px;width:16px;height:16px}
html[data-mobile] #screen-lobby #lobby-friends .fr-q{height:48px;padding:0 50px 0 40px;font-size:16px}
html[data-mobile] #screen-lobby #lobby-friends .fr-clear{width:44px;height:44px;right:2px;border-radius:0;background:none;box-shadow:none}
html[data-mobile] #screen-lobby #lobby-friends .fr-clear::before{content:"";position:absolute;left:50%;top:50%;translate:-50% -50%;width:28px;height:28px;border-radius:50%;background:var(--cp-sky-2)}
html[data-mobile] #screen-lobby #lobby-friends .fr-clear svg{position:relative;z-index:1;width:14px;height:14px}
html[data-mobile] #screen-lobby #lobby-friends .fr-clear:is(:hover,:focus-visible){background:none;box-shadow:none}
html[data-mobile] #screen-lobby #lobby-friends .fr-clear:is(:hover,:focus-visible)::before{background:var(--cp-sky-3)}
html[data-mobile] #screen-lobby #lobby-friends .fr-clear:focus-visible::before{box-shadow:0 0 0 3px var(--uv-neon)}      /* the X keeps a visible focus: the ring is the circle's, not the 44 px box's */

/* the scroller: the one part that gives, with the rows' drops' room (>= 4.7 px right, 5.3 px bottom) and a little left/top for
   a focus ring. Its sections are 14 px apart, 8 px between a heading and its rows. */
html[data-mobile] #screen-lobby #lobby-friends .fr-scroll{flex:0 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;margin:0;padding:6px 10px 12px 6px;gap:14px}
html[data-mobile] #screen-lobby #lobby-friends .fr-sec{gap:8px}
html[data-mobile] #screen-lobby #lobby-friends .fr-list{gap:8px}      /* the rows' one gap: the drop (5.3 px) no longer runs into the next row */
html[data-mobile] #screen-lobby #lobby-friends .fr-label{margin:0 0 0 8px;gap:6px;font-size:13px;letter-spacing:0;text-transform:none}
html[data-mobile] #screen-lobby #lobby-friends .fr-label span{font-size:13px}
html[data-mobile] #screen-lobby #lobby-friends .fr-count{min-width:20px;height:20px;padding:0 5px;font-size:13px}
html[data-mobile] #screen-lobby #lobby-friends .fr-more-n{margin-right:10px;font-size:13px}
html[data-mobile] #screen-lobby #lobby-friends .fr-hint{padding:10px 8px;font-size:13px}

/* every row one height (62 px: a request's two buttons, a search result with only its tag) with its contents centred: 16 px of
   left inset for the dot, 16 px of right so the buttons' own ink drops (the big 4.7 px, + the skew's 2.3) end inside the
   row's face, 9 px from its slanted edge (they were poking past its bottom and past its right edge). */
html[data-mobile] #screen-lobby #lobby-friends .fr-row{display:flex;align-items:center;gap:8px;min-height:62px;padding:9px 16px}
html[data-mobile] #screen-lobby #lobby-friends .fr-dot{width:10px;height:10px}
html[data-mobile] #screen-lobby #lobby-friends .fr-name{font-size:16px}
html[data-mobile] #screen-lobby #lobby-friends .fr-st{font-size:13px}
html[data-mobile] #screen-lobby #lobby-friends .fr-acts{gap:6px;flex-wrap:wrap;justify-content:flex-end;min-width:0}
html[data-mobile] #screen-lobby #lobby-friends .fr-act{height:44px;min-height:44px;padding:0 12px;font-size:14px;gap:5px}
html[data-mobile] #screen-lobby #lobby-friends .fr-add{height:44px;min-height:44px;padding:0 12px;font-size:14px}
html[data-mobile] #screen-lobby #lobby-friends .fr-more{width:44px;height:44px;min-height:44px}
html[data-mobile] #screen-lobby #lobby-friends .fr-more svg{width:18px;height:18px}
html[data-mobile] #screen-lobby #lobby-friends .fr-tag{height:30px;padding:0 10px;font-size:14px}
html[data-mobile] #screen-lobby #lobby-friends .fr-ask{font-size:13px}

/* "No friends yet": ink words on the pale plate (it was #6a9bc3 / #86b6db on #cfe5f4), the line a softer ink */
html[data-mobile] #screen-lobby #lobby-friends .fr-empty{padding:16px 14px;gap:6px}
html[data-mobile] #screen-lobby #lobby-friends .fr-empty b{font-size:16px;color:var(--cp-ink)}
html[data-mobile] #screen-lobby #lobby-friends .fr-empty span{font-size:13px;color:var(--cp-text-2)}

/* locked (no username yet): the view sits dimmed under ONE centred plate. The plate is ~156 px tall and hangs from the panel's
   middle, so the panel keeps the height that leaves >= 16 px between it and the faded search field above (10 + 48 + 11 = 69 px). */
html[data-mobile] #screen-lobby #lobby-friends.is-locked{min-height:min(340px,calc(100dvh - 101px))}
html[data-mobile] #screen-lobby #lobby-friends.is-locked > .lv-lock .fr-gate-t{font-size:17px}
/* a phone on its side: only 307 px of panel, so the plate drops its two bobbing faces and still clears the field */
@media (max-height:420px){
  html[data-mobile] #screen-lobby #lobby-friends.is-locked > .lv-lock::before,html[data-mobile] #screen-lobby #lobby-friends.is-locked > .lv-lock::after{display:none}
}

/* a phone on its side (844x390): the same rules, the panel 420 wide and filled to 16 px above the foot (its top there is 67) */
@media (orientation:landscape){
  html[data-mobile] #screen-lobby #lobby-friends{flex:1 1 auto;min-height:0;width:min(42rem,calc(100% - 2px));max-width:100%;max-height:none;margin:0 auto}
  html[data-mobile] #screen-lobby #lobby-friends.is-locked{min-height:0}
}

/* ======================================================= 3. THE SIGN-IN CARD ======================================================= */
/* Its close was 25 x 25 (ui.css .acct-close): the plate grows to a finger, the X with it, the look (a white pill, the ink face) as it was. */
html[data-mobile] #signin-card #btn-signin-close{width:44px;height:44px}
html[data-mobile] #signin-card #btn-signin-close svg{width:15px;height:15px}

/* ======================================================= 4. ROUND 2 (lane 9921) ======================================================= */
/* the rows' drop plate: ui.css's old chevron (button.lb-row::after: opacity .45, translate -.125rem) leaked into ua-views' ::after drop, so the
   drop read as a grey sliver on you and as nothing on the others. The plate is ink, whole. */
html[data-mobile] #screen-lobby #lobby-leaderboard .lb-row::after{opacity:1;translate:none;justify-self:stretch;align-self:stretch}      /* (its justify-self:end shrank the absolute plate to 0 px wide in the row's grid: no drop at all) */
/* the scope chip: "Global" and the globe only (its caption repeated it and wrapped the chip onto two lines on a phone) */
html[data-mobile] #screen-lobby #lobby-leaderboard .lb-scope{align-self:center;white-space:nowrap}
html[data-mobile] #screen-lobby #lobby-leaderboard .lb-scope b{font-size:14px}
html[data-mobile] #screen-lobby #lobby-leaderboard .lb-scope > span{display:none}
/* the You card on the board: "You", the #N chip and the value say it; the caption repeated the chip */
html[data-mobile] #screen-lobby #lobby-leaderboard .lb-you.is-on #lb-you-cap{display:none}
html[data-mobile] #screen-lobby #lobby-leaderboard .lb-you.is-on{min-height:52px}
/* not on the board (sign in, pick a username, hidden, none): the words on top at full width, the button under them at full width */
html[data-mobile] #screen-lobby #lobby-leaderboard .lb-you:not(.is-on){display:flex;flex-direction:column;align-items:stretch;gap:8px;padding:10px 14px}
html[data-mobile] #screen-lobby #lobby-leaderboard .lb-you:not(.is-on) .lb-you-go{width:100%;min-height:44px}
/* a narrow phone (360): a little more width for a 12-letter name */
@media (max-width:370px){
  html[data-mobile] #screen-lobby #lobby-leaderboard{padding:8px!important}
  html[data-mobile] #screen-lobby #lobby-leaderboard #lb-list{padding-left:4px}
  html[data-mobile] #screen-lobby #lobby-leaderboard .lb-you,html[data-mobile] #screen-lobby #lobby-leaderboard .lb-show{margin-left:4px}
  html[data-mobile] #screen-lobby #lobby-leaderboard .lb-tabs .seg-opt{font-size:13px;padding:0 8px}
}
@media (orientation:landscape){
  html[data-mobile] #screen-lobby #lobby-leaderboard{row-gap:12px!important}
  html[data-mobile] #screen-lobby #lobby-leaderboard .lb-show{align-items:center}
}
/* the You chip far down the board ("#4,321") is wider than the rows' 44 px chip column: the card's column grows with it instead of the chip running into "You" */
html[data-mobile] #screen-lobby #lobby-leaderboard .lb-you.is-on{grid-template-columns:minmax(44px,auto) minmax(0,1fr) auto}
/* an empty board: its plate in the flow (it was absolute in a 78 px box, leaving a gap above the You card), its words in ink */
html[data-mobile] #screen-lobby #lobby-leaderboard .lb-wrap:has(#lb-list:empty){min-height:0}
html[data-mobile] #screen-lobby #lobby-leaderboard #lb-list:empty{display:none}
html[data-mobile] #screen-lobby #lobby-leaderboard #lb-state{position:relative;inset:auto;margin:6px 12px 6px 6px;padding:14px 12px}
html[data-mobile] #screen-lobby #lobby-leaderboard #lb-state,html[data-mobile] #screen-lobby #lobby-leaderboard #lb-state b{font-size:15px;color:var(--cp-ink)}
/* a request, and a friend's Remove? confirm: two buttons beside the name left it a few letters ("Maximili…", "Wants to be f…") and the
   confirm's question ran over the name. The name and its line take the row's first line whole; the buttons (and the question) the second. */
html[data-mobile] #screen-lobby #lobby-friends .fr-row:is(.is-inc,.is-confirm){flex-wrap:wrap;row-gap:8px;padding-block:10px}
html[data-mobile] #screen-lobby #lobby-friends .fr-row:is(.is-inc,.is-confirm) .fr-who{flex:1 1 0;min-width:0}
html[data-mobile] #screen-lobby #lobby-friends .fr-row:is(.is-inc,.is-confirm) .fr-acts{flex:1 1 100%;flex-wrap:nowrap;justify-content:flex-end;align-items:center}
html[data-mobile] #screen-lobby #lobby-friends .fr-row.is-confirm .fr-ask{flex:1 1 auto;min-width:0;margin-right:auto;text-align:left}
html[data-mobile] #screen-lobby #lobby-friends .fr-row.is-inc .fr-act{flex:0 1 120px}
/* a phone on its side: the leaderboard's width (the 420 px column showed one and a half requests), and with that room a request or a
   Remove? confirm keeps its name and its buttons on one line again */
@media (orientation:landscape){
  html[data-mobile] #screen-lobby #lobby-friends{width:min(640px,calc(100% - 32px))}
  html[data-mobile] #screen-lobby #lobby-friends .fr-row:is(.is-inc,.is-confirm){flex-wrap:nowrap;padding-block:9px}
  html[data-mobile] #screen-lobby #lobby-friends .fr-row:is(.is-inc,.is-confirm) .fr-acts{flex:0 0 auto}
  html[data-mobile] #screen-lobby #lobby-friends .fr-row.is-inc .fr-act{flex:0 0 auto}
}
/* locked, upright phone: the plate centred in the room UNDER the search field (it was centred on the whole panel: 17 px above it, 78 below) */
@media (orientation:portrait){
  html[data-mobile] #screen-lobby #lobby-friends.is-locked{min-height:min(330px,calc(100dvh - 101px))}
  html[data-mobile] #screen-lobby #lobby-friends.is-locked > .lv-lock{top:calc(50% + 30px)}
}
@media (orientation:landscape){      /* the three tabs had their labels against their edges in a 45% column: a little more room on the left */
  html[data-mobile] #screen-lobby #lobby-leaderboard{grid-template-columns:minmax(0,52fr) minmax(0,48fr)}
  html[data-mobile] #screen-lobby #lobby-leaderboard .lb-tabs .seg-opt{padding:0 6px}
}
@media (orientation:landscape){      /* the screen's width less the 16 px gutters (it stopped at 640): a 12-letter name and a 5-digit value fit the list column */
  html[data-mobile] #screen-lobby #lobby-leaderboard{width:min(780px,calc(100% - 32px))}
}
/* (NOTES 769) off the board with a place (#256): the rank tag beside the words, as on the board, not stretched over its own line; the button (Sign in / Set a name) still takes a full row under them */
html[data-mobile] #screen-lobby #lobby-leaderboard .lb-you:not(.is-on):has(> .lb-rank:not(:empty)){display:grid;grid-template-columns:minmax(44px,max-content) minmax(0,1fr);align-items:center;column-gap:10px;row-gap:8px}
html[data-mobile] #screen-lobby #lobby-leaderboard .lb-you:not(.is-on):has(> .lb-rank:not(:empty)) .lb-you-go{grid-column:1 / -1}
