/* Pulse design system: global entry point. The token and primitive files are inlined here (in their @import order) so the browser fetches one stylesheet instead of a chain of 15. */

/* ---- tokens/fonts.css ---- */
/*
 * Self-hosted webfaces. Both files ship with the app (public/fonts) and are
 * declared by hand rather than through next/font: next/font emits its preload
 * links with crossorigin="", font requests are CORS-mode by spec, and under
 * Capacitor's custom scheme (capacitor://localhost) those requests fail the
 * CORS check — the face never loads and the WebView silently falls back to a
 * system font. Declaring them here means same-origin, no preflight.
 *
 * Latin subsets only; this product ships in English.
 */
@font-face{font-family:'Manrope';font-style:normal;font-weight:200 800;font-display:swap;src:url('assets/fonts/manrope-variable.woff2') format('woff2')}
@font-face{font-family:'Space Mono';font-style:normal;font-weight:400;font-display:swap;src:url('assets/fonts/space-mono-400.woff2') format('woff2')}
@font-face{font-family:'Space Mono';font-style:normal;font-weight:700;font-display:swap;src:url('assets/fonts/space-mono-700.woff2') format('woff2')}


/* ---- tokens/colors.css ---- */
/*
 * Pulse MEMBER colours. Namespace --pulse-*.
 *
 * Every value is fixed by the design handoff except the accent, which is
 * injected onto <html> at runtime from the tenant's gym.primary_colour. The
 * values below are the fallbacks so a paint before hydration is never
 * unstyled; #F7941D — the orange in the Pulse Gym logo — is the Pulse default.
 *
 * The darks are NEUTRAL greys. The handoff's darks carried a cool cast (blue a
 * few points above red and green — #0C0C11 is 12/12/17), which on a real
 * display reads as dark blue rather than as depth. The relative steps are the
 * handoff's; only the hue is dropped.
 */
:root{
  /* ---- Surfaces ---- */
  --pulse-ground:#070707;
  --pulse-surface:#0e0e0e;
  --pulse-disc:radial-gradient(70% 70% at 50% 38%,#141414,#090909 72%); /* @kind color */
  /* Product photography sits on its own surface, not the page: the shots are
     transparent cut-outs, so a black glove would disappear into a black page.
     Deliberately not the accent and not pure white, which glares. */
  --pulse-product-tile:#e8e8e9;

  /* ---- Lines and fills ---- */
  --pulse-hairline:rgba(255,255,255,0.06);
  --pulse-hairline-strong:rgba(255,255,255,0.1);
  --pulse-field-border:rgba(255,255,255,0.12);
  --pulse-fill-subtle:rgba(255,255,255,0.03);
  --pulse-fill-raised:rgba(255,255,255,0.06);

  /* ---- Text: five steps, brightest to faintest ---- */
  --pulse-text-primary:#ffffff;
  --pulse-text-body:#e4e4e7;
  --pulse-text-secondary:#b4b5bd;
  --pulse-text-muted:#94959e;
  --pulse-text-faint:#7a7b84;

  /* ---- Status: NEVER themed ----
     A member must read status identically in every gym's app, so these do not
     derive from the accent. */
  --pulse-success:#34d17e;
  --pulse-success-16:rgba(52,209,126,0.16);
  --pulse-warning:#e0a63c;
  --pulse-warning-16:rgba(224,166,60,0.16);
  --pulse-danger:#f2384e;
  --pulse-danger-16:rgba(242,56,78,0.16);
  --pulse-danger-soft:#e8663d;
  --pulse-danger-soft-16:rgba(232,102,61,0.16);

  /* ---- Accent, at the handoff's five alpha steps ----
     1.00 buttons, active nav, links, arc stroke
     0.60 disc glow when the code is open
     0.45 disc glow at rest, badge borders
     0.16 background bloom, selected-chip fill
     0.08 focused OTP box
     0    gradient terminator */
  --pulse-accent:#f7941d;
  --pulse-accent-rgb:247,148,29; /* @kind color */
  --pulse-accent-60:rgba(247,148,29,0.6);
  --pulse-accent-45:rgba(247,148,29,0.45);
  --pulse-accent-16:rgba(247,148,29,0.16);
  --pulse-accent-08:rgba(247,148,29,0.08);
  --pulse-accent-00:rgba(247,148,29,0);
  /* Chosen by relative luminance, not hardcoded: a gym with a pale accent
     (lime, yellow) would otherwise get unreadable white-on-light buttons.
     The app's rule is luminance > 0.55 -> #0A0A0C, else #FFFFFF.
     The brand orange sits at 0.41, so that rule returns white — which is only
     2.3:1 on #F7941D and fails on a 56px button. The fallback here is
     near-black (9.2:1). Worth lowering the app's threshold to ~0.40 to match. */
  --pulse-accent-fg:#0a0a0c;
}


/* ---- tokens/colors-admin.css ---- */
/*
 * Pulse ADMIN colours. Namespace --adm-*.
 *
 * Deliberately a separate namespace from --pulse-*, not an alias of it. The two
 * systems must not bleed: on member screens the accent is what you ACT on, and
 * in admin it is a DATA colour marking live bars, capacity fills, the active
 * nav row, selected days and changed fields — never a button. Keeping the names
 * apart means a component cannot inherit the wrong system's meaning.
 */
:root{
  /* ---- Surfaces. Neutral greys, not blue-black. ---- */
  --adm-page:#070707;
  --adm-surface:#0e0e0e;
  /* The drawer and nav sit a touch lighter than the cards. */
  --adm-raised:#0c0c0c;
  --adm-dialog:#151515;

  /* ---- Lines and fills ---- */
  --adm-hairline:rgba(255,255,255,0.07);
  --adm-hairline-strong:rgba(255,255,255,0.1);
  --adm-line:rgba(255,255,255,0.09);
  --adm-border:rgba(255,255,255,0.14);
  /* An editable field's underline: heavier than a hairline, so a field reads
     as a field beside the facts in the same sheet. The rule IS the affordance. */
  --adm-field-border:rgba(255,255,255,0.22);
  --adm-fill:rgba(255,255,255,0.05);
  --adm-fill-raised:rgba(255,255,255,0.07);
  --adm-track:rgba(255,255,255,0.08);

  /* ---- Text: six steps ---- */
  --adm-text-hi:#ffffff;
  --adm-text:#e5e5e5;
  --adm-text-mid:#b6b6b6;
  --adm-text-muted:#969696;
  --adm-text-low:#7b7b7b;
  --adm-text-dim:#5f5f5f;
  --adm-on-light:#0b0b10;

  /* ---- Primary button fill. NEUTRAL, deliberately. ---- */
  --adm-btn:#e4e4e7;
  --adm-btn-dim:#c9cad0;

  /* ---- Status: never themed. Admin's red is #E0483C, a shade off the
     member app's #F2384E — both are the handoff's. ---- */
  --adm-success:#34d17e;
  --adm-success-16:rgba(52,209,126,0.16);
  --adm-warning:#f59e0b;
  --adm-warning-16:rgba(245,158,11,0.16);
  --adm-warning-40:rgba(245,158,11,0.4);
  --adm-danger:#e0483c;
  --adm-danger-16:rgba(224,72,60,0.16);
  --adm-danger-40:rgba(224,72,60,0.4);
  --adm-neutral:#4a4b52;

  /* ---- Accent fallbacks. Admin uses a 0.12 nav wash the member app has no
     use for, which is why the alpha steps differ.
     The fallback is the brand orange #F7941D, same as the member default; the
     codebase's #F5853F was a near-miss of the logo colour. ---- */
  --adm-accent:#f7941d;
  --adm-accent-rgb:247,148,29; /* @kind color */
  --adm-accent-45:rgba(247,148,29,0.45);
  --adm-accent-16:rgba(247,148,29,0.16);
  --adm-accent-12:rgba(247,148,29,0.12);
  --adm-accent-08:rgba(247,148,29,0.08);
  --adm-accent-fg:#0a0a0c;
}


/* ---- tokens/typography.css ---- */
/*
 * Type. Two faces, one rule: mono for labels, counts and status; sans for
 * anything a human wrote.
 *
 * Named directly rather than through next/font's generated --font-manrope,
 * because that variable only exists on elements carrying next/font's class.
 */
:root{
  --pulse-font-sans:'Manrope',ui-sans-serif,system-ui,sans-serif;
  --pulse-font-mono:'Space Mono',ui-monospace,monospace;
  --adm-font-sans:'Manrope',ui-sans-serif,system-ui,sans-serif;
  --adm-font-mono:'Space Mono',ui-monospace,monospace;
}


/* ---- tokens/spacing.css ---- */
/*
 * Metrics. Both surfaces cap their content column at 600px: neither app has a
 * tablet layout and neither needs one — the cap keeps every fixed px size and
 * the gutter correct, so no screen inside has to change. Below that width it
 * is a no-op, so phones are untouched.
 */
:root{
  /* ---- Member ---- */
  --pulse-shell-max:600px;
  --pulse-gutter:28px;
  --pulse-gutter-sheet:24px;
  --pulse-gutter-nav:20px;
  --pulse-header-h:56px;
  --pulse-home-inset:34px;
  --pulse-dock-h:61.6px;
  /* Space below the dock's touch row. On a device with a home indicator the
     system inset reserves it; on one without, the design still wants air. */
  --pulse-dock-inset:max(var(--safe-bottom,0px),12px); /* @kind spacing */
  /* Room the scroll content must leave so the dock never covers it. */
  --pulse-dock-clearance:calc(var(--pulse-dock-h) + var(--pulse-dock-inset) + 12px); /* @kind spacing */

  /* ---- Admin ---- */
  --adm-shell-max:600px;
  --adm-gutter:20px;
  --adm-header-h:56px;
  --adm-nav-w:302px;
}

/*
 * Minimum tap target, applied as a mixin-by-convention. The design states 44px
 * WITHOUT EXCEPTION; a utility that shrinks a control visually must still route
 * through .pulse-tap so the hit area survives.
 */
.pulse-tap{min-width:44px;min-height:44px}


/* ---- tokens/radii.css ---- */
/*
 * Radii. Two distinct families, and the difference is the point: the member app
 * runs to fully-rounded pills and 28px buttons; admin is tighter and more
 * rectilinear, because it is a dense data surface.
 */
:root{
  /* ---- Member ---- */
  --pulse-r-pill:999px;
  --pulse-r-btn:28px;
  --pulse-r-card:16px;
  --pulse-r-panel:20px;
  --pulse-r-field:14px;
  --pulse-r-thumb:14px;
  --pulse-r-chip:22px;
  --pulse-r-micro:9px;
  --pulse-r-code:22px;

  /* ---- Admin ---- */
  --adm-r-row:10px;
  --adm-r-chip:9px;
  --adm-r-card:14px;
  --adm-r-panel:20px;
  --adm-r-sheet:24px;
  --adm-r-pill:999px;
}


/* ---- tokens/motion.css ---- */
/*
 * Motion. Curves are named for WHAT THEY MOVE, not for their shape, so call
 * sites read clearly.
 *
 * --pulse-ease-push is the house curve: a sharp ease-out that covers ~90% of
 * its travel in the first third. That is worth knowing before tuning a
 * duration — at 400ms on this curve a fade is effectively finished in ~130ms
 * no matter what the number says.
 *
 * --pulse-ease-overshoot is the one deliberate bounce in the whole system, and
 * it appears in exactly three places: the checkbox tick, the plan radio dot,
 * and the access code arriving.
 */
:root{
  --pulse-ease-push:cubic-bezier(0.33,1,0.68,1); /* @kind other */
  --pulse-ease-morph:cubic-bezier(0.65,0,0.35,1); /* @kind other */
  --pulse-ease-confirm:cubic-bezier(0.25,0.8,0.3,1); /* @kind other */
  --pulse-ease-overshoot:cubic-bezier(0.34,1.4,0.64,1); /* @kind other */

  --pulse-dur-tab:260ms; /* @kind other */
  --pulse-dur-push:420ms; /* @kind other */
  --pulse-dur-auth:440ms; /* @kind other */
  --pulse-dur-sheet:460ms; /* @kind other */
  --pulse-dur-morph:700ms; /* @kind other */

  /* Admin shares the curve. Tabs cross-fade with an 8px rise and no lateral
     slide, which would imply a left-to-right order the drawer does not have. */
  --adm-ease:cubic-bezier(0.33,1,0.68,1); /* @kind other */
  --adm-dur-fade:200ms; /* @kind other */
  --adm-dur-rise:300ms; /* @kind other */
  --adm-dur-nav:380ms; /* @kind other */
  --adm-dur-sheet:420ms; /* @kind other */
}

/* Reduced motion: stop the arcs, drop morphs to plain crossfades. */
@media (prefers-reduced-motion:reduce){
  :root{
    --pulse-dur-tab:0ms; /* @kind other */--pulse-dur-push:0ms; /* @kind other */--pulse-dur-auth:0ms; /* @kind other */
    --pulse-dur-sheet:0ms; /* @kind other */--pulse-dur-morph:0ms; /* @kind other */
    --adm-dur-fade:0ms; /* @kind other */--adm-dur-rise:0ms; /* @kind other */--adm-dur-nav:0ms; /* @kind other */--adm-dur-sheet:0ms; /* @kind other */
  }
}


/* ---- primitives/member.css ---- */
/*
 * Pulse member app — primitives.
 *
 * Typography, controls and surfaces shared across every member screen. Screen
 * specific layout lives in its own file; anything used twice belongs here.
 *
 * All classes are prefixed `pulse-` so they cannot collide with the Tailwind
 * utilities the admin dashboard still uses.
 */

/* ============================================================
   Screen shell
   ============================================================ */

/*
 * The member app is a single dark theme. `.pulse-app` is applied to <body> by
 * the member layout so the ground colour covers overscroll on iOS too.
 *
 * This is a native app, not a web page: nothing should be selectable, no
 * long-press callout should appear, and no element should be draggable. Left
 * alone, iOS highlights the ring's label on a long press and drags a
 * translucent ghost of it toward the finger.
 */
.pulse-app {
  background: var(--pulse-ground);
  color: var(--pulse-text-body);
  font-family: var(--pulse-font-sans);
  -webkit-font-smoothing: antialiased;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

.pulse-app *,
.pulse-app *::before,
.pulse-app *::after {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

/*
 * Images must never drag out as a ghost. Icons stay pointer-transparent so a
 * tap always lands on the button that owns them rather than the glyph.
 */
.pulse-app img {
  -webkit-user-drag: none;
  user-drag: none;
}

.pulse-app button svg,
.pulse-app button img {
  pointer-events: none;
}

/*
 * Text the member may legitimately want to copy — their member number, a pass
 * code, an order reference — opts selection back in.
 */
.pulse-app .pulse-selectable,
.pulse-app input,
.pulse-app textarea {
  -webkit-user-select: text;
  user-select: text;
}

/*
 * The app shell, locked to the viewport.
 *
 * ---- Why fixed rather than `min-height: 100dvh` ----
 *
 * In normal flow this box grows past the viewport, so the DOCUMENT scrolls —
 * and `html, body` carries `overscroll-behavior: contain`, which suppresses
 * the rubber-band. That is why the member app ended lists in a hard stop while
 * admin bounced: not nesting, and not `-webkit-overflow-scrolling`, which both
 * sides already had. Admin's `.pulse-adm` is `position: fixed; inset: 0;
 * overflow: hidden`, so its own scroller is the only thing that can move and
 * the bounce is always its own.
 *
 * Making `overflow-y: scroll` on `.pulse-scroll` was not enough by itself:
 * that made it *a* scroller, but the document was still the one moving under
 * the finger.
 *
 * The dock is already `position: fixed`, so it is unaffected by this.
 */
.pulse-screen {
  position: fixed;
  top: 0;
  bottom: 0;
  /*
   * `left`/`right` are deliberately `auto` rather than `0`.
   *
   * `inset: 0` would pin both edges, and a pinned pair beats `max-width` — the
   * exact trap the fixed layers below carry a note about. On a tablet that
   * would stretch the whole app across the screen while the dock stayed
   * correctly centred. `margin-inline: auto` in the large-screen block does
   * the centring; this only has to not fight it.
   */
  left: auto;
  right: auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--pulse-ground);
}

/*
 * Full-screen loading state.
 *
 * Centring a spinner by adding align/justify to .pulse-screen is not enough:
 * the spinner's wrapper is a flex child with no basis, so in a column container
 * it collapses and the member sees an empty dark screen with no sign anything
 * is happening. This centres it and stops it shrinking.
 */
.pulse-loading {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-height: 100dvh;
  background: var(--pulse-ground);
}

.pulse-loading > * {
  flex: none;
}

.pulse-loading__note {
  font-family: var(--pulse-font-mono);
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--pulse-text-muted);
}

/* Gutter used by every screen-level block. */
.pulse-gutter {
  padding-left: var(--pulse-gutter);
  padding-right: var(--pulse-gutter);
}

/*
 * Scroll region that clears the dock. Vertical only: nothing in the member app
 * scrolls sideways, so any element that overflows its width is a bug and should
 * be clipped rather than allowed to pan the screen.
 */
.pulse-scroll {
  flex: 1;
  min-height: 0;
  /*
   * `scroll`, not `auto`.
   *
   * With `auto`, iOS gives a container no rubber-band until its content
   * actually overflows — and on a short tab (a small shop, a quiet day on
   * Classes) it does not, so the scroller silently becomes the document and
   * the list ends in a hard stop. Admin's tabs bounce because their content
   * always overflows a fixed-height flex column, not because of any different
   * property, which is why matching the properties alone did not fix this.
   *
   * `scroll` makes this element the scroller unconditionally, so the bounce is
   * always its own. `overscroll-behavior` is deliberately NOT set: `contain`
   * and `none` both suppress the rubber-band at the ends, which is the whole
   * point here. Chaining to the document is already blocked by `contain` on
   * `html, body` in globals.css.
   */
  overflow-y: scroll;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding-bottom: var(--pulse-dock-clearance);
}

.pulse-app {
  overflow-x: hidden;
}

/* Status-bar inset. Height comes from the device, not a fixed 44px. */
.pulse-statusbar {
  flex: none;
  height: var(--safe-top, 0px);
}

/*
 * Header row. Deliberately slim: gym logo left, cart right, nothing else. The
 * screen heading belongs to the screen, not the chrome.
 */
.pulse-header {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--pulse-header-h);
  padding: 0 var(--pulse-gutter);
  background: transparent;
}

/*
 * The logo is a button, so it obeys the 44px minimum like everything else. It
 * was a 28px box, which is the mark's size, not a tap target — the difference
 * is why it was awkward to hit. Negative margin pulls the larger box back so
 * the mark stays optically aligned with the gutter.
 */
.pulse-header__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 44px;
  height: 44px;
  margin-left: -8px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: none;
  overflow: hidden;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.pulse-header__logo:active {
  opacity: 0.7;
}

/* The mark stays its own size inside the larger tap target. */
.pulse-header__logo img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

/*
 * The app's one loading mark: a single accent arc, echoing the access ring's
 * rotating arcs so a wait belongs to the same system as everything else.
 *
 * Before the gym has loaded there is no accent to use. Rather than flash a
 * placeholder colour that is not the gym's, the spinner starts neutral and
 * picks up the accent once it is known — `data-pulse-theme` is set on <html>
 * by ThemeProvider at the same moment the real colour arrives.
 */
.pulse-arc-spinner {
  display: inline-block;
  flex: none;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-top-color: var(--pulse-text-secondary);
  animation: pulse-spin 760ms linear infinite;
}

[data-pulse-theme] .pulse-arc-spinner {
  border-color: var(--pulse-accent-16);
  border-top-color: var(--pulse-accent);
}

@media (prefers-reduced-motion: reduce) {
  .pulse-arc-spinner {
    animation-duration: 2s;
  }
}

/* Inline spinner for buttons mid-action, inheriting the button's colour. */
.pulse-spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: pulse-spin 700ms linear infinite;
}

@keyframes pulse-spin {
  to {
    transform: rotate(360deg);
  }
}

/*
 * Launch passes through several separate loading gates — ClientOnly, the
 * session resolve, the gym fetch, the auth gate — which render the same screen
 * but are distinct mounts. Anchoring the animation to a negative delay means a
 * remounted spinner picks up mid-rotation rather than snapping back to the
 * start, so the sequence reads as one continuous wait instead of several.
 */
.pulse-loading .pulse-arc-spinner {
  animation-delay: -380ms;
}

/* ============================================================
   Typography
   ============================================================ */

.pulse-h1 {
  font-family: var(--pulse-font-sans);
  font-size: 29px;
  font-weight: 300;
  letter-spacing: 0.01em;
  line-height: 1.2;
  color: var(--pulse-text-primary);
  margin: 0;
}

.pulse-h2 {
  font-family: var(--pulse-font-sans);
  font-size: 20px;
  font-weight: 400;
  line-height: 1.3;
  color: var(--pulse-text-primary);
  margin: 0;
}

/* Big numerals: member number, pass code, subtotal. */
.pulse-hero-num {
  font-family: var(--pulse-font-sans);
  font-size: 40px;
  font-weight: 200;
  letter-spacing: 0.07em;
  line-height: 1;
  color: var(--pulse-text-primary);
}

.pulse-body {
  font-size: 13.5px;
  font-weight: 300;
  line-height: 1.5;
  color: var(--pulse-text-secondary);
  margin: 0;
}

.pulse-value {
  font-size: 15px;
  font-weight: 400;
  color: var(--pulse-text-body);
}

/*
 * Micro-caps. Always uppercase, always mono, always at least one step dimmer
 * than the value it labels — that contrast is what makes the label recede.
 */
.pulse-micro {
  font-family: var(--pulse-font-mono);
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--pulse-text-muted);
}

.pulse-micro--sm {
  font-size: 8px;
  letter-spacing: 0.14em;
}

.pulse-micro--lg {
  font-size: 10px;
  letter-spacing: 0.2em;
}

/* Section head sitting on a hairline rule. */
.pulse-section-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.pulse-section-head::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--pulse-hairline);
}

/* ============================================================
   Buttons
   ============================================================ */

.pulse-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 56px;
  /* Hold the stated height in a flex column rather than squashing to fit. */
  flex: none;
  padding: 0 24px;
  border: 0;
  border-radius: var(--pulse-r-btn);
  font-family: var(--pulse-font-sans);
  font-size: 16px;
  font-weight: 600;
  color: var(--pulse-accent-fg);
  background: var(--pulse-accent);
  cursor: pointer;
  transition: transform 140ms var(--pulse-ease-push), filter 140ms ease,
    opacity 140ms ease;
  -webkit-tap-highlight-color: transparent;
}

.pulse-btn:active:not(:disabled) {
  transform: scale(0.975);
  filter: brightness(0.92);
}

.pulse-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.pulse-btn--sm {
  height: 52px;
  border-radius: 26px;
  font-size: 15px;
}

/* Quiet button: outline on ground, for secondary actions like Done. */
.pulse-btn--ghost {
  background: transparent;
  border: 1px solid var(--pulse-field-border);
  color: var(--pulse-text-body);
  font-weight: 500;
}

.pulse-btn--ghost:active:not(:disabled) {
  background: var(--pulse-fill-raised);
  filter: none;
}

/* Destructive: payment failed, cancel booking. Never themed. */
.pulse-btn--danger {
  background: var(--pulse-danger);
  color: #fff;
}

.pulse-btn--danger-soft {
  background: var(--pulse-danger-soft);
  color: #fff;
}

/*
 * Text link. Gets a 44px hit area via negative margins so it stays optically
 * aligned with the text around it while remaining tappable.
 */
.pulse-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  margin-top: -11px;
  margin-bottom: -11px;
  padding: 0 4px;
  background: none;
  border: 0;
  font-family: var(--pulse-font-sans);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--pulse-accent);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.pulse-link:active {
  opacity: 0.6;
}

.pulse-link--quiet {
  color: var(--pulse-text-muted);
}

/* Icon-only button. */
.pulse-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 44px;
  height: 44px;
  padding: 0;
  background: none;
  border: 0;
  color: var(--pulse-text-muted);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.pulse-icon-btn:active {
  opacity: 0.6;
}

/* Round back button that floats over a banner image. */
.pulse-back-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(7, 7, 7, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--pulse-text-primary);
  cursor: pointer;
}

.pulse-back-btn:active {
  opacity: 0.7;
}

/* ============================================================
   Fields
   ============================================================ */

/*
 * Fields.
 *
 * The label lives *inside* the box, as a small mono caption above the value,
 * making one self-contained 58px unit rather than a label-above-input pair.
 * That is the handoff's pattern and it is what makes a form read as this brand
 * instead of as a generic dark form.
 *
 * The border sits on `.pulse-field`, not the control, because the whole unit is
 * the field. The input inside is stripped back to text on a transparent ground,
 * and focus is expressed by the wrapper via :focus-within, so the lit edge
 * surrounds label and value together.
 */
.pulse-field {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  min-height: 58px;
  padding: 0 18px;
  border: 1px solid var(--pulse-field-border);
  border-radius: var(--pulse-r-field);
  background: var(--pulse-fill-subtle);
  cursor: text;
  transition: border-color 200ms ease, background 200ms ease;
}

