/* The phone (html[data-mobile] only): watch. Owner 2026-11-17: "these uis are clearly not tested ... refine every single one of them". Loaded after phone.css (NOTES 680). */

/* ===================================================== 1. THE COURT ROWS ARE PLATES ===================================================== */
/* ua-brawl.css's court-list block paints each row itself and hides its ::before/::after, so on a phone the courts were flat upright rectangles
   while the leaderboard's and friends' rows are white plates on the one slant, with the ink outline and the hard ink drop. Draw that plate
   back here: the face on ::before (skewed), the drop on ::after (the same skew, translated); the row's own box stays flat, so its words,
   numbers and disc stay upright. Every selector carries the ids it needs to outrank ua-brawl's .court-shelf rules. */
html[data-mobile] #screen-lobby #lobby-courts #court-shelf #room-list .court-row:not(.is-skel){
  position:relative;isolation:isolate;background:none;box-shadow:none;border:0;transform:none;
  grid-template-columns:50px 2rem minmax(0,1fr) auto 6.4rem;column-gap:.5rem;align-items:center;min-height:4.4rem;height:auto;
  padding:.3rem .55rem .3rem .5rem;text-align:left}      /* the code's column its own word's width (14 px), and room at the right for the Watch face's drop */
html[data-mobile] #screen-lobby #lobby-courts #court-shelf #room-list .court-row:not(.is-skel)::before{
  content:"";display:block;position:absolute;inset:0;z-index:-1;border-radius:var(--uv-r,.41rem);background:var(--vw-face,#fff);
  border:var(--vw-ol,.1875rem) solid var(--cp-ink);box-shadow:none;transform:skewX(var(--cp-skew))}
html[data-mobile] #screen-lobby #lobby-courts #court-shelf #room-list .court-row:not(.is-skel)::after{
  content:"";display:block;position:absolute;inset:0;z-index:-2;width:auto;height:auto;margin:0;border:0;rotate:0deg;border-radius:var(--uv-r,.41rem);
  background:var(--cp-ink);transform:translate(var(--cp-drop-x),var(--cp-drop-y)) skewX(var(--cp-skew))}
/* a full court keeps the pale face (the one state a row still shows); no other state may tint a face */
html[data-mobile] #screen-lobby #lobby-courts #court-shelf #room-list .court-row.is-full:not(.is-skel)::before{background:var(--cp-well)}
html[data-mobile] #screen-lobby #lobby-courts #court-shelf #room-list .court-row:not(.is-skel):is(:hover,:focus,:focus-visible,.ae-sel,.uv-hot){background:none;box-shadow:none;transform:none}

/* the list scrolls in its well: the gap clears the ink drop (it falls 5.3 px), and the padding is the room the slanted corners, that drop
   and the keyboard ring need (the drop's top-right reaches ~7.3 px past the row; the face's bottom-left ~2.6 px), so nothing is cut here.
   Left .5rem + the row's own .5rem = 1rem: the codes line up with the bar's "Code" (below) */
html[data-mobile] #screen-lobby #lobby-courts #court-shelf #room-list{height:auto;gap:.7rem;overflow-y:auto;overscroll-behavior:contain;padding:.5rem .8rem .6rem .5rem}

/* A phone has no keyboard (web/aero.js sets .ae-on on every page, so it cannot tell): a row opening focused (or .ae-sel) left a ring round it,
   so the first row looked picked. On a phone no court row shows a focus/selected ring; every row opens alike. */
html[data-mobile] #screen-lobby #lobby-courts #court-shelf #room-list .court-row:not(.is-skel):is(:focus,:focus-visible,.ae-sel){outline:0}
html[data-mobile] #screen-lobby #lobby-courts #court-shelf #room-list .court-row:not(.is-skel):is(:focus,:focus-visible,.ae-sel)::before{box-shadow:none}
html[data-mobile] #screen-lobby #lobby-courts #court-shelf #room-list .court-row:not(.is-skel):is(:focus,:focus-visible,.ae-sel)::after{box-shadow:none}

/* ===================================================== 2. THE ROW'S WATCH ===================================================== */
/* The row's Watch was an upright rectangle with no drop. Give it the game's block: the cyan face on ::before (the one slant, the inset deep
   outline and the small ink drop), the text upright above it. A finger's block, a little shorter than the row (at least 44 px) and wide enough
   for the word at 14 px with room either side of its slanted edges (owner 2026-11-17: the word touched the face's edges). */
