/* // FLOW-VISITOR-SEES-THE-HOME-PAGE, FLOW-CREATE-AND-PUBLISH-EVENT */
/* BQ-4581: the one tap-target size (44 CSS px) - min-inline-size / min-block-size / inline-size of every tap target, shell and screens. */
:root {
  --tap: 2.75rem;
}

/* Every Layout rem kit styling for Tourney Now web2 redesign (BQ-4360).
   Pure rem/em/clamp/1px styling. Zero CSS order or row-reverse. */

/* BQ-4560 (FLOW-SCORE-CORRECTION-REQUEST): the desk page width, ONE token of the page piece */
:root { --page-max: 90rem; }
/* FLOW-SIGN-IN-WITH-AN-EMAILED-CODE (BQ-4705): the legacy main cap (67.5rem) kept even a wide page narrow beside navigation. */
/* FLOW-STAFF-SEES-THE-MERCHANT-ONBOARDING-PIPELINE: reserve the status sentence's natural wrapped height while counts arrive. */
.rs-status-shelf { display: grid; min-inline-size: 0; }
.rs-status-shelf > * { grid-area: 1 / 1; min-inline-size: 0; overflow-wrap: anywhere; }
.rs-status-measure { visibility: hidden; }
main:has(> .page.rs.wide) {
  max-inline-size: none;
}
@media (min-width: 1024px) {
  .page.rs .lede, .page.rs > p { max-inline-size: 70ch; }
}

.rs-stack {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: var(--stack-space, var(--space-4, 1rem));
}

.rs-cluster {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--cluster-space, var(--space-2, 0.5rem));
}

.rs-cluster.rs-cluster-spread {
  justify-content: space-between;
}

/* FLOW-CHECK-IN-TEAM (BQ-4847): one shared identity row for Field, Day and desk.
   The name and complete player list shrink within the row; the status and actions
   can take the next line without changing reading order or clipping text. */
.rs-identity {
  min-inline-size: 0;
  max-inline-size: 100%;
  inline-size: 100%;
}
.rs-identity .ev-body.rs-stack {
  flex: 1 1 12rem;
  min-inline-size: 0;
  max-inline-size: 100%;
  gap: var(--space-1);
}
.rs-identity .ev-body.rs-stack > * {
  display: block;
  min-inline-size: 0;
  max-inline-size: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}
.rs-identity > :is(.pill, .rs-pill, .row-actions, .chip) {
  min-inline-size: 0;
  max-inline-size: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}
.rs-identity > .row-actions > * {
  max-inline-size: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}

.rs-sidebar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4, 1rem);
}

.rs-sidebar > :first-child {
  flex-basis: var(--sidebar-width, 18rem);
  flex-grow: 1;
  /* FLOW-SIGN-IN-WITH-AN-EMAILED-CODE (BQ-4705): an intrinsic image must not reserve the content column's room. */
  min-inline-size: 0;
}

.rs-sidebar > :last-child {
  flex-basis: 0;
  flex-grow: 999;
  min-inline-size: min(100%, var(--sidebar-content-min, 24rem));
}

/* BQ-4501 (UF-ORGANIZER-BUILDS-AND-PUBLISHES-AN-EVENT): Sidebar with the side column LAST in the DOM (form first, then its side column):
   .rs-sidebar-end swaps the two roles, still no CSS order. The first child is the wide column, the last child the side. */
.rs-sidebar.rs-sidebar-end > :first-child {
  flex-basis: 0;
  flex-grow: 999;
  min-inline-size: min(100%, var(--sidebar-content-min, 24rem));
}

.rs-sidebar.rs-sidebar-end > :last-child {
  flex-basis: var(--sidebar-width, 18rem);
  flex-grow: 1;
  min-inline-size: 0;
}

.rs-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4, 1rem);
}

.rs-switcher > * {
  flex-grow: 1;
  flex-basis: calc((var(--switcher-threshold, 40rem) - 100%) * 999);
  min-width: 0;
}

/* FLOW-EDIT-PUBLISHED-EVENT (BQ-4850): sponsorship facts are the wide side of
   the shared Switcher. Bound every text child before the price/action wraps. */