.pulse-field:focus-within {
  border-color: var(--pulse-accent);
  background: var(--pulse-fill-raised);
}

.pulse-field:has(.pulse-input[aria-invalid='true']) {
  border-color: var(--pulse-danger);
}

.pulse-field__label {
  font-family: var(--pulse-font-mono);
  font-size: 8px;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--pulse-text-muted);
  pointer-events: none;
}

.pulse-input {
  width: 100%;
  min-height: 19px;
  flex: none;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-family: var(--pulse-font-sans);
  font-size: 15px;
  font-weight: 400;
  color: var(--pulse-text-body);
  outline: none;
  /* 16px would be needed to stop iOS zoom, but the viewport is user-scalable=no. */
  -webkit-appearance: none;
  appearance: none;
}

.pulse-input::placeholder {
  color: var(--pulse-text-faint);
}

/*
 * The error sits outside the box, so it must not inherit the field's own
 * border treatment — only the wrapper reacts to the invalid state.
 */
.pulse-input[aria-invalid='true'] {
  border: 0;
}

/*
 * Native select needs its own arrow once appearance is stripped. The arrow sits
 * against the control's own right edge, which is now inset by the field's
 * padding rather than being the box edge itself.
 */
.pulse-select {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394959E' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right center;
  padding-right: 24px;
}

.pulse-select:invalid,
.pulse-select[data-empty='true'] {
  color: var(--pulse-text-faint);
}

/*
 * The error sits below the box, outside the bordered unit. `.pulse-field` is
 * the box itself now, so the error is a sibling wrapped alongside it by
 * `.pulse-field-group` rather than a child.
 */
.pulse-field__error {
  font-size: 12.5px;
  font-weight: 400;
  color: var(--pulse-danger);
}

/*
 * Wraps a field with anything that must sit outside its border — today the
 * error line. Forms lay these out, not the bare fields.
 */
.pulse-field-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

/*
 * A block that sits in a form's flow but is not a text field: the photo picker,
 * a verification prompt. These previously borrowed `.pulse-field` for its column
 * layout, which was harmless when the field was an unpadded stack — but the
 * field is now a bordered box with only horizontal padding, so borrowing it left
 * the block visually cramped. This keeps the stacking without the box.
 */
.pulse-field-block {
  display: flex;
  flex-direction: column;
  padding: 4px 0;
}

/*
 * Checkbox. The tick is the one deliberate overshoot in the whole system.
 */
.pulse-check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-height: 44px;
  padding: 4px 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.pulse-check__box {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border: 1px solid var(--pulse-field-border);
  border-radius: 7px;
  background: var(--pulse-fill-subtle);
  color: var(--pulse-accent-fg);
  transition: background 180ms ease, border-color 180ms ease;
}

.pulse-check input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.pulse-check input:checked + .pulse-check__box {
  background: var(--pulse-accent);
  border-color: var(--pulse-accent);
}

.pulse-check__box svg {
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 140ms ease,
    transform 260ms var(--pulse-ease-overshoot);
}

.pulse-check input:checked + .pulse-check__box svg,
.pulse-check__box[data-checked='true'] svg {
  opacity: 1;
  transform: scale(1);
}

/*
 * The consent checkbox is a <button> carrying `data-checked`, not an <input>,
 * because a nested link inside a label cannot open a document without also
 * toggling the box. It therefore needs its own filled state.
 */
.pulse-check__box[data-checked='true'] {
  background: var(--pulse-accent);
  border-color: var(--pulse-accent);
}

.pulse-check__label {
  font-size: 13.5px;
  font-weight: 300;
  line-height: 1.45;
  color: var(--pulse-text-secondary);
  padding-top: 2px;
}

/* ============================================================
   Pills and chips
   ============================================================ */

.pulse-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: none;
  padding: 4px 8px;
  border-radius: var(--pulse-r-micro);
  font-family: var(--pulse-font-mono);
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
}

.pulse-pill--success {
  color: var(--pulse-success);
  background: var(--pulse-success-16);
}

.pulse-pill--full {
  color: var(--pulse-danger-soft);
  background: var(--pulse-danger-soft-16);
}

.pulse-pill--warning {
  color: var(--pulse-warning);
  background: var(--pulse-warning-16);
}

.pulse-pill--danger {
  color: var(--pulse-danger);
  background: var(--pulse-danger-16);
}

/* Scarcity is carried by the number, not by colour. */
.pulse-pill--neutral {
  color: #c9cad0;
  background: rgba(255, 255, 255, 0.07);
}

/* The only accent in a list. */
.pulse-pill--accent {
  color: var(--pulse-accent-fg);
  background: var(--pulse-accent);
  font-size: 8px;
  letter-spacing: 0.12em;
  padding: 3px 7px 3px 6px;
  border-radius: 8px;
}

/* Filter chip — 42px + 1px borders keeps the 44px tap target. */
.pulse-chip {
  flex: none;
  display: flex;
  align-items: center;
  /*
   * Spaces a leading icon from the label. The admin chips had the same gap
   * missing and the glyph sat against the text, reading as one clumped token.
   * Zero cost on a chip with no icon.
   */
  gap: 7px;
  height: 42px;
  padding: 0 17px;
  border: 1px solid var(--pulse-hairline-strong);
  border-radius: var(--pulse-r-chip);
  background: transparent;
  font-family: var(--pulse-font-mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--pulse-text-secondary);
  cursor: pointer;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}

.pulse-chip:active {
  background: rgba(255, 255, 255, 0.05);
}

.pulse-chip[aria-pressed='true'] {
  border-color: var(--pulse-accent);
  color: var(--pulse-accent);
  background: var(--pulse-accent-16);
}

/* ============================================================
   Cards, panels and rows
   ============================================================ */

.pulse-card {
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--pulse-r-card);
  background: var(--pulse-fill-subtle);
}

.pulse-card--accent {
  border-color: var(--pulse-accent);
  background: rgba(255, 255, 255, 0.03);
}

.pulse-panel {
  border: 1px solid var(--pulse-hairline-strong);
  border-radius: var(--pulse-r-panel);
  background: rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

/* Tappable row in a grouped list. */
.pulse-row {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 56px;
  padding: 15px 0;
  border: 0;
  background: none;
  text-align: left;
  color: inherit;
  font-family: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.pulse-row:active {
  background-color: rgba(255, 255, 255, 0.03);
}

.pulse-row + .pulse-row,
.pulse-row--ruled {
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.pulse-row__grow {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pulse-row__title {
  font-size: 15px;
  font-weight: 500;
  color: var(--pulse-text-primary);
}

.pulse-row__sub {
  font-size: 12.5px;
  font-weight: 300;
  color: var(--pulse-text-secondary);
}

/* Label/value pair, stacked or spread. */
.pulse-kv {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--pulse-hairline);
}

.pulse-kv__label {
  font-family: var(--pulse-font-mono);
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--pulse-text-muted);
}

.pulse-kv__value {
  font-size: 15px;
  font-weight: 400;
  color: var(--pulse-text-body);
  text-align: right;
}

/* Monogram circle — instructor, member avatar. */
.pulse-monogram {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  border-radius: 50%;
  background: var(--pulse-fill-raised);
  color: var(--pulse-text-body);
  font-weight: 400;
  overflow: hidden;
  object-fit: cover;
}

/* ============================================================
   Sheets
   ============================================================ */

.pulse-scrim {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(5, 5, 5, 0.72);
  opacity: 0;
  transition: opacity var(--pulse-dur-sheet) var(--pulse-ease-push);
}

.pulse-scrim[data-open='true'] {
  opacity: 1;
}

.pulse-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 61;
  /*
   * Capped, and scrollable once capped.
   *
   * Without the overflow a sheet taller than 88dvh was simply clipped and its
   * last elements became unreachable — the delete-account sheet lost its second
   * button entirely, because it is the tallest one (heading, body, a field and
   * two stacked buttons). Clipping is the wrong failure: the member cannot tell
   * there is anything below.
   */
  max-height: 88dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  /*
   * Clear the home indicator, nothing more.
   *
   * This used to pad by the full dock clearance, which was wrong: a sheet is
   * drawn *over* the dock, so it never needs to clear it. On a phone with a
   * home indicator that added ~116px of dead space under the buttons. The
   * handoff uses a flat 34px; the safe inset is honoured for devices whose
   * indicator is taller.
   */
  padding: 0 var(--pulse-gutter-sheet);
  border-radius: 28px 28px 0 0;
  background: var(--pulse-surface);
  /*
   * The lit top edge and the deep shadow under it are what make the sheet read
   * as a surface lifted off the page. Without them the panel is a flat block
   * whose slight cool cast reads as "blue" rather than as depth — both were in
   * the handoff and were missed on the first pass.
   */
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 -30px 70px -20px rgba(0, 0, 0, 0.9);
  transform: translateY(100%);
  transition: transform var(--pulse-dur-sheet) var(--pulse-ease-push);
}

.pulse-sheet[data-open='true'] {
  transform: translateY(0);
}

/*
 * The scrolling region. `min-height: 0` is the load-bearing part: without it a
 * flex item refuses to shrink below its content, so the sheet grew past its cap
 * and the last elements — the delete sheet's second button — were unreachable.
 */
.pulse-sheet__body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  /*
   * The home-indicator clearance lives here, inside the scroller, so the last
   * button can always be scrolled clear of it. On the sheet it sat outside the
   * scrolling area, which is why content could still end up underneath.
   */
  padding-bottom: max(var(--safe-bottom, 0px) + 12px, 34px);
}

.pulse-sheet__handle {
  flex: none;
  width: 38px;
  height: 4px;
  margin: 10px auto 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.18);
}

/* Rule above a totals block. */
.pulse-rule {
  height: 1px;
  background: var(--pulse-hairline-strong);
  border: 0;
  margin: 0;
}

/* ============================================================
   Misc
   ============================================================ */

/* Fixed-height slot for crossfading content, so nothing reflows mid-transition. */
.pulse-slot {
  position: relative;
}

.pulse-slot > * {
  transition: opacity 380ms ease;
}

.pulse-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ============================================================
   Segmented control
   ============================================================ */

/*
 * Two variables become two controls rather than a grid of cards. The indicator
 * slides between options instead of each option toggling its own fill.
 */
.pulse-segmented {
  position: relative;
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--pulse-hairline-strong);
  border-radius: var(--pulse-r-chip);
  background: var(--pulse-fill-subtle);
}

.pulse-segmented__indicator {
  position: absolute;
  top: 4px;
  left: 4px;
  bottom: 4px;
  border-radius: 20px;
  background: var(--pulse-accent);
  transition: transform 340ms var(--pulse-ease-push);
  pointer-events: none;
}

/*
 * 44px, not 40. This control changes the price the member is about to pay, so a
 * mis-tap is expensive — it does not get to be the one place that shaves the
 * minimum target.
 */
.pulse-segmented__option {
  position: relative;
  z-index: 1;
  flex: 1;
  min-width: 0;
  height: 44px;
  padding: 0 8px;
  border: 0;
  border-radius: 20px;
  background: none;
  font-family: var(--pulse-font-mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--pulse-text-secondary);
  white-space: nowrap;
  cursor: pointer;
  transition: color 240ms ease;
  -webkit-tap-highlight-color: transparent;
}

.pulse-segmented__option[aria-checked='true'] {
  color: var(--pulse-accent-fg);
}

/* ============================================================
   Tier row — plan selection
   ============================================================ */

.pulse-tier {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 18px 0;
  border: 0;
  border-top: 1px solid var(--pulse-hairline);
  background: none;
  text-align: left;
  font-family: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.pulse-tier:active:not(:disabled) {
  background-color: rgba(255, 255, 255, 0.03);
}

.pulse-tier:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.pulse-tier__radio {
  flex: none;
  width: 22px;
  height: 22px;
  border: 1px solid var(--pulse-field-border);
  border-radius: 50%;
  transition: border-color 180ms ease, border-width 180ms ease;
}

.pulse-tier__radio[data-selected='true'] {
  border: 7px solid var(--pulse-accent);
}

.pulse-tier__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.pulse-tier__name {
  font-size: 16px;
  font-weight: 500;
  color: var(--pulse-text-primary);
}

.pulse-tier__desc {
  font-size: 12.5px;
  font-weight: 300;
  line-height: 1.4;
  color: var(--pulse-text-secondary);
}

.pulse-tier__price {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
}

.pulse-tier__amount {
  font-size: 22px;
  font-weight: 300;
  letter-spacing: 0.01em;
  color: var(--pulse-text-primary);
}

.pulse-tier__suffix {
  font-family: var(--pulse-font-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--pulse-text-muted);
}

/* Loading placeholder in the shape of the content it stands in for. */
.pulse-skeleton {
  border-radius: var(--pulse-r-field);
  background: var(--pulse-fill-raised);
  animation: pulse-skeleton 1.4s ease-in-out infinite;
}

@keyframes pulse-skeleton {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pulse-skeleton {
    animation: none;
  }
}

/* ============================================================
   Segmented control
   ============================================================ */

/*
 * Two variables become two controls rather than a grid of cards. The indicator
 * slides between options instead of each option toggling its own fill.
 */
.pulse-segmented {
  position: relative;
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--pulse-hairline-strong);
  border-radius: var(--pulse-r-chip);
  background: var(--pulse-fill-subtle);
}

.pulse-segmented__indicator {
  position: absolute;
  top: 4px;
  left: 4px;
  bottom: 4px;
  border-radius: 20px;
  background: var(--pulse-accent);
  transition: transform 340ms var(--pulse-ease-push);
  pointer-events: none;
}

/*
 * 44px, not 40. This control changes the price the member is about to pay, so a
 * mis-tap is expensive — it does not get to be the one place that shaves the
 * minimum target.
 */
.pulse-segmented__option {
  position: relative;
  z-index: 1;
  flex: 1;
  min-width: 0;
  height: 44px;
  padding: 0 8px;
  border: 0;
  border-radius: 20px;
  background: none;
  font-family: var(--pulse-font-mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--pulse-text-secondary);
  white-space: nowrap;
  cursor: pointer;
  transition: color 240ms ease;
  -webkit-tap-highlight-color: transparent;
}

.pulse-segmented__option[aria-checked='true'] {
  color: var(--pulse-accent-fg);
}

/* ============================================================
   Tier row — plan selection
   ============================================================ */

.pulse-tier {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 18px 0;
  border: 0;
  border-top: 1px solid var(--pulse-hairline);
  background: none;
  text-align: left;
  font-family: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.pulse-tier:active:not(:disabled) {
  background-color: rgba(255, 255, 255, 0.03);
}

.pulse-tier:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.pulse-tier__radio {
  flex: none;
  width: 22px;
  height: 22px;
  border: 1px solid var(--pulse-field-border);
  border-radius: 50%;
  transition: border-color 180ms ease, border-width 180ms ease;
}

.pulse-tier__radio[data-selected='true'] {
  border: 7px solid var(--pulse-accent);
}

.pulse-tier__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.pulse-tier__name {
  font-size: 16px;
  font-weight: 500;
  color: var(--pulse-text-primary);
}

.pulse-tier__desc {
  font-size: 12.5px;
  font-weight: 300;
  line-height: 1.4;
  color: var(--pulse-text-secondary);
}

.pulse-tier__price {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
}

.pulse-tier__amount {
  font-size: 22px;
  font-weight: 300;
  letter-spacing: 0.01em;
  color: var(--pulse-text-primary);
}

.pulse-tier__suffix {
  font-family: var(--pulse-font-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--pulse-text-muted);
}

/* Loading placeholder in the shape of the content it stands in for. */
.pulse-skeleton {
  border-radius: var(--pulse-r-field);
  background: var(--pulse-fill-raised);
  animation: pulse-skeleton 1.4s ease-in-out infinite;
}

@keyframes pulse-skeleton {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pulse-skeleton {
    animation: none;
  }
}


/* ============================================================
   Consent row (registration terms)
   ============================================================

   Split into a checkbox control and a separate links row. Nesting the document
   links inside the label made the whole row untappable: the links had to
   suppress the label's toggle, and they covered most of its width. */

/*
 * Consent row: a checkbox beside one flowing sentence.
 *
 * This was a toggle row stacked above a separate links row, which broke
 * "I agree to the gym's" onto its own line no matter the width. The links now
 * sit inline in the paragraph, so it wraps like prose.
 *
 * The checkbox is deliberately NOT a <label> wrapping the text: a nested button
 * inside a label cannot open a document without also toggling the checkbox, and
 * suppressing that made the whole row untappable.
 */
.pulse-consent {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

/* Its own 44px target, pulled back so the box aligns with the first line. */
.pulse-consent__box {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  flex: none;
  width: 44px;
  height: 44px;
  margin: -11px 0 0 -11px;
  padding: 11px 0 0 11px;
  border: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.pulse-consent__text {
  margin: 0;
  font-size: 13.5px;
  font-weight: 300;
  line-height: 1.5;
  color: var(--pulse-text-secondary);
}


/*
 * Inline in the sentence, so no min-height: a 36px box on an inline element
 * forces every line it touches to that height and the paragraph's spacing
 * blows apart. The 44px rule is met by the checkbox, which is the control; the
 * links are text that happens to be tappable.
 */
.pulse-consent__link {
  padding: 0;
  border: 0;
  background: none;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 400;
  line-height: 1.45;
  color: var(--pulse-accent);
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.pulse-consent__link:active {
  opacity: 0.6;
}

.pulse-consent__and {
  font-size: 13.5px;
  font-weight: 300;
  color: var(--pulse-text-secondary);
}

/* ============================================================
   Toasts
   ============================================================

   A centred pill floating above the dock, per the design: 48px tall, fully
   rounded, dark glass. Sonner handles queueing and timing but renders
   `unstyled` (see PulseToaster) — its own skin injects itself at runtime with
   higher specificity than this file, so overriding it was a losing game. */

.pulse-toast {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 24px;
  /* Neutral, matching the surfaces — see the note in tokens.css. */
  background: rgba(22, 22, 22, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 12px 30px -8px rgba(0, 0, 0, 0.8);
  box-sizing: border-box;
  font-family: var(--pulse-font-sans);
}

.pulse-toast__title {
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.35;
  color: var(--pulse-text-body);
}

.pulse-toast__desc {
  display: block;
  margin-top: 3px;
  font-size: 12.5px;
  font-weight: 300;
  line-height: 1.4;
  color: var(--pulse-text-secondary);
}

/*
 * Status colour lives in the icon, not the whole surface — the member reads
 * what happened from the text, and the icon says whether it worked.
 */
.pulse-toast__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 16px;
  height: 16px;
}

.pulse-toast--success .pulse-toast__icon {
  color: var(--pulse-success);
}

.pulse-toast--error .pulse-toast__icon {
  color: var(--pulse-danger);
}

.pulse-toast--warning .pulse-toast__icon {
  color: var(--pulse-warning);
}

.pulse-toast--info .pulse-toast__icon {
  color: var(--pulse-text-secondary);
}

/* A toast carrying a description stacks and aligns left; a bare one centres. */
.pulse-toast:has(.pulse-toast__desc) {
  justify-content: flex-start;
  align-items: flex-start;
  padding: 13px 20px;
}

.pulse-toast:has(.pulse-toast__desc) .pulse-toast__icon {
  margin-top: 1px;
}

/*
 * Toast PLACEMENT is not shipped by this design system.
 *
 * The app positions Sonner's container by setting its private --offset /
 * --mobile-offset-* variables from --pulse-dock-h and --pulse-dock-inset, at a
 * higher specificity than Sonner's own runtime stylesheet. Those are a
 * third-party library's internals rather than design tokens, so they are not
 * reproduced here; the rule is that the toast clears the dock generously and
 * reads as a message about what just happened rather than as bottom chrome.
 *
 * The toast's own skin — .pulse-toast and friends above — is the design.
 */

/* Icon badge introducing a permission sheet. */
.pulse-primer__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-top: 14px;
  border-radius: 50%;
  background: var(--pulse-accent-16);
  color: var(--pulse-accent);
}

/* ============================================================
   Membership chooser
   ============================================================ */

/*
 * Two steps: tier, then billing period.
 *
 * The single-screen version this replaces broke twice — a segmented period
 * control squeezed to unreadable at five periods, and the Continue button fell
 * off the bottom with more than three tiers. Splitting it means step one needs
 * no button at all, so tier count stops mattering.
 */
/*
 * Height is claimed only on step two, which pins a footer above the dock.
 *
 * Step one is a plain list that scrolls with the page. Forcing it into the same
 * fixed frame left the invisible footer still occupying its height, so the tier
 * list was clipped short with dead space beneath it — and nothing indicated
 * there were more tiers below.
 */
.pulse-plan {
  display: flex;
  flex-direction: column;
}

.pulse-plan[data-step='freq'] {
  height: calc(
    100dvh - var(--safe-top, 0px) - var(--pulse-header-h) -
      var(--pulse-dock-clearance)
  );
}

.pulse-plan__steps {
  display: flex;
  gap: 5px;
  padding: 0 var(--pulse-gutter);
  margin-bottom: 18px;
}

/*
 * Fixed frame. Both steps are absolutely positioned inside it and crossfade, so
 * nothing below reflows mid-transition.
 */
.pulse-plan__stage {
  position: relative;
  flex: 1;
  min-height: 0;
}

/*
 * On step one the steps flow rather than stack: absolute positioning is what
 * the crossfade needs, but it also caps the list at the frame height.
 */
.pulse-plan:not([data-step='freq']) .pulse-plan__step[data-active='true'] {
  position: relative;
  inset: auto;
}

.pulse-plan:not([data-step='freq']) .pulse-plan__scroll {
  overflow: visible;
}

/*
 * Kept in the layout and faded rather than unmounted: `display: none` cannot be
 * transitioned, and conditional rendering leaves nothing to animate out.
 * `visibility` is transitionable and takes the hidden step out of the tab order
 * once it has gone.
 */
.pulse-plan__step {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(26px);
  transition:
    opacity 300ms ease,
    visibility 460ms,
    transform 460ms var(--pulse-ease-push);
}

.pulse-plan__step[data-active='true'] {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(0);
}

/* The outgoing step leaves to the left, so back reverses the motion. */
.pulse-plan__step:not([data-active='true']) {
  transform: translateX(-26px);
}

/*
 * This scrolls, and has to.
 *
 * The two steps are absolutely positioned so they can crossfade in the same
 * space, which means the stage has a fixed height and anything taller is
 * clipped. Removing the overflow here to avoid nesting scrollers left a long
 * tier list with no way to reach the bottom.
 *
 * Nesting is fine in practice because the outer `.pulse-scroll` has nothing
 * left to scroll on this tab — the chooser fills it exactly.
 */
.pulse-plan__scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 0 var(--pulse-gutter) 16px;
}

/* ---- Step one: tiers ---- */

.pulse-plan__tier {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 18px 20px;
  margin-bottom: 12px;
  border: 1px solid var(--pulse-hairline);
  border-radius: 18px;
  background: var(--pulse-fill-subtle);
  color: var(--pulse-text-muted);
  text-align: left;
  cursor: pointer;
  transition: background 200ms ease, border-color 200ms ease;
}

.pulse-plan__tier:active {
  background: var(--pulse-fill-raised);
}

.pulse-plan__tier-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 0;
}

.pulse-plan__tier-name {
  font-size: 17px;
  font-weight: 400;
  color: var(--pulse-text-primary);
}

.pulse-plan__tier-desc {
  font-size: 12.5px;
  font-weight: 300;
  line-height: 1.45;
  color: var(--pulse-text-secondary);
}

/* The one number needed to choose access: the cheapest per-month rate. */
.pulse-plan__from {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin-top: 2px;
}

.pulse-plan__from-amount {
  font-size: 19px;
  font-weight: 300;
  color: var(--pulse-text-primary);
}

.pulse-plan__from-unit {
  font-size: 12.5px;
  font-weight: 300;
  color: var(--pulse-text-secondary);
}

/* ---- Step two: periods ---- */

.pulse-plan__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 20px;
  padding: 16px 20px;
  border: 1px solid var(--pulse-hairline);
  border-radius: 18px;
  background: var(--pulse-fill-subtle);
}

.pulse-plan__summary-body {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.pulse-plan__summary-name {
  font-size: 17px;
  font-weight: 400;
  color: var(--pulse-text-primary);
}

.pulse-plan__change {
  flex: none;
  min-height: 44px;
  padding: 0 4px;
  margin: 0 -4px;
  border: 0;
  background: none;
  font-family: inherit;
  font-size: 15px;
  font-weight: 400;
  color: var(--pulse-accent);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.pulse-plan__period {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 72px;
  padding: 14px 16px;
  margin-bottom: 10px;
  border: 1px solid var(--pulse-hairline);
  border-radius: 14px;
  background: var(--pulse-fill-subtle);
  text-align: left;
  cursor: pointer;
  transition: background 200ms ease, border-color 200ms ease;
}

.pulse-plan__period[data-selected='true'] {
  border-color: var(--pulse-accent);
  background: var(--pulse-accent-16);
}

.pulse-plan__radio {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 20px;
  height: 20px;
  border: 1.5px solid var(--pulse-field-border);
  border-radius: 50%;
  transition: border-color 200ms ease;
}

.pulse-plan__radio[data-selected='true'] {
  border-color: var(--pulse-accent);
}

/*
 * The dot scales in on the overshoot curve. One of only three places that curve
 * appears — the checkbox tick, this, and the access code arriving.
 */
.pulse-plan__radio-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--pulse-accent);
  transform: scale(0);
  transition: transform 240ms var(--pulse-ease-overshoot);
}

