/* The language and units switcher (./Switcher.tsx): flat, solid fills, one radius, spacing between rows and no lines. Colours come from the page's own
   tokens (the member area's v3 set, the quiz's), with plain fallbacks; nothing here is a brand's. */
.ch, .ch-sheet { --ch-r: 14px; --ch-ink: var(--v3-ink, var(--text, #1a1a1f)); --ch-muted: var(--v3-muted, var(--text-muted, #6b6b74)); --ch-bg: var(--v3-bg, var(--bg, #fff)); --ch-row: var(--v3-dot, color-mix(in srgb, var(--ch-ink) 7%, transparent)); --ch-accent: var(--v3-accent, var(--accent, var(--ch-ink))); }
.ch { display: flex; justify-content: center; margin: 12px 0 0; }
/* Beside the member area's bottom bar (below 900 px, where .ap-nav is fixed: a 62 px tab and 6 px over and under, ../account/diet/player.css) the opener, appended after the
   page, overlaps nothing: the page gives up its 110 px bottom padding and the opener follows it in the flow, its own margin clearing the bar and the safe area. Pulled over
   the page, the page's box takes the tap; lifted, it lies over the bar. */
@media (max-width: 899px) {
  body:has(.ch) .has-segments:has(.ap-app) { padding-bottom: 0; }
  body:has(.has-segments .ap-app) .ch { margin-bottom: calc(86px + env(safe-area-inset-bottom)); }
}
.ch-open { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; border: 0; background: none; color: var(--ch-muted); font: 400 15px/1.3 var(--font, inherit); cursor: pointer; }
/* The member area's You has a Units row that opens this sheet (web/src/account/Account.tsx sets data-units-row): the units-only opener leaves the foot (its wrapper's spacing stays). */
html[data-units-row] .ch-open.is-units { display: none; }
.ch-open svg, .ch-x svg, .ch-row svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.ch-open:focus-visible, .ch-x:focus-visible, .ch-row:focus-visible { outline: 2px solid var(--ch-accent); outline-offset: 2px; }
.ch-sheet::backdrop { background: rgba(20, 20, 24, .32); }
.ch-sheet { position: fixed; inset: auto 0 0 0; margin: 0; width: 100%; max-width: none; max-height: 92dvh; overflow-y: auto; box-sizing: border-box; padding: 0; border: 0; border-radius: 22px 22px 0 0; background: var(--ch-bg); color: var(--ch-ink); font-family: var(--font, inherit); outline: 0; }
.ch-in { padding: 12px 20px calc(20px + env(safe-area-inset-bottom)); }
.ch-head { display: flex; align-items: center; justify-content: space-between; min-height: 48px; }
.ch-head h2 { margin: 0; font: 650 20px/1.25 var(--font, inherit); }
.ch-x { display: grid; place-items: center; width: 44px; height: 44px; margin-right: -10px; border: 0; background: none; color: var(--ch-ink); cursor: pointer; }
.ch-sheet section { margin-top: 18px; }
.ch-sheet h3 { margin: 0 0 6px; font: 500 15px/1.3 var(--font, inherit); color: var(--ch-muted); }
.ch-list { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.ch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; box-sizing: border-box; width: 100%; min-height: 48px; padding: 0 14px; border: 0; border-radius: var(--ch-r); background: none; color: var(--ch-ink); font: 520 17px/1.3 var(--font, inherit); text-align: left; cursor: pointer; }
.ch-row[aria-current="true"] { background: var(--ch-row); }
.ch-row[aria-current="true"] svg { color: var(--ch-accent); }
.ch-row:disabled { opacity: .6; cursor: default; }
.ch-select { box-sizing: border-box; width: 100%; min-height: 48px; padding: 0 14px; border: 0; border-radius: var(--ch-r); background: var(--ch-row); color: var(--ch-ink); font: 520 17px/1.3 var(--font, inherit); }
.ch-select:focus-visible { outline: 2px solid var(--ch-accent); outline-offset: 2px; }
.ch-zone { margin: 0; padding: 0 14px; font: 520 17px/1.3 var(--font, inherit); }
.ch-note { margin: 4px 0 0; padding: 0 14px; font: 400 14px/1.4 var(--font, inherit); color: var(--ch-muted); }
.ch-sheet h3 label { font: inherit; color: inherit; }
.ch-failed { margin: 16px 0 0; font: 400 15px/1.4 var(--font, inherit); color: var(--ch-muted); }
@media (min-width: 900px) {
  .ch-sheet::backdrop { background: rgba(20, 20, 24, .12); }
  .ch-sheet { inset: 50% auto auto 50%; width: 400px; max-height: 80dvh; border-radius: var(--ch-r); transform: translate(-50%, -50%); }
}
@media (prefers-reduced-motion: no-preference) {
  .ch-sheet { animation: ch-in .3s cubic-bezier(.2, .9, .3, 1) both; }
  @media (min-width: 900px) { .ch-sheet { animation: none; } }
  @keyframes ch-in { from { transform: translateY(100%); } to { transform: none; } }
}