html[data-mobile] #screen-lobby #lobby-courts #court-shelf #room-list .court-row .court-go{
  grid-column:5;grid-row:1;position:relative;isolation:isolate;display:grid;place-items:center;
  width:auto;height:max(3.6rem,44px);min-height:max(3.6rem,44px);padding:0 .4rem;border:0;border-radius:0;background:none;box-shadow:none;transform:none;scale:none;
  color:#fff;
  font-family:var(--font-display);font-size:max(1.15rem,14px);white-space:nowrap}
html[data-mobile] #screen-lobby #lobby-courts #court-shelf #room-list .court-row .court-go::before{
  content:"";display:block;position:absolute;inset:0;z-index:-1;border:0;border-radius:.35rem;background:var(--cp-main);transform:skewX(var(--cp-skew));
  box-shadow:inset 0 0 0 var(--cp-ol-sm) var(--cp-deep), var(--cp-drop-sm-x) var(--cp-drop-sm-y) 0 var(--cp-ink)}
html[data-mobile] #screen-lobby #lobby-courts #court-shelf #room-list .court-row .court-go::after{display:none}

/* ===================================================== 3. THE ROW'S TEXT ===================================================== */
/* At 360 px "Juno's tournament" was cut with an ellipsis: a tighter code/face column leaves the name the rest, and the name may take two
   lines instead of one. The seats are an important count, so they sit in a sky chip. */
html[data-mobile] #screen-lobby #lobby-courts #court-shelf #room-list .court-code{font-size:max(1.2rem,14px);letter-spacing:.02em}      /* a body text, never under 13 px (it read ~11 px) */
html[data-mobile] #screen-lobby #lobby-courts #court-shelf #room-list .court-who{
  display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;white-space:normal;overflow:hidden;text-overflow:clip;line-height:1.15;font-size:max(1.15rem,14px)}
html[data-mobile] #screen-lobby #lobby-courts #court-shelf #room-list .court-seats{
  grid-column:4;grid-row:1;justify-self:center;background:var(--cp-sky-2);color:var(--cp-ink);border-radius:.35rem;padding:.15rem .4rem;
  font-family:var(--font-display);font-size:max(.9rem,13px);line-height:1.2;font-variant-numeric:tabular-nums;text-align:center;white-space:nowrap}

/* ===================================================== 4. THE CODE BAR ===================================================== */
/* Watch sat mid-bar (ui.css gives .code-acts width:100% and a centred track, and its margin-left:auto did nothing with that width). Let the
   acts hug its right end: the button's right edge then lines up with the rows' Watch (the same list gutter, the same right padding), and the
   bar's left padding is the rows' one (list padding .5rem + row padding .5rem), so "Code" starts over the codes below it.
   The four 44 px boxes, "Code" and Watch did not fit the bar at 360 px either (Watch hung over the bar's rounded corner): tighten the gaps
   and the button's inner padding a little, keeping the 44 px boxes and the button's 44 px height. */
html[data-mobile] #screen-lobby #lobby-courts #court-shelf #lobby-code{padding-left:1rem;padding-right:1.35rem;align-items:center;gap:.3rem}
html[data-mobile] #screen-lobby #lobby-courts #court-shelf #lobby-code #code-h{margin-right:0}
html[data-mobile] #screen-lobby #lobby-courts #court-shelf #lobby-code .code-acts{
  display:flex;width:auto;min-width:0;flex:0 0 auto;justify-content:flex-end;grid-template-columns:none;margin-left:auto;gap:.4rem}
html[data-mobile] #screen-lobby #lobby-courts #court-shelf #lobby-code .code-acts .cs-act{padding:0 .6rem;gap:.25rem}
html[data-mobile] #screen-lobby #lobby-courts #court-shelf #lobby-code .code-acts .cs-act svg{width:1rem;height:1rem}
html[data-mobile] #screen-lobby #lobby-courts #court-shelf #lobby-code #btn-watch-code{height:4.4rem;min-height:4.4rem}

/* ===================================================== 5. THE NAME BAR ===================================================== */
/* "Change" (signed in) hung over the plate's slanted right edge: the plate's face leans out at the top, so the button needs the bar's own
   right padding to sit wholly on the white. */
