/* ==========================================================================================================
   SETTINGS (NOTES 325): the owner's pick, "A (Console tabs) but with the design elements like icons of C", 2026-11-07. Markup: web/index.html #settings,
   behaviour: web/ui.js (settings, drawTabs, setKey). Everything here is keyed on #settings (the tournament and friends cards still wear .panel.settings).
   Layout (mock A): Back + title top left, the status lights + Friends top right, one big plate: a tab rail on the left, the chosen tab's rows on the right,
   leaving pinned at the foot. Over a match that cannot pause and while watching it docks on the right (.sx-docked); a phone gets a full-screen sheet.
   Elements (mock C): a cobalt icon tile on every tab, flat rows split by hairlines, action rows in cobalt with their icon, the round status lamps.
   No yellow title plate: the title is plain white Rubik heavy. UI rules (DESIGN-MASTER): one -6deg slant, one ink outline, one hard drop; the keyboard / pad
   / mouse cursor is the cyan ring + a .25em lift (aero.js .ae-sel); chosen chips and the chosen tab are a cyan fill. Sizes are em of #settings, so a phone's
   sheet scales up from the 10px root in one place.
   ========================================================================================================== */
:is(#settings,#friends-card){--sx-ink:var(--cp-ink);--sx-drop:var(--cp-ink);--sx-cobalt:var(--cp-main);--sx-cobalt-d:var(--cp-deep);--sx-neon:var(--cp-main);--sx-tint:var(--cp-sky-2);--sx-ice:var(--cp-sky-3);--sx-track:var(--cp-haze);
  --sx-line:rgba(var(--cp-ink-rgb),.12);--sx-mute:var(--cp-text-2);--sx-red:var(--cp-red);--sx-slant:var(--cp-skew);--sx-ol:var(--cp-ol);--sx-ring:0 0 0 .2em var(--sx-ink),0 0 0 .42em var(--sx-neon),0 0 1.5rem rgba(var(--cp-main-rgb),.65);
  /* (Cyan pop, docs/cyanpop/SPEC.md: the --sx-* names stay; ink outlines and drops, cyan where it was cobalt or neon, the deep shade for words on white that were cobalt) */
  --sx-spring:cubic-bezier(.2,1.5,.4,1);
  position:fixed;inset:0;z-index:calc(var(--z-screen) + 3);pointer-events:none;font-size:1rem;font-family:var(--font-text,"Rubik"),system-ui,sans-serif;color:var(--sx-ink);
  text-align:left;outline:0;-webkit-font-smoothing:antialiased}
