/* Page styles: people area. Owned by its views; tokens and shared components live in ../app.css. */

/* ===== Singles ladder (Singles.dc.html) ===== */
.sg-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; min-height: 46px; }
.sg-note { margin: 0; min-width: 0; font-size: 13px; color: var(--subtle); overflow-wrap: anywhere; } /* a long unbroken season name or prize wraps inside the page */
/* Inline, with padding for a 44px tap target: a season name that wraps flows into the text after it
   instead of a box drawn over it. */
.sg-season-note a { display: inline; padding: 14px 0; font-weight: 600; text-decoration: none; }
.sg-season-note .text-btn { display: inline; min-height: 0; padding: 14px 0; font-size: 13px; } /* Try again after a failed seasons request */
.sg-season-note[hidden] { display: none; }
.sg-list { padding: 0 var(--gutter); display: flex; flex-direction: column; }
.sg-pad { padding: 0 var(--gutter); }
.sg-empty-note { margin: 0 0 6px; padding: 14px 0; font-size: 14px; line-height: 1.45; color: var(--muted); border-bottom: 1px solid var(--line); }
.sg-row {
  display: grid; grid-template-columns: 30px 36px minmax(0, 1fr) auto; align-items: center; gap: 10px;
  min-height: 64px; padding: 8px 10px; margin: 0 -10px; border-radius: 12px; border-bottom: 1px solid var(--line);
  background: transparent; text-decoration: none; color: var(--ink);
}
.sg-row:hover { color: var(--ink); background: rgba(255, 255, 255, 0.02); }
.sg-row.me, .sg-row.me:hover { background: var(--gold-tint); border-bottom-color: transparent; }
.sg-rank { font-family: var(--font-display); font-weight: 600; font-size: 24px; color: var(--gold); font-variant-numeric: tabular-nums; }
.sg-av { width: 36px; height: 36px; border-radius: 18px; background: var(--surface-2); display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; color: var(--ink); }
.sg-who { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sg-name { font-size: 16px; font-weight: 600; display: flex; align-items: baseline; min-width: 0; }
/* The name wraps (two similar 20-character usernames must not cut to the same text); the YOU tag stays after it. */
.sg-name-text { min-width: 0; overflow-wrap: anywhere; }
.sg-name-text.tight { font-family: var(--font-display); font-size: 17px; } /* fitNames: condensed, so a 20-character username stays whole */
.sg-name:has(.sg-name-text.tight) { flex-wrap: wrap; column-gap: 8px; } /* and the YOU tag moves under it rather than split it */
.sg-name:has(.sg-name-text.tight) .sg-you { margin-left: 0; } /* the column gap spaces it when it stays on the name's line */
/* and the delta goes above the rating, for more room. Still too wide (WWWW…, about 14 em, beside
   a delta): the name is sized to its column, so it stays whole. */
.sg-row:has(.sg-name-text.tight) .sg-right { flex-direction: column; align-items: flex-end; gap: 2px; }
.sg-name { container-type: inline-size; }
.sg-name-text.tighter { font-size: min(17px, calc(100cqw / 14)); }
/* fitNames .fit-wrap: that size would be below 11px (320px phones): the name takes the row's
   width beside the rank and avatar, and the figures go under it, side by side. */
.sg-row:has(.sg-name-text.fit-wrap) > :nth-child(3) { grid-column: 3 / -1; }
.sg-row:has(.sg-name-text.fit-wrap) > :nth-child(4) { grid-column: 3 / -1; justify-self: end; }
.sg-row:has(.sg-name-text.fit-wrap) .sg-right { flex-direction: row; align-items: baseline; gap: 8px; }
/* The partner table: its rows become grids with the table's columns, the name gets the row's
   width and its figures go on the line under it, still under their headings. */
.pf-table:has(tbody th.fit-wrap), .pf-table:has(tbody th.fit-wrap) > :is(caption, thead, tbody) { display: block; }
.pf-table:has(tbody th.fit-wrap) tr { display: grid; grid-template-columns: minmax(0, 1fr) 52px 64px 52px; align-items: center; }
.pf-table tbody tr > th.fit-wrap { grid-column: 1 / -1; }
.pf-table tbody tr:has(> th.fit-wrap) > td { padding-bottom: 10px; }
.pf-table tbody tr:has(> th.fit-wrap) > td:nth-of-type(1) { grid-column: 2; }
.sg-you { flex-shrink: 0; margin-left: 8px; font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold); }
.sg-meta { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.sg-right { display: flex; align-items: baseline; gap: 8px; }
.sg-delta { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.sg-delta.up { color: var(--ink); }
.sg-delta.down, .sg-delta.flat { color: var(--subtle); }
.sg-rating { font-family: var(--font-display); font-weight: 600; font-size: 28px; line-height: 1; font-variant-numeric: tabular-nums; min-width: 52px; text-align: right; }
.sg-unplayed-h { margin: 16px 0 0; font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--subtle); }
.sg-row.unplayed { min-height: 56px; padding: 0; margin: 0; border-radius: 0; color: var(--muted); }
.sg-row.unplayed:hover { color: var(--ink); background: transparent; }
.sg-row.unplayed .sg-rank { font-weight: 400; color: var(--faint); }
.sg-row.unplayed .sg-av { background: var(--surface); color: var(--muted); }
.sg-row.unplayed .sg-right { gap: 6px; }
.sg-row.unplayed .sg-rating { font-size: 24px; line-height: 1.1; min-width: 0; }
.sg-tag { font-size: 12px; }
.sg-recent { padding: 24px var(--gutter) 0; }
.sg-recent .eyebrow { color: var(--muted); }
.sg-feed { margin-top: 10px; display: flex; flex-direction: column; }
.sg-feed-empty { margin: 0; padding: 12px 0; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.sg-feed-item { display: grid; grid-template-columns: minmax(0, 1fr) auto 44px; gap: 3px 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.sg-feed-line { font-size: 15px; grid-row: 1; grid-column: 1; }
/* Names keep a 44px tap target through padding, so all three words share one baseline. */
.sg-feed-line a { display: inline-block; padding: 12px 0; margin: -12px 0; }
.sg-feed-line .w { color: var(--ink); font-weight: 700; text-decoration: none; }
.sg-feed-line .l { color: var(--ink); font-weight: 500; text-decoration: none; }
.sg-feed-fix { grid-column: 3; grid-row: 1 / span 2; align-self: center; margin: -3px -10px -3px 0; }
.sg-feed-line a:hover { text-decoration: underline; }
.sg-feed-line .verb { color: var(--subtle); }
.sg-feed-deltas { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.sg-feed-deltas .ld { color: var(--subtle); font-weight: 500; }
.sg-feed-meta { grid-row: 2; grid-column: 1; font-size: 12px; color: var(--subtle); }
/* Usernames are up to 20 characters with no spaces: wrap them inside the first column. */
.sg-feed-line, .sg-feed-meta { min-width: 0; overflow-wrap: anywhere; }
/* fitNames: condensed, so a 20-character username stays whole */
.sg-feed-line.tight { font-family: var(--font-display); font-size: 17px; }
.sg-feed-meta.tight { font-family: var(--font-display); font-size: 13px; }
.sg-feed-line a { max-width: 100%; }
.sg-feed-item .badge { align-self: start; }
.sg-feed-shots { grid-column: 1; justify-self: start; display: inline-flex; align-items: center; min-height: 32px; margin-bottom: -6px; font-size: 13px; font-weight: 600; color: var(--gold); text-decoration: none; }
.sg-feed-item .badge.corrected { grid-row: 2; grid-column: 2; }
.sg-feed-item.voided .sg-feed-line, .sg-feed-item.voided .sg-feed-line .w { color: var(--subtle); font-weight: 500; text-decoration: line-through; }
/* fitNames .fit-wrap (lows-6): two 20-character names ("MMMMMMMMMM-MMMMMMMMM beat WWWW…") would
   only fit the first column below 11px at 320px, so the line also takes the deltas' column; the
   deltas (or the Voided badge) go beside the meta line and the Corrected badge under it. */
.sg-feed-item:has(> .sg-feed-line.fit-wrap) > .sg-feed-line { grid-column: 1 / 3; }
.sg-feed-item:has(> .sg-feed-line.fit-wrap) > :nth-child(2) { grid-row: 2; grid-column: 2; justify-self: end; }
.sg-feed-item:has(> .sg-feed-line.fit-wrap) > .badge.corrected { grid-row: 3; grid-column: 1; justify-self: start; }

/* ===== Player profile (Profile.dc.html) ===== */
.pf-top { padding: 14px var(--gutter) 22px; display: flex; flex-direction: column; gap: 16px; }
.pf-title-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; min-height: 46px; }
.pf-name {
  margin: 0 0 -10px; min-width: 0; padding-bottom: 10px;
  font-family: var(--font-display); font-weight: 700; font-size: 52px; line-height: 0.88;
  overflow-wrap: anywhere; /* usernames are up to 20 characters with no spaces */
}
.pf-name.long { font-size: 38px; line-height: 0.95; }
.pf-name.tight { font-size: 28px; line-height: 1; } /* fitNames: a username too wide at the size above (the gear on /me takes room) */
/* fitNames: still too wide at 28px (WWWW…, the widest 20 characters, about 14 em): sized to the row,
   less the gear on /me, so it stays on one line. */
.pf-title-row { container-type: inline-size; }
.pf-name.tighter { font-size: min(28px, calc(100cqw / 14)); }
.pf-title-row:has(.pf-gear) .pf-name.tighter { font-size: min(28px, calc((100cqw - 56px) / 14)); }
.pf-gear { width: 44px; height: 44px; flex: none; display: flex; align-items: center; justify-content: center; color: var(--ink); }
.pf-gear:hover { color: var(--gold-hover); }
.pf-ident { display: flex; align-items: center; gap: 12px; }
.pf-av { width: 44px; height: 44px; flex: none; border-radius: 22px; background: var(--surface-2); border: 1px solid var(--border-strong); display: flex; align-items: center; justify-content: center; font-size: 17px; font-weight: 700; color: var(--ink); }
.pf-titles { flex: 1; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
a.pf-title { text-decoration: none; }
.pf-title { align-self: flex-start; max-width: 100%; overflow-wrap: anywhere; display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; color: var(--bg); background: var(--gold); border-radius: 6px; padding: 3px 8px; }
.pf-challenge { flex: none; }
.pf-of { font-size: 0.53em; color: var(--subtle); } /* 18px beside a 34px rank; shrinks with it (.stat-rank) */
.stat-value.pf-unplayed { font-size: 22px; line-height: 34px; color: var(--muted); }
.pf-body { padding: 4px var(--gutter) 0; display: flex; flex-direction: column; gap: 28px; }
.pf-sec { display: flex; flex-direction: column; gap: 10px; }
.pf-sec.flat { gap: 0; }
.pf-sec.tight { gap: 8px; }
.pf-sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.pf-sec-head.center { align-items: center; }
.pf-h2 { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.pf-act-h { margin-bottom: 6px; }
.pf-sec-meta { font-size: 13px; color: var(--subtle); font-variant-numeric: tabular-nums; text-align: right; }
.pf-empty { margin: 0; font-size: 14px; line-height: 1.45; color: var(--muted); }
.pf-team { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; padding: 8px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); text-decoration: none; color: var(--ink); }
.pf-team:hover { color: var(--ink); border-color: var(--border-strong); }
.pf-team-who { display: flex; flex-direction: column; min-width: 0; }
.pf-team-name { font-size: 15px; font-weight: 600; overflow-wrap: anywhere; } /* wraps: two partners with similar names must stay apart */
.pf-team-name.tight { font-family: var(--font-display); font-size: 17px; } /* fitNames: condensed, so a 20-character username stays whole */
.pf-team-meta { font-size: 12px; color: var(--subtle); font-variant-numeric: tabular-nums; }
.pf-team-rating { font-family: var(--font-display); font-weight: 600; font-size: 26px; font-variant-numeric: tabular-nums; }
.pf-table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
/* Fixed columns: the figures keep their width (a W–L of 12–8 never wraps) and a long partner name
   can only take the rest, where fitNames condenses or shrinks it rather than split it. */
.pf-table { table-layout: fixed; }
.pf-table thead th:nth-child(2) { width: 52px; }
.pf-table thead th:nth-child(3) { width: 64px; }
.pf-table thead th:nth-child(4) { width: 52px; }
.pf-table tbody td { white-space: nowrap; }
.pf-table caption { text-align: left; font-size: 12px; color: var(--subtle); padding: 6px 0; }
.pf-table thead tr { color: var(--subtle); font-size: 12px; text-align: right; }
.pf-table thead th { font-weight: 600; }
.pf-table thead th:first-child { text-align: left; padding: 6px 0; }
.pf-table tbody tr { border-top: 1px solid var(--line); text-align: right; }
.pf-table tbody th { text-align: left; font-weight: 600; padding: 0; overflow-wrap: anywhere; }
.pf-table tbody th.tight { font-family: var(--font-display); font-size: 16px; }
.pf-table tbody td { padding: 0 0 0 8px; }
.pf-plain { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); text-decoration: none; }
.pf-plain:hover { color: var(--gold-hover); }
.pf-best { margin-left: 6px; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold); }
.seg.pf-seg { border-radius: 10px; }
.seg.pf-seg > button { padding: 0 12px; border-radius: 8px; }
.pf-h2h { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.pf-h2h-empty { grid-column: 1 / -1; }
.pf-h2h-cell { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 48px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); text-decoration: none; color: var(--ink); font-size: 14px; min-width: 0; }
.pf-h2h-cell:hover { color: var(--ink); border-color: var(--border-strong); }
.pf-h2h-name { font-weight: 600; overflow-wrap: anywhere; min-width: 0; } /* wraps: similar long usernames must stay distinguishable */
/* A username too wide for a half-width cell (fitNames): one cell per line, full width. */
.pf-h2h:has(.pf-h2h-name.tight) { grid-template-columns: minmax(0, 1fr); }
.pf-h2h-wl { flex: none; font-family: var(--font-display); font-weight: 600; font-size: 20px; font-variant-numeric: tabular-nums; }
.pf-h2h-wl.up { color: var(--ink); }
.pf-h2h-wl.down { color: var(--subtle); }
.pf-h2h-wl.even { color: var(--muted); }
.pf-shots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-radius: 14px; border: 1px solid var(--border); overflow: hidden; }
.pf-shot { padding: 12px; display: flex; flex-direction: column; gap: 2px; }
.pf-shot + .pf-shot { border-left: 1px solid var(--border); }
.pf-shot-value { font-family: var(--font-display); font-weight: 700; font-size: 30px; line-height: 1; font-variant-numeric: tabular-nums; }
.pf-shot-label { font-size: 12px; color: var(--muted); white-space: nowrap; } /* "Break-and-runs" stays one word */
/* Under 360px a third of the row is narrower than "Break-and-runs" at 12px: less side padding, 11px. */
@media (max-width: 359px) {
  .pf-shot { padding: 12px 8px; }
  .pf-shot-label { font-size: 11px; }
}
.pf-foot { font-size: 12px; color: var(--subtle); }
.pf-act { display: grid; grid-template-columns: 68px minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 56px; border-top: 1px solid var(--line); }
.pf-kind { justify-self: start; font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--border-strong); border-radius: 5px; padding: 2px 5px; }
.pf-act-text { display: flex; flex-direction: column; min-width: 0; }
.pf-act-line { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.pf-act-line.tight { font-family: var(--font-display); font-size: 16px; } /* fitNames: condensed, so a 20-character username stays whole */
.pf-act-score { white-space: nowrap; } /* "· 2–3" stays whole */
.pf-act-when { font-size: 12px; color: var(--subtle); overflow-wrap: anywhere; } /* a long tournament name wraps */
.pf-act-res { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pf-act-res.up { color: var(--ink); }
.pf-act-res.down { color: var(--subtle); }
.pf-act.voided .pf-act-line { color: var(--subtle); font-weight: 500; }
/* fitNames .fit-wrap (lows-5): at 320px a 20-character name would only fit the text column below
   11px, so the line takes the row's full width under the kind badge and result. */
.pf-act:has(.pf-act-line.fit-wrap) { row-gap: 4px; padding: 8px 0; }
.pf-act:has(.pf-act-line.fit-wrap) > .pf-act-text { grid-column: 1 / -1; grid-row: 2; }
.pf-trn { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 48px; border-top: 1px solid var(--line); text-decoration: none; color: var(--ink); font-size: 14px; overflow: hidden; } /* stacked combining marks in a tournament name stay in the row */
.pf-trn:hover { color: var(--ink); }
.pf-trn-name { min-width: 0; overflow-wrap: anywhere; }
.pf-trn-name.tight { font-family: var(--font-display); font-size: 16px; } /* fitNames */
.pf-trn-status { flex: none; color: var(--muted); font-weight: 600; }
.pf-trn-status.live { color: var(--gold); }
/* The partner's name (namebox.js) too wide beside the status: the name line gets the row (lows-5). */
.pf-trn:has(.name-in.fit-wrap) { flex-wrap: wrap; row-gap: 2px; padding: 8px 0; }
.pf-trn:has(.name-in.fit-wrap) > .pf-trn-name { flex-basis: 100%; }

/* ===== Settings (Settings.dc.html) ===== */
.st-top { padding: 10px var(--gutter) 6px; display: flex; flex-direction: column; gap: 6px; }
.st-body { padding: 16px var(--gutter) 24px; display: flex; flex-direction: column; gap: 26px; }
.st-sec { display: flex; flex-direction: column; }
.st-h2 { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.st-h2.tight { margin-bottom: 4px; }
.st-label { font-size: 14px; color: var(--muted); }
.st-row { display: flex; gap: 8px; }
.st-input { flex: 1; min-width: 0; height: 48px; padding: 0 14px; border-radius: 12px; background: var(--surface); border: 1.5px solid var(--border); color: var(--ink); font: 600 16px var(--font-body); }
.st-input:focus { border-color: var(--ink); outline: none; }
.st-input.invalid { border-color: var(--error-line); }
.st-save { height: 48px; padding: 0 16px; border-radius: 12px; background: transparent; border: 1.5px solid var(--border-strong); color: var(--ink); font: 700 14px var(--font-body); }
.st-save:hover:not(:disabled) { border-color: var(--muted); }
.st-save:disabled { color: var(--disabled-ink); }
.st-help { min-width: 0; font-size: 12px; color: var(--subtle); overflow-wrap: anywhere; } /* long email addresses wrap */
.st-help-error { display: inline-flex; align-items: center; gap: 6px; color: var(--error-ink); }
.st-note { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; border-bottom: 1px solid var(--line); cursor: pointer; }
.st-note-text { display: flex; flex-direction: column; gap: 2px; }
.st-note-title { font-size: 15px; font-weight: 600; }
.st-note-sub { font-size: 12px; color: var(--subtle); }
.st-sw { appearance: none; -webkit-appearance: none; position: relative; flex: none; width: 52px; height: 32px; margin: 0; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--border-strong); cursor: pointer; }
.st-sw::before { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 12px; background: var(--muted); transition: transform 0.15s; }
.st-sw:checked { background: var(--red); border-color: var(--red); }
.st-sw:checked::before { transform: translateX(20px); background: #FFFFFF; }
.st-sw:disabled { opacity: 0.6; cursor: progress; }
.st-sw:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .st-sw::before { transition: none; } }
.st-link { display: flex; align-items: center; justify-content: space-between; min-height: 56px; padding: 0 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); color: var(--ink); text-decoration: none; }
.st-link:hover { color: var(--ink); border-color: var(--border-strong); }
.st-link-label { font-size: 15px; font-weight: 600; }
.st-link-end { display: flex; align-items: center; gap: 8px; }
.st-count { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--red); color: #FFFFFF; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.st-chev { color: var(--subtle); }
.st-rules { margin: 0; padding: 14px 16px 14px 32px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px; font-size: 14px; line-height: 1.45; color: var(--soft-ink); }
.st-rules strong { color: var(--ink); }
.st-download { align-self: flex-start; min-height: 44px; display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; text-decoration: none; }
.st-signout { height: 52px; border-radius: 12px; background: transparent; border: 1.5px solid var(--border-strong); color: var(--ink); font: 700 15px var(--font-body); }
.st-signout:hover:not(:disabled) { border-color: var(--muted); }
.st-signout:disabled { color: var(--disabled-ink); }
.st-others { font-size: 14px; }
.st-sessions { text-align: center; font-size: 12px; color: var(--subtle); }
.st-sessions:empty { display: none; }

/* ===== Members admin (Members.dc.html) ===== */
.mb-top { padding: 10px var(--gutter) 6px; display: flex; flex-direction: column; gap: 6px; }
.mb-body { padding: 16px var(--gutter) 40px; display: flex; flex-direction: column; gap: 26px; }
.mb-sec { display: flex; flex-direction: column; }
.mb-sec[id] { scroll-margin-top: 12px; } /* a #hash link (e.g. #donations) lands just below the edge */
.mb-h2 { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.mb-h2.tight { margin-bottom: 4px; }
.mb-empty { margin: 0; font-size: 14px; line-height: 1.45; color: var(--muted); }
.mb-help { font-size: 12px; line-height: 1.45; color: var(--subtle); }
.mb-card { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border-strong); }
.mb-card-who { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mb-card-name { font-size: 16px; font-weight: 700; overflow-wrap: anywhere; }
.mb-card-sub { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.mb-card-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.mb-card-status:empty { display: none; }
.mb-approve { height: 44px; border: 0; border-radius: 10px; background: var(--ink); color: var(--bg); font: 700 14px var(--font-body); }
.mb-approve:disabled { background: var(--surface-2); color: var(--disabled-ink); }
.mb-reject { height: 44px; border-radius: 10px; background: transparent; border: 1.5px solid var(--border-strong); color: var(--ink); font: 600 14px var(--font-body); }
.mb-reject:disabled { color: var(--disabled-ink); }
/* Still signing up (no username yet): quieter cards and small ghost buttons. */
.mb-sec.quiet .mb-h2 { color: var(--subtle); }
.mb-card.quiet { gap: 8px; padding: 10px 14px; background: transparent; border-color: var(--line); }
.mb-card.quiet .mb-card-name { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.mb-approve.quiet, .mb-reject.quiet { height: 36px; border-radius: 8px; background: transparent; border: 1px solid var(--border); color: var(--muted); font: 600 13px var(--font-body); }
.mb-approve.quiet:disabled, .mb-reject.quiet:disabled { background: transparent; color: var(--disabled-ink); }
.mb-row { display: flex; gap: 8px; }
.mb-row.top { align-items: flex-start; }
.mb-input { flex: 1; min-width: 0; height: 48px; padding: 0 14px; border-radius: 12px; background: var(--surface); border: 1.5px solid var(--border); color: var(--ink); font: 500 16px var(--font-body); }
.mb-input:focus { border-color: var(--ink); outline: none; }
textarea.mb-invite { height: 48px; min-height: 48px; padding: 12px 14px; line-height: 1.35; resize: none; overflow: hidden; }
.mb-input::placeholder { color: var(--subtle); }
.mb-send { flex: none; height: 48px; padding: 0 18px; border: 0; border-radius: 12px; background: var(--red); color: #FFFFFF; font: 700 14px var(--font-body); }
.mb-send:disabled { background: var(--surface-2); color: var(--disabled-ink); }
.mb-save { flex: none; height: 48px; padding: 0 16px; border-radius: 12px; background: transparent; border: 1.5px solid var(--border-strong); color: var(--ink); font: 700 14px var(--font-body); }
.mb-save:disabled { color: var(--disabled-ink); }
.mb-label { font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.mb-remove { height: 48px; border-radius: 12px; background: transparent; border: 1.5px solid var(--border-alert); color: var(--error-ink); font: 700 14px var(--font-body); }
.mb-remove:disabled { color: var(--disabled-ink); border-color: var(--line); }
.mb-reset { height: 48px; border-radius: 12px; background: transparent; border: 1.5px solid var(--border-strong); color: var(--ink); font: 700 14px var(--font-body); }
.mb-reset:disabled { color: var(--disabled-ink); border-color: var(--line); }
.mb-reset + .mb-help { margin: 0 0 8px; }
.mb-role { height: 48px; border-radius: 12px; background: transparent; border: 1.5px solid var(--border-strong); color: var(--ink); font: 700 14px var(--font-body); }
.mb-role:disabled { color: var(--disabled-ink); border-color: var(--line); }
.mb-role + .mb-help { margin: 0 0 8px; }
.mb-sheet-meta { margin: 0; font-size: 14px; color: var(--muted); }
.mb-item { display: grid; grid-template-columns: minmax(0, 1fr) auto 44px; align-items: center; gap: 8px; min-height: 60px; border-bottom: 1px solid var(--line); color: var(--ink); }
.mb-item.removed { color: var(--subtle); }
.mb-item-who { display: flex; flex-direction: column; min-width: 0; }
.mb-item-name { font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
/* fitNames: a 20-character username is condensed (then shrunk) rather than cut or split. */
.mb-item-name.tight { font-family: var(--font-display); font-size: 17px; }
.mb-sheet-name { display: block; }
.mb-sheet-name.tight { font-size: 24px; }
/* The whole email wraps (two invites may differ only at the end); "invited by" on its own line. */
.mb-item-email { font-size: 12px; color: var(--subtle); overflow-wrap: anywhere; }
.mb-item-by { font-size: 12px; color: var(--subtle); overflow-wrap: anywhere; }
.mb-tag { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--muted); border-radius: 6px; padding: 2px 6px; }
.mb-tag.admin { color: var(--gold); border-color: var(--gold); }
.mb-tag.removed { color: var(--subtle); border: 1px dashed var(--subtle); }
.mb-manage { width: 44px; height: 44px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); display: flex; align-items: center; justify-content: center; }
.mb-manage:hover { color: var(--ink); background: var(--surface); }
.mb-policy { margin: 0; padding: 14px; border-radius: 14px; border: 1px solid var(--border); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.mb-policy legend { padding: 0 6px; font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.mb-radio { display: flex; align-items: center; gap: 12px; min-height: 44px; font-size: 15px; }
.mb-radio input { width: 20px; height: 20px; margin: 0; accent-color: var(--red); }
.mb-radio-note { font-size: 12px; color: var(--subtle); }
.mb-policy .mb-help { padding-top: 6px; }

/* ===== Invite a brother (FP-MEMBER-INVITE): Settings section, Me-page card and sheet ===== */
.iv-lead { margin: 0; font-size: 14px; line-height: 1.45; color: var(--muted); }
.iv-input { font-weight: 500; }
.iv-input::placeholder { color: var(--subtle); font-weight: 500; }
.iv-send { flex: none; height: 48px; padding: 0 16px; border: 0; border-radius: 12px; background: var(--red); color: #FFFFFF; font: 700 14px var(--font-body); white-space: nowrap; }
.iv-send:hover:not(:disabled) { filter: brightness(1.06); }
.iv-send:disabled { background: var(--surface-2); color: var(--disabled-ink); }
.iv-help { line-height: 1.4; }
.iv-card {
  display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 12px;
  min-height: 64px; padding: 10px 14px; border-radius: 14px; width: 100%; text-align: left;
  background: var(--surface); border: 1px solid var(--border); color: var(--ink); font: inherit; cursor: pointer;
}
.iv-card:hover { border-color: var(--border-strong); }
.iv-card-icon { width: 40px; height: 40px; border-radius: 12px; background: var(--red); color: #FFFFFF; display: flex; align-items: center; justify-content: center; }
.iv-card-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.iv-card-title { font-size: 15px; font-weight: 700; }
.iv-card-sub { font-size: 13px; color: var(--muted); }
.iv-card .st-chev { font-size: 20px; }

/* ===== Join code (FP-JOIN-CODE): welcome/waiting screen and the Members admin section ===== */
.jc-bottom { margin-top: auto; }
.jc-check { align-self: flex-start; }
.jc-submit { margin-top: 8px; }
.jc-group { padding-top: 6px; }
/* Wraps: a code too long to share its line with the "set by" note keeps the line, and the note goes under it. */
.jc-current { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 2px 12px; min-height: 56px; padding: 8px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); }
/* Monospace so 0/O and 1/l/I are told apart: the code is matched exactly. */
.jc-code { min-width: 0; font-family: ui-monospace, 'Cascadia Mono', Consolas, Menlo, monospace; font-weight: 700; font-size: 20px; overflow-wrap: anywhere; }
.input.jc-input { font-family: ui-monospace, 'Cascadia Mono', Consolas, Menlo, monospace; font-size: 18px; }
.jc-code.none { font-family: var(--font-body); font-weight: 600; font-size: 15px; letter-spacing: 0; color: var(--muted); }
.jc-meta { flex: 0 1 auto; margin-left: auto; font-size: 12px; color: var(--subtle); text-align: right; }
.pf-act-shots { font-weight: 600; color: var(--gold); } /* "See the shots ›" on a live-scored activity row */

/* Singles Season/All-time toggle: one line, like the doubles one (doubles.css). */
.sg-toggle .seg > button { white-space: nowrap; }

/* FP-STALE-CLIENT: marker for ensureStylesheet in singles.js and profile.js (.fit-wrap rows;
   lows-4: 11px .pf-kind, no-wrap .pf-shot-label and singles toggle; lows-5: .fit-wrap activity
   and tournament rows; lows-6: .fit-wrap singles Recent lines). */
:root { --pp-lows6: 1; }