html[data-mobile] #screen-lobby #name-row{padding-right:.9rem}
html[data-mobile] #screen-lobby #name-row #btn-name-change{flex:0 0 auto;max-width:calc(100% - .2rem)}
html[data-mobile] #screen-lobby #name-row #name-input{min-width:0}

/* ===================================================== 6. THE EMOTE BAR ===================================================== */
/* Ten caps of 17 x 20 px in one row were far under a finger's 44 px. A 5 x 2 grid of 44 px caps (ten in one row on its side, which fits),
   the bar inside the 16 px gutters and never wider than the screen less those; the cap keeps the artifact's look (the ink outline, the
   small ink drop on white) on the bar's own white plate (ua-views.css 1017-1022). The bar's own position (bottom or top) is the older
   sheets' and stays. A spectator's bar sits above the view chips and the ask button above the bar, so nothing is under it. */
html[data-mobile] #hud{--pws-gutter:16px;--pws-tap:44px;--pws-safe:env(safe-area-inset-bottom,0px);--pws-views-b:calc(var(--pws-gutter) + var(--pws-safe));
  --pws-emotes-h:102px;--pws-emotes-b:calc(var(--pws-views-b) + var(--pws-tap) + .5rem)}
html[data-mobile] #hud #emotes{display:grid;grid-template-columns:repeat(5,var(--pws-tap));grid-auto-rows:var(--pws-tap);justify-content:end;gap:.35rem;
  padding:.5rem;max-width:calc(100vw - 2 * var(--pws-gutter))}
html[data-mobile] #hud #emotes .emote-btn{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:0;
  width:var(--pws-tap);height:var(--pws-tap);min-width:var(--pws-tap);min-height:var(--pws-tap);padding:0;
  border:var(--cp-ol-sm) solid var(--cp-ink);border-radius:.3rem;background:#fff;box-shadow:var(--cp-drop-sm)}
html[data-mobile] #hud #emotes .emote-btn img{width:26px;height:26px}
html[data-mobile] #hud #emotes .emote-key{display:none}      /* a phone has no digit keys */
@media (orientation:portrait){
  html[data-mobile] #hud #emotes{right:var(--pws-gutter);left:auto}
  html[data-mobile] body[data-role="spectator"]:not([data-overlay="match"]) #hud #emotes{bottom:var(--pws-emotes-b)}      /* (not on the result: the bar sits at the top there, and a bottom too stretched its plate down over the card) */
}
@media (orientation:landscape){
  html[data-mobile] #hud #emotes{grid-template-columns:repeat(10,var(--pws-tap))}
}
/* (NOTES 893, owner: "on phone, the emote selection stacks up on the right side. i dont like that, make it one line, just at the bottom of the screen") portrait: the ten caps in one row
   across the bottom, inside the gutters and over the safe area, each cap a tenth of the row (square); the ask button and anything stacked over the bar step down with its height */
@media (orientation:portrait){
  html[data-mobile] #hud{--pws-emotes-h:calc((100vw - 2 * var(--pws-gutter) - 12px - 9 * 4px) / 10 + 12px)}
  html[data-mobile] #hud #emotes{left:var(--pws-gutter);right:var(--pws-gutter);width:auto;max-width:none;justify-content:stretch;grid-template-columns:repeat(10,minmax(0,1fr));grid-auto-rows:auto;gap:4px;padding:6px}
  html[data-mobile] #hud #emotes .emote-btn{width:auto;height:auto;min-width:0;min-height:0;aspect-ratio:1}
  html[data-mobile] #hud #emotes .emote-btn img{width:68%;height:auto;aspect-ratio:1}
}

/* ===================================================== 7. THE CORNER CHIPS ===================================================== */
/* A finger's row: the hamburger 44 px square, the Court (or Tournament) pill and the watchers 44 px tall, 14 px words, centred and .4rem
   apart. The corner keeps the older sheets' layout (one row in a tall window, a column on its side); the scoreboard under it steps down by
   the extra height so the two never touch, and the banner under the board follows it. */