:is(#settings,#friends-card)[hidden]{display:none}
:where(#settings button,#friends-card button){font:inherit;color:inherit;border:0;background:none;padding:0;margin:0;cursor:pointer;-webkit-tap-highlight-color:transparent}      /* :where: the reset never out-ranks a component's own padding */
:is(#settings,#friends-card) :focus{outline:0}
:is(#settings,#friends-card) svg{display:block}
/* the dim: over the menu and a paused court (the court's own blur is .glass, the menu's body::after); none when docked: the court stays in view */
:is(#settings,#friends-card)::before{content:"";position:absolute;inset:0;background:var(--cp-scrim);animation:sx-fade 200ms ease-out both}      /* FULL SWEEP: the light frosted scrim, never an ink dim */
:is(#settings,#friends-card):not(.sx-docked)::before{-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px)}      /* the menu's own blur leaves the home's card crisp above it: one more, under the plate only while it is up */
#settings.sx-menu::before{background:var(--cp-scrim)}
:is(#settings,#friends-card).sx-docked::before{background:linear-gradient(90deg,transparent 0%,transparent 45%,var(--cp-scrim) 100%)}
@keyframes sx-fade{from{opacity:0}}

/* ---------- the top: Back, the title, the lights, Friends ---------- */
.sx-top{position:absolute;left:var(--back-x,3.4rem);right:var(--back-x,3.4rem);top:var(--back-y,1.6rem);height:3.6em;display:flex;align-items:center;gap:1.3em;pointer-events:none;animation:sx-in 260ms cubic-bezier(.2,.9,.25,1) both}
.sx-top > *{pointer-events:auto}
.sx-friends{position:relative;isolation:isolate;flex:none;height:3.6em;display:flex;align-items:center;transition:transform 170ms var(--sx-spring)}
.sx-friends::before,.sx-plate::before,.sx-pop-card::before{content:"";position:absolute;inset:0;z-index:-1;border-radius:.6em;background:var(--cp-panel);box-shadow:inset 0 0 0 var(--sx-ol) var(--sx-ink),var(--cp-drop-sm);transform:skewX(var(--sx-slant))}      /* Friends: a small white block, the small drop */
.sx-plate::before,.sx-pop-card::before{transform:none;box-shadow:inset 0 0 0 var(--sx-ol) var(--sx-ink),var(--cp-drop),var(--cp-pop-soft)}      /* the plate and the popup: pop-ups, the big drop and the one soft shadow */      /* the Settings / Paused plate and the (i) and Keys popup are pop-ups: upright boxes (owner: "pop up containers should never be skewed"); their rows, tabs and buttons keep the one slant */
/* the close X (owner 2026-11-17: "the settings window shouldnt have back, as it's a window"): on the plate's top right corner, half over its edge, like every
   window's close. A skewed white tile with the ink outline and the small hard drop, the X upright; the cyan fill under the pointer */
.sx-close{position:absolute;top:-1.1em;right:-1.1em;z-index:2;width:3.2em;height:3.2em;display:grid;place-items:center;isolation:isolate;transition:transform 170ms var(--sx-spring)}
.sx-close::before{content:"";position:absolute;inset:0;z-index:-1;border-radius:.55em;background:var(--cp-panel);box-shadow:inset 0 0 0 var(--cp-ol) var(--sx-ink),var(--cp-drop-sm);transform:skewX(var(--sx-slant));transition:background 140ms}
.sx-close svg{width:1.35em;height:1.35em;fill:none;stroke:var(--sx-ink);stroke-width:3;stroke-linecap:round}
@media (hover:hover){ .sx-close:hover::before{background:var(--sx-tint)} }
.sx-close:active{transform:translate(var(--cp-drop-sm-x),var(--cp-drop-sm-y))} .sx-close:active::before{box-shadow:inset 0 0 0 var(--cp-ol) var(--sx-ink)}
.sx-title{position:relative;isolation:isolate;margin:0;padding:.2em .7em .18em .55em;font-family:var(--font-display,"Rubik");font-weight:400;font-size:var(--cp-title-fs);line-height:1;color:var(--cp-text);letter-spacing:-.01em;white-space:nowrap;transform-origin:0 60%;text-shadow:none}
.sx-title::before{content:"";position:absolute;inset:0;z-index:-1;border-radius:var(--ua-r,.375rem);background:var(--cp-panel);box-shadow:inset 0 0 0 var(--cp-ol) var(--cp-ink),var(--cp-drop);transform:skewX(var(--sx-slant))}      /* FULL SWEEP: the one title plate (Settings, Paused) */
.sx-title.ov-pop{animation:num-pop 450ms var(--ease-bounce,ease)}
.sx-lights{margin:0 0 0 auto;padding:0;list-style:none;display:flex;gap:.55em}
.sx-lights li{position:relative;isolation:isolate;display:flex;align-items:center;gap:.5em;height:2.5em;padding:0 1em 0 .9em;color:var(--cp-text);font-size:1em;font-weight:500;white-space:nowrap}
.sx-lights li::before{content:"";position:absolute;inset:0;z-index:-1;border-radius:.4em;background:var(--cp-panel);box-shadow:inset 0 0 0 var(--cp-ol-sm) var(--cp-ink),var(--cp-drop-sm);transform:skewX(var(--sx-slant))}      /* FULL SWEEP: white pills, never an ink glass */
.sx-lights li[hidden]{display:none}
.sx-lights b{font-family:var(--font-display);font-weight:400}
.sx-lights em{font-style:normal;font-weight:500;opacity:.82}
/* the lamp (C): green = Ready, a white ring that breathes = Waiting, red = a problem, grey = off */
.sx-lights .light{flex:none;width:.75em;height:.75em;border-radius:50%;background:transparent;box-shadow:inset 0 0 0 .16em var(--cp-ink);animation:none}
.sx-lights .is-ok .light{background:var(--cp-live);box-shadow:none}
.sx-lights .is-wait .light{animation:sx-blink 1.4s ease-in-out infinite}
.sx-lights .is-bad .light{background:var(--sx-red);box-shadow:none}
.sx-lights .is-off .light{background:var(--ua-apron);box-shadow:none}
.sx-lights li.ov-pop{animation:num-pop 450ms var(--ease-bounce,ease)}
@keyframes sx-blink{50%{opacity:.35}}
.sx-social{flex:none;display:flex}
.sx-social[hidden]{display:none}
.sx-lights + .sx-social{margin-left:.4em}
.sx-top:not(:has(.sx-lights:not([hidden]) li:not([hidden]))) .sx-social{margin-left:auto}
.sx-friends{gap:.6em;padding:0 1.4em;font-family:var(--font-display);font-weight:400;font-size:1.15em;height:3.13em}
.sx-friends svg{width:1.5em;height:1.5em;fill:none;stroke:var(--cp-pink);stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round}
.sx-friends small{font-size:.8em;font-weight:400;color:var(--sx-mute)} .sx-friends small:empty{display:none}
.sx-badge{min-width:1.5em;height:1.5em;padding:0 .4em;border-radius:.75em;background:var(--sx-neon);display:grid;place-items:center;font-family:var(--font-display);font-size:.85em;font-weight:400;color:#fff;box-shadow:inset 0 0 0 var(--cp-ol-sm) var(--cp-deep)}
.sx-badge[hidden]{display:none}

/* ---------- the plate ---------- */
.sx-plate{position:absolute;left:calc(var(--back-x,3.4rem) + 1.2em);right:max(calc(var(--back-x,3.4rem) + 1.2em), calc(100vw - var(--back-x,3.4rem) - 1.2em - 82em));top:calc(var(--back-y,1.6rem) + 3.6em + 1.7em);bottom:2.4em;
  display:grid;grid-template-columns:14.5em minmax(0,1fr);gap:2.2em;padding:2em 3.2em 2em 3.6em;pointer-events:auto;isolation:isolate;animation:sx-in 300ms cubic-bezier(.2,.9,.25,1) both}
.sx-plate::before{border-radius:.9em}
@keyframes sx-in{from{opacity:0;translate:0 .6em}}
/* the menu's card is only as big as it needs to be (owner 2026-11-15, NOTES 525: the preview column is gone, "we don't need that much space"): 59em wide at most,
   30em tall at most; the rows scroll inside it on a short screen. Centred on the screen like every other pop-up (owner 2026-11-15, NOTES 532: "make the settings tab window centered"):
   the same room above and below as the top bar takes (--sx-hb), so it never runs under Back and the title, which stay top left as on every view */
@media (min-width:701px){ :is(#settings,#friends-card):not(.sx-docked) .sx-plate{--sx-hb:calc(var(--back-y,1.6rem) + 3.6em + 1.7em);top:var(--sx-hb);bottom:var(--sx-hb);margin-block:auto;
  left:0;right:0;margin-inline:auto;width:min(64em, calc(100vw - 2 * (var(--back-x,3.4rem) + 1.2em)));height:min(36em, calc(100vh - 2 * var(--sx-hb)))} }      /* (NOTES 714, owner 2026-11-18: "the window could be bigger") 59 x 30 -> 64 x 36em */
/* (NOTES 714, owner 2026-11-18: "im not a fan of how it gets cutoff for the leave button") Leave court sits at the foot of the tab rail, the rows take the plate's whole height on the right */
@media (min-width:701px){ #settings:not(.sx-docked) .sx-plate{grid-template-rows:minmax(0,1fr) auto} #settings:not(.sx-docked) .sx-plate > .sx-tabs{grid-column:1;grid-row:1} #settings:not(.sx-docked) .sx-plate > .sx-pane{grid-column:2;grid-row:1 / span 2}
  #settings:not(.sx-docked) .sx-plate > .sx-foot{grid-column:1;grid-row:2;flex-direction:column;align-items:stretch;gap:.7em;padding:0} #settings:not(.sx-docked) .sx-foot .sx-leave{width:100%;padding:0 1em} #settings:not(.sx-docked) .sx-foot .sx-note{text-align:center;font-size:.95em} }

/* the tab rail: C's icon tile on every tab, the chosen one a cyan fill */
.sx-tabs{display:flex;flex-direction:column;gap:.45em;min-width:0;padding-top:.1em}
.sx-tab{position:relative;isolation:isolate;flex:none;height:3.6em;display:flex;align-items:center;gap:.85em;padding:0 1em 0 .5em;text-align:left;white-space:nowrap;transition:transform 170ms var(--sx-spring)}
.sx-tab[hidden]{display:none}
.sx-tab::before{content:"";position:absolute;inset:0;z-index:-1;border-radius:.55em;background:var(--cp-panel);box-shadow:inset 0 0 0 var(--cp-ol) var(--sx-ink),var(--cp-drop-sm);transform:skewX(var(--sx-slant));transition:background 140ms}      /* FULL SWEEP: every tab a white block, the outline and the small drop */
@media (hover:hover){ .sx-tab:not([aria-selected="true"]):hover::before{background:var(--sx-tint)} }
.sx-tab:active{transform:translate(var(--cp-drop-sm-x),var(--cp-drop-sm-y))} .sx-tab:active::before{box-shadow:inset 0 0 0 var(--cp-ol) var(--sx-ink)}
.sx-tab[aria-selected="true"]{color:#fff;} .sx-tab[aria-selected="true"]::before{background:var(--sx-neon);box-shadow:inset 0 0 0 var(--cp-ol) var(--cp-deep),var(--cp-drop-deep-sm)}
.sx-tab[aria-selected="true"] .sx-ic{background:var(--cp-panel)} .sx-tab[aria-selected="true"] .sx-ic svg{stroke:var(--cp-deep)}      /* chosen: the cyan block, white words stroked deep; its icon tile turns white with the deep glyph (icons on white are deep blue, never cyan: NOTES 455) */
.sx-tab.ae-sel,html:not(.ae-on) .sx-tab:focus-visible{transform:translateY(-.25em)}
.sx-tab.ae-sel::before,html:not(.ae-on) .sx-tab:focus-visible::before{box-shadow:inset 0 0 0 var(--cp-ol) var(--sx-ink),0 0 0 .42em var(--cp-glow),var(--cp-drop-sm)}
.sx-tab[aria-selected="true"].ae-sel::before,html:not(.ae-on) .sx-tab[aria-selected="true"]:focus-visible::before{box-shadow:inset 0 0 0 var(--cp-ol) var(--cp-deep),0 0 0 .42em var(--cp-glow),var(--cp-drop-deep-sm)}
.sx-tab b{font-family:var(--font-display);font-size:1.2em;font-weight:400;line-height:1}
.sx-ic{flex:none;width:2.45em;height:2.45em;display:grid;place-items:center;border-radius:.42em;background:var(--sx-cobalt);box-shadow:inset 0 0 0 var(--cp-ol-sm) var(--cp-deep);transform:skewX(var(--sx-slant))}      /* an icon tile: cyan, the white glyph, the deep edge */
.sx-ic svg{width:1.45em;height:1.45em;transform:skewX(calc(-1 * var(--sx-slant)));fill:none;stroke:#fff;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round}

/* the pane: the rows scroll, the foot stays */
.sx-pane{min-width:0;min-height:0;display:flex;flex-direction:column;border-left:2px solid var(--sx-line);padding-left:2em;margin-left:-.2em}
.sx-rows{position:relative;flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;padding:.6em .7em .7em .5em;scrollbar-width:thin;scrollbar-color:var(--cp-haze) transparent}
.sx-group{display:flex;flex-direction:column}
.sx-group:not(.is-tab){position:absolute;left:0;top:0;width:100%;height:0;overflow:hidden;visibility:hidden;pointer-events:none}      /* out of sight, not display:none: ui.js drawTabs reads a rule that hides a whole group */
.sx-group.is-tab{animation:sx-pane-in 240ms cubic-bezier(.2,.9,.25,1) both}
@keyframes sx-pane-in{from{opacity:0;translate:0 .5em}}
.sx-why{display:none!important}      /* the words of an (i): read by ui.js why(), shown only in the popup */

/* a row (C): flat on the plate, a hairline above it; the cursor is an ice fill with the neon ring and a lift */
.sx-row{position:relative;isolation:isolate;flex:none;width:100%;min-height:3.5em;display:flex;align-items:center;justify-content:space-between;gap:1.2em;padding:.5em 1.1em .5em 1.2em;text-align:left;text-decoration:none;color:var(--sx-ink);
  box-shadow:inset 0 2px 0 var(--sx-line);transition:transform 170ms var(--sx-spring);cursor:default}
.sx-row[hidden]{display:none}
.sx-group > .sx-row:first-child,.sx-group > .sx-row[hidden] + .sx-row:not([hidden]):nth-child(2),.sx-row.sx-lead{box-shadow:none}      /* sx-lead (ui.js drawSubs): the first row on show, and the first under a group label */
.sx-row.sx-lead{scroll-margin-top:2.6em}      /* a key walk up onto a group's first row brings its label into view too */
/* a group label (Graphics: Display, Motion; Screen: You, Others, HUD): a quiet word over its rows, on the labels' left edge; not a row, never focused */
.sx-sub{flex:none;margin:.85em 0 0;padding:.15em 0 .15em 1.2em;font-family:var(--font-display);font-size:1em;font-weight:400;line-height:1.1;color:var(--sx-mute);text-transform:none;letter-spacing:0}
.sx-sub.sx-first{margin-top:-.4em}      /* the top label rises into the scroll box's top padding (kept for a lifted row's ring; a label has none) */
.sx-sub[hidden]{display:none}
button.sx-row,a.sx-row{cursor:pointer}
.sx-row::before{content:"";position:absolute;inset:.18em 0;z-index:-1;border-radius:.5em;background:transparent;transform:skewX(var(--sx-slant));transition:background 140ms}
.sx-row.ae-sel,html:not(.ae-on) .sx-row:focus-visible{transform:translateY(-.25em);box-shadow:none}
.sx-row.ae-sel::before,html:not(.ae-on) .sx-row:focus-visible::before{background:var(--sx-ice);box-shadow:var(--sx-ring)}
.sx-row.ae-sel + .sx-row,html:not(.ae-on) .sx-row:focus-visible + .sx-row{box-shadow:none}
button.sx-row:active,a.sx-row:active{transform:scale(1,.94);transition-duration:45ms}
.sx-lbl{display:flex;align-items:center;gap:.5em;min-width:0;font-family:var(--font-display);font-size:1.18em;font-weight:400;line-height:1.15}
.sx-row:is(:has(> .sx-chips),:has(> .sx-sl),:has(> .sx-cyc),.sx-sw) > .sx-lbl{flex:none;white-space:nowrap}      /* a value row's label is one line and never squeezed: the control gives way instead ("Menu sounds" wrapped) */
.sx-info{flex:none;width:1.45em;height:1.45em;border-radius:50%;background:var(--sx-neon);color:#fff;display:grid;place-items:center;font-family:var(--font-display);font-size:.72em;font-weight:400;font-style:normal;cursor:pointer;line-height:1;box-shadow:inset 0 0 0 var(--cp-ol-sm) var(--cp-deep),var(--cp-drop-deep-sm)}      /* FULL SWEEP: a cyan dot, the deep edge, a white i (no ink fill) */
#settings .sx-info{color:#fff}
.sx-info[hidden]{display:none}
html[data-mobile] #settings .sx-info{position:relative} html[data-mobile] #settings .sx-info::after{content:"";position:absolute;inset:calc((100% - 4.6rem) / 2)}      /* a finger's 44 px round the small dot (the dot keeps its size) */
@media (hover:hover){ .sx-info:hover{background:var(--cp-press)} }
/* an action row (C): the deep shade, its icon at the end */
.sx-act{color:var(--sx-cobalt-d)}
#settings .sx-act{color:var(--sx-cobalt-d)}
.sx-act .sx-lbl{font-weight:400}
.sx-act > svg{flex:none;width:1.6em;height:1.6em;margin-right:.2em;fill:none;stroke:currentColor;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round;transition:rotate 420ms var(--ease-bounce,ease),scale 160ms}
.sx-act > svg[viewBox="0 0 12 20"]{width:.8em;height:1.3em;stroke-width:3}
.sx-act[aria-disabled="true"]{opacity:.55;cursor:default}
#btn-recenter.ov-spin svg{animation:ov-recentre 560ms var(--ease-bounce,ease)}
@media (hover:hover){ #btn-recenter:hover svg{rotate:90deg} #btn-find-sinks:hover svg{scale:1.15} }

/* the switch: one pill, off = white with the ink knob left, on = cyan with a white knob right (the last sweep's, NOTES 318) */
.sx-sw > i{flex:none;position:relative;width:3.9em;height:2.2em;border-radius:1.1em;background:#fff;box-shadow:inset 0 0 0 var(--sx-ol) var(--sx-ink),var(--cp-drop-sm);transition:background 160ms}
.sx-sw > i::after{content:"";position:absolute;left:.32em;top:.32em;width:1.56em;height:1.56em;border-radius:50%;background:var(--cp-off-2);box-shadow:inset 0 0 0 var(--cp-ol-sm) var(--sx-ink);transition:transform 260ms var(--sx-spring),background 160ms}
.sx-sw[aria-checked="true"] > i{background:var(--sx-neon);box-shadow:inset 0 0 0 var(--sx-ol) var(--cp-deep),var(--cp-drop-deep-sm)}
.sx-sw[aria-checked="true"] > i::after{transform:translateX(1.7em);background:#fff;box-shadow:inset 0 0 0 var(--sx-ol) var(--sx-ink)}

/* the notch slider: - , the range as notches (a press or a drag sets it), + , the number */
.sx-sl{flex:none;width:min(21.5em,calc(100% - 10em));min-width:0;display:flex;align-items:center;justify-content:flex-end;gap:.55em}
.sx-pm{flex:none;width:2.4em;height:2.4em;display:grid;place-items:center;border-radius:.42em;background:var(--cp-panel);box-shadow:inset 0 0 0 var(--cp-ol-sm) var(--sx-ink),var(--cp-drop-sm);transform:skewX(var(--sx-slant));transition:transform 160ms var(--sx-spring)}
.sx-pm:active:not(:disabled){transform:skewX(var(--sx-slant)) translate(var(--cp-drop-sm-x),var(--cp-drop-sm-y));box-shadow:inset 0 0 0 var(--cp-ol-sm) var(--sx-ink)}
.sx-pm svg{width:1.1em;height:1.1em;transform:skewX(calc(-1 * var(--sx-slant)));fill:none;stroke:var(--sx-ink);stroke-width:3.2;stroke-linecap:round}
.sx-pm:disabled{opacity:.35;cursor:default}
@media (hover:hover){ .sx-pm:not(:disabled):hover{transform:skewX(var(--sx-slant)) translateY(-.15em)} }
.sx-notches{flex:1;min-width:6em;max-width:17em;height:2.2em;display:flex;align-items:stretch;gap:.26em;cursor:pointer;touch-action:none}
.sx-notches i{flex:1;border-radius:.2em;background:var(--sx-track);transform:skewX(var(--sx-slant));transition:background 100ms}
.sx-notches i.on{background:var(--sx-cobalt)}
.sx-num{flex:none;min-width:1.5em;text-align:right;font-family:var(--font-display);font-size:1.5em;font-weight:400;font-variant-numeric:tabular-nums}
.sx-num.ov-up{animation:ov-tick-up 360ms var(--ease-bounce,ease)} .sx-num.ov-down{animation:ov-tick-down 360ms var(--ease-bounce,ease)}

/* chips: one of a few (Paddle, Move, Difficulty); chosen = a cyan fill, white words stroked deep */
.sx-chips{flex:none;display:flex;gap:.5em;justify-content:flex-end;max-width:100%}
.sx-chip{position:relative;isolation:isolate;flex:0 1 auto;min-width:5.6em;height:2.6em;padding:0 1em;font-family:var(--font-display);font-size:1em;font-weight:400;white-space:nowrap;transition:transform 160ms var(--sx-spring)}
.sx-chip::before{content:"";position:absolute;inset:0;z-index:-1;border-radius:.4em;background:var(--cp-panel);box-shadow:inset 0 0 0 var(--cp-ol-sm) var(--sx-ink),var(--cp-drop-sm);transform:skewX(var(--sx-slant));transition:background 120ms}      /* FULL SWEEP: a white chip, the outline and the small drop */
#settings .sx-chip[aria-checked="true"]{color:#fff;} .sx-chip[aria-checked="true"]::before{background:var(--sx-neon);box-shadow:inset 0 0 0 var(--cp-ol-sm) var(--cp-deep),var(--cp-drop-deep-sm)}
@media (hover:hover){ .sx-chip:not(:disabled):hover{transform:translateY(-.15em)} }
.sx-chip:active:not(:disabled){transform:translate(var(--cp-drop-sm-x),var(--cp-drop-sm-y))} .sx-chip:active:not(:disabled)::before{box-shadow:inset 0 0 0 var(--cp-ol-sm) var(--sx-ink)}
#settings .sx-chip:disabled{color:var(--cp-text-3);cursor:default}
.sx-chip:disabled::before{background:var(--cp-off);box-shadow:inset 0 0 0 var(--cp-ol-sm) var(--cp-off-2),var(--cp-drop-sm-x) var(--cp-drop-sm-y) 0 var(--cp-off-2)}      /* off: the pale face, its haze edge and drop */

/* the cycler: one of many (Output) */
.sx-cyc{flex:0 1 21.5em;min-width:0;display:flex;align-items:center;gap:.35em}
.sx-val{flex:1;min-width:0;height:2.6em;display:flex;align-items:center;justify-content:center;padding:0 .9em;border-radius:.4em;background:var(--cp-well-2);font-family:var(--font-display);font-size:.95em;font-weight:400;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sx-val{display:block;line-height:2.6em;text-align:center}
.sx-arr{flex:none;width:2.4em;height:2.6em;display:grid;place-items:center;border-radius:.4em;background:var(--cp-panel);box-shadow:inset 0 0 0 var(--cp-ol-sm) var(--sx-ink),var(--cp-drop-sm);transform:skewX(var(--sx-slant))}
.sx-arr svg{transform:skewX(calc(-1 * var(--sx-slant)))}
@media (hover:hover){ .sx-arr:hover{background:var(--sx-tint)} }
.sx-arr:active{transform:skewX(var(--sx-slant)) translate(var(--cp-drop-sm-x),var(--cp-drop-sm-y));box-shadow:inset 0 0 0 var(--cp-ol-sm) var(--sx-ink)}
.sx-arr svg{width:.75em;height:1.2em;fill:none;stroke:var(--sx-ink);stroke-width:3.2;stroke-linecap:round;stroke-linejoin:round}
#set-sink.is-off .sx-val{color:var(--sx-mute);background:var(--cp-off)}
#set-sink.is-off .sx-arr{visibility:hidden}
#set-sink.is-off .sx-lbl{color:var(--sx-mute)}
#set-sink.is-off .sx-info{color:#fff}

/* the foot: leaving, pinned under the rows */
.sx-foot{flex:none;display:flex;align-items:center;justify-content:flex-end;gap:1.1em;padding:1em .7em 0 .5em}
.sx-foot:not(:has(> :not([hidden]))){display:none}
.sx-note{margin:0;font-size:1.05em;font-weight:500;color:var(--sx-mute)}
.sx-note[hidden]{display:none}
.sx-leave{position:relative;isolation:isolate;height:3.3em;padding:0 2em;transition:transform 170ms var(--sx-spring)}
#settings .sx-leave{color:#fff;font-family:var(--font-display);font-size:1.15em;font-weight:400;}
.sx-leave[hidden]{display:none}
.sx-leave::before{content:"";position:absolute;inset:0;z-index:-1;border-radius:.45em;background:var(--sx-red);transform:skewX(var(--sx-slant));box-shadow:inset 0 0 0 var(--cp-ol) var(--cp-red-deep),var(--cp-drop-red-sm)}      /* danger: the red block, its deep red outline and drop */
.sx-leave.ae-sel,html:not(.ae-on) .sx-leave:focus-visible{transform:translateY(-.25em)}
.sx-leave.ae-sel::before,html:not(.ae-on) .sx-leave:focus-visible::before{box-shadow:inset 0 0 0 var(--cp-ol) var(--cp-red-deep),0 0 0 .42em var(--cp-glow),var(--cp-drop-red-sm)}
.sx-leave:active{transform:translate(var(--cp-drop-sm-x),var(--cp-drop-sm-y))} .sx-leave:active::before{box-shadow:inset 0 0 0 var(--cp-ol) var(--cp-red-deep)}
.sx-leave.ov-nudge{animation:nudge 420ms var(--ease-soft,ease)}

/* Friends: the cursor's ring and lift (Back's are the one Back's) */
.sx-friends.ae-sel,html:not(.ae-on) .sx-friends:focus-visible{transform:translateY(-.25em)}
.sx-friends.ae-sel::before,html:not(.ae-on) .sx-friends:focus-visible::before{box-shadow:inset 0 0 0 var(--sx-ol) var(--sx-ink),var(--sx-ring),var(--cp-drop-sm-x) var(--cp-drop-sm-y) 0 .42em var(--sx-drop)}
.sx-friends:active{transform:translate(var(--cp-drop-sm-x),var(--cp-drop-sm-y))} .sx-friends:active::before{box-shadow:inset 0 0 0 var(--sx-ol) var(--sx-ink)}
@media (hover:hover){ .sx-friends:hover{transform:translateY(-.25em)} }

/* ---------- the popup: an (i)'s why, or the Keys ---------- */
.sx-pop{position:absolute;inset:0;z-index:5;display:grid;place-items:center;padding:1em;background:var(--cp-scrim);pointer-events:auto;animation:sx-fade 160ms ease-out both}
.sx-pop[hidden]{display:none}
.sx-pop-card{position:relative;isolation:isolate;width:min(32em,calc(100vw - 2em));max-height:calc(100dvh - 2em);overflow:visible;display:flex;flex-direction:column;padding:2em 3em 2.2em;animation:sx-in 220ms cubic-bezier(.2,.9,.25,1) both}
.sx-pop-card #sx-pop-b{min-height:0;overflow:auto} .sx-pop-card > .sx-ok{align-self:flex-start}      /* the list scrolls, not the card: its slanted face was clipped (owner 2026-11-08) */
.sx-pop-card h3{margin:0 0 .7em;font-family:var(--font-display);font-size:1.55em;font-weight:400}
.sx-pop-card p{margin:0;font-size:1.15em;line-height:1.45;font-weight:500}
.sx-keys{margin:0;display:grid;grid-template-columns:auto 1fr;gap:.55em 1.1em;align-items:center;font-size:1.05em;font-weight:500}
.sx-keys dt{display:flex;align-items:center;gap:.3em;font-weight:500;white-space:nowrap}
.sx-keys dd{margin:0}
.sx-keys kbd{min-width:2em;height:2em;padding:0 .5em;display:inline-grid;place-items:center;border-radius:.3em;background:var(--cp-panel);box-shadow:inset 0 0 0 var(--cp-ol-sm) var(--sx-ink),var(--cp-drop-sm);margin:0 var(--cp-drop-sm-x) var(--cp-drop-sm-y) 0;font:400 .85em var(--font-display),sans-serif}      /* a keycap: a small white block, Days One */
.sx-ok{position:relative;isolation:isolate;margin-top:1.5em!important;height:3em;padding:0 2em!important;transition:transform 170ms var(--sx-spring)}
#settings .sx-ok{font-family:var(--font-display);font-size:1.15em;font-weight:400;color:#fff;}
.sx-ok::before{content:"";position:absolute;inset:0;z-index:-1;border-radius:.45em;background:var(--sx-neon);transform:skewX(var(--sx-slant));box-shadow:inset 0 0 0 var(--sx-ol) var(--cp-deep),var(--cp-drop-deep-sm)}      /* the popup's one action: a cyan block, the deep outline and drop */
.sx-ok.ae-sel::before,html:not(.ae-on) .sx-ok:focus-visible::before{box-shadow:inset 0 0 0 var(--sx-ol) var(--cp-deep),0 0 0 .42em var(--cp-glow),var(--cp-drop-deep-sm)}
.sx-ok:active{transform:translate(var(--cp-drop-sm-x),var(--cp-drop-sm-y))} .sx-ok:active::before{box-shadow:inset 0 0 0 var(--sx-ol) var(--cp-deep)}

/* ---------- what shows where (the old card's rules, on the new rows) ---------- */
#settings.sx-menu :is(.sx-lights,#btn-recenter,#btn-pair,#set-bot,#grp-social,#set-note,#btn-leave-room){display:none} #settings.sx-menu .sx-foot:not(:has(> #btn-set-signout:not([hidden]))){display:none}      /* (NOTES 723) the foot itself stays for Sign out: hidden only when it has nothing to show */      /* the menu: no court, so no lights, Recenter, Reconnect, Difficulty, Friends (the lobby has its own tile) or Leave */
[data-mobile] #settings #set-music{display:none}      /* a phone plays no music; its paddle and match rows go by ui.css's data-mobile rule */
#settings:not(.sx-menu) #grp-help{display:none}      /* a court's card: the tutorial's cards would cover a live match */
#settings.is-spectator :is(#grp-paddle,#grp-match,#set-airpod,#set-camera,#tog-mytrail,#tog-cam,#tog-airpod){display:none}      /* watching: Sound, Graphics, Screen, and the Game light. No Trail or Webcam: a spectator hits no ball and its camera is off (NOTES 190); Player model stays (it is the watched player's in the Player view) */
[data-mobile] #settings #btn-set-keys{display:none}      /* a phone has no keys */
[data-mobile] #settings :is(#tog-keyhints,#tog-mytrail,#tog-airpod){display:none}      /* a phone has no keys, and never plays so has no trail of its own. Game, Others' trails, Others' emotes and Rally counter stay: a phone watches, and hears the court */
[data-mobile] #settings :is(#set-shake,#set-follow){display:none}      /* motion lane: a phone never sits on a court, so it has no play camera; Reduce motion stays. Shake and follow show on the menu, the docked card and watching (broadcast and pov shake, pov and split follow) */
#settings .sx-sw[aria-disabled="true"]{cursor:default} #settings .sx-sw[aria-disabled="true"] > i{opacity:.55} #settings .sx-sw[aria-disabled="true"] .sx-lbl{color:var(--sx-mute)}      /* a switch the device holds (Reduce motion): dimmed like Output when off, its (i) still pressable */

/* ---------- docked: a match that cannot pause, or watching. The court stays in view on the left ---------- */
@media (min-width:701px){      /* a phone is a full-screen sheet in every context */
:is(#settings,#friends-card).sx-docked .sx-top{top:max(var(--back-y,1.6rem), var(--sx-y,0px));left:auto;width:auto;max-width:calc(100vw - 2 * var(--back-x,3.4rem));gap:.9em}
:is(#settings,#friends-card).sx-docked .sx-title{font-size:var(--cp-title-fs)}
#settings.sx-docked .sx-lights{gap:.4em} #settings.sx-docked .sx-lights li{padding:0 .75em 0 .65em} #settings.sx-docked .sx-lights em{display:none}
:is(#settings,#friends-card).sx-docked .sx-plate{top:calc(max(var(--back-y,1.6rem), var(--sx-y,0px)) + 3.6em + 1.2em);left:auto;right:var(--back-x,3.4rem);width:min(36em,calc(100vw - 2 * var(--back-x,3.4rem)));grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(0,1fr) auto;gap:1em;padding:1.6em 2.2em 1.7em 2.6em}
/* narrow (docked, a phone): the tabs are a strip, a value row puts its control under the label */
:is(#settings.sx-docked) .sx-tabs{flex-direction:row;gap:.3em;overflow-x:auto;scrollbar-width:none;padding:.3em .3em .5em}
:is(#settings.sx-docked) .sx-tabs::-webkit-scrollbar{display:none}
:is(#settings.sx-docked) .sx-tab{flex:1 1 auto;min-width:0;height:4.2em;flex-direction:column;justify-content:center;gap:.3em;padding:0 .45em}      /* icon over word, as the phone's sheet: six tabs fit across without a hidden scroll ("Graphics" was cut off) */
:is(#settings.sx-docked) .sx-tab b{font-size:.92em}
:is(#settings.sx-docked) .sx-ic{width:1.85em;height:1.85em} :is(#settings.sx-docked) .sx-ic svg{width:1.15em;height:1.15em}
:is(#settings.sx-docked) .sx-pane{border-left:0;padding-left:0;margin-left:0}
:is(#settings.sx-docked) .sx-row:has(.sx-chips,.sx-sl,.sx-cyc){flex-wrap:wrap;row-gap:.55em;padding-top:.75em;padding-bottom:.8em}
:is(#settings.sx-docked) .sx-row:has(.sx-chips,.sx-sl,.sx-cyc) > :is(.sx-chips,.sx-sl,.sx-cyc){flex:1 1 100%;justify-content:stretch}
:is(#settings.sx-docked) .sx-chip{flex:1 1 0;min-width:0;padding:0 .4em}
:is(#settings.sx-docked) .sx-notches{max-width:none}
:is(#settings.sx-docked) .sx-lbl{font-size:1.2em}
}

/* a short or narrow desktop window: a little tighter */
@media (max-height:640px) and (min-width:701px){ .sx-row{min-height:3.5em} .sx-tab{height:3.1em} .sx-plate{padding-top:1.4em;padding-bottom:1.4em} }
@media (max-width:1100px) and (min-width:701px){ #settings:not(.sx-docked) .sx-plate{grid-template-columns:12.5em minmax(0,1fr);gap:1.6em;padding-left:2.6em;padding-right:2.4em} #settings:not(.sx-docked) .sx-pane{padding-left:1.4em} }

/* ---------- a phone (and any window 700px wide or less): a full-screen sheet ---------- */
@media (max-width:700px){
  #settings{font-size:14px}
  #settings .sx-top{left:16px;right:16px;top:12px;height:3.3em;gap:.8em}
  #settings .sx-top{right:calc(16px + 3.3em + .8em)}      /* the X takes the top row's right end */
  #settings .sx-close{top:calc(-14px - 3.3em);right:16px;width:3.3em;height:3.3em}      /* a phone: the sheet's corner is the screen's, so the X stands at the right end of the top row */
  #settings .sx-title{font-size:1.8em}

  #settings .sx-lights{display:none}
  #settings .sx-friends{height:2.9em;padding:0 1em;font-size:1em}
  #settings .sx-friends > span{display:none}
  #settings .sx-plate{left:0;right:0;width:auto;top:calc(12px + 3.3em + 14px);bottom:0;grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(0,1fr) auto;gap:.9em;padding:1.2em 16px calc(1em + env(safe-area-inset-bottom,0px))}
  #settings .sx-plate::before{transform:none;border-radius:1.2em 1.2em 0 0;box-shadow:inset 0 var(--sx-ol) 0 var(--sx-ink)}
  #settings::before{background:color-mix(in srgb,var(--cp-sky-1) 94%,transparent)}      /* the page's own header must not show between Back and the sheet (a near-opaque pale sky) */      /* the page's own header must not show between Back and the sheet */
  #settings .sx-tabs{flex-direction:row;gap:.3em;padding:.2em .2em .4em}
  #settings .sx-tab{flex:1 1 0;min-width:0;height:4.3em;flex-direction:column;justify-content:center;gap:.3em;padding:0 .2em}      /* a phone: the icon over its word, so every tab fits across */
  #settings .sx-tab b{font-size:.95em}
  #settings .sx-ic{width:1.9em;height:1.9em} #settings .sx-ic svg{width:1.15em;height:1.15em}
  #settings .sx-pane{border-left:0;padding-left:0;margin-left:0}
  #settings .sx-rows{padding:.3em .4em .7em .3em}
  #settings .sx-row:has(.sx-chips,.sx-sl,.sx-cyc){flex-wrap:wrap;row-gap:.55em;padding-top:.75em;padding-bottom:.8em}
  #settings .sx-row:has(.sx-chips,.sx-sl,.sx-cyc) > :is(.sx-chips,.sx-sl,.sx-cyc){flex:1 1 100%;justify-content:stretch}
  #settings .sx-chip{flex:1 1 0;min-width:0;padding:0 .4em}
  #settings .sx-notches{max-width:none}
  #settings .sx-lbl{font-size:1.2em}
  #settings .sx-foot{justify-content:space-between;padding:.8em .4em 0 .3em}
}
/* the plate in the middle covers the court's corner (hamburger, court code) and the insets: Back is the way out, so they step away until it closes */
body[data-settings]:has(#settings:not(.sx-docked):not([hidden])) :is(.corner,.inset){visibility:hidden}
body[data-settings]:has(#settings.sx-docked:not([hidden])) .inset{visibility:hidden}      /* docked, the camera and AirPod insets (top right) would sit under the lights */
/* the cards that sit beside or over the old left-hand card: with this one up, the ask card (a spectator wants Matt's seat) rides over it, bottom left */
body[data-settings] .ask-card{z-index:calc(var(--z-screen) + 4);left:var(--edge);right:auto;top:auto;bottom:var(--edge)}
body[data-settings] .dev-panel{z-index:calc(var(--z-screen) + 4)}
@media (prefers-reduced-motion:reduce){ #settings *,#settings::before{animation:none!important;transition:none!important} }
/* Cyan pop leftovers (NOTES 442): a row that does something (Recenter camera, Tutorial, Keys, How to play, Ask to restart...) is a white block at the one slant, outlined, on the small drop, so it reads as a button and not as a link line */
#settings .sx-act{margin:.35em 0;color:var(--sx-ink)}
#settings .sx-act::before{inset:0;background:var(--cp-panel);box-shadow:inset 0 0 0 var(--cp-ol-sm) var(--sx-ink),var(--cp-drop-sm)}
#settings .sx-act > svg{color:var(--cp-deep)}
#settings .sx-act.ae-sel::before,html:not(.ae-on) #settings .sx-act:focus-visible::before{background:var(--sx-ice);box-shadow:inset 0 0 0 var(--cp-ol-sm) var(--sx-ink),var(--cp-drop-sm),var(--sx-ring)}
#settings .sx-act:active::before{box-shadow:inset 0 0 0 var(--cp-ol-sm) var(--sx-ink)} #settings .sx-act:active{transform:translate(var(--cp-drop-sm-x),var(--cp-drop-sm-y))}
/* (NOTES 651) Settings > Codes: the field and Redeem on one row, the answer under them. The field is the game's own .field; Redeem the neon chip (the checked chip's look),
   off (pale) while the field is empty or a try is out */
.sx-code{flex-wrap:wrap;row-gap:.5em}
.sx-code-box{display:flex;align-items:center;gap:.9em;flex:1 1 16em;min-width:0;justify-content:flex-end}
#code-in{flex:1 1 auto;min-width:0;max-width:16em;height:2.6em;font-family:var(--font-display);font-size:1em;letter-spacing:.06em;text-transform:uppercase}
.sx-code-go{position:relative;isolation:isolate;flex:none;height:2.6em;padding:0 1.2em;font-family:var(--font-display);font-size:1em;color:#fff;white-space:nowrap;cursor:pointer;transition:transform 160ms var(--sx-spring)}
.sx-code-go::before{content:"";position:absolute;inset:0;z-index:-1;border-radius:.4em;background:var(--sx-neon);box-shadow:inset 0 0 0 var(--cp-ol-sm) var(--cp-deep),var(--cp-drop-deep-sm);transform:skewX(var(--sx-slant))}
@media (hover:hover){ .sx-code-go:not([aria-disabled="true"]):hover{transform:translateY(-.15em)} }
.sx-code-go:active:not([aria-disabled="true"]){transform:translate(var(--cp-drop-sm-x),var(--cp-drop-sm-y))}
#settings .sx-code-go[aria-disabled="true"]{color:var(--cp-text-3);cursor:default}
.sx-code-go[aria-disabled="true"]::before{background:var(--cp-off);box-shadow:inset 0 0 0 var(--cp-ol-sm) var(--cp-off-2),var(--cp-drop-sm-x) var(--cp-drop-sm-y) 0 var(--cp-off-2)}
.sx-code-msg{flex:1 0 100%;display:flex;flex-wrap:wrap;justify-content:flex-end;align-items:center;column-gap:.4em;row-gap:.2em;font-size:.95em;line-height:1.3;text-align:right;color:var(--cp-text-2,var(--sx-ink))}
.sx-code-msg[data-tone="err"]{color:var(--cp-red,#e8352c);font-weight:600}
.sx-code-msg[data-tone="ok"]{color:var(--sx-ink)}
.sx-code-ok{font-family:var(--font-display);font-weight:400;color:var(--cp-deep)}
.sx-code-fig{display:inline-flex;align-items:center;gap:.3em;padding:.15em .6em .15em .4em;border-radius:.4em;background:var(--cp-panel);box-shadow:inset 0 0 0 var(--cp-ol-sm) var(--sx-ink),var(--cp-drop-sm);font-family:var(--font-display)}
.sx-code-fig .coin-ic{width:1.15em;height:1.15em}
#settings .sx-code-go[aria-busy="true"]{cursor:progress}
#code-in::placeholder{text-transform:none;letter-spacing:0;color:var(--cp-text-3)}
/* (NOTES 653) the card on top of Codes: where codes come from (owner: "a card that says to find codes on x ... make the card pretty with my current profile picture"). The cyan
   block of the UI (its outline and hard ink drop), the picture round in a white ring with the X badge, the words in the display face; the whole card opens x.com in a new tab */
.sx-xcard{min-height:0;margin:.2em 0 .9em;padding:1em 1.3em;gap:1.1em;justify-content:flex-start;color:#fff;cursor:pointer;box-shadow:none!important}
.sx-xcard::before{content:"";position:absolute;inset:0;z-index:-1;border-radius:.7em;background:linear-gradient(115deg,var(--cp-main) 0%,var(--cp-main) 55%,var(--cp-deep) 100%);box-shadow:inset 0 0 0 var(--cp-ol) var(--sx-ink),var(--cp-drop);transform:skewX(var(--sx-slant))}
.sx-xcard::after{content:"";position:absolute;inset:0;z-index:-1;border-radius:.7em;background:radial-gradient(circle at 12% 30%,rgba(255,255,255,.35),transparent 45%);transform:skewX(var(--sx-slant));pointer-events:none}
.sx-xcard.ae-sel::before,html:not(.ae-on) .sx-xcard:focus-visible::before{background:linear-gradient(115deg,var(--cp-main) 0%,var(--cp-main) 55%,var(--cp-deep) 100%);box-shadow:inset 0 0 0 var(--cp-ol) var(--sx-ink),var(--sx-ring)}      /* selected (owner 2026-11-16: white words on the rows' ice had no contrast): the card keeps its blue face, the ring alone marks it */
@media (hover:hover){ .sx-xcard:hover{transform:translateY(-.15em)} }
.sx-xcard:active{transform:translate(var(--cp-drop-sm-x),var(--cp-drop-sm-y))}
.sx-xpic{position:relative;flex:none;width:4.2em;height:4.2em}
.sx-xpic img{display:block;width:100%;height:100%;border-radius:50%;object-fit:cover;box-shadow:0 0 0 .2em #fff,0 0 0 calc(.2em + var(--cp-ol-sm)) var(--sx-ink),.18em .22em 0 calc(.2em + var(--cp-ol-sm)) var(--sx-ink)}
.sx-xbadge{position:absolute;right:-.3em;bottom:-.3em;width:1.7em;height:1.7em;display:grid;place-items:center;border-radius:50%;background:#000;box-shadow:0 0 0 .14em #fff,0 0 0 calc(.14em + var(--cp-ol-sm)) var(--sx-ink)}
.sx-xbadge svg{width:.95em;height:.95em;fill:#fff}
.sx-xtext{display:flex;flex-direction:column;min-width:0;gap:.12em}
.sx-xtitle{font-family:var(--font-display);font-weight:400;font-size:1.45em;line-height:1.05;}
.sx-xhandle{font-family:var(--font-display);font-size:1.05em;color:var(--sx-ink);background:#fff;align-self:flex-start;padding:.05em .5em;border-radius:.35em;box-shadow:inset 0 0 0 var(--cp-ol-sm) var(--sx-ink)}
.sx-xsub{font-size:.95em;font-weight:600;line-height:1.25;color:#fff;text-shadow:0 1px 0 var(--cp-deep)}
.sx-xgo{flex:none;width:.8em;height:1.3em;margin-left:auto;fill:none;stroke:#fff;stroke-width:3;stroke-linecap:round;stroke-linejoin:round}

/* ---------- the friends window (NOTES 715, owner 2026-11-18: "it's not cohesive to the settings window; it is smaller, and moves into the corner ... the window could be bigger"):
   Settings' frame (the root, scrim, title, top-right block, plate, X and docking above take #friends-card too); one column in the plate: the search, then the list, which scrolls */
#friends-card .sx-plate{display:flex;flex-direction:column;padding:2em 2.6em}
#friends-card .fc-body{flex:1;min-height:0;display:flex;flex-direction:column}
#friends-card .fr-panel{flex:1;min-height:0;display:flex;flex-direction:column;gap:.8em}
#friends-card .fr-panel > :last-child{min-height:0}
#friends-card .fc-set svg{stroke:var(--sx-ink)}
#friends-card .fr-q{height:3.2em;font-size:1.05em}
#friends-card .fr-row{min-height:4em;padding:.45em .6em .45em 1em;gap:.8em}
#friends-card .fr-name{font-size:1.15em}
#friends-card .fr-act{height:2.7em;padding:0 1.1em;font-size:.95em}
#friends-card .fr-more{width:2.7em;height:2.7em}
#friends-card .fr-tag{height:2.4em;font-size:.9em}
@media (max-width:700px){ #friends-card .sx-top{top:12px;left:16px;right:16px;height:3.3em} #friends-card .sx-plate{left:0;right:0;width:auto;top:calc(12px + 3.3em + 14px);bottom:0;padding:1.2em 16px calc(1em + env(safe-area-inset-bottom,0px))}
  #friends-card .sx-plate::before{border-radius:1.2em 1.2em 0 0;box-shadow:inset 0 var(--sx-ol) 0 var(--sx-ink)} #friends-card .sx-close{display:none} }      /* a phone: the sheet, as Settings' (Settings top right goes back, Esc and outside close) */
#friends-card{width:auto;gap:0}      /* (ui.css's old .friends-card width was the small card's: the frame is the whole screen, as #settings) */
#friends-card .fr-scroll{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:var(--cp-haze) transparent;padding:.2em .5em .6em .2em}
/* (NOTES 714-715) a list longer than its window fades out at the foot instead of ending on a hard cut, and scrolls its last row clear of the fade */
@media (min-width:701px){ :is(#settings,#friends-card) :is(.sx-rows,.fr-scroll){-webkit-mask-image:linear-gradient(180deg,#000 calc(100% - 2.2em),transparent);mask-image:linear-gradient(180deg,#000 calc(100% - 2.2em),transparent);padding-bottom:2.4em} }
#friends-card .fr-label{font-size:1.05em} #friends-card .fr-st{font-size:.95em} #friends-card :is(.fr-count,.fr-more-n){font-size:.85em}

/* ======================================================= NOTES 723: Settings > Account and Sign out (owner 2026-11-18) =======================================================
   Signed in, and only on the menu's card: on a court, signing out or deleting would redial the socket (a forfeit mid-match), so the tab and the foot's button are not drawn
   there (ui.js drawTabs leaves out a tab whose group is display:none). Username shows the name before its pen; the export's error line sits under its row; Delete account is
   the one red part: its label, a short line of what goes, the box, and a red button that stays grey until the box says "delete" */
#settings:not(.sx-menu) #grp-account,#settings:not(.sx-menu) #btn-set-signout{display:none}
.sx-acct-v{flex:1 1 auto;min-width:0;margin-left:auto;text-align:right;font-family:var(--font-display);font-size:1.05em;color:var(--sx-mute);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sx-acct-msg{margin:.1em 0 .3em;padding:0 1.2em;font-size:.95em;line-height:1.3;font-weight:600;color:var(--cp-red,#e8352c);text-align:right}
.sx-acct-msg[hidden]{display:none}
.sx-sub.sx-sub-danger{color:var(--cp-red-deep,#b3261e)}
.sx-del{align-items:flex-start;flex-direction:column;gap:.6em;padding-top:.7em;padding-bottom:.8em}
.sx-del::before{background:rgba(232,53,44,.06)}
.sx-del-note{margin:0;font-size:1em;line-height:1.3;color:var(--sx-ink)}
.sx-del .sx-code-box{width:100%;flex:none;justify-content:flex-start}
#del-in{flex:1 1 auto;min-width:0;max-width:16em;height:2.6em;font-family:var(--font-display);font-size:1em}
.sx-del .sx-code-msg{flex:none;width:100%;justify-content:flex-start;text-align:left}
.sx-del-go:not([aria-disabled="true"])::before{background:var(--sx-red);box-shadow:inset 0 0 0 var(--cp-ol-sm) var(--cp-red-deep),var(--cp-drop-red-sm)}
/* Sign out: the last thing at the foot (under Leave court when both show), a white block with the ink outline, the account's quiet way out (not the red of danger) */
.sx-signout{position:relative;isolation:isolate;height:3.3em;padding:0 1.6em;display:inline-flex;align-items:center;justify-content:center;gap:.55em;font-family:var(--font-display);font-size:1.1em;font-weight:400;color:var(--sx-ink);transition:transform 170ms var(--sx-spring)}
.sx-signout[hidden]{display:none}
.sx-signout svg{flex:none;width:1.25em;height:1.25em;fill:none;stroke:var(--cp-deep);stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round}
.sx-signout::before{content:"";position:absolute;inset:0;z-index:-1;border-radius:.45em;background:var(--cp-panel);transform:skewX(var(--sx-slant));box-shadow:inset 0 0 0 var(--cp-ol-sm) var(--sx-ink),var(--cp-drop-sm)}
@media (hover:hover){ .sx-signout:hover::before{background:var(--sx-tint)} }
.sx-signout.ae-sel,html:not(.ae-on) .sx-signout:focus-visible{outline:0;transform:translateY(-.25em)}
.sx-signout.ae-sel::before,html:not(.ae-on) .sx-signout:focus-visible::before{background:var(--sx-ice);box-shadow:inset 0 0 0 var(--cp-ol-sm) var(--sx-ink),var(--cp-drop-sm),var(--sx-ring)}
.sx-signout:active{transform:translate(var(--cp-drop-sm-x),var(--cp-drop-sm-y))} .sx-signout:active::before{box-shadow:inset 0 0 0 var(--cp-ol-sm) var(--sx-ink)}
@media (min-width:701px){ #settings:not(.sx-docked) .sx-foot .sx-signout{width:100%;padding:0 1em} }
html[data-mobile] #settings .sx-signout{min-height:44px}
/* a phone (NOTES 723): six tabs now (Account joined), so the strip packs a little tighter to keep every word whole; the long switch label wraps rather than push the
   switch off the edge; Sign out runs the sheet's width */
html[data-mobile] #settings .sx-plate > .sx-tabs{gap:.25em}
html[data-mobile] #settings .sx-tab{min-width:0;padding:0 .1em}
html[data-mobile] #settings .sx-tab b{font-size:12px;letter-spacing:-.01em}
#settings #tog-set-lb > .sx-lbl{flex:1 1 auto;min-width:0;white-space:normal}
html[data-mobile] #settings .sx-foot .sx-signout{width:100%}

/* (NOTES 745, owner 2026-11-18: "the 'type delete' isnt very intuitive / user friendly. can u follow how github asks you to delete your account? like first have a button,
   and then when you press it, then this window pops up") the Account tab ends in one red Delete account row; it opens #del-card over Settings: what goes, in a red-tinted
   box, then "To confirm, type <username> below", the box, and Delete this account (the one danger face) off until the box matches; Cancel or Esc closes it */
.sx-del-open{margin-top:.6em}
.sx-del-open .sx-lbl{color:var(--cp-red-deep,#b3261e)}
#settings .sx-del-open svg{stroke:var(--cp-red-deep,#b3261e)}
#del-card .del-warn{margin:.2rem 0 .1rem;padding:.75rem .9rem;border-radius:.45rem;background:rgba(232,53,44,.08);box-shadow:inset 0 0 0 .12rem rgba(179,38,30,.35);color:var(--cp-red-deep,#b3261e);font-size:1rem;font-weight:600;line-height:1.35}
#del-card .del-ask{display:block;margin:.5rem 0 .3rem;font-size:1rem;font-weight:500;color:var(--uv-ink,#1c3150)}
#del-card .del-ask b{font-family:var(--font-display);font-weight:400;padding:0 .3em;border-radius:.25rem;background:var(--cp-sky-2,#e3f6ff);user-select:all}
#del-card #del-in{width:100%;max-width:none;height:2.8rem;font-family:var(--font-display);font-size:1.05rem}
#del-card .acct-err:empty{display:none}
#del-card .del-go[aria-disabled="true"]{opacity:.45;cursor:not-allowed}
#del-card .acct-btns{display:flex;gap:.7rem;margin-top:.6rem}

/* (NOTES 740) Controls > Calibrate before each game: its "Recommended" tag after the words, a small cyan chip at the one slant (the words upright) */
.sx-tag{position:relative;isolation:isolate;display:inline-block;margin-left:.6em;padding:.18em .55em .14em;font:400 .72em/1 var(--font-display);font-style:normal;color:var(--cp-deep);vertical-align:.12em;white-space:nowrap}
.sx-tag::before{content:"";position:absolute;inset:0;z-index:-1;border-radius:.3em;background:var(--cp-sky-2);box-shadow:inset 0 0 0 .1em rgba(var(--cp-deep-rgb,0,104,194),.45);transform:skewX(var(--sx-slant,var(--cp-skew)))}

/* (NOTES 757, owner 2026-11-18, Settings > Codes: "fix this line break. and instead of having just text pop up beneath it expanding the window on an error, make like a pop-up
   error at the bottom of the window appear like a banner") the code's answer is a banner along the window's bottom edge (shop.js codeSay moves it into the plate): one line,
   slid up, never growing the card; an error red, a redeemed code white with the ink line; gone on the next keystroke, and hidden off the Codes tab */
#settings .sx-plate > #code-msg{position:absolute;left:50%;bottom:1.1em;z-index:5;width:auto;max-width:calc(100% - 3em);flex:none;display:flex;align-items:center;justify-content:center;gap:.5em;
  padding:.65em 1.4em;border-radius:.6em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:center;font-family:var(--font-display);font-weight:400;font-size:1.05em;line-height:1.2;
  translate:-50% 0;box-shadow:inset 0 0 0 var(--sx-ol,.15rem) var(--sx-ink,#1c3150),var(--cp-drop-sm);background:var(--cp-panel,#fff);color:var(--sx-ink,#1c3150)}
#settings .sx-plate > #code-msg[hidden]{display:none}
#settings .sx-plate > #code-msg[data-tone="err"]{background:var(--cp-red,#e8352c);color:#fff;box-shadow:inset 0 0 0 var(--sx-ol,.15rem) var(--cp-red-deep,#b3261e),var(--cp-drop-red-sm,var(--cp-drop-sm))}
#settings .sx-plate > #code-msg.is-in{animation:code-banner-in 260ms cubic-bezier(.2,1.4,.4,1) both}
@keyframes code-banner-in{from{opacity:0;translate:-50% .9em}}
#settings:has(#sx-tab-codes[aria-selected="false"]) .sx-plate > #code-msg{display:none}
@media (prefers-reduced-motion:reduce){ #settings .sx-plate > #code-msg.is-in{animation:none} }

#sx-pop-b a{color:var(--cp-deep,#0b63c4);font-weight:600;text-decoration:underline;text-underline-offset:.15em}      /* (NOTES 934) a hint's link (the usage stats (i): How we handle data) */
/* Paddle = Keyboard (docs/KEYBOARD.md): the rows only a phone, an AirPod or a camera need go; the Keys list shows the keyboard's own */
html[data-kb] #settings :is(#btn-pair,#set-move,#set-sens,#tog-precal,#btn-recenter,#set-airpod,#set-camera,#tog-cam,#tog-airpod){display:none!important}
.sx-keys .k-kb{display:none} html[data-kb] .sx-keys dt.k-kb{display:flex} html[data-kb] .sx-keys dd.k-kb{display:block} html[data-kb] .sx-keys .k-pad{display:none}