.rs-sponsorship-row {
  min-inline-size: 0;
  max-inline-size: 100%;
  align-items: center;
}
.rs-switcher.rs-sponsorship-row > .rs-stack.ev-body {
  min-inline-size: 0;
  max-inline-size: 100%;
  flex-basis: calc((var(--switcher-threshold, 40rem) - 100%) * 999);
  flex-grow: 2;
}
.rs-sponsorship-row > .ev-body > *,
.rs-sponsorship-row > .sp-sale-buy > * {
  min-inline-size: 0;
  max-inline-size: 100%;
  overflow-wrap: anywhere;
}
.rs-sponsorship-row > .sp-sale-buy {
  min-inline-size: 0;
  max-inline-size: 100%;
  flex-grow: 1;
}

/* FLOW-ORGANIZER-ANSWERS-A-SCORE-CORRECTION-REQUEST (BQ-4823):
   G14's list row is a Stack beside a wrapping status. Each text child must
   shrink within the Stack before the status moves to its next line. */
.g14-correction .list > .item {
  min-inline-size: 0;
  max-inline-size: 100%;
}
.g14-correction .list > .item > .ev-body {
  min-inline-size: 0;
  max-inline-size: 100%;
  flex: 1 1 12rem;
}
.g14-correction .list > .item > .ev-body > * {
  display: block;
  min-inline-size: 0;
  max-inline-size: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}
.g14-correction .list > .item > .pill {
  max-inline-size: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}

.rs-autogrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--grid-min, 16rem)), 1fr));
  gap: var(--space-4, 1rem);
}

/* BQ-4501: a Step card (pieces.css .rs-step is a flex column) that is also an AutoGrid is the grid - the O04 essentials card. */
.rs-step.rs-autogrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--grid-min, 16rem)), 1fr));
}

.rs-center {
  box-sizing: content-box;
  max-inline-size: var(--center-max, 73.75rem);
  margin-inline: auto;
  width: 100%;
  min-width: 0;
}

/* BQ-4555 / FLOW-ORGANIZER-SEES-THEIR-EVENTS (UF-168): the form screens (O02, O04, O05, G26, O19) read as ONE stacked column on a desk.
   The shelf is the Stack's, kept here in the drawer (Shell's Screen owns the page element, so the piece is applied by its selector); the page's own max-width stays in create-publish.css. */
@media (min-width: 1024px) {
  main .page.rs:is([data-testid="screen-O02"], [data-testid="screen-O04"], [data-testid="screen-O05"], [data-testid="screen-G26"], [data-testid="screen-O19"]) {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }
  /* BQ-4600 (UF-159): the builder and the course request take the one desk page token */
  main .page.rs:is([data-testid="screen-O04"], [data-testid="screen-O05"], [data-testid="screen-G26"]),
  main .page.loading.rs:has([data-screen-placeholder="O04"], [data-screen-placeholder="O05"], [data-screen-placeholder="G26"]) {
    max-width: var(--page-max);
  }
}

/* ---------------- Rail (BQ-4541; FLOW-VISITOR-OPENS-A-TOURNAMENT-DETAIL-PAGE) ----------------
   A main column plus a side rail. DOM order: aside, then main. Under 1024px one column in that order; from 1024px two columns,
   the rail on the right and sticky. The page that holds a Rail (Shell adds .rail) takes the public page-wide maximum. */
.rs-rail-aside > * + *,
.rs-rail-main > * + * {
  margin-top: var(--space-4, 1rem);
}

.rs-rail-main {
  min-width: 0;
  overflow-wrap: anywhere;
}

.rs-rail-aside {
  min-width: 0;
}

/* BQ-4638: the Rail root is .rs-railpage, never .rs-rail (that is the card strip, pieces.css). Explicit block = one column under 1024px. */
.rs-railpage {
  display: block;
  min-width: 0;
}

/* BQ-4578: ONE page width for every side (the golfer pages used to stop at 720px in style.css) and a readable measure for prose */
@media (min-width: 1024px) {
  /* PL-1695: every side takes --page-max (golfer side too, IN-0180) */
  .page, .page:not(.find) {
    max-width: var(--page-max);
  }

  /* BQ-4583: the desk-work sides (organizer, course, staff) and a wide page take the room - the one --page-max token */
  main:is(.side-organizer, .side-course, .side-staff) .page, .page.rs.wide, .page.rs.wide:not(.find) {
    max-width: var(--page-max);
  }

  .page p, .page .small, .page .note {
    max-inline-size: 70ch;
  }

  /* SUPERSEDED BQ-4654: the empty-aside one-track rule moved into @container rail with the grid */
}