.pulse-plan__radio[data-selected='true'] .pulse-plan__radio-dot {
  transform: scale(1);
}

.pulse-plan__period-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 0;
}

.pulse-plan__period-label {
  font-family: var(--pulse-font-mono);
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--pulse-text-secondary);
}

.pulse-plan__period[data-selected='true'] .pulse-plan__period-label {
  color: var(--pulse-text-primary);
}

.pulse-plan__period-month {
  font-size: 12.5px;
  font-weight: 300;
  color: var(--pulse-text-muted);
}

.pulse-plan__period-price {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex: none;
}

.pulse-plan__period-amount {
  font-size: 17px;
  font-weight: 400;
  color: var(--pulse-text-primary);
}

/* ---- Pinned footer ---- */

/*
 * Sits directly above the dock. The container already stops short of it, so
 * this needs its own breathing room rather than the safe inset — that is
 * accounted for inside the dock clearance.
 */
.pulse-plan__foot {
  flex: none;
  /* Collapsed while hidden, so it reserves no height on step one. */
  height: 0;
  overflow: hidden;
  padding: 0 var(--pulse-gutter);
  opacity: 0;
  transform: translateY(18px);
  pointer-events: none;
  transition:
    opacity 300ms ease,
    transform 460ms var(--pulse-ease-push);
}

.pulse-plan__foot[data-visible='true'] {
  height: auto;
  overflow: visible;
  padding: 14px var(--pulse-gutter) 4px;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.pulse-plan__renewal {
  margin: 12px 0 0;
  font-size: 12.5px;
  font-weight: 300;
  text-align: center;
  color: var(--pulse-text-muted);
}

/* Cascade entrance, replayed on each arrival rather than only first mount. */
@keyframes pulse-rise {
  from {
    transform: translateY(16px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* ============================================================
   Field action, strength meter, chips, divider
   ============================================================ */

/*
 * A field carrying a trailing control — today the password reveal.
 *
 * The field stays a column (label above value) and the action is positioned
 * against its right edge, so the stacked label/input layout is untouched and
 * only the input reserves room for the glyph.
 */
.pulse-field--action {
  position: relative;
}

.pulse-field--action .pulse-input {
  padding-right: 34px;
}

/*
 * The label and input stack on the left; this sits beside them. Full 44px
 * target, pulled into the field's padding so the glyph aligns with the edge.
 */
.pulse-field__action {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--pulse-text-muted);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* Password strength: four segments and a verdict, per the design. */
.pulse-strength {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: -4px;
}

.pulse-strength__bars {
  display: flex;
  gap: 4px;
  flex: 1;
}

.pulse-strength__seg {
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.12);
  transition: background 240ms ease;
}

/*
 * Colour tracks the verdict, not the segment index, so a weak password does not
 * show green bars just because it filled two of them.
 */
.pulse-strength__seg[data-on='true'][data-level='1'],
.pulse-strength__seg[data-on='true'][data-level='2'] {
  background: var(--pulse-warning);
}

.pulse-strength__seg[data-on='true'][data-level='3'] {
  background: var(--pulse-warning);
}

.pulse-strength__seg[data-on='true'][data-level='4'] {
  background: var(--pulse-success);
}

.pulse-strength__label {
  flex: none;
  font-family: var(--pulse-font-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--pulse-warning);
  transition: color 240ms ease;
}

.pulse-strength__label[data-level='4'] {
  color: var(--pulse-success);
}

/* Choice chips. 42px plus 1px borders, so the tap target still clears 44. */
.pulse-chips {
  display: flex;
  gap: 10px;
}

.pulse-chip {
  flex: 1;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--pulse-field-border);
  border-radius: var(--pulse-r-chip);
  background: var(--pulse-fill-subtle);
  font-family: var(--pulse-font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--pulse-text-secondary);
  cursor: pointer;
  transition: border-color 200ms ease, background 200ms ease, color 200ms ease;
  -webkit-tap-highlight-color: transparent;
}

.pulse-chip[data-selected='true'] {
  border-color: var(--pulse-accent);
  background: var(--pulse-accent-16);
  color: var(--pulse-text-primary);
}

/* A labelled rule separating peer actions. */
.pulse-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 26px 0 18px;
}

.pulse-divider::before,
.pulse-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--pulse-hairline);
}

.pulse-divider__label {
  font-family: var(--pulse-font-mono);
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--pulse-text-muted);
}

/* Secondary height, for a button that is an alternative rather than the action. */
.pulse-btn--compact {
  height: 52px;
}

/* A label with breathing room above a control that is not a boxed field. */
.pulse-field__label--loose {
  display: block;
  margin-bottom: 10px;
}

/* ============================================================
   Large-screen shell
   ============================================================ */

/*
 * A centred column on tablets, unchanged on phones.
 *
 * Without this every screen stretches to the viewport: 15px body text across a
 * metre of class row, and the access ring alone in a field of black. The store
 * listings need iPad and tablet screenshots, so the app has to not look broken
 * at that size — this is the whole of that work, not a tablet layout.
 *
 * The page background stays full-bleed and there is deliberately no card edge,
 * border or shadow: the column should read as the app, not as a window
 * floating on a desk.
 */
/*
 * All three full-height roots: the dashboard, the auth screens, and the launch
 * spinner. Missing `.pulse-auth` left the welcome buttons spanning a full iPad
 * while the letterhead above them was correctly centred.
 */
.pulse-screen,
.pulse-auth,
.pulse-loading {
  width: 100%;
  max-width: var(--pulse-shell-max);
  margin-inline: auto;
}

/*
 * The fixed layers are positioned against the viewport, so they escape the
 * wrapper above and need constraining themselves.
 *
 * The scrim is the exception and stays full-bleed: it dims everything behind a
 * sheet, and a scrim that only covered the column would look like a bug.
 */
.pulse-dock,
.pulse-sheet,
.pulse-subpage,
.pulse-confirm {
  /*
   * `left: 0; right: 0` pins these to both edges, which beats max-width — a
   * stretched element cannot centre. Releasing both to `auto` lets the width
   * apply and the margins centre it.
   *
   * `width: 100%` is what keeps a phone unchanged. Without it the element
   * shrinks to its content instead of filling the viewport: the cart sheet came
   * out narrower than the screen. With it, a phone gets the full width (100% is
   * below the max) and a tablet gets the capped, centred column.
   */
  left: auto;
  right: auto;
  width: 100%;
  max-width: var(--pulse-shell-max);
  margin-inline: auto;
}

/* ============================================================
   Class credit packs
   ============================================================ */

/*
 * A pack the member already holds. Read-only, so not a `.pulse-plan__tier`:
 * that is a button with a chevron, and giving a row an affordance it does not
 * have is worse than it looking plainer.
 */
.pulse-credit__held {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 18px;
  margin-bottom: 10px;
  border: 1px solid var(--pulse-hairline);
  border-radius: 16px;
  background: var(--pulse-fill-subtle);
}

.pulse-credit__held-body {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
  min-width: 0;
}

.pulse-credit__held-name {
  font-size: 15px;
  font-weight: 400;
  color: var(--pulse-text-primary);
}

.pulse-credit__held-types {
  font-size: 12px;
  font-weight: 300;
  line-height: 1.4;
  color: var(--pulse-text-secondary);
}

.pulse-credit__held-count {
  display: flex;
  align-items: baseline;
  gap: 5px;
  flex: none;
}

/*
 * The accent lands on the remaining count and nothing else on this row. It is
 * the one number the member is here to read, and it is live data — which is
 * what the accent means on both sides of the app.
 */
.pulse-credit__held-left {
  font-size: 22px;
  font-weight: 300;
  color: var(--pulse-accent);
}

.pulse-credit__held-total {
  font-family: var(--pulse-font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--pulse-text-muted);
}

.pulse-credit__types {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

/*
 * A chip used as a label rather than a filter. `.pulse-chip` is a control by
 * default, so the pointer and press feedback are taken back off — a member
 * tapping one of these and nothing happening reads as a broken screen.
 */
.pulse-chip[data-static='true'] {
  cursor: default;
}

.pulse-chip[data-static='true']:active {
  background: transparent;
}

/*
 * Back out of the credits screen.
 *
 * Credits is reached only from the Classes tab and has no dock slot, so
 * without this it is a dead end — the dock shows Classes lit, and tapping it
 * does nothing because as far as the dock is concerned the member is already
 * there.
 *
 * Inline rather than `.pulse-back-btn`, which is a floating circle designed to
 * sit over a banner image. This screen has no banner, and a labelled arrow
 * says where back goes: "Packs" on the confirm step, "Classes" on the list.
 */
.pulse-credit-nav {
  padding: 4px var(--pulse-gutter) 0;
}

.pulse-credit-nav__btn {
  display: flex;
  align-items: center;
  gap: 3px;
  min-height: 44px;
  /* Pulls the glyph to the gutter edge without losing the 44px hit area. */
  margin-left: -7px;
  padding: 0 7px 0 0;
  border: 0;
  background: none;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 300;
  color: var(--pulse-text-secondary);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.pulse-credit-nav__btn:active {
  opacity: 0.6;
}

/*
 * A spent weekly allowance.
 *
 * Kept on screen rather than filtered out: "I have used my Boxing this week"
 * is the answer a member came for, and a row that vanishes when it reaches
 * zero makes the entitlement look like it was never there.
 */
.pulse-credit__held[data-spent='true'] .pulse-credit__held-left {
  color: var(--pulse-text-muted);
}

.pulse-credit__held[data-spent='true'] .pulse-credit__held-name {
  color: var(--pulse-text-secondary);
}

/*
 * The one-line qualifier under a group.
 *
 * "Resets every Monday" and "Never expire" are the whole difference between
 * the two kinds of credit, and the difference matters when deciding whether to
 * buy — so each group states its own rule instead of an explainer paragraph at
 * the top of the screen.
 */
.pulse-credit__note {
  margin: 8px 0 0;
  font-size: 11.5px;
  font-weight: 300;
  color: var(--pulse-text-faint);
}

/*
 * The class-type glyph on a bought-credits row.
 *
 * Those rows are grouped by class type rather than by pack, so the icon is
 * identifying the thing the credits buy — which makes it worth the width.
 * Weekly allowance rows deliberately have none: they are named by the gym
 * ("Boxing Allowance") and can span several types, so no single glyph is
 * honest.
 */
/* Tighter to its label than the 14px the row uses between body and count. */
.pulse-credit__held-icon + .pulse-credit__held-body {
  margin-left: -3px;
}

.pulse-credit__held-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--pulse-fill-raised);
  color: var(--pulse-text-secondary);
}


/* ---- primitives/member-dock.css ---- */
/*
 * Pulse member app — bottom dock.
 *
 * Four items max. The active item widens and expands its label from zero width:
 * the bar reflows rather than just lighting up. Items are hidden entirely when
 * the gym does not sell that thing.
 *
 * This replaces the light `.menu` block (21st.dev modern-mobile-menu) for
 * member screens. That block stays in globals.css only until the last consumer
 * is migrated.
 */

.pulse-dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: flex;
  align-items: stretch;
  gap: 0;
  /*
   * 61.6px of dock, then the home-indicator inset below it. Padding the dock by
   * the safe inset alone leaves the icons sitting on the indicator; the design
   * wants the touchable row to end above it.
   */
  height: calc(var(--pulse-dock-h) + var(--pulse-dock-inset));
  padding: 0 var(--pulse-gutter-nav) var(--pulse-dock-inset);
  background: rgba(7, 7, 7, 0.86);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--pulse-hairline);
  -webkit-user-select: none;
  user-select: none;
  /* Drops out of view behind pushed sub-pages. */
  transform: translateY(0);
  transition: transform var(--pulse-dur-push) var(--pulse-ease-push);
}

.pulse-dock[data-hidden='true'] {
  transform: translateY(20px);
  pointer-events: none;
  opacity: 0;
}

.pulse-dock__item {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  height: var(--pulse-dock-h);
  padding: 0;
  border: 0;
  background: none;
  color: #6e6f78;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: flex-grow 340ms var(--pulse-ease-push), color 240ms ease;
}

.pulse-dock__item:active {
  opacity: 0.7;
}

.pulse-dock__item[aria-selected='true'] {
  flex-grow: 2.3;
  color: var(--pulse-accent);
}

.pulse-dock__icon {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

/*
 * The label expands from zero width. `max-width` animates where `width: auto`
 * cannot; the value only needs to exceed the longest label.
 */
.pulse-dock__label {
  font-family: var(--pulse-font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  max-width: 0;
  opacity: 0;
  transition: max-width 340ms var(--pulse-ease-push), opacity 240ms ease;
}

.pulse-dock__item[aria-selected='true'] .pulse-dock__label {
  max-width: 8em;
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .pulse-dock,
  .pulse-dock__item,
  .pulse-dock__label {
    transition-duration: 0ms;
  }
}


/* ---- primitives/member-access.css ---- */
/*
 * Pulse member app — Access screen.
 *
 * The member's entry credential. Replaces the card-and-QR-modal pattern: the
 * ring is always on screen, and tapping the disc morphs it into the code in
 * place rather than opening a dialog over it.
 */

/* ============================================================
   Background bloom
   ============================================================ */

.pulse-bloom {
  position: absolute;
  top: 130px;
  /* Bleeds 80px past both edges so the falloff never shows a hard stop. */
  left: -80px;
  right: -80px;
  height: 430px;
  pointer-events: none;
  background: radial-gradient(
    48% 46% at 50% 50%,
    var(--pulse-accent-16),
    var(--pulse-accent-00) 70%
  );
}

/* ============================================================
   Meta line
   ============================================================ */

.pulse-access__meta {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  gap: 12px;
  height: 14px;
  font-family: var(--pulse-font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--pulse-text-muted);
}

.pulse-access__meta-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #3c3c3c;
}

.pulse-access__state-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
}

/* ============================================================
   Ring
   ============================================================ */

/*
 * The ring's canvas. The design draws a 356px square, but only the 288px ring
 * and the 240px disc inside it are ever visible — so the box is sized to the
 * ring and the rest of the canvas becomes margin. A box wider than the
 * viewport's content area is what made the Access tab scroll sideways.
 */
.pulse-ring-block {
  position: relative;
  flex: none;
  width: 288px;
  max-width: 100%;
  height: 288px;
  /* (356 - 288) / 2, preserving the design's vertical rhythm. */
  margin: 38px auto;
}

/* The Access column clips its own overflow so the ring canvas cannot scroll. */
.pulse-access__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding: 22px var(--pulse-gutter) 0;
  position: relative;
  overflow-x: clip;
}

/*
 * Centred by flow, NOT by `transform: translate(-50%, -50%)`.
 *
 * A centring transform is fragile on an interactive element: any :active rule
 * that sets its own transform replaces it outright, and the button snaps to its
 * untransformed position — down and to the right — sliding out from under the
 * finger, which also makes the tap miss.
 */
.pulse-ring {
  position: relative;
  display: block;
  margin: 0 auto;
  width: 288px;
  height: 288px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.pulse-ring:disabled {
  cursor: default;
}

.pulse-ring__edge {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/*
 * Two opposing arcs painted by a conic gradient, masked to a hairline by an
 * inset disc in the ground colour. The rotation never stops — not during the
 * morph, not while the code is open.
 */
.pulse-ring__arcs {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  overflow: hidden;
  transition: opacity 400ms ease;
}

.pulse-ring__arcs::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    var(--pulse-accent-00) 0deg,
    var(--pulse-accent) 26deg,
    var(--pulse-accent-00) 52deg,
    var(--pulse-accent-00) 180deg,
    var(--pulse-accent) 206deg,
    var(--pulse-accent-00) 232deg,
    var(--pulse-accent-00) 360deg
  );
  animation: pulse-arcspin 14s linear infinite;
}

.pulse-ring__arcs::after {
  content: '';
  position: absolute;
  top: 2.5px;
  left: 2.5px;
  right: 2.5px;
  bottom: 2.5px;
  border-radius: 50%;
  background: var(--pulse-ground);
}

@keyframes pulse-arcspin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .pulse-ring__arcs::before {
    animation: none;
  }
}

/* ============================================================
   Disc
   ============================================================ */

.pulse-disc {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: var(--pulse-disc);
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 0 90px -22px var(--pulse-accent-45);
  /*
   * The disc holds its size and shape; only the glow responds.
   *
   * The design contracts it 240 -> 196px because there the code is drawn as
   * light modules directly on the dark face — the disc *becomes* the code, so
   * tightening around it reads as one object changing state. We render the QR
   * on a white tile instead (older door readers can refuse an inverted code),
   * which gives it its own hard edge. Against that, shrinking the disc animates
   * a backdrop around an object it no longer contains: motion with nothing to
   * say, and it delays the moment the code is actually usable.
   */
  transition: box-shadow 420ms ease;
}

/* Open: the glow lifts, so the disc still registers the state change. */
.pulse-disc[data-open='true'] {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 0 100px -18px var(--pulse-accent-60);
}

/* Dark state: no access. Ring untappable, arcs at zero. */
.pulse-disc[data-dark='true'] {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.pulse-disc__label {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  margin-top: -9px;
  text-align: center;
  font-family: var(--pulse-font-mono);
  font-size: 12px;
  letter-spacing: 0.3em;
  color: #f2f2f4;
  /* Drops 10px and fades out over the first 260ms of the morph. */
  transition: opacity 260ms ease, transform 260ms var(--pulse-ease-morph);
}

.pulse-disc[data-open='true'] .pulse-disc__label {
  opacity: 0;
  transform: translateY(10px);
}

.pulse-disc[data-dark='true'] .pulse-disc__label {
  color: var(--pulse-text-faint);
}

/*
 * The code fades up over the disc face. With the contraction gone there is
 * nothing to wait for, so it arrives promptly instead of trailing a 700ms
 * shape change — the member tapped to see a code, not an animation.
 */
.pulse-disc__code {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 156px;
  height: 156px;
  margin: -78px 0 0 -78px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.96);
  pointer-events: none;
  transition: opacity 180ms ease, transform 0ms;
}

.pulse-disc[data-open='true'] .pulse-disc__code {
  opacity: 1;
  transform: scale(1);
  transition: opacity 300ms ease 120ms,
    transform 420ms var(--pulse-ease-overshoot) 120ms;
}

/*
 * White tile behind the QR. The design puts light modules straight on the dark
 * disc; we keep a white tile because older door readers may refuse an inverted
 * code, and a missed scan at the door costs more than the extra drama.
 */
.pulse-qr-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  border-radius: 12px;
  background: #ffffff;
}

.pulse-qr-tile canvas,
.pulse-qr-tile img {
  display: block;
  width: 100%;
  height: auto;
  image-rendering: pixelated;
}

/* PIN alternative, centred in the disc. */
.pulse-disc__pin {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  opacity: 0;
  transform: scale(0.96);
  pointer-events: none;
  transition: opacity 180ms ease;
}

.pulse-disc[data-open='true'] .pulse-disc__pin {
  opacity: 1;
  transform: scale(1);
  transition: opacity 300ms ease 120ms,
    transform 420ms var(--pulse-ease-overshoot) 120ms;
}

/*
 * Codes run to 12 characters. They split into two groups on one row and the
 * type scales to fit (34px down to a 19px floor) — a ragged second row reads
 * worse than smaller type.
 */
.pulse-pin__groups {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  width: 196px;
}

.pulse-pin__group {
  font-family: var(--pulse-font-mono);
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.25;
  color: #fff;
  white-space: nowrap;
}

/* ============================================================
   Member number / code block
   ============================================================ */

.pulse-access__code {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 13px;
  flex: none;
  overflow: hidden;
  transition: height 380ms var(--pulse-ease-push), opacity 300ms ease;
}

/* ============================================================
   Bottom slot — crossfades between rest / open / buy / overdue
   ============================================================ */

.pulse-access__bottom {
  position: relative;
  width: 100%;
  flex: none;
  transition: height 380ms var(--pulse-ease-push), margin-top 380ms ease;
}

/*
 * Crossfading layers in the bottom slot.
 *
 * The fades are deliberately asymmetric and staggered: the outgoing layer
 * leaves quickly while the incoming one waits, so the two are never both
 * legible at once. A single symmetric duration makes the morph look like a
 * double exposure.
 */
.pulse-access__layer {
  position: absolute;
  inset: 0;
  /* Arriving: wait for the outgoing layer to clear. */
  transition: opacity 340ms ease 200ms;
}

.pulse-access__layer[data-hidden='true'] {
  opacity: 0;
  pointer-events: none;
  /* Leaving: get out of the way fast, no delay. */
  transition: opacity 140ms ease;
}

/*
 * The buy layer is the one that defines its own height rather than being
 * clipped by the slot: it is only shown in the `none` state, where there is no
 * morph to protect from reflow, and its two priced cards need more room than a
 * fixed value that also suits a small screen.
 */
.pulse-access__layer--buy {
  position: relative;
  inset: auto;
}

.pulse-access__layer--buy[data-hidden='true'] {
  position: absolute;
  inset: 0;
}

/* The open layer arrives once the code itself has settled. */
.pulse-access__layer--open {
  transition: opacity 300ms ease 160ms;
}

.pulse-access__layer--open[data-hidden='true'] {
  transition: opacity 120ms ease;
}

/* Nav tiles under the code block. */
.pulse-tiles {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.pulse-tile {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 11px;
  height: 62px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--pulse-r-field);
  background: rgba(255, 255, 255, 0.02);
  box-sizing: border-box;
  cursor: pointer;
  text-align: left;
  -webkit-tap-highlight-color: transparent;
}

.pulse-tile:active {
  background: var(--pulse-fill-raised);
}

.pulse-tile__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.pulse-tile__name {
  font-size: 14px;
  font-weight: 500;
  color: var(--pulse-text-primary);
}

.pulse-tile__hint {
  font-size: 11.5px;
  font-weight: 300;
  color: var(--pulse-text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Priced cards shown when the member has no access yet. */
.pulse-buy-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  /* Size to content. These sit in a flex column inside a fixed-height slot, and
     without this they stretch to fill it — which reads as bloated padding. */
  flex: none;
  padding: 16px 18px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--pulse-r-card);
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  text-align: left;
  -webkit-tap-highlight-color: transparent;
}

.pulse-buy-card:active {
  background: var(--pulse-fill-raised);
}

.pulse-buy-card--accent {
  border-color: var(--pulse-accent);
  background: rgba(255, 255, 255, 0.03);
}

.pulse-buy-card--accent:active {
  background: rgba(255, 255, 255, 0.07);
}

.pulse-buy-card__body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pulse-buy-card__price {
  font-size: 22px;
  font-weight: 300;
  color: var(--pulse-text-primary);
}

.pulse-buy-card__note {
  font-size: 12.5px;
  font-weight: 300;
  color: var(--pulse-text-secondary);
}

/*
 * The buy card's trailing slot — chevron, or spinner while opening checkout.
 *
 * Fixed size so the swap moves nothing. The spinner and the chevron are both
 * 18px, but a spinner renders as a block with its own box, and without a
 * reserved slot the card's text reflowed by a pixel or two as it appeared.
 */
.pulse-buy-card__go {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 18px;
  height: 18px;
}


/* ---- primitives/member-auth.css ---- */
/*
 * Pulse member app — authentication screens.
 *
 * Screens carry direction: forward slides in from +26px, back from -26px. One
 * path through welcome -> sign in -> forgot -> sent, and welcome -> register
 * step 1 -> step 2.
 *
 * Note this app has no confirm-email step and no plan chooser inside
 * registration — signup lands on the dashboard, where the no-access state
 * offers the day pass and membership. The design's extra screens are
 * deliberately not built; see CLAUDE.md.
 */

.pulse-auth {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  padding: 0 var(--pulse-gutter)
    calc(var(--pulse-home-inset) + var(--safe-bottom, 0px));
  background: var(--pulse-ground);
  overflow-x: hidden;
}

.pulse-auth__top {
  flex: none;
  height: calc(var(--safe-top, 0px) + 12px);
}

/* Back button row, kept at header height so screens align. */
.pulse-auth__bar {
  flex: none;
  display: flex;
  align-items: center;
  height: var(--pulse-header-h);
  margin-left: -10px;
}

.pulse-auth__logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: contain;
}

.pulse-auth__head {
  margin: 20px 0 26px;
}

.pulse-auth__title {
  font-size: 30px;
  font-weight: 300;
  letter-spacing: 0.01em;
  line-height: 1.15;
  color: var(--pulse-text-primary);
  margin: 0;
}

.pulse-auth__sub {
  font-size: 14px;
  font-weight: 300;
  line-height: 1.5;
  color: var(--pulse-text-secondary);
  margin: 12px 0 0;
}

