/* ═══════════════════════════════════════════════════════════════════════════
   FitMind Ultimate — what the redesign didn't cover.

   app.css is the design bundle's stylesheet, unchanged. This file adds only
   the surfaces the prototype never had, in the same material: the sign-in gate,
   toasts, the streaming coach, markdown inside a bubble, and the image
   attachment. Same tokens, same radii, same hairlines.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── the gate ─────────────────────────────────────────────────────────────── */

.gate {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--page, #050506);
  overflow-y: auto;
}
.gate[hidden] { display: none; }

.gate-bloom {
  position: absolute;
  left: 50%;
  top: 12%;
  width: 520px;
  height: 460px;
  margin-left: -260px;
  background: radial-gradient(ellipse at 50% 50%, rgba(63, 99, 184, .34), transparent 68%);
  filter: blur(34px);
  pointer-events: none;
}

.gate-card {
  position: relative;
  width: 100%;
  max-width: 380px;
  box-sizing: border-box;
  padding: 34px 30px 30px;
  border-radius: 44px;
  background: #0B0B0D;
  border: 1px solid rgba(255, 255, 255, .07);
  box-shadow: 0 24px 60px -26px rgba(0, 0, 0, .9);
}

/* Three bars — the same primitive the gym icon is built from. */
.gate-mark { display: flex; align-items: center; gap: 3px; height: 18px; }
.gate-mark i { width: 3px; border-radius: 2px; background: var(--ocean, #457BF1); display: block; }
.gate-mark i:nth-child(1) { height: 10px; }
.gate-mark i:nth-child(2) { height: 18px; background: var(--starship, #E7FE55); }
.gate-mark i:nth-child(3) { height: 13px; }

.gate-title {
  margin: 20px 0 0;
  font: 700 27px/1 Manrope, sans-serif;
  letter-spacing: -.035em;
  color: var(--ink, #ECEFF4);
}
.gate-sub {
  margin: 12px 0 0;
  font: 400 12.5px/1.6 Manrope, sans-serif;
  color: rgba(236, 239, 244, .5);
}

.gate-tabs {
  display: flex;
  gap: 4px;
  margin: 26px 0 22px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .035);
  border: 1px solid rgba(255, 255, 255, .07);
}
.gate-tabs button {
  flex: 1;
  min-height: 40px;
  appearance: none;
  cursor: pointer;
  border: 0;
  border-radius: 999px;
  background: none;
  color: rgba(236, 239, 244, .45);
  font: 600 12.5px Manrope, sans-serif;
}
.gate-tabs button.on { background: rgba(255, 255, 255, .09); color: var(--ink, #ECEFF4); }

.gate-label {
  display: block;
  margin: 16px 0 8px;
  font: 400 8.2px/1 'Martian Mono', monospace;
  letter-spacing: .15em;
  color: rgba(236, 239, 244, .34);
}
.gate-input {
  width: 100%;
  box-sizing: border-box;
  min-height: 50px;
  padding: 0 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .1);
  color: var(--ink, #ECEFF4);
  font: 500 14px Manrope, sans-serif;
  outline: none;
}
.gate-input:focus { border-color: rgba(140, 175, 255, .4); background: rgba(255, 255, 255, .06); }

.auth-signup-only[hidden] { display: none; }

.gate-submit {
  width: 100%;
  min-height: 52px;
  margin-top: 24px;
  appearance: none;
  cursor: pointer;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(255, 255, 255, .06);
  color: var(--starship, #E7FE55);
  font: 700 13.5px Manrope, sans-serif;
  letter-spacing: -.01em;
}
.gate-submit:disabled { opacity: .55; cursor: default; color: rgba(236, 239, 244, .5); }

.gate-error {
  margin-top: 16px;
  font: 400 8.2px/1.7 'Martian Mono', monospace;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255, 138, 107, .85);
}
.gate-error[hidden] { display: none; }

.gate-note {
  margin: 18px 0 0;
  font: 400 7.6px/1.7 'Martian Mono', monospace;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: rgba(236, 239, 244, .24);
}

#auth-dev-row[hidden] { display: none; }
.gate-ghost {
  width: 100%;
  min-height: 44px;
  margin-top: 14px;
  appearance: none;
  cursor: pointer;
  border: 0;
  background: none;
  color: rgba(140, 175, 255, .7);
  font: 500 12px Manrope, sans-serif;
}

/* ── toasts ───────────────────────────────────────────────────────────────── */

.toast-wrap {
  position: fixed;
  left: 50%;
  bottom: 118px;
  z-index: 30;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  width: max-content;
  max-width: 88vw;
}
.toast {
  padding: 12px 18px;
  border-radius: 999px;
  background: rgba(16, 17, 22, .94);
  border: 1px solid rgba(255, 255, 255, .1);
  backdrop-filter: blur(20px) saturate(160%);
  color: var(--ink, #ECEFF4);
  font: 500 12.5px Manrope, sans-serif;
  box-shadow: 0 18px 40px -20px rgba(0, 0, 0, .9);
  animation: fmToastIn .28s cubic-bezier(.2, .8, .2, 1) both;
}
.toast.ok { color: var(--starship, #E7FE55); }
.toast.warn { color: #FF9A78; }

/* A record. Ember and a heavier border, because it is not the same event as a
   set going in and should not be said in the same voice — and it is rare
   enough to be allowed the emphasis. */
.toast.pr {
  color: #FF9A78;
  border-color: rgba(255,138,107,.42);
  background: rgba(255,138,107,.10);
  font-weight: 700; letter-spacing: .01em;
  box-shadow: 0 16px 44px -14px rgba(255,138,107,.34);
}
.toast.out { animation: fmToastOut .4s ease forwards; }

@keyframes fmToastIn  { from { opacity: 0; transform: translateY(10px) scale(.97); } }
@keyframes fmToastOut { to   { opacity: 0; transform: translateY(-6px); } }

/* ── coach ────────────────────────────────────────────────────────────────── */

.coach-clear {
  appearance: none;
  cursor: pointer;
  border: 0;
  background: none;
  padding: 8px 2px;
  letter-spacing: .16em;
}

.bub.err { color: #FF9A78; }

/* Markdown inside an assistant bubble. Tight, because a chat bubble is not a
   document — no big headings, no wide margins. */
.bub-body > *:first-child { margin-top: 0; }
.bub-body > *:last-child { margin-bottom: 0; }
.bub-body p { margin: 0 0 9px; }
.bub-body h4, .bub-body h5 {
  margin: 14px 0 7px;
  font: 600 13px Manrope, sans-serif;
  letter-spacing: -.01em;
  color: var(--ink, #ECEFF4);
}
.bub-body ul, .bub-body ol { margin: 0 0 9px; padding-left: 18px; }
.bub-body li { margin: 0 0 4px; }
.bub-body code {
  padding: 1px 5px;
  border-radius: 5px;
  background: rgba(255, 255, 255, .07);
  font: 400 11px 'Martian Mono', monospace;
}
.bub-body pre {
  margin: 0 0 9px;
  padding: 11px 13px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .07);
  overflow-x: auto;
}
.bub-body pre code { background: none; padding: 0; }
.bub-body blockquote {
  margin: 0 0 9px;
  padding-left: 12px;
  border-left: 2px solid rgba(140, 175, 255, .35);
  color: rgba(236, 239, 244, .62);
}
.bub-body a { color: #9CC0FF; }
.bub-body strong { font-weight: 700; color: var(--ink, #ECEFF4); }

.bub-img {
  display: block;
  width: 100%;
  max-width: 220px;
  margin-bottom: 9px;
  border-radius: 16px;
}

.coach-tool {
  display: inline-flex;
  align-items: center;
  margin-top: 10px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .08);
  font: 400 8.2px/1 'Martian Mono', monospace;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: rgba(140, 175, 255, .8);
}

/* The waiting state stands directly in the chat rather than inside another
   assistant bubble. The loader itself supplies both the identity and motion. */
.coach-live {
  align-self: flex-start;
  width: 60px;
  min-height: 60px;
  display: grid;
  place-items: center;
  margin: 4px 0;
  animation: fmRise .3s cubic-bezier(.2,.7,.3,1) both;
}
.coach-thinking {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
}
.coach-ai-loader {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 180px;
  height: 180px;
  transform: scale(.333333);
  transform-origin: center;
  user-select: none;
}
.coach-ai-word {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  color: #FFF;
  font: 600 24px/1 Manrope, system-ui, sans-serif;
  letter-spacing: .04em;
}
.coach-ai-word i {
  display: inline-block;
  font: inherit;
  font-style: normal;
  opacity: .4;
  animation: fmCoachLetter 3s ease-in-out infinite;
  animation-delay: calc(var(--letter-index) * .1s);
  will-change: transform, opacity;
}
.coach-ai-circle {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  animation: fmCoachCircle 5s linear infinite;
  will-change: transform, box-shadow;
}
@keyframes fmCoachCircle {
  0% {
    transform: translateZ(0) rotate(90deg);
    box-shadow:
      0 6px 12px 0 #38BDF8 inset,
      0 12px 18px 0 #005DFF inset,
      0 36px 36px 0 #1E40AF inset,
      0 0 3px 1.2px rgba(56,189,248,.3),
      0 0 6px 1.8px rgba(0,93,255,.2);
  }
  50% {
    transform: translateZ(0) rotate(270deg);
    box-shadow:
      0 6px 12px 0 #60A5FA inset,
      0 12px 6px 0 #0284C7 inset,
      0 24px 36px 0 #005DFF inset,
      0 0 3px 1.2px rgba(56,189,248,.3),
      0 0 6px 1.8px rgba(0,93,255,.2);
  }
  100% {
    transform: translateZ(0) rotate(450deg);
    box-shadow:
      0 6px 12px 0 #4DC8FD inset,
      0 12px 18px 0 #005DFF inset,
      0 36px 36px 0 #1E40AF inset,
      0 0 3px 1.2px rgba(56,189,248,.3),
      0 0 6px 1.8px rgba(0,93,255,.2);
  }
}
@keyframes fmCoachLetter {
  0%, 100% { opacity: .4; transform: translate3d(0, 0, 0) scale(1); }
  20% { opacity: 1; transform: translate3d(0, 0, 0) scale(1.15); }
  40% { opacity: .7; transform: translate3d(0, 0, 0) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .coach-ai-circle,
  .coach-ai-word i { animation: none; }
}

/* Chips normally create this breathing room. They disappear while streaming,
   so reserve it explicitly to stop the live bubble/tool state crowding the
   composer on short iPhone viewports. */
.coach.is-streaming .chat { padding-bottom: 24px; }

.coach-img {
  position: relative;
  width: max-content;
  margin: 0 0 10px;
}
.coach-img img { display: block; max-width: 120px; border-radius: 16px; }
.coach-img button {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 26px;
  height: 26px;
  appearance: none;
  cursor: pointer;
  border-radius: 50%;
  background: #16171C;
  border: 1px solid rgba(255, 255, 255, .16);
  color: var(--ink, #ECEFF4);
  font: 500 15px/1 Manrope, sans-serif;
}

.composer .attach {
  flex: none;
  width: 38px;
  height: 38px;
  appearance: none;
  cursor: pointer;
  border-radius: 50%;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .09);
  color: rgba(236, 239, 244, .6);
  font: 300 20px/1 Manrope, sans-serif;
}
.composer input:disabled { opacity: .5; }
.composer .send:disabled { opacity: .4; cursor: default; }

/* ── sheet form fields ────────────────────────────────────────────────────── */

.sheet input[type="text"]:focus,
.sheet input[type="email"]:focus,
.sheet input[type="password"]:focus,
.sheet input[type="number"]:focus {
  border-color: rgba(140, 175, 255, .4);
}

/* ── concise sheet actions ──────────────────────────────────────────────────
   A vertical list is a rounded rectangle, not a pile of equal capsules. The
   primary action gets one clear surface; navigation and destructive actions
   fall into quieter grouped rows underneath. */

.fm-sheet-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}
.fm-sheet-actions > .fm-disclosure-group { margin-top: 0; }

.fm-sheet-primary,
.fm-choice,
.fm-action-row {
  appearance: none;
  cursor: pointer;
  font-family: Manrope, sans-serif;
  -webkit-tap-highlight-color: transparent;
  transition: background .18s cubic-bezier(.23, 1, .32, 1),
              border-color .18s cubic-bezier(.23, 1, .32, 1),
              scale .16s cubic-bezier(.23, 1, .32, 1);
}

.fm-sheet-primary {
  width: 100%;
  min-height: 52px;
  padding: 0 18px;
  border-radius: 18px;
  border: 1px solid rgba(140, 175, 255, .28);
  background: rgba(63, 99, 184, .18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
  color: #C8D8FF;
  font-size: 13.5px;
  font-weight: 650;
  text-align: center;
}

.fm-sheet-primary.lime {
  border-color: rgba(231, 254, 85, .24);
  background: rgba(231, 254, 85, .1);
  color: #E7FE55;
}

.fm-sheet-primary:active,
.fm-choice:active,
.fm-action-row:active { scale: .98; }

.fm-compact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.fm-compact-action,
.fm-inline-action {
  appearance: none;
  cursor: pointer;
  min-height: 48px;
  font-family: Manrope, sans-serif;
  font-size: 13px;
  font-weight: 600;
  -webkit-tap-highlight-color: transparent;
  transition: background .18s cubic-bezier(.23, 1, .32, 1),
              border-color .18s cubic-bezier(.23, 1, .32, 1),
              scale .16s cubic-bezier(.23, 1, .32, 1);
}
.fm-compact-action {
  width: 100%;
  padding: 0 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, .1);
  background: rgba(255, 255, 255, .035);
  color: rgba(236, 239, 244, .82);
}
.fm-inline-action {
  width: 100%;
  padding: 0 12px;
  border: 0;
  background: transparent;
  color: rgba(236, 239, 244, .5);
}
.fm-compact-action:hover { background: rgba(255, 255, 255, .065); }
.fm-inline-action:hover { color: rgba(236, 239, 244, .75); }
.fm-compact-action:active,
.fm-inline-action:active { scale: .98; }

.fm-action-group {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 20px;
  background: rgba(255, 255, 255, .025);
}

.fm-action-row {
  width: 100%;
  min-height: 52px;
  padding: 10px 16px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
  background: transparent;
  color: #ECEFF4;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
}

.fm-action-row:last-child { border-bottom: 0; }
.fm-action-row:hover { background: rgba(255, 255, 255, .04); }
.fm-action-row.danger { color: #FF9A78; }
.fm-action-row.nav::after {
  content: '';
  flex: none;
  width: 7px;
  height: 7px;
  border-top: 1.5px solid rgba(236, 239, 244, .35);
  border-right: 1.5px solid rgba(236, 239, 244, .35);
  transform: rotate(45deg);
}

.fm-action-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.fm-action-copy strong {
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -.01em;
}
.fm-action-copy small {
  color: rgba(236, 239, 244, .38);
  font: 400 8px/1.4 'Martian Mono', monospace;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.fm-action-row.danger .fm-action-copy small { color: rgba(255, 154, 120, .5); }
.fm-action-value {
  flex: none;
  color: rgba(236, 239, 244, .38);
  font: 400 8.2px/1 'Martian Mono', monospace;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.fm-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 18px;
}
.fm-choice {
  min-height: 48px;
  padding: 0 12px;
  border-radius: 16px;
  border: 1px solid rgba(140, 175, 255, .2);
  background: rgba(63, 99, 184, .11);
  color: #B9CEFF;
  font-size: 12.5px;
  font-weight: 600;
}

.fm-disclosure-group {
  overflow: hidden;
  margin-top: 20px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 20px;
  background: rgba(255, 255, 255, .02);
}
.fm-disclosure { border-bottom: 1px solid rgba(255, 255, 255, .07); }
.fm-disclosure:last-child { border-bottom: 0; }
.fm-disclosure > summary {
  min-height: 54px;
  padding: 0 16px;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(236, 239, 244, .86);
  font: 600 13.5px/1.2 Manrope, sans-serif;
  -webkit-tap-highlight-color: transparent;
}
.fm-disclosure > summary::-webkit-details-marker { display: none; }
.fm-disclosure > summary::after {
  content: '';
  flex: none;
  width: 7px;
  height: 7px;
  margin-left: auto;
  border-right: 1.5px solid rgba(236, 239, 244, .34);
  border-bottom: 1.5px solid rgba(236, 239, 244, .34);
  transform: rotate(45deg) translate(-2px, 2px);
  transition: transform .18s cubic-bezier(.23, 1, .32, 1);
}
.fm-disclosure[open] > summary::after { transform: rotate(225deg) translate(-2px, 2px); }
.fm-disclosure-body { padding: 0 16px 18px; }
.fm-danger-menu .fm-disclosure-body,
.fm-manage-menu .fm-disclosure-body { padding: 0 8px 8px; }
.fm-danger-menu .fm-action-group,
.fm-manage-menu .fm-action-group { border-radius: 14px; }
.fm-danger-menu .fm-disclosure > summary { color: rgba(255, 154, 120, .72); }
.fm-sheet-note {
  margin-top: 16px;
  color: rgba(236, 239, 244, .42);
  font: 400 11.5px/1.55 Manrope, sans-serif;
}
.review-source {
  margin-top: 16px;
  color: rgba(140, 175, 255, .58);
  font: 500 11.5px/1.5 Manrope, sans-serif;
}

/* ── activity picker ───────────────────────────────────────────────────────
   Programme workouts stay together in one familiar group. One-off movement
   choices become a 2 × 2 field so the sheet has rhythm instead of seven
   technically identical rows. */
.activity-picker-section { margin-top: 24px; }
.activity-picker-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.activity-picker-label span {
  color: rgba(236, 239, 244, .8);
  font: 600 12.5px/1.2 Manrope, sans-serif;
  letter-spacing: -.01em;
}
.activity-picker-label small {
  color: rgba(236, 239, 244, .3);
  font: 400 7.6px/1 'Martian Mono', monospace;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.activity-picker-list {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .085);
  border-radius: 20px;
  background: rgba(255, 255, 255, .025);
}
.activity-picker-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.activity-pick {
  appearance: none;
  cursor: pointer;
  width: 100%;
  min-height: 64px;
  padding: 10px 14px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, .065);
  background: transparent;
  color: #ECEFF4;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  -webkit-tap-highlight-color: transparent;
  transition: background .18s cubic-bezier(.23, 1, .32, 1),
              border-color .18s cubic-bezier(.23, 1, .32, 1),
              scale .16s cubic-bezier(.23, 1, .32, 1);
}
.activity-pick:last-child { border-bottom: 0; }
.activity-pick:hover { background: rgba(255, 255, 255, .04); }
.activity-pick:active { scale: .985; }
.activity-pick-copy { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.activity-pick-copy strong {
  overflow: hidden;
  color: rgba(236, 239, 244, .88);
  font: 600 13.5px/1.25 Manrope, sans-serif;
  letter-spacing: -.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.activity-pick-copy small {
  color: rgba(236, 239, 244, .34);
  font: 400 7.8px/1 'Martian Mono', monospace;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.activity-pick-arrow {
  flex: none;
  width: 7px;
  height: 7px;
  margin-right: 3px;
  border-top: 1.5px solid rgba(236, 239, 244, .28);
  border-right: 1.5px solid rgba(236, 239, 244, .28);
  transform: rotate(45deg);
}
.activity-pick.is-tile {
  min-height: 112px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, .085);
  border-radius: 20px;
  background: rgba(255, 255, 255, .028);
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}
.activity-pick.is-tile:hover { background: rgba(255, 255, 255, .055); }
.activity-pick.is-tile .activity-pick-copy { width: 100%; flex: none; }

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

/* ── onboarding ───────────────────────────────────────────────────────────────
   The first-run wizard, ported from the live app and restyled: same questions,
   same steps, graphite cards and lime for the answer you picked. */

#onboarding-screen {
  position: fixed;
  inset: 0;
  z-index: 25;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(6, 7, 9, .88);
  backdrop-filter: blur(6px);
  overflow-y: auto;
}

.ob-card {
  position: relative;
  width: 100%;
  max-width: 400px;
  max-height: calc(100% - 24px);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  padding: 26px 24px 22px;
  border-radius: 40px;
  background: #101116;
  border: 1px solid rgba(255, 255, 255, .07);
  box-shadow: 0 24px 60px -26px rgba(0, 0, 0, .9);
  animation: fmPop .34s cubic-bezier(.2, .8, .2, 1) both;
}

.ob-progress {
  height: 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, .07);
  overflow: hidden;
  flex: none;
}
.ob-progress-fill {
  height: 3px;
  border-radius: 2px;
  background: var(--starship, #E7FE55);
  transition: width .4s cubic-bezier(.2, .8, .2, 1);
}

.ob-body { flex: 1; min-height: 0; overflow-y: auto; padding: 22px 2px 4px; scrollbar-width: none; }
.ob-body::-webkit-scrollbar { display: none; }

.ob-title {
  margin: 0 0 8px;
  font: 700 21px/1.25 Manrope, sans-serif;
  letter-spacing: -.025em;
  color: var(--ink, #ECEFF4);
}
.ob-sub { margin: 0 0 18px; font: 400 12.5px/1.6 Manrope, sans-serif; color: rgba(236, 239, 244, .5); }
.ob-hint { font: 400 8.2px/1 'Martian Mono', monospace; letter-spacing: .14em; color: rgba(236, 239, 244, .34); }

.ob-options { display: flex; flex-direction: column; gap: 8px; }
.ob-option {
  width: 100%;
  min-height: 60px;
  padding: 12px 16px;
  appearance: none;
  cursor: pointer;
  text-align: left;
  border-radius: 20px;
  background: rgba(255, 255, 255, .035);
  border: 1px solid rgba(255, 255, 255, .08);
  color: var(--ink, #ECEFF4);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}
.ob-option.selected { background: rgba(231, 254, 85, .08); border-color: rgba(231, 254, 85, .34); }
.ob-option-label { font: 600 13.5px Manrope, sans-serif; letter-spacing: -.01em; }
.ob-option-sub { font: 400 8.2px/1 'Martian Mono', monospace; letter-spacing: .12em; color: rgba(236, 239, 244, .38); }
.ob-option.selected .ob-option-label { color: var(--starship, #E7FE55); }

.ob-chip-row { display: flex; flex-wrap: wrap; gap: 7px; }
.ob-chip {
  min-height: 44px;
  padding: 0 15px;
  appearance: none;
  cursor: pointer;
  border-radius: 999px;
  background: rgba(255, 255, 255, .035);
  border: 1px solid rgba(255, 255, 255, .09);
  color: rgba(236, 239, 244, .7);
  font: 600 12.5px Manrope, sans-serif;
}
.ob-chip.selected { background: rgba(231, 254, 85, .1); border-color: rgba(231, 254, 85, .36); color: var(--starship, #E7FE55); }
.ob-day-row .ob-day { flex: 1; min-width: 44px; padding: 0 6px; }

.ob-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

#onboarding-screen .input-label {
  display: block;
  margin: 14px 0 8px;
  font: 400 8.2px/1 'Martian Mono', monospace;
  letter-spacing: .15em;
  color: rgba(236, 239, 244, .34);
}
#onboarding-screen .input {
  width: 100%;
  box-sizing: border-box;
  min-height: 48px;
  padding: 13px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .1);
  color: var(--ink, #ECEFF4);
  font: 500 14px Manrope, sans-serif;
  outline: none;
}
#onboarding-screen .input:focus { border-color: rgba(140, 175, 255, .4); }
#onboarding-screen .ob-textarea { min-height: 92px; resize: none; line-height: 1.5; }

.ob-review { display: flex; flex-direction: column; margin: 4px 0 20px; }
.ob-review-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  min-height: 42px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .05);
}
.ob-review-row span { font: 400 8.2px/1 'Martian Mono', monospace; letter-spacing: .14em; color: rgba(236, 239, 244, .34); }
.ob-review-row b { font: 600 12.5px Manrope, sans-serif; color: rgba(236, 239, 244, .88); text-align: right; }

.ob-error {
  margin-top: 12px;
  font: 400 8.2px/1.7 'Martian Mono', monospace;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255, 138, 107, .85);
}

.ob-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; flex: none; }
.ob-back {
  min-height: 44px;
  padding: 0 4px;
  appearance: none;
  cursor: pointer;
  border: 0;
  background: none;
  color: rgba(236, 239, 244, .45);
  font: 600 12.5px Manrope, sans-serif;
}
#onboarding-screen .btn-primary {
  min-height: 48px;
  padding: 0 24px;
  appearance: none;
  cursor: pointer;
  border-radius: 20px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .12);
  color: var(--starship, #E7FE55);
  font: 700 13px Manrope, sans-serif;
}
.ob-skip {
  width: 100%;
  min-height: 44px;
  margin-top: 10px;
  appearance: none;
  cursor: pointer;
  border: 0;
  background: none;
  color: rgba(140, 175, 255, .7);
  font: 500 12px Manrope, sans-serif;
}

/* ── body composition card ────────────────────────────────────────────────── */
/* The weight is the headline, so it is set at the readiness numeral's weight
   rather than a stat tile's. The move sits beside it as a caption, not under
   it: they are one fact — where you are and which way you are going. */
.body-now {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 10px;
  margin-top: 16px;
  font: 200 30px/1 'Martian Mono', ui-monospace, monospace;
  color: #ECEFF4;
}
.body-now small { font: 200 13px/1 'Martian Mono', ui-monospace, monospace; color: rgba(236,239,244,.38); }
.body-move {
  font: 400 8.4px/1 'Martian Mono', ui-monospace, monospace;
  letter-spacing: .14em; color: rgba(140,175,255,.72);
}
.body-comp { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 16px; }
.body-comp span {
  display: flex; align-items: baseline; gap: 6px;
  font: 200 15px/1 'Martian Mono', ui-monospace, monospace; color: #ECEFF4;
}
.body-comp i {
  font-style: normal; font-weight: 400; font-size: 7.8px; letter-spacing: .14em;
  color: rgba(236,239,244,.38);
}
.body-comp em { font-style: normal; font-size: 10px; color: rgba(236,239,244,.38); }

/* The muscles the current lift is working, named under the live figure. */
.mm-now {
  margin-top: 10px; text-align: center;
  font: 400 8.4px/1.5 'Martian Mono', ui-monospace, monospace;
  letter-spacing: .16em; color: rgba(180, 188, 200, .8);
}

/* The planned-workout overview stays in the card's existing metadata line.
   It has no fill or outline, so Start session remains the one obvious CTA;
   the chevron is the only invitation. A larger invisible target makes the
   restrained treatment dependable on iPhone. */
.train-overview {
  min-height: 44px;
  margin: -17px -4px -17px 0;
  padding: 0 4px 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  appearance: none;
  border: 0;
  background: none;
  color: rgba(231, 254, 85, .82);
  font: inherit;
  letter-spacing: .13em;
  cursor: pointer;
  transition: color .16s, transform .12s;
  -webkit-tap-highlight-color: transparent;
}
.train-overview i {
  font: normal 400 17px/1 Manrope, system-ui, sans-serif;
  color: rgba(236, 239, 244, .34);
  transform: translateY(-1px);
}
.train-overview:hover { color: #E7FE55; }
.train-overview:active { transform: scale(.96); }
.train-overview:focus-visible {
  outline: 2px solid rgba(140, 175, 255, .72);
  outline-offset: 2px;
  border-radius: 10px;
}

/* ── ending a session ─────────────────────────────────────────────────────────
   One graphite X, centred. It replaced a lime button and an ember button sitting
   side by side under the set card: two saturated blocks arguing for attention on
   a screen whose job is the set in front of you. Pressing this is not a decision
   yet, so it carries no accent — the colour belongs on the two outcomes in the
   sheet it opens, where a choice is actually being made.

   Drawn from primitives, like every other icon in the app: two 1.5px bars
   crossed, no icon font. */
.end-x-wrap { display: flex; justify-content: center; margin-top: 14px; }

.end-x {
  position: relative;
  width: 52px; height: 52px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(255, 255, 255, .04);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .16s, border-color .16s, transform .12s;
}
.end-x:hover { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .22); }
.end-x:active { transform: scale(.94); }
.end-x:focus-visible { outline: 2px solid rgba(140, 175, 255, .7); outline-offset: 3px; }

.end-x i {
  position: absolute;
  width: 17px; height: 1.5px;
  border-radius: 1px;
  background: rgba(236, 239, 244, .62);
}
.end-x i:first-child { transform: rotate(45deg); }
.end-x i:last-child  { transform: rotate(-45deg); }

/* ── ending a session: the sheet the X opens ──────────────────────────────────
   The work is the hero. A set count is the only thing this sheet is really
   about, so it gets the dot-matrix numeral the readiness ring and the
   tonnes-lifted hero already use — the app's own way of saying "this is the
   number that matters" — and the two outcomes reduce to one word each.

   Colour does the explaining that captions used to. Lime is the app's keep-this
   accent; ember is reserved for the irreversible and appears nowhere else in a
   live session. Tinted fills rather than outlines, so the pair reads as coloured
   at arm's length, which is the distance you are at with a bar still racked. */
.sx { display: flex; flex-direction: column; align-items: center; }

.sx-stamp {
  font: 400 8.4px/1 'Martian Mono', ui-monospace, monospace;
  letter-spacing: .18em;
  color: rgba(236, 239, 244, .38);
}

.sx-work { display: flex; flex-direction: column; align-items: center; margin: 22px 0 26px; }
.sx-work .dm { display: grid; }
.sx-work .dm span { border-radius: 50%; display: block; }
.sx-unit {
  margin-top: 14px;
  font: 400 9px/1 'Martian Mono', ui-monospace, monospace;
  letter-spacing: .2em;
  color: rgba(236, 239, 244, .5);
}

.sx-empty {
  margin: 24px 0 26px;
  font: 600 19px/1.2 Manrope, system-ui, sans-serif;
  letter-spacing: -.02em;
  color: rgba(236, 239, 244, .62);
}

.sx-pair { display: flex; gap: 10px; width: 100%; }

.sx-btn {
  flex: 1;
  min-height: 56px;
  border-radius: 999px;
  font: 700 14.5px Manrope, system-ui, sans-serif;
  letter-spacing: -.01em;
  cursor: pointer;
  transition: background .16s, border-color .16s, transform .12s;
}
.sx-btn:active { transform: scale(.97); }
.sx-btn:focus-visible { outline: 2px solid rgba(140, 175, 255, .75); outline-offset: 3px; }

.sx-btn.save {
  border: 1px solid rgba(231, 254, 85, .36);
  background: rgba(231, 254, 85, .13);
  color: #E7FE55;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12);
}
.sx-btn.save:hover { background: rgba(231, 254, 85, .19); border-color: rgba(231, 254, 85, .5); }

.sx-btn.discard {
  border: 1px solid rgba(255, 138, 107, .3);
  background: rgba(255, 138, 107, .09);
  color: rgba(255, 156, 128, .95);
}
.sx-btn.discard:hover { background: rgba(255, 138, 107, .16); border-color: rgba(255, 138, 107, .46); }

.sx-btn.plain {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, .16);
  background: rgba(255, 255, 255, .05);
  color: rgba(236, 239, 244, .9);
}
.sx-btn.plain:hover { background: rgba(255, 255, 255, .09); }

.sx-note {
  margin-top: 16px;
  font: 400 8px/1 'Martian Mono', ui-monospace, monospace;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(236, 239, 244, .26);
}

/* ── profile photo ────────────────────────────────────────────────────────────
   .avatar centres its child, which is right for an initial and wrong for a
   photo: as a flex item the image will not stretch, so `width:100%` resolved
   against a shrunk box and the picture sat inset inside its own ring. Absolute
   fill takes it out of the flex flow entirely. */
.avatar { position: relative; overflow: hidden; }
.avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}