.rs-rail-aside:empty, .rs-rail-aside:has(> .rs-stack:empty) {
  display: none;
}

/* a list (ul.list) that is also an AutoGrid keeps its list semantics and is the grid */
.list.rs-autogrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--grid-min, 16rem)), 1fr));
  gap: var(--space-4, 1rem);
}

/* SUPERSEDED BQ-4654: a Rail page takes --page-max like every side (PL-1695); the 73.75rem Rail cap is gone */

/* BQ-4654: the Rail splits by ITS OWN width (rem), not by the window: two columns only when the Rail is >= 66rem wide
   (rail 18rem + gap 1.5rem <= 30% of 66rem, so the main column is always >= 70%). Under that: one column, aside then main. */
.rs-railbox {
  container-type: inline-size;
  container-name: rail;
  min-width: 0;
}

@container rail (min-width: 66rem) {
  .rs-railpage {
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--rail-w, 18rem);
    column-gap: var(--space-6, 1.5rem);
    align-items: start;
  }

  .rs-railpage:has(> .rs-rail-aside:empty), .rs-railpage:has(> .rs-rail-aside > .rs-stack:empty) {
    grid-template-columns: minmax(0, 1fr);
  }

  .rs-rail-aside {
    grid-column: 2;
    grid-row: 1;
    position: sticky;
    top: calc(var(--top-h, 0px) + var(--space-4, 1rem));
  }

  .rs-rail-main {
    grid-column: 1;
    grid-row: 1;
  }
}

/* ---------------- Pinned Bar = the dock IN THE PAGE (BQ-4661, IN-0200 / UF-209; Rob 11-11) ----------------
   The bottom of the screen belongs to the tab bar only. The dock (Screen's `main`) is in the page flow at EVERY width: right under the
   title/sub, or at the form's foot (mainAt="end"); never fixed or sticky at the bottom, no top border strip, no 33vh cap, no inner scroll.
   SUPERSEDED by this block: the fixed dock above the tab bar (BQ-4371 / BQ-4454 / BQ-4500, and the phone half of BQ-4479) - the old rules
   are in git history. Unchanged: the TOP edge bar, the toast, and the desk sticky variants below. */
.rs-pinned-bar {
  position: static;
  max-height: none;
  padding: 0;
  background: none;
  border: 0;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-2, 0.5rem);
}

.page.rs .rs-pinned-bar,
.page.rs .dock {
  background: none;
  border: 0;
  box-shadow: none;
}

.rs-pinned-bar > * {
  margin-left: 0;
}

/* a form that ends with its own button for the same submit draws no dock, at any width: the form's button is the one main-action */
.rs-pinned-bar.dock-form {
  display: none;
}

@media (min-width: 1024px) {
  .rs-pinned-bar.rs-pinned-desk-top {
    position: sticky;
    top: var(--top-h, 0px);
    z-index: 3;
    padding-bottom: 0.5rem;
    background: var(--rs-bg, var(--surface-page));
  }

  /* SUPERSEDED BQ-4541: the sticky moved onto .rs-rail-aside (button AND facts stay in view); the dock is static inside it */
  .rs-pinned-bar.rs-pinned-desk-rail {
    position: static;
  }
}

/* the loading placeholder of the dock holds the box the loaded dock takes, in the page (no jump) */
.rs-pinned-bar-slot {
  position: static;
  width: 100%;
  max-width: 26.25rem;
  min-height: 3.375rem;
  padding: 0;
  border: 0;
  background: transparent;
  display: flex;
  align-items: center;
}

/* nothing reserves room for a dock: the page keeps the tab bar's room only (style.css reserved max(dock, 5.5rem) above it) */
@media (max-width: 1023.98px) {
  .page.has-dock {
    padding-bottom: calc(var(--tab-h, 0px) + var(--space-8) + max(var(--toast-room, 0px), var(--toast-h, 0px) + 0.5rem));
  }
}

/* ---------------- O04 KEEPS ITS PINNED DOCK (BQ-4661 amendment; IN-0200 ask 3 / BQ-4669) ----------------
   SUPERSEDED (BQ-4680): the host redesign removed keepPinnedDock from O04 Build - its page button is the in-page MainTwin; this rule now serves only Change-a-live-tournament and Publish-a-draft. Until then, O04 Build's Screen passes keepPinnedDock: its dock carries .rs-pinned-keep and keeps the OLD look on good
   (BQ-4371 / BQ-4454 / BQ-4500): below 1024px fixed on the tab bar, 33vh cap with inner scroll, the tab bar reshaped to ONE bottom area, the
   room rule's in-flow dock. Every other screen's dock is in the page flow (above). Scoped to .rs-pinned-keep / body:has(.rs-pinned-keep). */