.pulse-auth__fields {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.pulse-auth__actions {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
}

.pulse-auth__actions .pulse-btn {
  width: 100%;
}

.pulse-auth__foot {
  margin-top: auto;
  padding-top: 28px;
  display: flex;
  justify-content: center;
  gap: 6px;
  align-items: baseline;
  font-size: 13.5px;
  font-weight: 300;
  color: var(--pulse-text-secondary);
}

/*
 * Failed sign-in is inline, and the fields keep their values. A CLEAR action
 * sits beside the message rather than the error dismissing itself.
 */
.pulse-auth__error {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  font-size: 13px;
  font-weight: 400;
  color: var(--pulse-danger);
}

.pulse-auth__error-clear {
  font-family: var(--pulse-font-mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--pulse-text-muted);
  background: none;
  border: 0;
  padding: 8px;
  margin: -8px;
  cursor: pointer;
}

/*
 * Terms gate the submit visibly — 55% opacity plus a footnote saying why.
 * No silent rejection on tap.
 */
.pulse-auth__gate-note {
  font-size: 12.5px;
  font-weight: 300;
  line-height: 1.5;
  color: var(--pulse-text-muted);
  text-align: center;
  margin: 0;
}

/* Welcome's closing line. Quiet: the mark and name carry the branding. */
/* Back out of sign in to welcome. 44px like every other control. */
.pulse-auth__back {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-left: -12px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--pulse-text-secondary);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* ============================================================
   Brand letterhead
   ============================================================ */

/*
 * One element across every auth screen, at two heights. Nothing is swapped:
 * height, ring size, logo size, name size and bloom position all transition
 * together, so moving between screens reads as one block adapting.
 */
.pulse-brand {
  position: relative;
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 62px;
  transition: height var(--pulse-dur-sheet) var(--pulse-ease-push);
}

/*
 * On welcome the block absorbs the spare height and centres its group above
 * the buttons. Elsewhere it is fixed and the content takes the slack — without
 * this the mark sits high, because block and content each claim half the screen.
 */
.pulse-brand[data-variant='full'] {
  flex: 1;
  height: 212px;
}

.pulse-brand__bloom {
  position: absolute;
  top: -90px;
  left: -70px;
  right: -70px;
  height: 420px;
  pointer-events: none;
  background: radial-gradient(
    46% 44% at 50% 50%,
    var(--pulse-accent-16),
    var(--pulse-accent-00) 72%
  );
  transition: top var(--pulse-dur-sheet) var(--pulse-ease-push);
}

.pulse-brand[data-variant='full'] .pulse-brand__bloom {
  top: 10px;
}

.pulse-brand__ring {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 0;
  height: 0;
  border-radius: 50%;
  opacity: 0;
  overflow: hidden;
  transition:
    width var(--pulse-dur-sheet) var(--pulse-ease-push),
    height var(--pulse-dur-sheet) var(--pulse-ease-push),
    opacity var(--pulse-dur-sheet) var(--pulse-ease-push);
}

.pulse-brand[data-variant='full'] .pulse-brand__ring {
  width: 128px;
  height: 128px;
  opacity: 1;
}

/*
 * Two opposing arcs on a hairline circle, rotating once every 14s. The same
 * motif as the access ring — signing in should read as the same product as the
 * door it opens.
 */
.pulse-brand__arcs {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    var(--pulse-accent-00) 0deg,
    var(--pulse-accent) 22deg,
    var(--pulse-accent) 98deg,
    var(--pulse-accent-00) 120deg,
    var(--pulse-accent-00) 202deg,
    var(--pulse-accent) 222deg,
    var(--pulse-accent) 278deg,
    var(--pulse-accent-00) 300deg,
    var(--pulse-accent-00) 360deg
  );
  animation: pulse-arcspin 14s linear infinite;
}

/* Masks the gradient down to a ring, leaving the centre as ground. */
.pulse-brand__disc {
  position: absolute;
  inset: 2px;
  border-radius: 50%;
  background: var(--pulse-ground);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.pulse-brand__logo {
  position: relative;
  width: 0;
  height: 0;
  border-radius: 50%;
  object-fit: contain;
  box-shadow: 0 0 46px -8px var(--pulse-accent-45);
  transition:
    width var(--pulse-dur-sheet) var(--pulse-ease-push),
    height var(--pulse-dur-sheet) var(--pulse-ease-push);
}

.pulse-brand[data-variant='full'] .pulse-brand__logo {
  width: 116px;
  height: 116px;
}

.pulse-brand__name {
  position: relative;
  margin-top: 0;
  font-size: 19px;
  font-weight: 400;
  color: var(--pulse-text-primary);
  transition:
    font-size var(--pulse-dur-sheet) var(--pulse-ease-push),
    margin-top var(--pulse-dur-sheet) var(--pulse-ease-push);
}

.pulse-brand[data-variant='full'] .pulse-brand__name {
  margin-top: 22px;
  font-size: 26px;
}

.pulse-brand__tag {
  position: relative;
  margin-top: 7px;
  font-family: var(--pulse-font-mono);
  font-size: 8px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--pulse-text-muted);
}

@keyframes pulse-arcspin {
  to {
    transform: rotate(360deg);
  }
}

/* The arcs are decoration; a member who asked for stillness gets it. */
@media (prefers-reduced-motion: reduce) {
  .pulse-brand__arcs {
    animation: none;
  }
}

/* ============================================================
   Screen transitions
   ============================================================ */