html[data-mobile] #hud #corner{align-items:center;gap:.4rem}
@media (orientation:landscape){ html[data-mobile] #hud #corner{align-items:flex-start} }      /* on its side the corner is a column: menu, Court pill and watchers share one left edge */
html[data-mobile] #hud #corner #btn-menu{width:var(--pws-tap);height:var(--pws-tap);min-width:var(--pws-tap);min-height:var(--pws-tap)}
html[data-mobile] #hud #corner #btn-menu svg{width:2rem;height:2rem}
html[data-mobile] #hud #corner #room-pill,
html[data-mobile] #hud #corner #watchers{height:var(--pws-tap);min-height:var(--pws-tap);padding-inline:.9rem;align-items:center;font-size:max(1.4rem,14px)}
html[data-mobile] #hud #corner #tour-pill{height:auto;min-height:var(--pws-tap);padding-inline:.9rem;align-items:center;font-size:max(1.4rem,14px)}
html[data-mobile] #hud #corner #watchers svg{width:1.9rem;height:1.9rem}
html[data-mobile] #hud{--pws-board-top:calc(var(--edge) + var(--pws-tap) + .6rem)}
@media (orientation:portrait){
  html[data-mobile] body[data-role="spectator"] #hud #board{top:var(--pws-board-top)}
  html[data-mobile] body[data-role="spectator"] #hud .banner-tag{top:calc(var(--pws-board-top) + 4.75rem)}
}

/* ===================================================== 8. THE SCOREBOARD'S SMALL WORDS ===================================================== */
/* "Club" under a name and "Rally" over the count read 11 px: a body line is 13 px, so the rally box grows a little for its word. */
html[data-mobile] #hud #board .score-who small{font-size:max(1.3rem,13px)}
html[data-mobile] #hud #board .rally{min-width:max(4.4rem,var(--pws-tap));padding-inline:.5rem}
html[data-mobile] #hud #board .rally small{font-size:max(1.3rem,13px)}

/* ===================================================== 9. THE VIEW CHIPS ===================================================== */
/* Broadcast / Split / Player / Free were 22 px pills. Four 44 px chips with 14 px words; in portrait they share the width between the
   16 px gutters, so the row reads as one segmented control (on its side it keeps its own width, clear of the bar beside it). The V keycap
   goes (no keyboard). They are only ever a spectator's: the older sheet still owns whether the row shows. */
html[data-mobile] #hud #views{flex-wrap:nowrap;gap:.35rem;max-width:none}
html[data-mobile] #hud #views .view-chip{height:var(--pws-tap);min-height:var(--pws-tap);padding:0 .25rem;justify-content:center;font-size:max(1.4rem,14px)}
html[data-mobile] #hud #views .views-key{display:none}
@media (orientation:portrait){
  html[data-mobile] #hud #views{left:var(--pws-gutter);right:var(--pws-gutter);bottom:var(--pws-views-b)}
  html[data-mobile] #hud #views .view-chip{flex:1 1 auto;min-width:0;padding:0 .6rem}      /* (auto: "Broadcast" needs more than a quarter at 390 px; equal quarters cut it) */
}
/* the ask button moves above the bar: the old place beside it was measured for the 10-in-a-row bar and is now under the grid */
html[data-mobile] #hud #btn-ask{right:var(--pws-gutter);width:min(16rem,calc(100vw - 2 * var(--pws-gutter)))}
@media (orientation:portrait){
  html[data-mobile] #hud #btn-ask{bottom:calc(var(--pws-emotes-b) + var(--pws-emotes-h) + .5rem)}
}
@media (orientation:landscape){
  html[data-mobile] #hud #btn-ask{bottom:calc(var(--pws-gutter) + var(--pws-tap) + 1rem + var(--pws-safe))}
}

/* ===================================================== 10. THE RESULT CARD ===================================================== */
/* A stat read label over number in a full-width box in portrait (the narrow window's rule); every stat is one row on a phone now, the
   label left and the number right, as on its side. The rematch note under the buttons is centred and 13 px, and the buttons keep their
   room off the slab's bottom edge. */
html[data-mobile] #screen-match #result #result-slab #result-stats li.stat{flex-direction:row;align-items:center;justify-content:space-between;gap:.6rem}
html[data-mobile] #screen-match #result #result-slab #rematch{padding-bottom:.4rem}
html[data-mobile] #screen-match #result #result-slab #rematch #rematch-note{font-size:max(1.3rem,13px);text-align:center;margin:.5rem 0 0;padding:0 .3rem;min-height:1.2em;line-height:1.25}
html[data-mobile] #screen-match #result #result-slab #rematch #rematch-btns .btn{min-height:44px}      /* (its own 44 px: the result card is outside #hud, where the bar's tokens live) */