/* ---------------- Approved Pinned Bar ---------------- */
.rs-pinned-bar.rs-pinned-keep {
  position: fixed;
  left: 0;
  right: 0;
  bottom: var(--tab-h, 0px);
  z-index: 4;
  padding: var(--space-3, 0.75rem) var(--space-4, 1rem) calc(0.875rem + env(safe-area-inset-bottom));
  background: var(--surface-page);
  border-top: 1px solid var(--border-default);
  box-shadow: 0 -0.375rem 1.125rem rgba(29, 53, 87, 0.06);
  display: flex;
  flex-direction: column;
  gap: var(--space-2, 0.5rem);
}

.page.rs .rs-pinned-bar.rs-pinned-keep {
  background: var(--rs-bg);
  border-top: 1px solid var(--rs-line);
  box-shadow: 0 -0.25rem 0.75rem rgba(29, 53, 87, 0.06);
}

@media (max-width: 1023.98px) {
  .rs-pinned-bar.rs-pinned-keep {
    max-height: 33vh;
    max-height: 33dvh;
    overflow: hidden;
    box-sizing: border-box;
    padding: var(--space-2, 0.5rem) var(--space-4, 1rem) calc(0.5rem + env(safe-area-inset-bottom));
    gap: 0.375rem;
  }

  .rs-pinned-bar.rs-pinned-keep > :is(.needs, .dock-note, p:not(.btn)) {
    flex: 0 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .rs-pinned-bar.rs-pinned-keep > .needs {
    min-height: min(2.6em, 5vh);
    min-height: min(2.6em, 5dvh);
  }

  .rs-pinned-bar.rs-pinned-keep > .confirm {
    flex: 0 1 auto;
    min-height: 0;
    max-height: 100%;
    overflow: hidden;
    box-sizing: border-box;
  }

  .rs-pinned-bar.rs-pinned-keep > :is(.btn, a.btn, button.btn, .row-actions, .two) {
    flex: none;
  }

}

@media (min-width: 1024px) {
  .rs-pinned-bar.rs-pinned-keep,
  .page.rs .rs-pinned-bar.rs-pinned-keep {
    position: static;
    padding: 0;
    background: none;
    border: 0;
    box-shadow: none;
  }
}

/* ---------------- ONE BOTTOM AREA (BQ-4454, IN-0139 + IN-0140; FLOW-CREATE-AND-PUBLISH-EVENT, O04 G03 G09 O06) ----------------
   SUPERSEDES the dock as a bar floating over the floating tab bar (phones). Below 1024px, when a screen has a tab bar AND a main
   action, the two are ONE bottom area: one navy surface, one top edge, one shadow, no gap. CSS only - same elements, same testids,
   DOM order unchanged. No tab bar (standalone) = the dock is as before. Desktop (>= 1024px) is untouched. */
@media (max-width: 1023.98px) {
  body:has(nav.tabbar):has(.rs-pinned-keep) {
    --area-tab-h: calc(var(--rs-tabbar-h, 3.5rem) + env(safe-area-inset-bottom));
  }

  /* the tab bar: full width, flush with the screen's foot, square, no shadow of its own (the dock's top shadow is the area's) */
  body:has(nav.tabbar):has(.rs-pinned-keep) nav.tabbar,
  body:has(nav.tabbar):has(.rs-pinned-keep) nav.tabbar.organizer,
  body:has(nav.tabbar):has(.rs-pinned-keep) nav.tabbar.course,
  body:has(nav.tabbar):has(.rs-pinned-keep) nav.tabbar.staff {
    left: 0;
    right: 0;
    bottom: 0;
    height: var(--area-tab-h);
    min-height: var(--area-tab-h);
    padding: 0.25rem var(--space-1, 0.25rem) env(safe-area-inset-bottom);
    border-radius: 0;
    box-shadow: none;
  }

  body:has(nav.tabbar):has(.rs-pinned-keep) nav.tabbar .tab {
    border-radius: var(--radius-md, 0.625rem);
  }

  /* the dock: sits directly on the tabs, same navy, no seam; the shadow is the area's one */
  body:has(nav.tabbar):has(.rs-pinned-keep) .dock.rs-pinned-bar.rs-pinned-keep,
  body:has(nav.tabbar):has(.rs-pinned-keep) .page.rs .dock.rs-pinned-bar.rs-pinned-keep {
    bottom: var(--area-tab-h);
    flex-direction: row;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 0.5rem;
    padding: 0.625rem max(var(--space-4, 1rem), calc((100% - 38rem) / 2)) 0.5rem;
    background: var(--navy);
    border: 0;
    border-radius: 0;
    box-shadow: 0 -0.375rem 1.25rem rgba(16, 32, 58, 0.18);
    color: #fff;
  }

  body:has(nav.tabbar):has(.rs-pinned-keep) .dock.rs-pinned-bar.rs-pinned-keep > * {
    flex: 1 0 100%;
    width: auto;
    max-width: none;
    margin: 0;
    min-width: 0;
  }

  /* the buttons: one row while each has 9rem (a Switcher by hand), stacked below that; the main action first, as in the DOM */
  body:has(nav.tabbar):has(.rs-pinned-keep) .dock.rs-pinned-bar.rs-pinned-keep > :is(.btn, a.btn, button.btn) {
    flex: 1 1 9rem;
    min-height: 2.75rem;
    padding-block: 0.25rem;
  }

  body:has(nav.tabbar):has(.rs-pinned-keep) .dock.rs-pinned-bar.rs-pinned-keep > :is(.btn, a.btn, button.btn):not(.ghost-btn):not(.danger):not(:disabled):not([aria-disabled="true"]) {
    background: var(--aqua);
    color: var(--navy);
  }

  body:has(nav.tabbar):has(.rs-pinned-keep) .dock.rs-pinned-bar.rs-pinned-keep .btn.ghost-btn,
  body:has(nav.tabbar):has(.rs-pinned-keep) .page.rs .dock.rs-pinned-bar.rs-pinned-keep .btn.ghost-btn {
    background: transparent;
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.55);
  }

  /* dock notes: ONE line in the area, light on navy (the whole list is in the page) */
  body:has(nav.tabbar):has(.rs-pinned-keep) .dock.rs-pinned-bar.rs-pinned-keep > :is(.needs, .dock-note, p:not(.btn)) {
    flex: 1 0 100%;
    min-height: 0;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    overflow-wrap: normal;
    text-align: left;
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.875rem;
    line-height: 1.3;
  }

  body:has(nav.tabbar):has(.rs-pinned-keep) .dock.rs-pinned-bar.rs-pinned-keep .needs .ok-line,
  body:has(nav.tabbar):has(.rs-pinned-keep) .dock.rs-pinned-bar.rs-pinned-keep summary {
    color: var(--aqua);
  }

  /* a confirm still opens in the area (capped at 33dvh by the rule above) */
  body:has(nav.tabbar):has(.rs-pinned-keep) .dock.rs-pinned-bar.rs-pinned-keep > .confirm {
    flex: 1 0 100%;
  }


  /* the page reserves the area (dock + tabs); the tab bar is 0.75rem lower than --tab-h assumed, so the room is only more */
  body:has(nav.tabbar):has(.rs-pinned-keep) .page.has-dock {
    padding-bottom: calc(max(var(--dock-h, 0px), 5.5rem) + var(--area-tab-h) + var(--space-8));
  }
}