.pulse-auth__screen {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

/*
 * On welcome the letterhead absorbs the spare height and centres its group in
 * the space above the buttons, so the content must not also claim it. With both
 * at flex:1 they split the screen and the mark sits high — the handoff calls
 * this out by name as the thing that goes wrong here.
 */
.pulse-auth[data-view='welcome'] .pulse-auth__screen {
  flex: none;
}

/*
 * Welcome, sign in and register are peers — a member chooses between them, one
 * is not deeper than another. Peers crossfade with a slight scale; sliding them
 * implies an order that does not exist, and here it also fought the letterhead
 * resizing vertically at the same moment, which read as two directions at once.
 *
 * The registration steps DO slide, because those are steps in one task. That
 * distinction is the whole rule.
 */
.pulse-auth__screen[data-dir='fwd'],
.pulse-auth__screen[data-dir='back'] {
  animation: pulse-auth-peer 320ms var(--pulse-ease-push);
}

/* Steps within registration keep their horizontal movement. */
.pulse-auth__screen[data-dir='fwd'][data-step] {
  animation: pulse-auth-fwd var(--pulse-dur-auth) var(--pulse-ease-push);
}

.pulse-auth__screen[data-dir='back'][data-step] {
  animation: pulse-auth-back var(--pulse-dur-auth) var(--pulse-ease-push);
}

@keyframes pulse-auth-peer {
  from {
    transform: scale(0.97);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes pulse-auth-fwd {
  from {
    transform: translateX(26px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes pulse-auth-back {
  from {
    transform: translateX(-26px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pulse-auth__screen[data-dir='fwd'],
  .pulse-auth__screen[data-dir='back'] {
    animation: none;
  }
}

/* ============================================================
   Step indicator — two steps, matching the existing register flow
   ============================================================ */

/*
 * Registration progress: two segments, one per step, sitting in the back row
 * beside the back button. No count label — the bar states it.
 */
.pulse-steps {
  /*
   * Spans the rest of the back row rather than sitting as two stubs beside the
   * arrow: the segments are the step indicator, so they take the width the row
   * has left. 12px of right padding keeps them off the edge.
   */
  flex: 1;
  display: flex;
  align-items: center;
  gap: 5px;
  margin-left: 8px;
  padding-right: 12px;
}

.pulse-steps__seg {
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.1);
  transition: background 300ms var(--pulse-ease-push);
}

.pulse-steps__seg[data-on='true'] {
  background: var(--pulse-accent);
}


/*
 * The alternative action, held at the bottom of the screen.
 *
 * `margin-top: auto` pushes it to the edge regardless of how tall the form
 * above it is, so it reads as a peer choice rather than as a continuation of
 * the form. The home-indicator inset is honoured so it never sits under it.
 */
.pulse-auth__alt {
  margin-top: auto;
  padding-bottom: max(var(--safe-bottom, 0px), 8px);
}

/* ==========================================================================
   Gym launch countdown
   ==========================================================================

   Shown before a gym goes live, in place of the app. Not in the design export
   — it predates it and has no drawn equivalent — so this is the existing
   screen ported onto the member tokens rather than a redesign. It used to be
   Tailwind over `bg-background` / `text-muted-foreground`, which resolve from
   the light `:root` shadcn tokens and rendered a light screen on a dark app.
*/

.pulse-launch {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: var(--pulse-ground);
  color: var(--pulse-text-body);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* The animated grid sits behind everything and never takes a tap. */
.pulse-launch__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.pulse-launch__grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  /* Fades the grid out towards the centre so the logo is not sitting on it. */
  mask-image: radial-gradient(ellipse at center, transparent 30%, black);
  -webkit-mask-image: radial-gradient(ellipse at center, transparent 30%, black);
}

.pulse-launch__grid > span {
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0.2;
  background-image: repeating-linear-gradient(
    100deg,
    #64748b 0%,
    #64748b 1px,
    transparent 1px,
    transparent 4%
  );
}

.pulse-launch__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  max-width: var(--pulse-shell-max);
  padding: 32px var(--pulse-gutter);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  box-sizing: border-box;
}

.pulse-launch__main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
}

/* The ringed disc. Sized in one place so the rings and logo stay concentric. */
.pulse-launch__disc {
  position: relative;
  width: 160px;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (min-width: 400px) {
  .pulse-launch__disc {
    width: 220px;
    height: 220px;
  }

  .pulse-launch__logo,
  .pulse-launch__initial {
    width: 195px;
    height: 195px;
  }
}

.pulse-launch__ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--pulse-accent);
  background: linear-gradient(135deg, var(--pulse-accent-45) 0%, transparent 100%);
}

.pulse-launch__ring > span {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  mix-blend-mode: screen;
  background: radial-gradient(ellipse at center, var(--pulse-accent-16) 10%, transparent 70%);
}

.pulse-launch__logo {
  position: relative;
  z-index: 1;
  width: 135px;
  height: 135px;
  border-radius: 50%;
  object-fit: contain;
}

/* Stands in for a missing logo rather than leaving the disc hollow. */
.pulse-launch__initial {
  position: relative;
  z-index: 1;
  width: 135px;
  height: 135px;
  border-radius: 50%;
  background: var(--pulse-fill-raised);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
  font-weight: 600;
  color: var(--pulse-text-muted);
}

.pulse-launch__message {
  max-width: 32ch;
  text-align: center;
  font-size: 17px;
  font-weight: 300;
  line-height: 1.55;
  color: var(--pulse-text-secondary);
}

.pulse-launch__clock {
  width: 100%;
  max-width: 420px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.pulse-launch__unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.pulse-launch__num {
  font-size: 28px;
  font-weight: 600;
  color: var(--pulse-accent);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.pulse-launch__label {
  font-family: var(--pulse-font-mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--pulse-text-muted);
}

/* The arcs are decorative; stop them when the member has asked for less. */
@media (prefers-reduced-motion: reduce) {
  .pulse-launch__grid,
  .pulse-launch__ring {
    animation: none !important;
  }
}

/* ==========================================================================
   One-time code input
   ==========================================================================

   The boxes on the reset-password screen. Previously Tailwind, and white with
   grey text — on the auth screen's dark ground that read as disabled fields.
*/

.pulse-otp {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.pulse-otp__box {
  /* 48px square clears the 44px minimum tap target on its own. */
  width: 48px;
  height: 52px;
  padding: 0;
  text-align: center;
  font-family: var(--pulse-font-mono);
  font-size: 20px;
  font-weight: 700;
  color: var(--pulse-text-primary);
  background: var(--pulse-fill-subtle);
  border: 1px solid var(--pulse-field-border);
  border-radius: var(--pulse-r-field);
  outline: none;
  box-sizing: border-box;
  transition:
    border-color 160ms ease,
    background 160ms ease;
  /* iOS zooms the page when a field under 16px takes focus; this is 20px. */
  -webkit-appearance: none;
  appearance: none;
}

/* A filled box reads as done without being as loud as the focused one. */
.pulse-otp__box[data-filled='true'] {
  border-color: var(--pulse-hairline-strong);
  background: var(--pulse-fill-raised);
}

.pulse-otp__box:focus {
  border-color: var(--pulse-accent);
  background: var(--pulse-accent-08);
}

.pulse-otp__box:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/*
 * "Powered by Pulse", as a control.
 *
 * It reads identically to the static line it replaces — same size, weight and
 * colour — but buys back a 44px hit area with negative margins, the same trick
 * `.pulse-link` uses. Making it look like a button would put a third
 * affordance on a screen whose whole job is two.
 */
.pulse-auth__powered {
  display: flex;
  align-items: center;
  justify-content: center;
  /* Room for the info glyph, which is what makes the line read as tappable. */
  gap: 5px;
  width: 100%;
  min-height: 44px;
  margin: -14px 0 -10px;
  padding: 0;
  border: 0;
  background: none;
  font-family: inherit;
  font-size: 11px;
  font-weight: 300;
  color: var(--pulse-text-faint);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.pulse-auth__powered:active {
  color: var(--pulse-text-muted);
}

/* "Powered by" stays quiet; the mark and the name carry the line. */
.pulse-auth__powered-label {
  font-size: 11px;
  font-weight: 300;
}

/*
 * The wordmark, sized by height.
 *
 * Its aspect is about 3.4:1, so the width follows from the height rather than
 * being set — pinning both would squash it. No backing tile: the artwork is
 * white and orange with a transparent ground, unlike the retired logo whose
 * black ring needed one.
 *
 * 13px is small, but the SVG stays crisp where a raster would not, and it has
 * to sit beside 11px type without overpowering the two buttons above.
 */
.pulse-auth__powered-mark {
  height: 13px;
  width: auto;
}

/* ---- The sheet behind it ---- */

.pulse-about {
  padding-bottom: 8px;
}

/*
 * The wordmark, on the sheet's own ground.
 *
 * Height-driven so the 3.4:1 aspect is preserved, and capped by `max-width` so
 * it cannot run into the gutters on a narrow phone. No backing tile — the
 * artwork is transparent-grounded white and orange.
 */
.pulse-about__wordmark {
  display: block;
  height: 34px;
  width: auto;
  max-width: 72%;
  margin: 0 auto;
}

.pulse-about__eyebrow {
  margin: 16px 0 0;
  font-family: var(--pulse-font-mono);
  font-size: 9.5px;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-align: center;
  color: var(--pulse-text-faint);
}

/*
 * The one sentence this sheet exists to say. Sized as a headline rather than
 * body copy, and left-aligned below the centred mark: a centred paragraph of
 * two lines reads as a splash screen, and this is meant to be read.
 */
.pulse-about__lede {
  margin: 10px 0 0;
  font-size: 19px;
  font-weight: 300;
  line-height: 1.4;
  letter-spacing: -0.01em;
  text-align: center;
  color: var(--pulse-text-primary);
}

/*
 * Three labelled facts instead of two paragraphs.
 *
 * The prose version said the same things but buried the answer to "who has my
 * card details" mid-sentence. A mono label per fact means the member can find
 * the one they came for without reading the rest.
 */
.pulse-about__facts {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin-top: 24px;
  border-radius: 14px;
  overflow: hidden;
  background: var(--pulse-hairline);
}

.pulse-about__fact {
  padding: 14px 16px;
  background: var(--pulse-fill-subtle);
}

.pulse-about__fact-label {
  display: block;
  font-family: var(--pulse-font-mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  color: var(--pulse-text-faint);
}

.pulse-about__fact-body {
  margin: 7px 0 0;
  font-size: 13.5px;
  font-weight: 300;
  line-height: 1.5;
  color: var(--pulse-text-secondary);
}

/*
 * Who Pulse is, in prose.
 *
 * Above the labelled facts rather than inside them: the facts answer "who
 * handles what", and this answers "who are you" — which is the question
 * someone tapping a company's name is actually asking.
 */
.pulse-about__body {
  margin: 14px 0 0;
  font-size: 13.5px;
  font-weight: 300;
  line-height: 1.55;
  text-align: center;
  color: var(--pulse-text-secondary);
}

/*
 * The domain, under the button rather than on it.
 *
 * The button says what tapping does; this says where it goes. Putting the bare
 * URL on the button made the one action on the sheet look like a footnote.
 */
.pulse-about__link-note {
  margin: 10px 0 0;
  font-family: var(--pulse-font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-align: center;
  color: var(--pulse-text-faint);
}

.pulse-about__version {
  margin: 18px 0 0;
  font-family: var(--pulse-font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
  color: var(--pulse-text-faint);
}


/* ---- primitives/member-classes.css ---- */
/*
 * Pulse member app — Classes list, calendar and class detail.
 */

/* ============================================================
   Calendar panel
   ============================================================ */

.pulse-cal {
  flex: none;
  margin: 10px var(--pulse-gutter-nav) 0;
}

.pulse-cal__inner {
  padding: 14px 12px 12px;
}

/* Month label, arrows and expand chevron share one 36px control row. */
.pulse-cal__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-left: 8px;
}

.pulse-cal__month {
  font-family: var(--pulse-font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--pulse-text-primary);
}

.pulse-cal__controls {
  display: flex;
  align-items: center;
  gap: 2px;
}

.pulse-cal__ctrl {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--pulse-text-secondary);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.pulse-cal__ctrl:active {
  color: var(--pulse-text-primary);
}

.pulse-cal__divider {
  width: 1px;
  height: 18px;
  margin: 0 4px;
  background: var(--pulse-field-border);
}

.pulse-cal__dows {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  margin-top: 10px;
}

.pulse-cal__dow {
  font-family: var(--pulse-font-mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  color: var(--pulse-text-muted);
}

/*
 * Week view shows one row; month view expands to the full grid.
 *
 * Row pitch is the single source of truth for both the viewport height and the
 * translate that scrolls to the active week — they must agree exactly or the
 * grid drifts by 2px per row and the last week of a six-week month is clipped.
 */
.pulse-cal {
  --pulse-cal-row: 40px;
  --pulse-cal-gap: 2px;
  --pulse-cal-pitch: calc(var(--pulse-cal-row) + var(--pulse-cal-gap));
}

.pulse-cal__viewport {
  margin-top: 8px;
  overflow: hidden;
  transition: height var(--pulse-dur-push) var(--pulse-ease-push);
}

/*
 * The horizontal rail carrying previous / current / next.
 *
 * 300% wide with three equal panels, so translating by a third moves exactly
 * one period. The transition is suppressed while a finger is down, so the grid
 * tracks the drag directly, and again on the recentre after a slide commits —
 * otherwise the rail would visibly rewind.
 */
.pulse-cal__rail {
  display: flex;
  width: 300%;
  transition: transform 320ms var(--pulse-ease-push);
}

.pulse-cal__rail[data-dragging='true'] {
  transition: none;
}

.pulse-cal__panel {
  width: calc(100% / 3);
  flex: none;
}

.pulse-cal__track {
  transition: transform var(--pulse-dur-push) var(--pulse-ease-push);
}

.pulse-cal__week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  row-gap: 2px;
  justify-items: center;
}

.pulse-cal__week + .pulse-cal__week {
  margin-top: var(--pulse-cal-gap);
}

.pulse-cal__day {
  display: flex;
  align-items: center;
  justify-content: center;
  /* The session dot is absolute against this. */
  position: relative;
  width: var(--pulse-cal-row);
  height: var(--pulse-cal-row);
  padding: 0;
  border: 0;
  border-radius: 20px;
  background: none;
  font-family: var(--pulse-font-sans);
  font-size: 15px;
  font-weight: 300;
  color: var(--pulse-text-body);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  /*
   * `font-weight` is deliberately not transitioned: it cannot animate smoothly
   * and would reflow the numeral mid-move.
   */
  transition:
    background-color 220ms var(--pulse-ease-push),
    color 160ms ease;
}

.pulse-cal__day:active:not(:disabled) {
  background: rgba(255, 255, 255, 0.08);
}

.pulse-cal__day[data-outside='true'] {
  color: #494a51;
}

.pulse-cal__day:disabled {
  color: #363636;
  cursor: default;
}

/*
 * The selected day: an accent disc, inset from its cell.
 *
 * The cell is 40px with a 2px gap, so a background filling it left the disc
 * nearly touching its neighbours and reading as oversized. `background-clip:
 * content-box` with 3px padding shrinks the painted disc to 34px while the
 * button keeps its full 40px tap target — the grid geometry is shared with
 * ClassCalendar's ROW/GAP/PITCH constants and must not change.
 *
 * The colour transition is on the base rule; the keyframed pop below is what
 * makes it read as the circle arriving rather than the colour just changing.
 */
.pulse-cal__day[aria-selected='true'] {
  background: var(--pulse-accent);
  background-clip: content-box;
  padding: 3px;
  color: var(--pulse-accent-fg);
  font-weight: 500;
}

/*
 * The overshoot is an ENTRANCE, not a resting state.
 *
 * A `transform: scale()` on `[aria-selected]` was tried and reverted: it holds
 * for as long as the day stays selected, so the circle just sat there larger
 * than every other cell and read as a sizing bug rather than motion. An
 * animation plays once and leaves no residue.
 */
@keyframes pulse-cal-pick {
  0% {
    transform: scale(0.86);
  }
  /*
   * No overshoot past 1.
   *
   * It peaked at 1.05, and on a 40px cell in a tight grid that read as the
   * circle being too big rather than as a bounce — the neighbouring cells give
   * the eye an exact reference for full size. Growing into place and stopping
   * there keeps the motion and loses the impression of a sizing bug.
   */
  100% {
    transform: scale(1);
  }
}

.pulse-cal__day[aria-selected='true'] {
  animation: pulse-cal-pick 260ms var(--pulse-ease-push);
}

@media (prefers-reduced-motion: reduce) {
  .pulse-cal__day {
    transition: none;
    animation: none;
  }
}

/*
 * Dot marking a day that has sessions.
 *
 * ---- Placement ----
 *
 * `bottom: 4px` put its centre 6px from the cell's edge while the numeral is
 * centred at 20px, so it read as detached from the number it belongs to — and
 * once the selected disc was inset to 34px the dot sat 1px inside its lower
 * edge, right where the circle curves away.
 *
 * Positioned from the centre instead: `top: 50%` plus a translate puts it a
 * fixed distance below the numeral's baseline, so it stays concentric with the
 * disc whatever the disc's size. 11px clears the 15px numeral and leaves 6px
 * inside the 34px disc.
 *
 * Three separate rules for this element were merged here at the same time;
 * they had drifted apart across edits and one duplicated `.pulse-cal__day`'s
 * `position: relative`.
 */
.pulse-cal__dot {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 3.5px;
  height: 3.5px;
  /* Centred horizontally, then pushed below the numeral. */
  transform: translate(-50%, 11px);
  border-radius: 50%;
  background: var(--pulse-text-faint);
  transition: background-color 200ms ease;
}

.pulse-cal__dot[data-booked='true'] {
  background: var(--pulse-success);
}

/*
 * On the selected day the dot is the accent's foreground, and dimmed: the
 * filled disc already says "this day", so a full-contrast dot on top competes
 * with the numeral for the same 34px.
 */
.pulse-cal__day[aria-selected='true'] .pulse-cal__dot {
  background: var(--pulse-accent-fg);
  opacity: 0.55;
}

/* ============================================================
   Session list
   ============================================================ */

.pulse-sessions {
  padding: 0 var(--pulse-gutter);
  margin-top: 16px;
}

.pulse-sessions__group + .pulse-sessions__group {
  margin-top: 18px;
}

.pulse-session {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 15px 0;
  border: 0;
  background: none;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.pulse-session:active:not(:disabled) {
  background-color: rgba(255, 255, 255, 0.03);
}

/*
 * Separators are inset to start after the time column for bookable rows, and
 * run full width for Booked and Full rows — so the two states that matter are
 * visually bracketed.
 */
.pulse-session--bookable {
  background-image: linear-gradient(
    rgba(255, 255, 255, 0.07),
    rgba(255, 255, 255, 0.07)
  );
  background-size: calc(100% - 66px) 1px;
  background-position: right top;
  background-repeat: no-repeat;
}

.pulse-session--bracketed {
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.pulse-session--full {
  opacity: 0.5;
  cursor: default;
}

.pulse-session__time {
  width: 52px;
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.pulse-session__hour {
  font-size: 18px;
  font-weight: 300;
  letter-spacing: 0.02em;
  color: var(--pulse-text-primary);
}

.pulse-session__dur {
  font-family: var(--pulse-font-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--pulse-text-muted);
  white-space: nowrap;
}

.pulse-session__rule {
  width: 1px;
  height: 38px;
  flex: none;
  background: rgba(255, 255, 255, 0.08);
}

.pulse-session__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pulse-session__name {
  font-size: 15px;
  font-weight: 500;
  color: var(--pulse-text-primary);
}

.pulse-session__meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Price sits beside the availability pill. */
.pulse-session__price {
  font-size: 13px;
  font-weight: 400;
  color: var(--pulse-text-body);
}

/* ============================================================
   Class detail
   ============================================================ */

/* Scrolls with the content, full-bleed under the status bar. */
.pulse-detail__banner {
  position: relative;
  height: 260px;
  flex: none;
  overflow: hidden;
  /* Cancel the scroll container's gutter so the image reaches both edges. */
  margin: 0 calc(var(--pulse-gutter) * -1);
}

.pulse-detail__banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Gradient-masked into the ground colour. */
.pulse-detail__banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(7, 7, 7, 0.55) 0%,
    rgba(7, 7, 7, 0.1) 38%,
    rgba(7, 7, 7, 0.85) 82%,
    var(--pulse-ground) 100%
  );
}

/*
 * Floats over the banner, which runs full-bleed under the status bar. Fixed
 * rather than absolute so it stays reachable as the content scrolls. The
 * minimum keeps it clear of the notch even if the safe-area inset is
 * unavailable for any reason — a hidden back button strands the member.
 */
.pulse-detail__back {
  position: absolute;
  top: max(calc(var(--safe-top, 0px) + 8px), 52px);
  left: var(--pulse-gutter-nav);
  z-index: 5;
}

/*
 * Lifted over the foot of the banner so the date/time line reads against the
 * gradient's dark end rather than the image. Both are children of the same
 * scroll container, so this margin now does what it says — previously the body
 * was nested a level deeper and pulled the whole container up instead.
 */
.pulse-detail__body {
  padding: 0 var(--pulse-gutter) 24px;
  margin-top: -44px;
  position: relative;
  z-index: 1;
}

/* The pinned footer replaces the dock, so no dock clearance is needed here. */
.pulse-screen > .pulse-scroll:has(+ .pulse-detail__actions) {
  padding-bottom: 0;
}

/* Date and time as one micro-cap line above the title — what a member scans for. */
.pulse-detail__when {
  font-family: var(--pulse-font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--pulse-text-muted);
}

.pulse-detail__title {
  font-size: 34px;
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: 0.01em;
  color: var(--pulse-text-primary);
  margin: 12px 0 0;
}

.pulse-detail__desc {
  font-size: 14px;
  font-weight: 300;
  line-height: 1.5;
  color: var(--pulse-text-secondary);
  margin: 14px 0 0;
}

.pulse-detail__instructor {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
}

.pulse-detail__instructor .pulse-monogram {
  width: 40px;
  height: 40px;
  font-size: 15px;
}

.pulse-detail__instructor-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.pulse-detail__instructor-bio {
  font-size: 12.5px;
  font-weight: 300;
  line-height: 1.45;
  color: var(--pulse-text-secondary);
}

/*
 * The price arithmetic is shown, not performed silently. The old build printed
 * only the result.
 */
/*
 * The label/value list. Its first row already carries a hairline and 14px of
 * padding, so it needs less margin above it than a plain block would — with a
 * full 24px on top the section sat noticeably lower than the ones around it.
 */
.pulse-detail__facts {
  margin-top: 10px;
}

.pulse-detail__maths {
  margin-top: 10px;
}

.pulse-detail__maths-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 9px 0;
  font-size: 14px;
  font-weight: 300;
  color: var(--pulse-text-secondary);
}

.pulse-detail__maths-row--credit {
  color: var(--pulse-success);
}

/*
 * Pinned to the bottom of the screen rather than sitting at the end of the
 * content. Booking is the reason the member opened this page, so the action
 * should never require scrolling to reach — and on a class with a long
 * description it otherwise falls below the fold.
 *
 * The refund note lives inside this block, above the button: terms belong
 * before the commitment, not after it.
 */
.pulse-detail__actions {
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: stretch;
  padding: 14px var(--pulse-gutter)
    calc(var(--pulse-home-inset) + var(--safe-bottom, 0px));
  background: var(--pulse-ground);
  border-top: 1px solid var(--pulse-hairline);
}

.pulse-detail__actions .pulse-auth__gate-note {
  margin-bottom: 2px;
}

.pulse-detail__actions .pulse-btn {
  width: 100%;
}

/* ============================================================
   Booking confirmation overlay
   ============================================================ */

.pulse-confirm {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 var(--pulse-gutter);
  background: var(--pulse-ground);
  text-align: center;
  overflow: hidden;
}

.pulse-confirm__stage {
  position: relative;
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 96px;
  height: 96px;
  margin-bottom: 34px;
}

.pulse-confirm__bloom-outer,
.pulse-confirm__bloom-core {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
}

.pulse-confirm__bloom-outer {
  width: 620px;
  height: 620px;
  background: radial-gradient(circle, var(--pulse-accent-16), var(--pulse-accent-00) 68%);
  animation: pulse-glow-in 1400ms var(--pulse-ease-confirm) forwards;
}

.pulse-confirm__bloom-core {
  width: 330px;
  height: 330px;
  background: radial-gradient(circle, var(--pulse-accent-16), var(--pulse-accent-00) 70%);
  animation: pulse-glow-in 1200ms var(--pulse-ease-confirm) forwards,
    pulse-glow-breathe 6.5s ease-in-out 1200ms infinite;
}

.pulse-confirm__halo {
  position: absolute;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 1px solid var(--pulse-accent-45);
  opacity: 0;
  animation: pulse-halo-out 1900ms var(--pulse-ease-confirm) forwards;
}

.pulse-confirm__halo--2 {
  animation-delay: 620ms;
}

.pulse-confirm__halo--1 {
  animation-delay: 260ms;
}

.pulse-confirm__badge {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: var(--pulse-accent-16);
  border: 1px solid var(--pulse-accent-45);
  color: var(--pulse-accent);
  opacity: 0;
  animation: pulse-ringpop 900ms var(--pulse-ease-confirm) forwards;
}

.pulse-confirm__tick {
  opacity: 0;
  animation: pulse-fade-in 460ms ease 200ms forwards;
}

.pulse-confirm__spark {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 3px;
  height: 3px;
  margin: -1.5px 0 0 -1.5px;
  border-radius: 50%;
  background: var(--pulse-accent);
  opacity: 0;
  transform-origin: center;
  animation: pulse-spark-out 1600ms var(--pulse-ease-confirm) forwards;
}

.pulse-confirm__heading,
.pulse-confirm__line,
.pulse-confirm__buttons {
  opacity: 0;
  animation: pulse-rise-in 700ms var(--pulse-ease-confirm) forwards;
}

.pulse-confirm__heading {
  animation-delay: 380ms;
}

.pulse-confirm__line {
  animation-delay: 500ms;
}

.pulse-confirm__buttons {
  animation-delay: 640ms;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 32px;
}

@keyframes pulse-glow-in {
  0% {
    transform: scale(0.82);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 0.72;
  }
}

@keyframes pulse-glow-breathe {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.66;
  }
  50% {
    transform: scale(1.04);
    opacity: 0.82;
  }
}

@keyframes pulse-halo-out {
  0% {
    transform: scale(0.86);
    opacity: 0;
  }
  30% {
    opacity: 0.4;
  }
  100% {
    transform: scale(1.85);
    opacity: 0;
  }
}

@keyframes pulse-ringpop {
  0% {
    transform: scale(0.9);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes pulse-fade-in {
  to {
    opacity: 1;
  }
}

@keyframes pulse-rise-in {
  from {
    transform: translateY(9px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes pulse-spark-out {
  0% {
    transform: rotate(var(--a)) translateY(-14px) scale(0.9);
    opacity: 0;
  }
  35% {
    opacity: 0.5;
  }
  100% {
    transform: rotate(var(--a)) translateY(-52px) scale(0.5);
    opacity: 0;
  }
}

/* Reduced motion: the whole sequence becomes a plain crossfade. */
@media (prefers-reduced-motion: reduce) {
  .pulse-confirm__bloom-outer,
  .pulse-confirm__bloom-core,
  .pulse-confirm__halo,
  .pulse-confirm__spark {
    animation: none;
    opacity: 0;
  }

  .pulse-confirm__badge,
  .pulse-confirm__tick,
  .pulse-confirm__heading,
  .pulse-confirm__line,
  .pulse-confirm__buttons {
    animation: pulse-fade-in 200ms ease forwards;
  }
}

/*
 * Neutral tone: an outcome that completed but is not a celebration, such as a
 * cancellation. Muted badge, no bloom, no sparks.
 */
.pulse-confirm[data-tone='neutral'] .pulse-confirm__badge {
  background: var(--pulse-fill-raised);
  border-color: var(--pulse-hairline-strong);
  color: var(--pulse-text-secondary);
}

/* ============================================================
   Class credits, above the calendar
   ============================================================ */

/*
 * The buy/balance banner.
 *
 * Above the calendar rather than below the list, and on this tab rather than
 * in Profile settings. A member looking at a timetable is one tap from a
 * price; this is where the alternative to that price belongs.
 *
 * ---- One line, and black ----
 *
 * It was two lines on `--pulse-fill-subtle`, which put a rounded translucent
 * card immediately above the calendar's rounded translucent card — two
 * surfaces of the same weight, so the banner read as part of the calendar
 * rather than as an offer above it. A solid dark fill separates them with no
 * extra border, and one line keeps it subordinate to the schedule it sits on
 * top of.
 *
 * Margins are `--pulse-gutter-nav`, matching `.pulse-cal`, so the two edges
 * align. `.pulse-gutter` is 28px and would inset this 8px further each side.
 */
/*
 * The row holding one or both credit controls.
 *
 * Margins live here rather than on the buttons, so a split pair shares the
 * calendar's gutter instead of each half carrying its own.
 */
.pulse-credit-bar {
  display: flex;
  gap: 8px;
  margin: 10px var(--pulse-gutter-nav) 0;
}

/*
 * Halves when both apply.
 *
 * `min-width: 0` matters: without it a flex item refuses to shrink below its
 * content, so the longer label would push the pair past the gutter instead of
 * ellipsing inside its own half.
 */
.pulse-credit-bar[data-split='true'] > .pulse-credit-banner {
  flex: 1;
  min-width: 0;
}

.pulse-credit-banner {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 1;
  min-width: 0;
  min-height: 44px;
  padding: 0 14px;
  /*
   * Its own value rather than `--pulse-hairline` (0.06).
   *
   * That token is tuned for dividing two translucent surfaces of similar
   * lightness. Here it separates a solid black fill from the screen behind it,
   * where 0.06 all but disappeared and the banner lost its shape. 0.16 reads
   * as a deliberate edge without competing with the accent inside it.
   */
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  background: #000;
  text-align: left;
  color: var(--pulse-accent);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 200ms ease;
}

.pulse-credit-banner:active {
  border-color: rgba(255, 255, 255, 0.26);
}

/*
 * The buy half's label is white, like the other.
 *
 * It was accent-coloured to distinguish the two, which made it read as a link
 * rather than the equal control it is. The two are told apart by their icons
 * instead — a ticket for what you hold, a plus for buying.
 */
.pulse-credit-bar .pulse-credit-banner[data-buy='true'] .pulse-credit-banner__text {
  color: var(--pulse-text-primary);
}

/* Tighter when halved: 14px each side leaves too little for the label. */
.pulse-credit-bar[data-split='true'] > .pulse-credit-banner {
  gap: 6px;
  padding: 0 11px;
}

/*
 * The sentence carries the figure rather than a separate numeral block: at one
 * line there is no room for a stacked count, and "3 class credits left" reads
 * faster than a 3 the eye has to pair with a label.
 */
.pulse-credit-banner__text {
  flex: 1;
  min-width: 0;
  font-size: 13.5px;
  font-weight: 300;
  color: var(--pulse-text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Shown only when the member holds none, where the row is an offer. */
.pulse-credit-banner__cta {
  flex: none;
  padding: 4px 8px;
  border: 1px solid var(--pulse-accent-45);
  border-radius: 7px;
  font-family: var(--pulse-font-mono);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--pulse-accent);
}

/*
 * The banner's reserved slot.
 *
 * Whether the banner shows depends on a query, so with nothing here the
 * calendar and the whole session list sat 54px higher until the answer landed
 * and then jumped. This holds the exact height the banner occupies —
 * 44px plus its 10px top margin — and shows nothing.
 *
 * Rendered only while the answer is outstanding, and only for a gym that could
 * show a banner: an unconditional slot would leave a permanent gap on every
 * gym that sells no packs.
 */
.pulse-credit-banner__slot {
  height: 54px;
}

/*
 * The session list cascades in when the day changes.
 *
 * It had no entrance at all: the calendar circle moved and the list beneath it
 * simply became different rows, which is what made Classes feel static beside
 * the shop. The list is keyed on the selected date in ClassesTab so these
 * nodes are new on each change and this runs.
 *
 * Same curve and rhythm as the shop grid, deliberately — two lists that
 * refilter on a tap should not move differently. Per row rather than per
 * group, so a day with one slot still cascades.
 */
/*
 * A fade, with no vertical travel.
 *
 * It slid up 14px first, which was wrong for this list: on a day with a single
 * class the row rose out of empty space with nothing around it to move
 * against, and read as a glitch rather than an entrance. The shop grid can
 * carry a lift because its cards arrive as a block of six or eight; a
 * timetable often holds one.
 *
 * Staggered per session rather than per slot, so the rows fade in sequence
 * down the day whether they are split across MORNING/AFTERNOON/EVENING or all
 * sitting in one.
 */
@keyframes pulse-session-in {
  from {
    opacity: 0;
  }
}

.pulse-session {
  animation: pulse-session-in 420ms ease both;
}

/*
 * The delay is set inline by ClassesTab, not with `nth-child`.
 *
 * The rows are nested inside a per-slot group, so a CSS stagger would restart
 * its count at every MORNING / AFTERNOON / EVENING heading and the first class
 * of each slot would animate at the same moment. The component counts across
 * the whole day instead.
 */
@media (prefers-reduced-motion: reduce) {
  .pulse-session {
    /* `!important` because the delay above is an inline style. */
    animation: none !important;
  }
}


/* ---- primitives/member-shop.css ---- */
/*
 * Pulse member app — Shop and cart.
 *
 * The category carousel is gone: it listed categories twice, as large image
 * cards that only scrolled you to a heading of the same name. One row of filter
 * chips replaces it.
 */

/* ============================================================
   Filter chips
   ============================================================ */

.pulse-shop__filters {
  flex: none;
  display: flex;
  gap: 8px;
  margin-top: 8px;
  padding: 0 var(--pulse-gutter);
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.pulse-shop__filters::-webkit-scrollbar {
  display: none;
}

/* ============================================================
   Product grid
   ============================================================ */

/*
 * Products fade in when the category changes.
 *
 * Switching category replaced the contents in one frame, which read as a
 * flash rather than a change. The grid is keyed on the category in
 * ShopContent so these nodes are new each time and the animation runs.
 */
@keyframes pulse-shop-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
}

/*
 * The cards cascade in; the grid itself does not animate.
 *
 * ---- Why two earlier attempts still read as a flash ----
 *
 * First it was one 260ms fade on the whole grid. Then per-card at 400ms, which
 * was reported as still instant — and it was, because of the curve rather than
 * the duration. `--pulse-ease-push` is `cubic-bezier(0.33, 1, 0.68, 1)`, a
 * sharp ease-out that covers ~90% of its travel in the first third: at 400ms
 * both the fade and the lift were effectively finished in ~130ms no matter
 * what the number said.
 *
 * So the curve is nearly linear in its first half here, the duration is longer,
 * and the stagger step is wide enough to actually see one pair land before the
 * next. The lift is also bigger: 10px over a 200px card is a twitch.
 */
.pulse-product {
  animation: pulse-shop-in 520ms cubic-bezier(0.2, 0.6, 0.35, 1) both;
}

/*
 * Rows of two, so each pair shares a step and the grid fills top-to-bottom
 * rather than in a diagonal.
 *
 * Capped at eight steps: beyond that the delay would outlast anyone's
 * attention, so the ninth card onward lands with the eighth.
 */
.pulse-product:nth-child(-n + 2) {
  animation-delay: 0ms;
}

.pulse-product:nth-child(n + 3):nth-child(-n + 4) {
  animation-delay: 80ms;
}

.pulse-product:nth-child(n + 5):nth-child(-n + 6) {
  animation-delay: 160ms;
}

.pulse-product:nth-child(n + 7):nth-child(-n + 8) {
  animation-delay: 240ms;
}

.pulse-product:nth-child(n + 9) {
  animation-delay: 300ms;
}

@media (prefers-reduced-motion: reduce) {
  .pulse-product {
    animation: none;
  }
}

.pulse-shop__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px 12px;
  align-content: start;
  margin-top: 20px;
  padding: 0 var(--pulse-gutter);
}

.pulse-product {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pulse-product__image {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--pulse-r-thumb);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: var(--pulse-product-tile);
}

/*
 * Images fade in once decoded rather than popping in one by one. The container
 * already reserves its space via aspect-ratio, so nothing shifts — this is
 * purely about the grid settling as a whole instead of flickering into place.
 *
 * `contain`, not `cover`: these are cut-out product shots with real edges, and
 * cropping them to fill a square slices the merchandise. Padding keeps the
 * product off the tile's rounded corners.
 */
.pulse-product__image img {
  width: 100%;
  height: 100%;
  padding: 10px;
  box-sizing: border-box;
  object-fit: contain;
  display: block;
  opacity: 0;
  transition: opacity 240ms ease;
}

.pulse-product__image img[data-loaded='true'] {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .pulse-product__image img {
    transition: none;
  }
}

.pulse-product__body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pulse-product__name {
  font-size: 13px;
  font-weight: 400;
  color: var(--pulse-text-body);
}

.pulse-product__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pulse-product__price {
  font-size: 15px;
  font-weight: 300;
  color: var(--pulse-text-primary);
}

/*
 * Stock reads in the same micro-caps as everything else — a chip on the image
 * rather than a coloured pill competing with the class-list status colours.
 */
.pulse-product__stock {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  align-items: center;
  height: 22px;
  padding: 0 9px;
  border-radius: 11px;
  background: rgba(7, 7, 7, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-family: var(--pulse-font-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--pulse-text-body);
  pointer-events: none;
}

/* Out of stock: dim the card and band the image, don't add another colour. */
.pulse-product__oos {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(7, 7, 7, 0.86);
  font-family: var(--pulse-font-mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #c9cad0;
  pointer-events: none;
}

.pulse-product[data-oos='true'] .pulse-product__body {
  opacity: 0.45;
}

/* Round accent-bordered add button. */
.pulse-add-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--pulse-accent);
  border-radius: 20px;
  background: transparent;
  color: var(--pulse-accent);
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease;
  -webkit-tap-highlight-color: transparent;
}

.pulse-add-btn:active:not(:disabled) {
  background: var(--pulse-accent);
  color: var(--pulse-accent-fg);
}

.pulse-add-btn:disabled {
  border-color: var(--pulse-field-border);
  color: var(--pulse-text-faint);
  cursor: not-allowed;
}

/* ============================================================
   Cart badge on the header icon
   ============================================================ */

/* Sits clear of the 22px glyph inside the 44px button, not on top of it. */
.pulse-cart-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--pulse-accent);
  font-family: var(--pulse-font-mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--pulse-accent-fg);
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  transition: transform 320ms var(--pulse-ease-overshoot), opacity 200ms ease;
}

/* ============================================================
   Cart sheet
   ============================================================ */

.pulse-cart__row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-top: 1px solid var(--pulse-hairline);
}

.pulse-cart__thumb {
  flex: none;
  width: 76px;
  height: 76px;
  border-radius: var(--pulse-r-thumb);
  overflow: hidden;
  background: var(--pulse-product-tile);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.pulse-cart__thumb img {
  width: 100%;
  height: 100%;
  padding: 6px;
  box-sizing: border-box;
  object-fit: contain;
  display: block;
}

.pulse-cart__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pulse-cart__name {
  font-size: 14px;
  font-weight: 400;
  color: var(--pulse-text-body);
}

.pulse-cart__price {
  font-size: 15px;
  font-weight: 300;
  color: var(--pulse-text-primary);
}

.pulse-cart__controls {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

/* Stepper pill — 44x44 segments keep both controls at the tap minimum. */
.pulse-stepper {
  display: flex;
  align-items: center;
  height: 44px;
  border: 1px solid var(--pulse-field-border);
  border-radius: 22px;
  overflow: hidden;
}

.pulse-stepper__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--pulse-text-body);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.pulse-stepper__btn:active:not(:disabled) {
  background: var(--pulse-fill-raised);
}

.pulse-stepper__btn:disabled {
  color: var(--pulse-text-faint);
  cursor: not-allowed;
}

.pulse-stepper__count {
  min-width: 26px;
  text-align: center;
  font-family: var(--pulse-font-mono);
  font-size: 13px;
  color: var(--pulse-text-primary);
}

.pulse-cart__remove {
  font-size: 12px;
  font-weight: 400;
  color: #8a8b93;
}

.pulse-cart__totals {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 18px 0 20px;
}

/* Subtotal gets the hero numeral treatment. */
.pulse-cart__subtotal {
  font-size: 26px;
  font-weight: 200;
  letter-spacing: 0.03em;
  color: var(--pulse-text-primary);
}


/* ---- primitives/member-profile.css ---- */
/*
 * Pulse member app — You (profile) and its sub-pages.
 *
 * The old build used a five-item sidebar nav inside the tab. This is a plain
 * scrolling list of grouped rows that push to sub-pages, which is what the
 * content actually is.
 */

.pulse-profile__header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px var(--pulse-gutter) 0;
}

.pulse-profile__avatar {
  width: 64px;
  height: 64px;
  font-size: 22px;
  font-weight: 400;
}

.pulse-profile__name {
  font-size: 22px;
  font-weight: 400;
  color: var(--pulse-text-primary);
  margin: 0;
}

.pulse-profile__member-no {
  font-family: var(--pulse-font-mono);
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--pulse-text-muted);
  margin-top: 7px;
  display: block;
}

/* Membership status card under the header. */
.pulse-status-card {
  margin: 24px var(--pulse-gutter) 0;
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.pulse-status-card__plan {
  font-size: 17px;
  font-weight: 400;
  color: var(--pulse-text-primary);
}

/* ============================================================
   Grouped rows
   ============================================================ */

.pulse-group {
  margin-top: 28px;
  padding: 0 var(--pulse-gutter);
}

.pulse-group__head {
  font-family: var(--pulse-font-mono);
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--pulse-text-faint);
  margin-bottom: 4px;
  display: block;
}

/* Row that pushes to a sub-page. */
.pulse-nav-row {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 54px;
  padding: 15px 0;
  border: 0;
  border-top: 1px solid var(--pulse-hairline);
  background: none;
  text-align: left;
  font-family: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.pulse-nav-row:active {
  background-color: rgba(255, 255, 255, 0.03);
}

.pulse-nav-row__label {
  flex: 1;
  min-width: 0;
  font-size: 15px;
  font-weight: 400;
  color: var(--pulse-text-body);
}

.pulse-nav-row__value {
  font-size: 14px;
  font-weight: 300;
  color: var(--pulse-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 45%;
}

/* ============================================================
   Switch — notification preferences
   ============================================================ */

.pulse-switch {
  position: relative;
  flex: none;
  width: 46px;
  height: 28px;
  border-radius: 14px;
  border: 0;
  padding: 0;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
  transition: background 220ms ease;
  -webkit-tap-highlight-color: transparent;
}

.pulse-switch[aria-checked='true'] {
  background: var(--pulse-accent);
}

.pulse-switch__knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  transition: transform 220ms var(--pulse-ease-push);
}

.pulse-switch[aria-checked='true'] .pulse-switch__knob {
  transform: translateX(18px);
}

/* ============================================================
   Activity list — transactions and shop orders merged
   ============================================================ */

.pulse-activity__day {
  font-family: var(--pulse-font-mono);
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--pulse-text-faint);
  margin: 22px 0 2px;
  display: block;
}

.pulse-activity__row {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 15px 0;
  border: 0;
  border-top: 1px solid var(--pulse-hairline);
  background: none;
  text-align: left;
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
}

.pulse-activity__row[data-tappable='true'] {
  cursor: pointer;
}

.pulse-activity__row[data-tappable='true']:active {
  background-color: rgba(255, 255, 255, 0.03);
}

.pulse-activity__desc {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pulse-activity__amount {
  font-size: 15px;
  font-weight: 300;
  color: var(--pulse-text-primary);
  white-space: nowrap;
}

/* ============================================================
   Sub-page push
   ============================================================ */

/*
 * A panel pushed over the screen beneath it, dismissed by its back button or by
 * swiping from the left edge. The edge shadow is what makes it read as a layer
 * on top rather than a replacement, especially mid-drag when both are visible.
 */
.pulse-subpage {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  background: var(--pulse-ground);
  transform: translateX(100%);
  transition: transform var(--pulse-dur-push) var(--pulse-ease-push);
  box-shadow: -14px 0 34px -8px rgba(0, 0, 0, 0.55);
  /* The swipe handler owns horizontal panning; the browser must not. */
  touch-action: pan-y;
}

.pulse-subpage[data-open='true'] {
  transform: translateX(0);
}

.pulse-subpage__bar {
  flex: none;
  display: flex;
  align-items: center;
  gap: 4px;
  height: var(--pulse-header-h);
  padding: 0 var(--pulse-gutter-nav);
}

.pulse-subpage__title {
  font-size: 17px;
  font-weight: 400;
  color: var(--pulse-text-primary);
}

/*
 * Pinned action for a sub-page.
 *
 * Sticky rather than fixed: it stays at the foot of the viewport on a short
 * page, and scrolls naturally with long content instead of covering it.
 */
.pulse-subpage__footer {
  position: sticky;
  bottom: 0;
  margin-top: auto;
  padding: 14px var(--pulse-gutter)
    calc(var(--pulse-home-inset) + var(--safe-bottom, 0px));
  background: var(--pulse-ground);
  border-top: 1px solid var(--pulse-hairline);
}

/* The scroll region becomes a column so `margin-top: auto` can push the
   footer down on a page that does not fill the screen. */
.pulse-subpage .pulse-scroll {
  display: flex;
  flex-direction: column;
}

/*
 * A section standing in for content the member does not have yet.
 *
 * Deliberately weightier than a line of body text with a link: on a screen
 * whose only purpose is a subscription the member does not hold, signing up is
 * the screen, not a footnote at the bottom of it.
 */
.pulse-empty {
  display: flex;
  flex-direction: column;
  padding: 22px 20px 24px;
  border: 1px solid var(--pulse-hairline);
  border-radius: var(--pulse-r-panel);
  background: var(--pulse-fill-subtle);
}


/* ---- primitives/admin.css ---- */
/*
 * Pulse ADMIN — primitives (staff-facing app).
 *
 * Verbatim from pulse-gms-app/styles/pulse/admin.css. The --adm-* token block
 * that opened that file lives in tokens/colors-admin.css, tokens/typography.css,
 * tokens/spacing.css, tokens/radii.css and tokens/motion.css instead.
 *
 * ---- The two rules that define this surface ----
 *  1. Every class is pulse-adm-*, every token --adm-*. The member system
 *     (pulse-* / --pulse-*) must not bleed into it.
 *  2. The accent is a DATA colour: live bars, capacity fills, the active nav
 *     row, changed fields, selected days. Primary buttons are a NEUTRAL light
 *     fill (--adm-btn). Red is overdue, out-of-stock and destructive only.
 */

/* ==========================================================================
   Shell
   ========================================================================== */

/*
 * The admin root. Fixed rather than a tall document: the tab stage scrolls
 * inside, so the header stays put and each tab keeps its own scroll position.
 */
/*
 * `color-scheme: dark` on the shell, not just on the date inputs.
 *
 * Without it iOS draws every native control with its own light chrome and
 * system-blue accents — the <select> pickers on Plans, Settings and the
 * routing sheet, scrollbars, and the spinners inside date fields. It was only
 * set on date/time inputs, so a dark app was opening light blue pickers, which
 * is the "blue" that stood out on the plans screen.
 *
 * This is the whole point of the property: it tells the platform which palette
 * to draw its own widgets from, and nothing in a stylesheet can restyle a
 * native picker.
 */
.pulse-adm {
  color-scheme: dark;
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: var(--adm-shell-max);
  margin: 0 auto;
  background: var(--adm-page);
  color: var(--adm-text);
  font-family: var(--adm-font-sans);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  /* Contains the nav drawer and sheets, which are absolutely positioned. */
  isolation: isolate;
}

/* Status bar inset. The app runs black-translucent, so admin draws its own. */
.pulse-adm__inset {
  flex: none;
  height: var(--safe-top, 0px);
}

.pulse-adm__header {
  flex: none;
  height: var(--adm-header-h);
  padding: 0 var(--adm-gutter);
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid var(--adm-hairline);
}

/* Icon buttons in the header keep a 44px hit area at a 20px glyph. */
.pulse-adm__icon {
  width: 44px;
  height: 44px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--adm-text);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

.pulse-adm__icon:first-child {
  margin-left: -10px;
}

.pulse-adm__icon:last-child {
  margin-right: -10px;
}

.pulse-adm__icon[disabled] {
  opacity: 0.4;
  cursor: default;
}

.pulse-adm__brand {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
}

.pulse-adm__logo {
  width: 26px;
  height: 26px;
  flex: none;
  border-radius: 8px;
  overflow: hidden;
  background: var(--adm-surface);
  display: block;
  object-fit: contain;
}

.pulse-adm__gym {
  font-family: var(--adm-font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--adm-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* The screen tag — which tab you are on, in the header rather than a title. */
.pulse-adm__tag {
  flex: none;
  padding: 3px 6px;
  border-radius: 5px;
  font-family: var(--adm-font-mono);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--adm-surface);
  background: #b4b5bd;
  white-space: nowrap;
}

/* ---- The tab stage ---- */

.pulse-adm__stage {
  flex: 1;
  min-height: 0;
  position: relative;
}

/*
 * One layer per tab, all mounted, crossfading. Only the active layer takes
 * pointer events, and inactive layers are hidden from assistive tech.
 */
.pulse-adm__tab {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition:
    opacity var(--adm-dur-fade) ease,
    transform var(--adm-dur-rise) var(--adm-ease);
}

.pulse-adm__tab--on {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* The scrolling body of a tab. */
.pulse-adm__scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0 var(--adm-gutter) calc(30px + var(--safe-bottom, 0px));
}

/* A tab whose head (filters, strip) is fixed above its own scrolling list. */
.pulse-adm__head {
  flex: none;
  padding: 14px var(--adm-gutter) 0;
}

.pulse-adm__list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 4px var(--adm-gutter) calc(30px + var(--safe-bottom, 0px));
}

/* ==========================================================================
   Type
   ========================================================================== */

/*
 * A count line at the head of a list — "12 CLASS TYPES", "8 OF 20".
 *
 * Its own band rather than a bare eyebrow, because the list's own top padding
 * is only 4px: sat directly under a search field or a filter row, the count
 * collided with the control above it.
 */
.pulse-adm-count {
  display: flex;
  align-items: center;
  min-height: 40px;
  font-family: var(--adm-font-mono);
  font-size: 9px;
  letter-spacing: 0.22em;
  color: var(--adm-text-muted);
}

/* Mono section header. The export's most-used element. */
.pulse-adm-eyebrow {
  display: block;
  font-family: var(--adm-font-mono);
  font-size: 9px;
  letter-spacing: 0.22em;
  color: var(--adm-text-muted);
}

/* A quieter variant for inline counts and captions. */
.pulse-adm-mono {
  font-family: var(--adm-font-mono);
  font-size: 8.5px;
  letter-spacing: 0.14em;
  color: var(--adm-text-low);
}

.pulse-adm-section {
  margin-top: 28px;
}

.pulse-adm-section:first-child {
  margin-top: 0;
}

/* The 44px band above a section's first row, where a tab opens on a label. */
.pulse-adm-section__top {
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* A big figure. Light weight, tight tracking — the export's hero numeral. */
.pulse-adm-figure {
  font-size: 46px;
  font-weight: 200;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--adm-text-hi);
  font-variant-numeric: tabular-nums;
}

.pulse-adm-figure--sm {
  font-size: 24px;
}

.pulse-adm-figure--md {
  font-size: 34px;
}

/* ==========================================================================
   Rows
   ========================================================================== */

/*
 * The hairline-separated row that every list in admin is made of. 46px
 * minimum, 68px where it carries an avatar and two lines — both clear the
 * 44px tap target the design system requires without exception.
 */
.pulse-adm-row {
  width: 100%;
  min-height: 46px;
  padding: 12px 0;
  border-top: 1px solid var(--adm-hairline);
  display: flex;
  align-items: center;
  gap: 11px;
  background: none;
  border-left: 0;
  border-right: 0;
  border-bottom: 0;
  color: inherit;
  font: inherit;
  text-align: left;
}

/* A row list closes with a rule under the last item. */
.pulse-adm-row:last-child {
  border-bottom: 1px solid var(--adm-hairline);
}

/* Tappable rows. Buttons already carry the cursor; this marks the press. */
button.pulse-adm-row {
  cursor: pointer;
  transition: background var(--adm-dur-fade) ease;
}

button.pulse-adm-row:active {
  background: rgba(255, 255, 255, 0.03);
}

/* The taller list row: avatar, two lines of text, a status pill. */
.pulse-adm-row--lg {
  min-height: 68px;
  padding: 14px 0;
  gap: 12px;
  border-top: 0;
  border-bottom: 1px solid var(--adm-hairline);
}

.pulse-adm-row__main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.pulse-adm-row__title {
  font-size: 15px;
  font-weight: 400;
  color: var(--adm-text-hi);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pulse-adm-row__sub {
  font-family: var(--adm-font-mono);
  font-size: 8.5px;
  letter-spacing: 0.14em;
  color: var(--adm-text-low);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pulse-adm-row__value {
  flex: none;
  font-size: 14px;
  font-weight: 300;
  color: var(--adm-text-hi);
  font-variant-numeric: tabular-nums;
}

/* Circular initials, used for members, staff and instructors. */
.pulse-adm-avatar {
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 50%;
  background: var(--adm-fill-raised);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 500;
  color: var(--adm-btn-dim);
}

.pulse-adm-avatar--sm {
  width: 34px;
  height: 34px;
  font-size: 11.5px;
}

/* A status dot. Colour comes from a modifier or an inline status colour. */
.pulse-adm-dot {
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 50%;
  display: block;
}

/* ---- Day rail (Classes) ----
 *
 * A continuously scrolling rail where the day under the centre IS the
 * selection. It replaced a paged week strip that swapped seven days per swipe,
 * which jumped and hid the boundary being crossed; and then a version where
 * scrolling and selecting were separate, so every date change took two
 * gestures and the highlight animated afterwards to catch up.
 */

.pulse-adm-rail__month {
  display: block;
  margin: 12px 0 10px;
  text-align: center;
  font-family: var(--adm-font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--adm-text-hi);
}

.pulse-adm-rail {
  position: relative;
  /* Bleed to the gutter edges so the rail reads as continuing off-screen. */
  margin: 0 calc(var(--adm-gutter) * -1);
}

.pulse-adm-rail__track {
  display: flex;
  gap: 3px;
  overflow-x: auto;
  /*
   * `mandatory` rather than `proximity`: the centre column is the selection,
   * so a flick must always come to rest on a day rather than between two.
   */
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  /*
   * Half the viewport of padding at each end, so the first and last days can
   * still reach the centre. Without it the rail cannot select its own edges.
   */
  padding: 0 50%;
}

.pulse-adm-rail__track::-webkit-scrollbar {
  display: none;
}

.pulse-adm-rail__day {
  /* Fixed width: a day sized to its content would jitter between single and
     double digits as the rail scrolls. */
  flex: 0 0 auto;
  width: 46px;
  min-height: 62px;
  scroll-snap-align: center;
  padding: 9px 0;
  border: 0;
  border-radius: 11px;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: background 200ms ease;
}

/* The selected day is accent-filled: which day you are reading is data. */
.pulse-adm-rail__day--on {
  background: var(--adm-accent);
}

.pulse-adm-rail__letter {
  font-family: var(--adm-font-mono);
  font-size: 8px;
  letter-spacing: 0.14em;
  color: var(--adm-text-low);
}

.pulse-adm-rail__num {
  font-size: 15px;
  font-weight: 300;
  color: var(--adm-text);
  font-variant-numeric: tabular-nums;
}

.pulse-adm-rail__day--on .pulse-adm-rail__letter,
.pulse-adm-rail__day--on .pulse-adm-rail__num {
  color: var(--adm-accent-fg);
}

.pulse-adm-rail__day--on .pulse-adm-rail__num {
  font-weight: 500;
}

.pulse-adm-rail__dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--adm-text-muted);
  display: block;
}

.pulse-adm-rail__day--on .pulse-adm-rail__dot {
  background: var(--adm-accent-fg);
}

/*
 * Returns to today. Shown only when the rail is off it — a control that does
 * nothing is worse than no control.
 */
.pulse-adm-rail__today {
  display: block;
  width: 100%;
  min-height: 44px;
  margin-top: 2px;
  border: 0;
  background: none;
  font-family: var(--adm-font-mono);
  font-size: 8.5px;
  letter-spacing: 0.16em;
  color: var(--adm-accent);
  cursor: pointer;
}

/*
 * A hairline at the centre, showing which column scrolling will select.
 *
 * It exists to answer "what am I about to pick", so it fades out once the
 * centre day is actually selected and carries the accent fill — leaving both
 * on marks the same day twice, with the outline reading as a second, competing
 * state around a day that is already chosen.
 *
 * Behind the days and non-interactive: a sight line, not a control.
 */
.pulse-adm-rail__centre {
  position: absolute;
  top: -4px;
  bottom: -4px;
  left: 50%;
  width: 46px;
  margin-left: -23px;
  border-radius: 13px;
  border: 1px solid var(--adm-hairline-strong);
  pointer-events: none;
  z-index: -1;
  opacity: 1;
  /* Slower out than the fill arrives, so the two do not cross-fade against
     each other and briefly read as a third state. */
  transition: opacity 180ms ease;
}

.pulse-adm-rail[data-settled='true'] .pulse-adm-rail__centre {
  opacity: 0;
}

/*
 * A session row in the timetable.
 *
 * Was deleted by accident when the week strip's CSS was replaced — the
 * replacement spanned from the week block to the class-type chip and took the
 * session rows in between with it, leaving them entirely unstyled.
 */
.pulse-adm-session {
  width: 100%;
  padding: 15px 0;
  border: 0;
  border-bottom: 1px solid var(--adm-hairline);
  background: none;
  display: flex;
  align-items: center;
  gap: 13px;
  text-align: left;
  cursor: pointer;
  color: inherit;
  font: inherit;
}

/* The class's icon on a session row — colour comes from the class type. */
.pulse-adm-session__icon {
  flex: none;
  width: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pulse-adm-session__time {
  width: 50px;
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.pulse-adm-session__hh {
  font-size: 15px;
  font-weight: 300;
  color: var(--adm-text-hi);
  font-variant-numeric: tabular-nums;
}

.pulse-adm-session__main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.pulse-adm-session__count {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
}

/* A class type chip. */
.pulse-adm-type {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 9px 12px;
  border-radius: var(--adm-r-row);
  background: var(--adm-fill);
  font-size: 13px;
  color: var(--adm-text);
}

/* ==========================================================================
   Status pills and tags
   ========================================================================== */

/*
 * A labelled status, not a bare dot — nobody should have to learn what green
 * means. Each modifier sets its own colour and 16%-alpha tint.
 */
.pulse-adm-pill {
  flex: none;
  padding: 4px 8px;
  border-radius: 8px;
  font-family: var(--adm-font-mono);
  font-size: 8.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
  /* Each modifier sets its own pair directly. This was a --tone/--tone-bg
     custom-property pair; the values and the rendering are unchanged. */
  color: var(--adm-text-mid);
  background: var(--adm-fill-raised);
}

.pulse-adm-pill--active {
  color: var(--adm-success);
  background: var(--adm-success-16);
}

.pulse-adm-pill--overdue {
  color: var(--adm-danger);
  background: var(--adm-danger-16);
}

.pulse-adm-pill--warning {
  color: var(--adm-warning);
  background: var(--adm-warning-16);
}

.pulse-adm-pill--muted {
  color: var(--adm-text-mid);
  background: rgba(255, 255, 255, 0.09);
}

/* An outlined tag, for a state rather than a status (DESK, HIDDEN, BETA). */
.pulse-adm-tag {
  flex: none;
  padding: 3px 6px;
  border-radius: 5px;
  border: 1px solid var(--adm-border);
  font-family: var(--adm-font-mono);
  font-size: 8px;
  letter-spacing: 0.12em;
  color: var(--adm-text-muted);
  white-space: nowrap;
}

/* A solid count badge — unfulfilled orders in the nav. Red because it is work. */
.pulse-adm-badge {
  flex: none;
  padding: 3px 6px;
  border-radius: 5px;
  font-family: var(--adm-font-mono);
  font-size: 8px;
  font-weight: 700;
  color: #fff;
  background: var(--adm-danger);
}

/* A change indicator beside a figure — the +8 on active memberships. */
.pulse-adm-delta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 6px;
  padding: 3px 7px;
  border-radius: 7px;
  font-family: var(--adm-font-mono);
  font-size: 10px;
  font-weight: 700;
}

.pulse-adm-delta[data-tone='up'] {
  color: var(--adm-success);
  background: var(--adm-success-16);
}

.pulse-adm-delta[data-tone='down'] {
  color: var(--adm-danger);
  background: var(--adm-danger-16);
}

/* ==========================================================================
   Bars
   ========================================================================== */

/* A proportional hairline rather than a pie. The fill is the accent. */
.pulse-adm-bar {
  height: 3px;
  border-radius: 2px;
  background: var(--adm-track);
  display: block;
  position: relative;
  overflow: hidden;
}

.pulse-adm-bar__fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  border-radius: 2px;
  background: var(--adm-accent);
  display: block;
  transition: width var(--adm-dur-rise) var(--adm-ease);
}

/* The segmented membership-health bar: several tones butted together. */
.pulse-adm-split {
  height: 10px;
  border-radius: 5px;
  overflow: hidden;
  display: flex;
  gap: 2px;
}

.pulse-adm-split > span {
  display: block;
  min-width: 0;
}

/* ==========================================================================
   Filters and chips
   ========================================================================== */

/*
 * A row of filter pills.
 *
 * Scrolls rather than squeezing. The children were `flex: 1` in a row with no
 * overflow, so every option added narrowed all the others — Revenue's five
 * labels (ALL / MEMBERSHIPS / SHOP / CLASSES / PASSES) were already at the
 * point where the longest was clipping. `flex: 1 0 auto` lets them share the
 * width when they fit and keep their own when they do not.
 */
.pulse-adm-filters {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  /* The scrollbar is hidden globally; this keeps the row from adding a gutter
     of its own on platforms that reserve one. */
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.pulse-adm-filters::-webkit-scrollbar {
  display: none;
}

.pulse-adm-filters + .pulse-adm-filters {
  margin-top: 6px;
}

/*
 * Selected is a light NEUTRAL fill, not the accent — the accent is data.
 * 42px + the row's own padding clears 44px.
 */
.pulse-adm-filter {
  /* Grow to share the row, but never shrink below the label's own width. */
  flex: 1 0 auto;
  white-space: nowrap;
  min-height: 44px;
  /* Horizontal padding now that labels are not being crushed to fit. */
  padding: 9px 12px;
  border: 0;
  border-radius: var(--adm-r-chip);
  text-align: center;
  font-family: var(--adm-font-mono);
  font-size: 8.5px;
  letter-spacing: 0.1em;
  cursor: pointer;
  color: var(--adm-text-muted);
  background: var(--adm-fill);
  transition:
    background var(--adm-dur-fade) ease,
    color var(--adm-dur-fade) ease;
}

.pulse-adm-filter--on {
  color: var(--adm-on-light);
  background: var(--adm-btn-dim);
}

/*
 * Segmented control — sub-navigation inside one tab.
 *
 * Distinct from `.pulse-adm-filters`, which narrows a list in place. This
 * switches between different *contents*, so the selected segment reads as
 * where you are rather than what you have filtered to.
 *
 * Introduced for Classes, where one scroll held the day's sessions, every
 * class type and every instructor. That is fine at the three types the design
 * was drawn with and unusable at twelve: the sessions staff open the tab for
 * get pushed up by reference data they scroll past every day.
 */
.pulse-adm-seg {
  display: flex;
  gap: 2px;
  padding: 2px;
  border-radius: 11px;
  background: var(--adm-fill);
}

.pulse-adm-seg__option {
  flex: 1;
  min-width: 0;
  min-height: 40px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  font-family: var(--adm-font-mono);
  font-size: 8.5px;
  letter-spacing: 0.12em;
  white-space: nowrap;
  color: var(--adm-text-muted);
  cursor: pointer;
  transition:
    background var(--adm-dur-fade) ease,
    color var(--adm-dur-fade) ease;
}

/*
 * The selected segment is a NEUTRAL raised fill, not the accent: which
 * sub-screen you are on is chrome, and the accent is reserved for data.
 */
.pulse-adm-seg__option[aria-selected='true'] {
  color: var(--adm-on-light);
  background: var(--adm-btn-dim);
}

/* A count beside the label, so the volume is visible before you tap in. */
.pulse-adm-seg__count {
  margin-left: 5px;
  opacity: 0.65;
}

/* ---- Weekday picker (bulk sessions) ---- */

.pulse-adm-days {
  display: flex;
  gap: 5px;
}

.pulse-adm-day {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  border: 0;
  border-radius: var(--adm-r-chip);
  background: var(--adm-fill);
  font-family: var(--adm-font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--adm-text-muted);
  cursor: pointer;
  transition:
    background var(--adm-dur-fade) ease,
    color var(--adm-dur-fade) ease;
}

/*
 * Selected days are accent-filled: which days a class runs on is the data
 * being entered, not chrome.
 */
.pulse-adm-day--on {
  color: var(--adm-accent-fg);
  background: var(--adm-accent);
}

/*
 * Native date and time inputs.
 *
 * Used rather than text fields with a format hint: iOS gives a real picker for
 * free, which is both fewer taps and impossible to typo. `appearance: none`
 * strips the default chrome so they sit on the same underline as every other
 * field, and the dark scheme keeps the picker itself from opening white.
 */
.pulse-adm-input[type='date'],
.pulse-adm-input[type='time'] {
  -webkit-appearance: none;
  appearance: none;
  color-scheme: dark;
  /* Safari centres the value vertically only with an explicit line height. */
  line-height: 44px;
}

.pulse-adm-input[type='date']:disabled,
.pulse-adm-input[type='time']:disabled {
  opacity: 0.4;
}

/*
 * An icon swatch — the class-type icon picker.
 *
 * The colour is the icon's own, passed in as --swatch, not the gym accent:
 * these seven identify a class at a glance in both apps, so they are fixed
 * the way status colours are. The web admin pairs each with a light pastel
 * fill for a white card; on this ground the tint is the same colour at low
 * alpha instead.
 */
/*
 * Four then three, not six then one.
 *
 * Seven icons in a wrapping flex row put the seventh alone on a second line,
 * which looked like a mistake. A four-column grid splits them evenly.
 */
.pulse-adm-swatches {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.pulse-adm-swatch {
  width: 100%;
  min-width: 44px;
  height: 44px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 12px;
  background: var(--adm-fill);
  color: var(--adm-text-muted);
  cursor: pointer;
  transition:
    background var(--adm-dur-fade) ease,
    border-color var(--adm-dur-fade) ease,
    color var(--adm-dur-fade) ease;
}

/* Selected reads as selection, in the accent, rather than as the icon's own
   hue — the icons carry no colour of their own; see class-icons.ts. */
.pulse-adm-swatch--on {
  color: var(--adm-accent);
  border-color: var(--adm-accent);
  background: color-mix(in srgb, var(--adm-accent) 16%, transparent);
}

/*
 * A class type's icon in a list: the glyph and nothing else.
 *
 * It replaced a 44px tinted square. At list scale the badge was the loudest
 * thing on the row — a column of coloured tiles competing with the names they
 * were meant to label. The width still matches the swatch's column so the
 * Types list and the session rows align.
 */
.pulse-adm-glyph {
  width: 30px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--adm-text-muted);
}

.pulse-adm-swatch[disabled] {
  opacity: 0.45;
  cursor: default;
}

/*
 * A row of chips. Wraps, because a five-option field does not fit one line on
 * a phone and truncating a choice is worse than a second row.
 */
.pulse-adm-chips {
  display: flex;
  flex-wrap: wrap;
  /*
   * 8px, not 6px. These wrap to two and three rows in the class-type pickers
   * (credit packs, package allowances), and at 6px with chips this short the
   * list read as one clumped block rather than a set of separate targets.
   * Slightly more row gap than column gap, because a wrapped row needs the
   * separation more than two chips side by side do.
   */
  gap: 9px 8px;
}

/*
 * A card's footer: one setting that belongs to the whole card.
 *
 * Inside the card's padding rather than spanning it like the price rows,
 * because this is a control about the card, not another item in its list.
 */
.pulse-adm-card__foot {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--adm-hairline);
}

.pulse-adm-card__footlabel {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  color: var(--adm-text-muted);
}

/*
 * A row inside a card that opens something else.
 *
 * Shares the price rows' geometry so a card reads as one list, but it is not a
 * price and does not borrow `.pulse-adm-price` — the amount column and the
 * muted-label rule there are about money.
 */
.pulse-adm-cardlink {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 46px;
  margin: 0 -16px;
  padding: 0 16px;
  border: 0;
  border-top: 1px solid var(--adm-hairline);
  background: none;
  font-family: var(--adm-font-sans);
  font-size: 14px;
  color: var(--adm-text);
  text-align: left;
  cursor: pointer;
  transition: background var(--adm-dur-fade) ease;
}

.pulse-adm-cardlink:active {
  background: var(--adm-fill);
}

/*
 * One class allowance in the list: tap the body to edit, the bin to remove.
 *
 * Two targets on one row rather than a row that opens an editor containing a
 * delete — removing an allowance takes an entitlement away from everyone on
 * the package, so it is worth reaching deliberately, and burying it one level
 * down made it easy to hit while looking for the name field.
 */
.pulse-adm-allowance {
  display: flex;
  align-items: center;
  gap: 4px;
  border-bottom: 1px solid var(--adm-hairline);
}

.pulse-adm-allowance__main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 13px 0;
  border: 0;
  background: none;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.pulse-adm-allowance__top {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

/* The weekly count. Mono so the figure reads as data, not prose. */
.pulse-adm-allowance__count {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  flex: none;
  font-family: var(--adm-font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--adm-accent);
}

/*
 * Its own class rather than `.pulse-adm__icon`, whose `:last-child` negative
 * margin is meant for a header's edge and would pull this one off the row.
 */
.pulse-adm-allowance__del {
  width: 44px;
  height: 44px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: -10px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--adm-danger);
  cursor: pointer;
}

/*
 * Two even columns, for a pair that is a single either/or.
 *
 * Cash and Card are one decision with two answers, so they read better as
 * halves of a row than as two chips sized to their own words. Order status
 * used this too, until "Awaiting collection" became "Ready" and all four
 * fitted on one line naturally.
 */
.pulse-adm-chips--grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.pulse-adm-chips--grid .pulse-adm-chip {
  justify-content: center;
}

/* A chip that sits open in the edit drawer. One tap, no keyboard. */
.pulse-adm-chip {
  /*
   * Flex, so a chip carrying a leading icon (the class-type pickers) centres it
   * against the label and spaces it. Without this the chip was inline: the
   * glyph sat on the text baseline with no gap, which read as one clumped
   * token rather than an icon and a name.
   */
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 10px 13px;
  border: 0;
  border-radius: var(--adm-r-row);
  font-family: var(--adm-font-mono);
  font-size: 8.5px;
  letter-spacing: 0.1em;
  cursor: pointer;
  color: var(--adm-text-muted);
  background: var(--adm-fill);
  transition:
    background var(--adm-dur-fade) ease,
    color var(--adm-dur-fade) ease;
}

/*
 * A selected chip IS accent-filled: it is the value of a field, which is data,
 * and in the drawer it reads alongside the changed-field accent mark.
 */
.pulse-adm-chip--on {
  color: var(--adm-accent-fg);
  background: var(--adm-accent);
}

.pulse-adm-chip[disabled] {
  opacity: 0.45;
  cursor: default;
}

/* ---- Search ----
 *
 * The design has no search field: it was removed when the icon did nothing,
 * and its own README calls that "the sharpest regression". `search_members_by_gym`
 * already supports it, so the field comes back here.
 */

.pulse-adm-search {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 14px;
  border-radius: var(--adm-r-card);
  background: var(--adm-fill);
  color: var(--adm-text-muted);
}

.pulse-adm-search__input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: none;
  outline: none;
  font-family: var(--adm-font-sans);
  font-size: 15px;
  color: var(--adm-text-hi);
  /* Safari draws its own clear affordance on type=search; ours is consistent
     across platforms and carries a real tap target. */
  -webkit-appearance: none;
  appearance: none;
}

.pulse-adm-search__input::-webkit-search-cancel-button {
  display: none;
}

.pulse-adm-search__input::placeholder {
  color: var(--adm-text-low);
}

.pulse-adm-search__clear {
  width: 32px;
  height: 32px;
  margin-right: -8px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: none;
  color: var(--adm-text-muted);
  cursor: pointer;
}

/* "Show more" at the foot of a paginated list. */
.pulse-adm-more {
  width: 100%;
  min-height: 58px;
  border: 0;
  background: none;
  font-family: var(--adm-font-mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  color: var(--adm-accent);
  cursor: pointer;
}

.pulse-adm-more[disabled] {
  color: var(--adm-text-low);
  cursor: default;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

/* The primary action: a NEUTRAL light fill. Never the accent. */
.pulse-adm-btn {
  position: relative;
  width: 100%;
  height: 54px;
  border: 0;
  border-radius: 27px;
  background: var(--adm-btn);
  color: var(--adm-on-light);
  font-family: var(--adm-font-sans);
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  cursor: pointer;
  transition: opacity var(--adm-dur-fade) ease;
}

/*
 * Everything tappable looks pressed.
 *
 * Only some controls had an active state, so taps on the rest gave no
 * feedback at all and the app read as slow rather than as waiting. A scale
 * plus a dim is enough, and it costs nothing on the main thread.
 */
.pulse-adm-btn:active:not([disabled]),
.pulse-adm-row:active,
.pulse-adm-setting:active,
.pulse-adm-card__head:active,
.pulse-adm-chip:active:not([disabled]),
.pulse-adm-swatch:active:not([disabled]),
.pulse-adm-price:active,
.pulse-adm-cardlink:active,
.pulse-adm-image__main:active,
.pulse-adm-cash__primary:active:not([disabled]),
.pulse-adm-cash__secondary:active,
.pulse-adm-dialog__confirm:active:not([disabled]) {
  opacity: 0.82;
  transform: scale(0.985);
}

/* Rows are wide, so scaling them looks like a wobble. Dim only. */
.pulse-adm-row:active,
.pulse-adm-setting:active,
.pulse-adm-price:active,
.pulse-adm-cardlink:active,
.pulse-adm-image__main:active {
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .pulse-adm-btn:active:not([disabled]),
  .pulse-adm-chip:active:not([disabled]),
  .pulse-adm-swatch:active:not([disabled]) {
    transform: none;
  }
}

/*
 * The working spinner inside a button.
 *
 * Absolutely positioned, so it never displaces the label. Holding a slot in
 * the flex row kept the label from moving *when the spinner appeared*, but it
 * also pushed the label permanently off-centre by half the slot: the button
 * looked wrong all the time to fix a jump that lasted 300ms.
 *
 * The label stays centred and the spinner sits to its right, in the space a
 * 54px button has going spare.
 */
.pulse-adm-btn__spin {
  position: absolute;
  right: 18px;
  top: 50%;
  margin-top: -6.5px;
  width: 13px;
  height: 13px;
  border: 1.5px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: pulse-adm-spin 0.7s linear infinite;
}

@keyframes pulse-adm-spin {
  to {
    transform: rotate(360deg);
  }
}

/* A spinner that cannot spin should not be drawn at all. */
@media (prefers-reduced-motion: reduce) {
  .pulse-adm-btn__spin {
    animation: none;
    border-top-color: currentColor;
    opacity: 0.4;
  }
}

.pulse-adm-btn[disabled] {
  opacity: 0.4;
  cursor: default;
}

/* The secondary action: outlined, same height class. */
/*
 * The secondary action, usually Back or Cancel beside a primary.
 *
 * `width: auto` matters: `.pulse-adm-btn` is full width because most buttons
 * are the only one in their footer, and inheriting that here made Back demand
 * the whole row and squash the primary beside it to nothing. Padding sizes it
 * to its own label instead.
 */
.pulse-adm-btn--ghost {
  width: auto;
  flex: none;
  min-width: 96px;
  padding: 0 18px;
  /* 54px and 27px, matching the primary: side by side in a footer, a 4px
     difference reads as one of them being wrong rather than as hierarchy. */
  height: 54px;
  border-radius: 27px;
  border: 1px solid var(--adm-border);
  background: none;
  color: var(--adm-text);
  font-size: 14.5px;
  font-weight: 500;
}

/*
 * A footer holding two actions.
 *
 * The primary takes the slack and the secondary sizes to its label, so the
 * pair reads as "mostly do this, or go back" rather than two equal choices.
 */
.pulse-adm-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/*
 * Both actions take an equal share.
 *
 * The secondary sized to its label first, which left "Back" narrow beside a
 * wide primary and read as unbalanced rather than as hierarchy. Hierarchy is
 * already carried by the fill: one is solid, the other outlined.
 */
.pulse-adm-actions > .pulse-adm-btn,
.pulse-adm-actions > .pulse-adm-actions__grow {
  flex: 1;
  min-width: 0;
}

.pulse-adm-actions > .pulse-adm-btn--ghost {
  width: auto;
  padding: 0;
}

/*
 * A ghost button that is the only action, so it spans the row.
 *
 * "Add a recurring timetable" and the drawer's secondary slot are not a
 * choice beside a primary; they are the one thing on offer, and a
 * label-width pill floating in a full-width footer reads as unfinished.
 */
.pulse-adm-btn--ghost.pulse-adm-btn--wide {
  width: 100%;
  min-width: 0;
  padding: 0;
}

/*
 * A create action that sits in the flow of a list, not in the header.
 *
 * Dashed rather than filled: it makes a new thing rather than committing a
 * change to an existing one, and a solid neutral button next to "Save" would
 * read as the same weight of action.
 */
.pulse-adm-btn--make {
  width: 100%;
  height: 50px;
  margin-top: 14px;
  border-radius: 25px;
  border: 1px dashed var(--adm-border);
  background: none;
  color: var(--adm-text);
  font-size: 14.5px;
  font-weight: 500;
}

/* The one red action. Outlined, never a filled red button. */
.pulse-adm-btn--danger {
  height: 50px;
  border-radius: 25px;
  border: 1px solid var(--adm-danger-40);
  background: none;
  color: var(--adm-danger);
  font-size: 14.5px;
  font-weight: 500;
}

/* A small mono action sitting inline with a section header. */
.pulse-adm-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: none;
  font-family: var(--adm-font-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  color: var(--adm-accent);
  cursor: pointer;
}

/* ==========================================================================
   Fields
   ========================================================================== */

/* A label + control pair in the drawer. */
.pulse-adm-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 20px;
}

.pulse-adm-field__label {
  font-family: var(--adm-font-mono);
  font-size: 8.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  /* A changed field turns its label accent — set inline by the drawer. */
  color: var(--mark, var(--adm-text-muted));
}

.pulse-adm-field__note {
  font-size: 11.5px;
  font-weight: 300;
  line-height: 1.45;
  color: var(--adm-text-low);
}

/*
 * Text input. Underlined rather than boxed, so a live field reads as editable
 * without a heavy control at every row. 40px + the label above clears 44px of
 * tappable column.
 */
/*
 * An editable field.
 *
 * The underline is deliberately stronger than a hairline now that facts sit
 * beside fields in the same sheet: when the only difference was a label
 * saying READ ONLY, nothing about the controls themselves distinguished what
 * could be typed into. The rule is the affordance.
 */
.pulse-adm-input {
  width: 100%;
  height: 44px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--mark, var(--adm-field-border));
  border-radius: 0;
  background: transparent;
  outline: none;
  box-sizing: border-box;
  font-family: var(--adm-font-sans);
  font-size: 15px;
  font-weight: 400;
  color: var(--adm-text-hi);
  transition: border-color var(--adm-dur-fade) ease;
  /* iOS zooms the page on focus below 16px; this keeps 15px visually. */
  -webkit-text-size-adjust: 100%;
}

.pulse-adm-input:focus {
  border-bottom-color: var(--adm-accent);
}

.pulse-adm-input::placeholder {
  color: var(--adm-text-low);
}

textarea.pulse-adm-input {
  height: auto;
  min-height: 66px;
  padding: 8px 0;
  resize: none;
  line-height: 1.5;
}

/*
 * Select.
 *
 * The design specifies chips for three-way choices — "one tap, no keyboard".
 * That holds at three or four options and breaks past it: a member's PLAN is
 * every package crossed with every billing frequency, which is a dozen chips
 * carrying labels like "Premium · Monthly £49.99". As a chip row that is a wall
 * of buttons; as a select it is one tap and a native picker the platform
 * already knows how to scroll.
 *
 * A native <select> deliberately, not a custom menu: iOS renders it as a wheel
 * that handles long lists, search-by-typing and VoiceOver for free.
 */
.pulse-adm-select {
  /* Also set here: a select inside a portalled sheet is not always a
     descendant of .pulse-adm. */
  color-scheme: dark;
  width: 100%;
  height: 44px;
  padding: 0 24px 0 0;
  border: 0;
  border-bottom: 1px solid var(--mark, var(--adm-hairline));
  border-radius: 0;
  background: transparent;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394959E' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right center;
  outline: none;
  box-sizing: border-box;
  font-family: var(--adm-font-sans);
  font-size: 15px;
  font-weight: 400;
  color: var(--adm-text-hi);
  cursor: pointer;
  transition: border-color var(--adm-dur-fade) ease;
  -webkit-appearance: none;
  appearance: none;
}

.pulse-adm-select:focus {
  border-bottom-color: var(--adm-accent);
}

/* The option list is drawn by the OS, so it needs an explicit dark ground. */
.pulse-adm-select option {
  background: var(--adm-surface);
  color: var(--adm-text-hi);
}

.pulse-adm-select[disabled] {
  opacity: 0.45;
  cursor: default;
}

/*
 * A fact — context the user cannot change and never could.
 *
 * An order's member, its items, what was paid. These used to render as fields
 * with "READ ONLY" beside each label, which told the user four times that they
 * had failed to find something that does not exist. Presented as information
 * instead: no underline, no input affordance, a quieter label, and grouped so
 * they read as one block of context rather than four dead controls.
 */
.pulse-adm-fact {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 11px 0;
  border-top: 1px solid var(--adm-hairline);
}

/*
 * A fact whose value is several lines — an order's items.
 *
 * The label sits above rather than beside, because a column of lines next to a
 * label baseline-aligns to the first one and leaves the rest hanging.
 */
.pulse-adm-fact--list {
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}

.pulse-adm-fact__lines {
  display: flex;
  flex-direction: column;
}

/*
 * One line. A three-column grid rather than flex, so quantities and prices
 * align down the column instead of each row centring its own — which is what
 * makes a list scannable rather than just wrapped.
 */
.pulse-adm-line {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: baseline;
  gap: 10px;
  padding: 7px 0;
  font-size: 14px;
  color: var(--adm-text);
}

.pulse-adm-line + .pulse-adm-line {
  border-top: 1px solid var(--adm-hairline);
}

.pulse-adm-line__qty {
  font-family: var(--adm-font-mono);
  font-size: 11px;
  color: var(--adm-text-muted);
  font-variant-numeric: tabular-nums;
}

.pulse-adm-line__label {
  min-width: 0;
  overflow-wrap: anywhere;
}

.pulse-adm-line__value {
  font-variant-numeric: tabular-nums;
  color: var(--adm-text-mid);
}

/* The group closes with a rule, the way row lists do. */
.pulse-adm-fact:last-of-type {
  border-bottom: 1px solid var(--adm-hairline);
  margin-bottom: 4px;
}

.pulse-adm-fact__label {
  flex: none;
  min-width: 74px;
  font-family: var(--adm-font-mono);
  font-size: 8.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--adm-text-low);
}

.pulse-adm-fact__value {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  color: var(--adm-text-mid);
  overflow-wrap: anywhere;
}

/* A read-only value. Says so, and explains why. */
.pulse-adm-readonly {
  width: 100%;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--adm-hairline);
  background: none;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  cursor: pointer;
  color: var(--adm-btn-dim);
  font-family: var(--adm-font-sans);
  font-size: 15px;
}

.pulse-adm-readonly > span:first-child {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* A settings row: mono label left, value right, whole row tappable. */
.pulse-adm-setting {
  width: 100%;
  min-height: 52px;
  padding: 12px 0;
  border: 0;
  border-bottom: 1px solid var(--adm-hairline);
  background: none;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  cursor: pointer;
}

.pulse-adm-setting__label {
  flex: none;
  font-family: var(--adm-font-mono);
  font-size: 8.5px;
  letter-spacing: 0.14em;
  color: var(--adm-text-muted);
}

.pulse-adm-setting__value {
  flex: 1;
  min-width: 0;
  text-align: right;
  font-size: 14px;
  font-weight: 400;
  color: var(--adm-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/*
 * An explicit either/or choice, where a switch would imply a default.
 *
 * Built for the price editor: one option leaves existing members alone, the
 * other charges them. Neither is a safe default, so both are stated with their
 * consequence and one must be picked.
 */
.pulse-adm-choice {
  width: 100%;
  padding: 14px;
  margin-top: 8px;
  border: 1px solid var(--adm-hairline);
  border-radius: var(--adm-r-card);
  background: none;
  display: flex;
  flex-direction: column;
  gap: 5px;
  text-align: left;
  cursor: pointer;
  font-family: var(--adm-font-sans);
  transition:
    border-color var(--adm-dur-fade) ease,
    background var(--adm-dur-fade) ease;
}

/* The chosen option is accent-marked: it is the value of a field. */
.pulse-adm-choice--on {
  border-color: var(--adm-accent);
  background: var(--adm-accent-08);
}

.pulse-adm-choice__title {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--adm-text-hi);
}

.pulse-adm-choice__note {
  font-size: 12px;
  font-weight: 300;
  line-height: 1.45;
  color: var(--adm-text-low);
}

/* ---- Switch ---- */

.pulse-adm-switch-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
}

.pulse-adm-switch-row__text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.pulse-adm-switch-row__title {
  font-size: 14px;
  font-weight: 400;
  color: var(--adm-text);
}

.pulse-adm-switch-row__hint {
  font-size: 12px;
  font-weight: 300;
  line-height: 1.45;
  color: var(--adm-text-low);
}

/*
 * The switch itself. 46x28 visually, but the button carries 44px of hit area
 * through padding that does not affect layout (the track is the ::before).
 */
.pulse-adm-switch {
  position: relative;
  flex: none;
  width: 46px;
  height: 44px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  display: block;
}

.pulse-adm-switch__track {
  position: absolute;
  top: 8px;
  left: 0;
  width: 46px;
  height: 28px;
  border-radius: 14px;
  background: var(--adm-fill-raised);
  display: block;
  transition: background 220ms ease;
}

/* On is the accent: a switch's state is data, not chrome. */
.pulse-adm-switch[aria-checked='true'] .pulse-adm-switch__track {
  background: var(--adm-accent);
}

.pulse-adm-switch__knob {
  position: absolute;
  top: 11px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  display: block;
  transition: transform 220ms var(--adm-ease);
}

.pulse-adm-switch[aria-checked='true'] .pulse-adm-switch__knob {
  transform: translateX(18px);
}

.pulse-adm-switch[disabled] {
  opacity: 0.45;
  cursor: default;
}

/* ---- Stepper ---- */

.pulse-adm-stepper {
  display: flex;
  align-items: center;
  gap: 14px;
}

.pulse-adm-stepper__btn {
  width: 52px;
  height: 52px;
  flex: none;
  border-radius: 16px;
  border: 1px solid var(--adm-border);
  background: none;
  color: var(--adm-text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.pulse-adm-stepper__btn[disabled] {
  opacity: 0.35;
  cursor: default;
}

/*
 * The figure, which is an input rather than a label.
 *
 * Buttons suit a correction of one or two; a delivery of forty does not, so
 * the number can be typed. Styled to look like the figure it replaced, with
 * no field chrome until it has focus.
 */
.pulse-adm-stepper__value {
  flex: 1;
  min-width: 0;
  width: 100%;
  text-align: center;
  font-family: var(--adm-font-sans);
  font-size: 32px;
  font-weight: 200;
  color: var(--adm-text-hi);
  font-variant-numeric: tabular-nums;
  border: 0;
  border-bottom: 1px solid transparent;
  background: none;
  padding: 0;
  /* iOS zooms into a focused input under 16px; this is 32px, so it will not. */
  appearance: none;
}

/* A hairline on focus, so it is clear the figure is being edited. */
.pulse-adm-stepper__value:focus {
  outline: none;
  border-bottom-color: var(--adm-accent);
}

.pulse-adm-stepper__value[disabled] {
  opacity: 0.5;
}

/* ==========================================================================
   Cards
   ========================================================================== */

.pulse-adm-card {
  width: 100%;
  padding: 16px;
  border: 1px solid var(--adm-hairline);
  border-radius: var(--adm-r-card);
  background: var(--adm-surface);
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
  color: inherit;
  font: inherit;
}

button.pulse-adm-card {
  cursor: pointer;
}

.pulse-adm-card__top {
  display: flex;
  align-items: center;
  gap: 9px;
}

/* A card whose header is the tap target for editing the thing itself. */
/*
 * The headline figure a selling tab opens with.
 *
 * The running-the-gym tabs each open with a state; these three opened on a
 * section label and listed records. A tab filed under "what you sell" should
 * say how much of it sold.
 */
.pulse-adm-headline {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px 0 20px;
}

.pulse-adm-headline__row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pulse-adm-headline__figure {
  font-size: 40px;
  font-weight: 200;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--adm-text-hi);
  font-variant-numeric: tabular-nums;
}

.pulse-adm-headline__note {
  font-size: 12.5px;
  color: var(--adm-text-muted);
}

/* The change against the previous period. Hidden at zero by the caller. */
.pulse-adm-delta {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 6px;
  font-family: var(--adm-font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
}

.pulse-adm-delta[data-tone='up'] {
  color: #34d17e;
  background: rgba(52, 209, 126, 0.13);
}

.pulse-adm-delta[data-tone='down'] {
  color: var(--adm-danger);
  background: rgba(224, 72, 60, 0.12);
}

/*
 * A mono toggle in a section header — REORDER.
 *
 * Off by default, because reordering is rare and the mode's whole purpose is
 * taking two tap targets off every card the rest of the time.
 */
.pulse-adm-toggle {
  flex: none;
  height: 26px;
  padding: 0 10px;
  border: 1px solid var(--adm-hairline-strong);
  border-radius: 6px;
  background: none;
  font-family: var(--adm-font-mono);
  font-size: 8.5px;
  letter-spacing: 0.13em;
  color: var(--adm-text-muted);
  cursor: pointer;
}

.pulse-adm-toggle--on {
  color: var(--adm-accent);
  border-color: color-mix(in srgb, var(--adm-accent) 45%, transparent);
  background: color-mix(in srgb, var(--adm-accent) 12%, transparent);
}

/*
 * The money beside a headline count. Masked by the revenue lock, where the
 * count next to it is not: counts are operational, takings are not.
 */
.pulse-adm-headline__taken {
  font-size: 13px;
  color: var(--adm-text-muted);
}

/*
 * A chevron that must not disturb the figures beside it.
 *
 * On the dashboard's membership split, three rows show a count and only one
 * is tappable. Putting the chevron in the flow pushed that row's number out
 * of line with the other two; a fixed negative-margin slot keeps the column
 * straight.
 */
.pulse-adm-row__chev {
  flex: none;
  width: 16px;
  margin-right: -6px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

/* An avatar showing a real photo rather than initials. */
.pulse-adm-avatar--photo {
  padding: 0;
  overflow: hidden;
}

.pulse-adm-avatar--photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/*
 * A row that picks and previews one image — a gym logo, an instructor photo.
 */
.pulse-adm-image {
  display: flex;
  align-items: center;
  gap: 4px;
  border-bottom: 1px solid var(--adm-hairline);
}

.pulse-adm-image__main {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 13px 0;
  border: 0;
  background: none;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.pulse-adm-image__thumb {
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--adm-fill);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--adm-text-dim);
}

/* A banner is landscape, so its preview is too. */
.pulse-adm-image__thumb--wide {
  width: 78px;
  height: 46px;
}

.pulse-adm-image__thumb img {
  width: 100%;
  height: 100%;
  /* `contain` for a logo: `cover` would crop a wordmark's edges off. */
  object-fit: contain;
  display: block;
}

.pulse-adm-image__thumb--wide img {
  object-fit: cover;
}

.pulse-adm-image__text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.pulse-adm-image__label {
  font-size: 14.5px;
  color: var(--adm-text-hi);
}

.pulse-adm-image__hint {
  font-size: 11.5px;
  line-height: 1.4;
  color: var(--adm-text-low);
}

.pulse-adm-image__del {
  width: 44px;
  height: 44px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: -10px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--adm-danger);
  cursor: pointer;
}

/*
 * The routing summary's second line.
 *
 * Sentence case at 12.5px, not the mono caps `.pulse-adm-row__sub` uses: this
 * is a sentence about where money goes ("Cafe takes shop"), and mono caps made
 * it read as a status label.
 */
.pulse-adm-routing__sub {
  font-size: 12.5px;
  font-weight: 300;
  color: var(--adm-text-low);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---- Billing: how members pay, and the Pulse Cash subscription ---- */

/*
 * The two payment methods, side by side.
 *
 * A read-out, not controls: `pulse_cash_enabled` is a generated column derived
 * from the subscription, so there is nothing here to toggle. The tiles say
 * what is true and the card below is where it changes.
 */
.pulse-adm-pay {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.pulse-adm-pay__tile {
  position: relative;
  display: flex;
  flex-direction: column;
  /* The gap does the work: icon at the top, text pinned to the bottom, so the
     two tiles align on both regardless of how long the note runs. */
  gap: 22px;
  padding: 14px 15px;
  border: 1px solid var(--adm-hairline-strong);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--adm-text-dim);
}

/* Stripe's own purple, solid — their brand colour, as on web. */
.pulse-adm-pay__tile--online {
  border-color: transparent;
  background: #635bff;
  color: #ffffff;
}

/*
 * Solid, exactly as Online is solid. The two tiles are the same kind of
 * statement — "this method is live" — so a tint on one and a fill on the
 * other read as two different weights of fact.
 */
.pulse-adm-pay__tile--cash {
  border-color: transparent;
  background: #0e9f6e;
  color: #ffffff;
}

.pulse-adm-pay__text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pulse-adm-pay__name {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--adm-text-muted);
}

.pulse-adm-pay__note {
  font-size: 11px;
  line-height: 1.35;
  color: var(--adm-text-dim);
}

.pulse-adm-pay__tile--online .pulse-adm-pay__name {
  color: #ffffff;
}

.pulse-adm-pay__tile--online .pulse-adm-pay__note {
  color: rgba(255, 255, 255, 0.78);
}

.pulse-adm-pay__tile--cash .pulse-adm-pay__name {
  color: #ffffff;
}

.pulse-adm-pay__tile--cash .pulse-adm-pay__note {
  color: rgba(255, 255, 255, 0.78);
}

/* Holds a tile's footprint while the status loads. */
.pulse-adm-pay__skel {
  height: 108px;
  border-radius: 16px;
}

/* The state, in the tile's own corner rather than in its flow. */
.pulse-adm-pay__pill {
  position: absolute;
  top: 11px;
  right: 11px;
  padding: 3px 7px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.07);
  font-size: 9.5px;
  font-weight: 600;
  color: var(--adm-text-muted);
}

.pulse-adm-pay__tile--online .pulse-adm-pay__pill {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

.pulse-adm-pay__tile--cash .pulse-adm-pay__pill {
  background: rgba(255, 255, 255, 0.24);
  color: #ffffff;
}

/*
 * The subscription card.
 *
 * Its own block rather than `.pulse-adm-card`: 18px radius, a lighter fill and
 * a 13px internal rhythm, per the design. Reusing the generic card would have
 * meant overriding most of it.
 */
.pulse-adm-cash {
  display: flex;
  flex-direction: column;
  gap: 13px;
  margin-top: 26px;
  padding: 17px 17px 18px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.02);
}

.pulse-adm-cash__head {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--adm-text);
}

.pulse-adm-cash__title {
  flex: 1;
  min-width: 0;
  font-size: 16px;
  font-weight: 500;
  color: var(--adm-text-hi);
}

/* The status pill in the card's title row. Mono, unlike the tile's chip. */
.pulse-adm-cash__pill {
  flex: none;
  padding: 4px 9px;
  border: 1px solid transparent;
  border-radius: 20px;
  font-family: var(--adm-font-mono);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

/*
 * Green. Used by `trial` only — `active` never renders this pill, because the
 * Cash tile directly above already says "Active" and repeating it is the same
 * word twice in one screenful.
 */
.pulse-adm-cash__pill[data-tone='trial'] {
  color: #34d17e;
  background: rgba(52, 209, 126, 0.14);
  border-color: rgba(52, 209, 126, 0.32);
}

.pulse-adm-cash__pill[data-tone='warning'] {
  color: var(--adm-warning);
  background: rgba(245, 158, 11, 0.13);
  border-color: rgba(245, 158, 11, 0.34);
}


/* The £1 that leads the card when cash is off. */
.pulse-adm-cash__price {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 34px;
  font-weight: 200;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--adm-text-hi);
}

.pulse-adm-cash__per {
  font-size: 13.5px;
  font-weight: 300;
  letter-spacing: 0;
  color: var(--adm-text-mid);
}

.pulse-adm-cash__body {
  font-size: 13px;
  font-weight: 300;
  line-height: 1.55;
  color: var(--adm-text-muted);
}

/*
 * Billable members and the next invoice.
 *
 * Three equal tiles was the alternative; at 390pt that is three 110pt columns
 * of 24px numerals, and a third figure for unit price restates the other two —
 * £1 × 16 = £16.00 is on screen either way.
 */
.pulse-adm-cash__figures {
  display: flex;
  flex-direction: column;
}

.pulse-adm-cash__row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 13px 0;
  border-top: 1px solid var(--adm-hairline);
}

/* Separates the pairs: each figure owns the caption directly beneath it. */
.pulse-adm-cash__row--next {
  margin-top: 11px;
}

.pulse-adm-cash__label {
  flex: 1;
  min-width: 0;
  font-size: 13.5px;
  font-weight: 300;
  color: var(--adm-text-mid);
}

.pulse-adm-cash__value {
  font-size: 20px;
  font-weight: 300;
  color: var(--adm-text-hi);
  font-variant-numeric: tabular-nums;
}

/* What the figure counts, or when it falls due. Sits under its own row. */
.pulse-adm-cash__qual {
  font-family: var(--adm-font-mono);
  font-size: 8.5px;
  letter-spacing: 0.14em;
  color: var(--adm-text-dim);
}

/* 50pt primary, 48pt secondary, both 14px radius — the card's own buttons. */
.pulse-adm-cash__primary,
.pulse-adm-cash__secondary {
  /* Positioning context for the spinner, which sits over the button rather
     than in its flow so the label stays centred. */
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
  border-radius: 14px;
  font-family: var(--adm-font-sans);
  font-weight: 500;
  cursor: pointer;
}

.pulse-adm-cash__primary {
  height: 50px;
  border: 0;
  background: rgba(255, 255, 255, 0.1);
  color: var(--adm-text-hi);
  font-size: 15px;
}

.pulse-adm-cash__secondary {
  height: 48px;
  border: 1px solid var(--adm-border);
  background: none;
  color: var(--adm-text);
  font-size: 14.5px;
}

.pulse-adm-cash__primary[disabled] {
  opacity: 0.55;
  cursor: default;
}

.pulse-adm-cash__caption {
  font-size: 12px;
  font-weight: 300;
  line-height: 1.5;
  text-align: center;
  color: var(--adm-text-low);
}

/*
 * A dated amber panel: something is booked to happen on a day.
 *
 * Amber rather than red — nothing has broken, and the gym chose this. Red is
 * for overdue and destructive.
 */
.pulse-adm-dated {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 14px 15px;
  border: 1px solid rgba(245, 158, 11, 0.26);
  border-radius: 13px;
  background: rgba(245, 158, 11, 0.09);
}

.pulse-adm-dated__when {
  font-size: 14px;
  font-weight: 500;
  color: var(--adm-warning);
}

.pulse-adm-dated__what {
  font-size: 12.5px;
  font-weight: 300;
  line-height: 1.55;
  color: var(--adm-text);
}

/* A currency prefix inside the field, rather than explained in a hint. */
.pulse-adm-input__money {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.pulse-adm-input__money > span {
  flex: none;
  font-size: 15px;
  color: var(--adm-text-muted);
}

.pulse-adm-input__money .pulse-adm-input {
  flex: 1;
  min-width: 0;
}

/* A fact whose value is the point of the sheet, not context for it. */
.pulse-adm-fact__value--hi {
  color: var(--adm-text-hi);
}

/*
 * A meta line whose subject is still live — an unused day pass.
 *
 * Accent because it is data, not chrome: the pass is money taken that has not
 * been redeemed, which is the row worth spotting in the list.
 */
.pulse-adm-row__sub[data-live] {
  color: var(--adm-accent);
}

/*
 * A product thumbnail.
 *
 * The image is already in the query and already drawn in the member app shop.
 * Without it staff and members are looking at different shops.
 */
.pulse-adm-thumb {
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 11px;
  overflow: hidden;
  background: var(--adm-fill);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--adm-text-dim);
}

.pulse-adm-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/*
 * Two actions pinned below a list: a create that fills the space, and a
 * narrower secondary beside it.
 */
.pulse-adm-pinned {
  display: flex;
  gap: 8px;
  margin-top: 18px;
}

.pulse-adm-pinned .pulse-adm-btn--make {
  flex: 1;
  min-width: 0;
}

.pulse-adm-pinned__side {
  flex: none;
  width: 128px;
}

/* Members on a package, in the card's title row. A count, never masked. */
.pulse-adm-card__members {
  flex: none;
  font-family: var(--adm-font-mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--adm-text-mid);
}

/* A fact row that opens a sheet rather than stating a value. */
.pulse-adm-fact--link {
  width: 100%;
  border-left: 0;
  border-right: 0;
  border-bottom: 0;
  background: none;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

/* The grip and the card's own header button, side by side. */
.pulse-adm-card__headrow {
  display: flex;
  align-items: center;
  gap: 4px;
}

/*
 * Move a card one place up or down.
 *
 * A pair of buttons rather than a drag handle: these cards run past 400pt, so
 * dragging one over its neighbour needs more finger travel than the viewport
 * has. Joined into one control with a shared border, so the pair reads as a
 * single "position" affordance rather than two unrelated chevrons.
 */
.pulse-adm-move {
  flex: none;
  display: inline-flex;
  border: 1px solid var(--adm-hairline-strong);
  border-radius: var(--adm-r-chip);
  overflow: hidden;
}

.pulse-adm-move__btn {
  /* 40px wide rather than 44: two of them plus the switch share one row, and
     the 44px height carries the tap target. */
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: none;
  color: var(--adm-text);
  cursor: pointer;
  transition: background var(--adm-dur-fade) ease;
}

.pulse-adm-move__btn:active:not([disabled]) {
  background: var(--adm-fill);
}

.pulse-adm-move__btn + .pulse-adm-move__btn {
  border-left: 1px solid var(--adm-hairline-strong);
}

/* Already at that end of the list. Shown, so the control does not reflow. */
.pulse-adm-move__btn[disabled] {
  color: var(--adm-text-dim);
  cursor: default;
}

.pulse-adm-card__head {
  width: 100%;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  display: flex;
  align-items: center;
  gap: 9px;
  text-align: left;
  cursor: pointer;
  color: inherit;
  font: inherit;
}

.pulse-adm-card__title {
  flex: 1;
  min-width: 0;
  font-size: 15.5px;
  font-weight: 500;
  color: var(--adm-text-hi);
}

.pulse-adm-card__body {
  font-size: 13px;
  font-weight: 300;
  line-height: 1.5;
  color: var(--adm-text-low);
}

/*
 * A price variant on a package card. An archived price is dimmed rather than
 * hidden: archived prices stay with the members already paying them, so staff
 * need to see what someone is actually on.
 */
/*
 * A package's prices: a list, not a row of pills.
 *
 * Pills wrapped into a ragged block whose figures landed wherever the text
 * length put them, so the eye could not compare monthly against annual. These
 * are hairline-separated rows inside the card — the amounts align right and
 * read down the column.
 */
/* Cancels the card's 10px flex gap: the price rows and the link row divide
   with their own hairlines and must sit flush. The footer is untouched — it
   sets its own margin, because it is a control about the card rather than
   another row in its list. */
.pulse-adm-prices + .pulse-adm-cardlink {
  margin-top: -10px;
}

.pulse-adm-prices {
  display: flex;
  flex-direction: column;
  /* Full card width: the rows' own separators do the dividing, so the card's
     padding is cancelled rather than boxing each row in again. The bottom is
     0 because `.pulse-adm-cardlink` follows and supplies its own rule; a
     negative bottom here pulled that row up over the last price. */
  margin: 2px -16px 0;
}

.pulse-adm-prices__none {
  font-size: 13px;
  color: var(--adm-text-muted);
}

.pulse-adm-price {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 46px;
  padding: 0 16px;
  border: 0;
  border-top: 1px solid var(--adm-hairline);
  background: none;
  font-family: var(--adm-font-sans);
  font-size: 14px;
  color: var(--adm-text);
  text-align: left;
  cursor: pointer;
  transition: background var(--adm-dur-fade) ease;
}

.pulse-adm-price:active {
  background: var(--adm-fill);
}

/*
 * "Add a price" reads as an action, not a price: the label sits in the muted
 * colour the intervals use and there is no amount to align, so the row would
 * otherwise look like a price with a missing figure.
 */
.pulse-adm-price--add {
  color: var(--adm-text-muted);
}

/* The interval. Takes the slack so the amount is pinned right. */
.pulse-adm-price__every {
  flex: 1;
  min-width: 0;
  color: var(--adm-text-muted);
}

/*
 * How many people pay this exact price.
 *
 * No label: it sits between the interval and the amount, where "142 · £25.00"
 * reads as one statement. Muted, because the amount is the value and this is
 * its weight.
 */
.pulse-adm-price__on {
  flex: none;
  font-family: var(--adm-font-mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--adm-text-low);
  font-variant-numeric: tabular-nums;
}

.pulse-adm-price__amt {
  font-variant-numeric: tabular-nums;
  color: var(--adm-text-hi);
}



/* An inline banner — restock warning, out-of-stock alert. */
.pulse-adm-alert {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border-radius: var(--adm-r-card);
  background: var(--adm-danger-16);
  display: flex;
  align-items: center;
  gap: 11px;
  text-align: left;
  border: 0;
  cursor: pointer;
  color: var(--adm-text);
  font-family: var(--adm-font-sans);
  font-size: 13px;
}

.pulse-adm-alert--warning {
  background: var(--adm-warning-16);
}

/* Filtering is on: the panel says so, since the list below it is now partial. */
.pulse-adm-alert--on {
  box-shadow: inset 0 0 0 1px var(--adm-danger-40);
}

.pulse-adm-alert--warning.pulse-adm-alert--on {
  box-shadow: inset 0 0 0 1px var(--adm-warning-40);
}

/* SHOW / SHOW ALL, at the end of the alert. */
.pulse-adm-alert__hint {
  flex: none;
  font-family: var(--adm-font-mono);
  font-size: 8.5px;
  letter-spacing: 0.13em;
  color: var(--adm-text-mid);
}

.pulse-adm-alert__text {
  flex: 1;
  min-width: 0;
}

/* The three-up stat strip (to fulfil / today / taken). */
.pulse-adm-strip {
  display: flex;
  align-items: stretch;
  margin-top: 16px;
}

.pulse-adm-strip__cell {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.pulse-adm-strip__cell + .pulse-adm-strip__cell {
  padding-left: 16px;
}

.pulse-adm-strip__rule {
  width: 1px;
  background: var(--adm-hairline);
  display: block;
}

.pulse-adm-strip__label {
  font-family: var(--adm-font-mono);
  font-size: 8.5px;
  letter-spacing: 0.18em;
  color: var(--adm-text-low);
}

/* ==========================================================================
   Overlays: scrim, nav drawer, sheet, dialog, toast
   ==========================================================================

   Every overlay here is a child of .pulse-adm, which is `position: fixed` and
   creates no transform, so these stack correctly without portalling. (The
   member app's SubPage carries a transform, which is why its sheets must
   portal — see CLAUDE.md. Admin has no such ancestor.)
*/

.pulse-adm-scrim {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  opacity: 0;
  pointer-events: none;
  transition: opacity 260ms ease;
  border: 0;
  padding: 0;
}

.pulse-adm-scrim--on {
  opacity: 1;
  pointer-events: auto;
  cursor: pointer;
}

.pulse-adm-scrim--nav {
  z-index: 120;
}

.pulse-adm-scrim--sheet {
  z-index: 100;
  background: rgba(0, 0, 0, 0.62);
}

.pulse-adm-scrim--dialog {
  z-index: 150;
  background: rgba(0, 0, 0, 0.68);
}

/* ---- Nav drawer ---- */

.pulse-adm-nav {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--adm-nav-w);
  max-width: 86%;
  z-index: 130;
  background: var(--adm-raised);
  border-right: 1px solid var(--adm-line);
  box-shadow: 24px 0 60px rgba(0, 0, 0, 0.55);
  transform: translateX(-100%);
  transition: transform var(--adm-dur-nav) var(--adm-ease);
  display: flex;
  flex-direction: column;
}

.pulse-adm-nav--open {
  transform: translateX(0);
}

.pulse-adm-nav__head {
  flex: none;
  padding: calc(12px + var(--safe-top, 0px)) var(--adm-gutter) 18px;
  display: flex;
  align-items: center;
  gap: 11px;
  border-bottom: 1px solid var(--adm-hairline);
}

.pulse-adm-nav__logo {
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 10px;
  overflow: hidden;
  background: var(--adm-surface);
  object-fit: contain;
  display: block;
}

.pulse-adm-nav__body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 22px 12px 12px;
}

/*
 * A group of destinations — Running the gym, What you sell, Money, Setup.
 *
 * Each group is its own element so the gap between groups belongs to the
 * group, not to a header rule. The previous version put the separation in
 * `.pulse-adm-nav__group`'s padding and then cancelled it with `:first-child`,
 * which matched *every* header — each group sits in its own wrapper, so each
 * header is the first child of one. The result was no separation anywhere:
 * eleven items and four headers in one undifferentiated column.
 */
.pulse-adm-nav__section + .pulse-adm-nav__section {
  margin-top: 26px;
}

.pulse-adm-nav__group {
  display: block;
  padding: 0 8px 10px;
  font-family: var(--adm-font-mono);
  font-size: 8px;
  letter-spacing: 0.22em;
  color: var(--adm-text-muted);
}

/* A destination. 48px with 2px between, so neighbours read as separate rows
   rather than one block of text. */
.pulse-adm-nav__item + .pulse-adm-nav__item {
  margin-top: 2px;
}

.pulse-adm-nav__item {
  width: 100%;
  min-height: 48px;
  padding: 0 10px;
  border: 0;
  border-radius: var(--adm-r-row);
  background: transparent;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  text-align: left;
  color: var(--adm-text);
  font-family: var(--adm-font-sans);
  transition: background 220ms ease;
}

/* The active row is washed in the accent — an active nav row is data. */
.pulse-adm-nav__item--on {
  background: var(--adm-accent-12);
}

.pulse-adm-nav__item svg {
  flex: none;
  color: var(--adm-text-muted);
}

.pulse-adm-nav__item--on svg {
  color: var(--adm-accent);
}

.pulse-adm-nav__label {
  flex: 1;
  min-width: 0;
  padding: 14px 0;
  font-size: 14.5px;
  font-weight: 400;
}

.pulse-adm-nav__item--on .pulse-adm-nav__label {
  font-weight: 500;
  color: var(--adm-text-hi);
}

.pulse-adm-nav__count {
  flex: none;
  font-family: var(--adm-font-mono);
  font-size: 9px;
  color: var(--adm-text-muted);
}

.pulse-adm-nav__foot {
  flex: none;
  padding: 14px var(--adm-gutter) calc(14px + max(var(--safe-bottom, 0px), 20px));
  border-top: 1px solid var(--adm-hairline);
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ---- Bottom sheet (the edit drawer) ---- */

.pulse-adm-sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  /*
   * A height band rather than sizing to content.
   *
   * Without a minimum the sheet grew tall for its loading skeletons and then
   * collapsed when the shorter real list arrived, which reads as the sheet
   * retracting out from under your thumb. A range means it settles once and
   * the content scrolls inside it.
   */
  height: 76%;
  max-height: 92%;
  min-height: 360px;
  z-index: 110;
  background: var(--adm-raised);
  border-top: 1px solid var(--adm-hairline-strong);
  border-radius: var(--adm-r-sheet) var(--adm-r-sheet) 0 0;
  box-shadow: 0 -24px 60px rgba(0, 0, 0, 0.6);
  transform: translateY(100%);
  transition: transform var(--adm-dur-sheet) var(--adm-ease);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.pulse-adm-sheet--open {
  transform: translateY(0);
}

.pulse-adm-sheet__grab {
  flex: none;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pulse-adm-sheet__grab > span {
  width: 38px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.16);
  display: block;
}

.pulse-adm-sheet__head {
  flex: none;
  padding: 4px var(--adm-gutter) 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--adm-hairline);
}

.pulse-adm-sheet__title {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pulse-adm-sheet__title > strong {
  font-size: 17px;
  font-weight: 400;
  color: var(--adm-text-hi);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pulse-adm-sheet__kind {
  font-family: var(--adm-font-mono);
  font-size: 8.5px;
  letter-spacing: 0.16em;
  color: var(--adm-text-low);
}

.pulse-adm-sheet__body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  /*
   * The bottom inset clears the home indicator on a sheet with NO footer —
   * the register and staff sheets have none, so their last row was sitting
   * against the bezel. Sheets with a footer get their clearance there, and the
   * extra here is harmless because it scrolls.
   */
  padding: 18px var(--adm-gutter) calc(16px + max(var(--safe-bottom, 0px), 8px));
}

.pulse-adm-sheet__foot {
  flex: none;
  padding: 14px var(--adm-gutter) calc(14px + max(var(--safe-bottom, 0px), 16px));
  border-top: 1px solid var(--adm-hairline);
  background: var(--adm-raised);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ---- Centred dialog (confirmations) ---- */

.pulse-adm-dialog {
  position: absolute;
  left: 24px;
  right: 24px;
  top: 50%;
  z-index: 155;
  padding: 22px 20px;
  border-radius: var(--adm-r-panel);
  background: var(--adm-dialog);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.62);
  opacity: 0;
  transform: translateY(-50%) scale(0.94);
  pointer-events: none;
  transition:
    opacity 220ms ease,
    transform 320ms var(--adm-ease);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pulse-adm-dialog--open {
  opacity: 1;
  transform: translateY(-50%) scale(1);
  pointer-events: auto;
}

.pulse-adm-dialog__title {
  font-size: 17px;
  font-weight: 500;
  color: var(--adm-text-hi);
}

.pulse-adm-dialog__body {
  font-size: 13px;
  font-weight: 300;
  line-height: 1.5;
  color: var(--adm-text-muted);
  /*
   * Newlines in the body are honoured. A confirmation that lists what is about
   * to change — five revenue streams and their destinations — is unreadable as
   * one run-on sentence, and the alternative is every caller building its own
   * markup.
   */
  white-space: pre-line;
}

.pulse-adm-dialog__actions {
  margin-top: 14px;
  display: flex;
  gap: 10px;
}

.pulse-adm-dialog__actions > button {
  flex: 1;
  height: 48px;
  border-radius: 24px;
  font-family: var(--adm-font-sans);
  font-size: 14.5px;
  font-weight: 500;
  cursor: pointer;
}

.pulse-adm-dialog__cancel {
  border: 1px solid var(--adm-border);
  background: none;
  color: var(--adm-text);
}

.pulse-adm-dialog__confirm {
  /* Positioning context for the working spinner. */
  position: relative;
  border: 0;
  background: var(--adm-btn);
  color: var(--adm-on-light);
  font-weight: 600;
}

/* A destructive confirm is red-filled: it is the last step, not an option. */
.pulse-adm-dialog__confirm--danger {
  background: var(--adm-danger);
  color: #fff;
}

.pulse-adm-dialog__actions > button[disabled] {
  opacity: 0.5;
  cursor: default;
}

/* ---- Toast ---- */

.pulse-adm-toast {
  position: absolute;
  left: var(--adm-gutter);
  right: var(--adm-gutter);
  bottom: calc(24px + var(--safe-bottom, 0px));
  z-index: 140;
  padding: 14px 16px;
  border-radius: var(--adm-r-card);
  background: rgba(20, 20, 26, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition:
    opacity 240ms ease,
    transform 320ms var(--adm-ease);
  display: flex;
  align-items: center;
  gap: 11px;
}

.pulse-adm-toast--on {
  opacity: 1;
  transform: translateY(0);
}

.pulse-adm-toast__dot {
  width: 5px;
  height: 5px;
  flex: none;
  border-radius: 50%;
  background: var(--adm-accent);
  display: block;
}

.pulse-adm-toast--danger .pulse-adm-toast__dot {
  background: var(--adm-danger);
}

.pulse-adm-toast__text {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  font-weight: 400;
  color: var(--adm-text);
}

/* ==========================================================================
   States
   ========================================================================== */

.pulse-adm-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 54px 0;
  text-align: center;
}

.pulse-adm-empty__title {
  font-size: 15px;
  font-weight: 400;
  color: var(--adm-text);
}

/*
 * Skeletons. The handoff draws no loading or empty states ("Missing from the
 * design"), so these are additions rather than omissions — but a list that
 * pops in from nothing reads as a fault, and admin lists are always fetched.
 */
.pulse-adm-skel {
  border-radius: 6px;
  background: var(--adm-fill);
  animation: pulse-adm-breathe 1.4s ease-in-out infinite;
}

@keyframes pulse-adm-breathe {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.45;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pulse-adm-skel {
    animation: none;
  }
}

/* Masked figures. Asterisks, not blur: blur reads as a rendering fault and
   can be squinted through. No row moves, because the slot keeps its width. */
.pulse-adm-hidden-figure {
  letter-spacing: 0.06em;
  color: var(--adm-text-muted);
}

/*
 * A retired credit pack.
 *
 * Dimmed rather than hidden: this sheet is the only place a pack can be put
 * back on sale, so a list that dropped them would make that impossible from
 * the phone. Dimming the row, not the whole thing, keeps the restore button
 * at full contrast — it is the one action a retired row has.
 */
.pulse-adm-allowance[data-off='true'] .pulse-adm-allowance__main {
  opacity: 0.5;
}

.pulse-adm-allowance[data-off='true'] .pulse-adm-allowance__del {
  color: var(--adm-text-muted);
}

/*
 * "OFF" rather than a bin icon.
 *
 * Retiring a pack deletes nothing — members keep the credits they bought and
 * the row comes back with one tap. A bin would promise a destruction that
 * does not happen, which is the more misleading of the two errors.
 */
.pulse-adm-allowance__del-text {
  font-family: var(--adm-font-mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