/* ---------------- ROOM RULE (BQ-4500; FLOW-CREATE-AND-PUBLISH-EVENT, O04 + G26, every docked screen) ----------------
   Shell.tsx syncRoom() marks <html data-room="short"> when header + dock + tab bar would take more than 60% of the room (a phone at 200%
   text/zoom). Then the header steps away (Shell), the SAME dock element draws in the flow at the end of the page (never fixed, never over
   the note or the button), --dock-h reads 0px so the page does not reserve it twice, and the tab bar stays fixed (the way around). */
@media (max-width: 1023.98px) {
  html[data-room="short"] .dock.rs-pinned-bar.rs-pinned-keep,
  html[data-room="short"] body:has(nav.tabbar):has(.rs-pinned-keep) .dock.rs-pinned-bar.rs-pinned-keep,
  html[data-room="short"] body:has(nav.tabbar):has(.rs-pinned-keep) .page.rs .dock.rs-pinned-bar.rs-pinned-keep {
    position: static;
    max-height: none;
    overflow: visible;
    margin-top: var(--space-4, 1rem);
  }

  html[data-room="short"] body:has(nav.tabbar):has(.rs-pinned-keep) .page.has-dock,
  html[data-room="short"] .page.has-dock {
    padding-bottom: calc(var(--area-tab-h, var(--tab-h, 0px)) + var(--space-8));
  }
}


/* the page of a pinned (kept) dock reserves the dock's room again (the in-flow rule above reserves none) */
@media (max-width: 1023.98px) {
  .page.has-dock:has(> .rs-pinned-keep) {
    padding-bottom: calc(max(var(--dock-h, 0px), 5.5rem) + var(--tab-h, 0px) + var(--space-8) + max(var(--toast-room, 0px), var(--toast-h, 0px) + 0.5rem));
  }
}

/* ---------------- PinnedBar variants (BQ-4581; the app shell, IN-0157 / UF-166) ----------------
   edge="top": a bar pinned to the TOP edge (sticky) - the header (.top). variant="toast": a floating status bar over the page, offset by the
   tab bar (phone, bottom) / the side nav (desk) - the toast. Their pin declarations are in ds/layout-shell.css (moved from style.css), keyed on
   these classes AND on the shell's own class names, so the shell's look is unchanged. */
.rs-pinned-edge-top {
  position: sticky;
  top: 0;
  z-index: 5;
}

.rs-pinned-toast {
  position: fixed;
}

/* the backdrop strip under the status bar (safe-area-inset-top): a src/ds rule, set on body by the shell (body::before) or on any
   element carrying .rs-backdrop */
.rs-backdrop::before {
  content: '';
  position: fixed;
  inset: 0 0 auto 0;
  height: env(safe-area-inset-top);
  z-index: 7;
  pointer-events: none;
}

/* BQ-4698 / FLOW-SOLO-REGISTRATION-PAID-BY-CARD / FLOW-TEAM-REGISTRATION-SPLIT-SHARES /
   FLOW-GOLFER-CHECKS-IN-INSIDE-THE-WINDOW / FLOW-SPONSOR-BUYS-AN-EVENT-SPONSORSHIP:
   Status is measured by Shell. The ordinary dock is in the page, so it contributes
   no fixed bottom offset or extra room. Keep baseline room after dismissal. */
.toast.rs-pinned-toast {
  bottom: calc(var(--tab-h, 0px) + var(--space-2, 0.5rem));
}

.page,
.page.has-dock {
  padding-bottom: calc(var(--tab-h, 0px) + var(--space-8) + max(var(--toast-room, 0px), var(--toast-h, 0px) + var(--space-2, 0.5rem)));
}

/* A retained fixed dock still needs its own measured clearance. */
@media (max-width: 1023.98px) {
  body:has(.rs-pinned-keep) .toast.rs-pinned-toast {
    bottom: calc(var(--tab-h, 0px) + var(--dock-h, 0px) + var(--space-2, 0.5rem));
  }
  .page.has-dock:has(.rs-pinned-keep) {
    padding-bottom: calc(var(--tab-h, 0px) + var(--dock-h, 0px) + var(--space-8) + max(var(--toast-room, 0px), var(--toast-h, 0px) + var(--space-2, 0.5rem)));
  }
  html[data-room="short"] body:has(.rs-pinned-keep) .toast.rs-pinned-toast {
    bottom: calc(var(--tab-h, 0px) + var(--space-2, 0.5rem));
  }
  html[data-room="short"] .page.has-dock:has(.rs-pinned-keep) {
    padding-bottom: calc(var(--tab-h, 0px) + var(--space-8) + max(var(--toast-room, 0px), var(--toast-h, 0px) + var(--space-2, 0.5rem)));
  }
}

/* FLOW-STAFF-SEES-PAID-JOINS-REFUSED-WITH-NO-REFUND, FLOW-STAFF-SEES-A-COURSES-CONTACTS
   PL-1839 / BQ-4869: the shared header label gets its full intrinsic line before
   wrapping beside bounded role controls. It must never ellipsize at large text. */
.switch-bar[data-testid="switch-bar"] {
  flex-wrap: wrap;
}
.switch-bar[data-testid="switch-bar"] .you {
  flex: 1 1 auto;
  min-inline-size: 0;
  max-inline-size: 100%;
  overflow: visible;
  white-space: normal;
  text-overflow: clip;
  overflow-wrap: anywhere;
}
