/* TonPR — shared styles for the member app and admin */
/* Barlow and Barlow Condensed are bundled (SIL Open Font License, see /fonts/OFL-LICENSE.txt). */
@font-face { font-family: 'Barlow'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/barlow-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow'; font-style: normal; font-weight: 500; font-display: swap; src: url('/fonts/barlow-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow'; font-style: normal; font-weight: 600; font-display: swap; src: url('/fonts/barlow-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow Condensed'; font-style: normal; font-weight: 600; font-display: swap; src: url('/fonts/barlow-condensed-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow Condensed'; font-style: normal; font-weight: 700; font-display: swap; src: url('/fonts/barlow-condensed-latin-700-normal.woff2') format('woff2'); }

:root {
  --red: #ff3040;          /* logo red: fills, icons, the check-in slab */
  --red-text: #d81f33;     /* red for text/links on white (AA contrast) */
  --red-tint: #fff0f1;
  --ink: #16181b;
  --graphite: #262a2f;
  --muted: #646a72;
  --line: #e1e3e6;
  --surface: #f5f6f7;
  --white: #ffffff;
  --go: #1d7f55;
  --go-tint: #e9f6ef;
  --warn: #9a5b00;
  --warn-tint: #fff6e6;
  --radius-s: 6px;
  --radius-m: 10px;
  --display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --body: 'Barlow', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --shadow: 0 1px 2px rgba(22, 24, 27, 0.06), 0 4px 14px rgba(22, 24, 27, 0.06);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font: 400 17px/1.5 var(--body);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--red-text); text-underline-offset: 2px; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }

h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.05; letter-spacing: 0.005em; margin: 0 0 0.4em; }
h1 { font-size: clamp(34px, 7vw, 46px); }
h2 { font-size: 28px; }
h3 { font-size: 21px; font-weight: 600; }
p { margin: 0 0 0.8em; }
.muted { color: var(--muted); }
.small { font-size: 14.5px; }
.tnum { font-variant-numeric: tabular-nums; }

/* ---------- App bar ---------- */
.appbar {
  position: sticky; top: 0; z-index: 20;
  background: var(--graphite); color: #fff;
  padding: calc(env(safe-area-inset-top) + 10px) 16px 10px;
}
.appbar-inner { max-width: 1100px; margin: 0 auto; display: flex; align-items: center; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; }
.brand img { height: 20px; width: auto; }
.brand span { font-family: var(--display); font-weight: 600; font-size: 21px; letter-spacing: 0.01em; white-space: nowrap; }
@media (max-width: 360px) { .brand span { font-size: 18px; } }
.appbar .spacer { flex: 1; }
.appbar .link { white-space: nowrap; color: #e9eaec; background: none; border: 0; font: inherit; font-size: 15.5px; cursor: pointer; padding: 8px 4px; text-decoration: none; }
.appbar .link:hover { color: #fff; text-decoration: underline; }

main { padding: 24px 16px calc(48px + env(safe-area-inset-bottom)); }
.wrap { max-width: 600px; margin: 0 auto; }
.wrap-wide { max-width: 1100px; margin: 0 auto; }

/* ---------- Chevron progress (the sign-up steps) ---------- */
.steps { display: flex; gap: 4px; margin: 4px 0 26px; list-style: none; padding: 0; }
.steps li {
  flex: 1; position: relative; height: 38px;
  background: var(--surface); color: var(--muted);
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 50%, calc(100% - 12px) 100%, 0 100%, 12px 50%);
  display: flex; align-items: center; justify-content: center;
  font: 600 15px/1 var(--display); letter-spacing: 0.02em;
  transition: background 0.25s, color 0.25s;
}
.steps li:first-child { clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 50%, calc(100% - 12px) 100%, 0 100%); }
.steps li.done { background: #ffc9ce; color: #8c1220; }
.steps li.current { background: var(--red); color: #fff; }

/* ---------- Form ---------- */
.field { margin-bottom: 16px; }
.field label, .label { display: block; font-weight: 600; font-size: 15.5px; margin-bottom: 6px; }
.field .hint { font-size: 14px; color: var(--muted); margin-top: 4px; }
.req { color: var(--red-text); }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row3 { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 12px; }
@media (max-width: 480px) { .row3 { grid-template-columns: 1fr 1fr; } .row3 > :first-child { grid-column: 1 / -1; } }
input[type=text], input:not([type]), input[type=email], input[type=tel], input[type=password], input[type=date], input[type=number], input[type=search], input[type=datetime-local], select, textarea {
  width: 100%; font: inherit; font-size: 17px; color: var(--ink);
  background: var(--white); border: 1.5px solid #c9cdd2; border-radius: var(--radius-s);
  padding: 11px 12px; min-height: 48px;
}
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(255, 48, 64, 0.25); }
.invalid input, .invalid .sigbox, .invalid .check { border-color: var(--red-text) !important; }
.err { color: var(--red-text); font-size: 14.5px; margin-top: 5px; }

.check {
  display: flex; gap: 12px; align-items: flex-start; cursor: pointer;
  border: 1.5px solid var(--line); border-radius: var(--radius-m); padding: 14px; margin: 12px 0;
  background: var(--white); font-size: 16px;
}
.check input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--red); flex: none; }
.check:has(input:checked) { border-color: var(--ink); background: #fafbfb; }

/* Legal text panels */
.legal { border-left: 3px solid var(--red); padding: 2px 0 2px 16px; margin: 18px 0; font-size: 15.5px; line-height: 1.6; }
.legal h3 { margin-top: 16px; font-size: 18px; }
.legal h3:first-child { margin-top: 0; }
.legal ul { margin: 0 0 0.8em; padding-left: 20px; }
.legal li { margin-bottom: 2px; }
.scrollbox { max-height: 380px; overflow: auto; border: 1.5px solid var(--line); border-radius: var(--radius-m); padding: 16px 18px; margin: 12px 0; font-size: 15.5px; line-height: 1.6; background: var(--white); }
.scrollbox h3 { font-size: 18px; margin-top: 18px; }
.scrollbox h3:first-of-type { margin-top: 8px; }
.scrollbox ul { padding-left: 20px; }

/* ---------- Products ---------- */
.products { display: grid; gap: 12px; }
.product {
  display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: start;
  border: 1.5px solid var(--line); border-radius: var(--radius-m); padding: 16px; cursor: pointer; background: var(--white);
}
.product input { width: 22px; height: 22px; accent-color: var(--red); margin: 3px 0 0; }
.product:has(input:checked) { border-color: var(--red); box-shadow: inset 0 0 0 1px var(--red); }
.product h3 { margin: 0 0 2px; font-size: 22px; }
.product .price { font-family: var(--display); font-weight: 700; font-size: 24px; white-space: nowrap; text-align: right; line-height: 1; }
.product .per { display: block; font-family: var(--body); font-weight: 400; font-size: 13.5px; color: var(--muted); margin-top: 4px; }
.product ul { margin: 8px 0 0; padding-left: 18px; color: var(--muted); font-size: 14.5px; }
.product details summary { color: var(--red-text); font-size: 14.5px; cursor: pointer; margin-top: 4px; }

/* ---------- Signature ---------- */
.sigbox { position: relative; border: 1.5px solid #c9cdd2; border-radius: var(--radius-m); background: var(--white); touch-action: none; }
.sigbox canvas { display: block; width: 100%; height: 170px; cursor: crosshair; }
.sigbox .baseline { position: absolute; left: 18px; right: 18px; bottom: 38px; border-bottom: 1.5px dashed #c9cdd2; pointer-events: none; }
.sigbox .sig-x { position: absolute; left: 18px; bottom: 42px; color: #b3b8be; font: 700 22px var(--display); pointer-events: none; }
.sig-tools { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 20px; border-radius: var(--radius-s);
  font: 600 17px var(--body); cursor: pointer; text-decoration: none;
  border: 1.5px solid var(--ink); background: var(--ink); color: #fff;
}
.btn:hover { background: #000; }
.btn.secondary { background: var(--white); color: var(--ink); }
.btn.secondary:hover { background: var(--surface); }
.btn.red { background: var(--red); border-color: var(--red); color: #fff; }
.btn.red:hover { background: #ee2233; }
.btn.ghost { background: none; border-color: transparent; color: var(--red-text); padding: 0 8px; }
.btn.small { min-height: 36px; padding: 0 12px; font-size: 15px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.actions { display: flex; gap: 10px; justify-content: space-between; margin-top: 24px; }
.actions .btn:only-child { margin-left: auto; }

/* ---------- Check-in slab (the signature element) ---------- */
.checkin {
  position: relative; width: 100%; border: 0; cursor: pointer; text-align: left;
  background: var(--red); color: #fff; min-height: 128px; padding: 22px 110px 22px 22px;
  clip-path: polygon(0 0, calc(100% - 46px) 0, 100% 50%, calc(100% - 46px) 100%, 0 100%);
  border-radius: var(--radius-m) 0 0 var(--radius-m);
  font-family: var(--display);
}
.checkin .big { display: block; font-size: 46px; font-weight: 700; line-height: 0.95; }
.checkin .sub { display: block; font-family: var(--body); font-size: 15.5px; margin-top: 8px; opacity: 0.95; }
.checkin img { position: absolute; right: 58px; top: 50%; width: 64px; transform: translateY(-50%); opacity: 0.9; }
.checkin:hover { background: #ee2233; }
.checkin:active { transform: scale(0.99); }
.checkin.done { background: var(--go); }
.checkin:disabled { background: #c3c7cc; cursor: not-allowed; }
@media (prefers-reduced-motion: no-preference) {
  .checkin.just-done { animation: slide 0.5s ease-out; }
  @keyframes slide { from { transform: translateX(-10px); } to { transform: none; } }
}

/* ---------- Panels ---------- */
.panel { border: 1.5px solid var(--line); border-radius: var(--radius-m); padding: 18px; margin: 16px 0; background: var(--white); }
.panel > h2:first-child, .panel > h3:first-child, .panel-head { margin-top: 0; }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 10px; }
.panel-head h2, .panel-head h3 { margin: 0; }
.list { list-style: none; margin: 0; padding: 0; }
.list > li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.list > li:first-child { border-top: 0; }
.list .grow { flex: 1; min-width: 0; }
.list .title { font-weight: 600; }
.empty { color: var(--muted); padding: 6px 0; }

.meter { height: 10px; border-radius: 99px; background: var(--surface); overflow: hidden; margin: 8px 0 4px; }
.meter > span { display: block; height: 100%; background: var(--red); border-radius: 99px; }

.tag { display: inline-block; font-size: 13px; font-weight: 600; padding: 2px 9px; border-radius: 99px; background: var(--surface); color: var(--muted); white-space: nowrap; }
.tag.go { background: var(--go-tint); color: var(--go); }
.tag.warn { background: var(--warn-tint); color: var(--warn); }
.tag.red { background: var(--red-tint); color: var(--red-text); }

/* Date strip + slots for booking */
.datestrip { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 10px; scroll-snap-type: x mandatory; }
.datestrip button {
  flex: none; width: 62px; scroll-snap-align: start; border: 1.5px solid var(--line); background: var(--white);
  border-radius: var(--radius-m); padding: 8px 0; cursor: pointer; font: inherit; color: var(--ink);
}
.datestrip button b { display: block; font: 700 24px/1.1 var(--display); }
.datestrip button small { font-size: 12.5px; color: var(--muted); }
.datestrip button[aria-pressed=true] { background: var(--ink); color: #fff; border-color: var(--ink); }
.datestrip button[aria-pressed=true] small { color: #d6d9dd; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.slots button { min-height: 44px; border: 1.5px solid var(--line); background: var(--white); border-radius: var(--radius-s); font: 600 15.5px var(--body); cursor: pointer; color: var(--ink); }
.slots button:hover:not(:disabled) { border-color: var(--ink); }
.slots button:disabled { color: #b5b9be; text-decoration: line-through; cursor: not-allowed; }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  background: var(--ink); color: #fff; padding: 12px 18px; border-radius: var(--radius-m); z-index: 100;
  box-shadow: var(--shadow); font-size: 16px; max-width: calc(100% - 32px);
}
.toast.error { background: #8c1220; }

/* Dialog */
dialog { border: 0; border-radius: var(--radius-m); padding: 0; max-width: min(560px, calc(100% - 24px)); width: 100%; box-shadow: 0 20px 60px rgba(0,0,0,0.25); }
dialog::backdrop { background: rgba(22, 24, 27, 0.45); }
dialog .dlg { padding: 20px; }
dialog .dlg-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }

.pay-methods { display: grid; gap: 12px; }
.paybox { border: 1.5px solid var(--line); border-radius: var(--radius-m); padding: 16px; }
.paybox h3 { margin-bottom: 8px; }
.zelle-details { background: var(--surface); border-radius: var(--radius-s); padding: 12px 14px; margin-top: 10px; font-size: 16px; }
.zelle-details dt { color: var(--muted); font-size: 14px; }
.zelle-details dd { margin: 0 0 8px; font-weight: 600; word-break: break-word; }

.summary-line { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; padding: 14px 0; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.summary-line .amt { font: 700 30px var(--display); }

.install-tip { background: var(--surface); border-radius: var(--radius-m); padding: 14px 16px; font-size: 15px; margin-top: 16px; }

.footer-links { text-align: center; font-size: 14.5px; color: var(--muted); margin-top: 32px; }
.footer-links a { color: var(--muted); }
.eyebrow { font-family: var(--display); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: 13px; color: var(--red-text); margin: 0 0 4px; }
@media (max-width: 430px) { .hide-narrow { display: none; } }
.staff-link { margin-top: 10px; font-size: 13.5px; }
.powered { text-align: center; font-size: 12.5px; color: var(--muted); letter-spacing: .02em; padding: 0 16px calc(20px + env(safe-area-inset-bottom)); margin: -28px 0 0; }
.powered a { color: inherit; text-decoration: none; }
.brand .brand-sub { font-family: var(--body); font-weight: 400; font-size: .7em; opacity: .75; margin-left: 6px; letter-spacing: 0; text-transform: none; }
.powered strong { font-weight: 700; color: var(--ink); }

.spinner { width: 20px; height: 20px; border: 3px solid rgba(255,255,255,0.4); border-top-color: #fff; border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; } }

.sr-busy { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.btn.secondary .spinner, .btn.ghost .spinner { border-color: rgba(22,24,27,0.2); border-top-color: var(--ink); }

.datestrip button.closed { color: #a3a8ae; background: var(--surface); border-style: dashed; }
.datestrip button.closed[aria-pressed=true] { background: #8b9096; border-color: #8b9096; color: #fff; }
.slots button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; }
.slots button small { font-weight: 500; font-size: 12px; color: var(--muted); }
.slots button:disabled { text-decoration: none; }
.slots button:disabled small { color: inherit; }

.slots > p { grid-column: 1 / -1; }

/* Reminder banners and the last-visits countdown */
.alert { display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; border: 1.5px solid #f0c56b; background: var(--warn-tint); border-radius: var(--radius-m); padding: 14px 16px; margin: 0 0 16px; font-size: 15.5px; }
.alert.due { border-color: #f3a3ab; background: var(--red-tint); }
.alert.countdown { border-color: var(--line); background: var(--white); }
.countdown-body { display: flex; gap: 14px; align-items: center; }
.pips { display: flex; gap: 3px; flex: none; }
.pips span { width: 22px; height: 30px; background: #e1e3e6; clip-path: polygon(0 0, 45% 0, 100% 50%, 45% 100%, 0 100%, 55% 50%); }
.pips span.on { background: var(--red); }

/* Discounts at checkout */
.amt .was { font-family: var(--body); font-weight: 400; font-size: 17px; color: var(--muted); }
.discount-applied { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: var(--go-tint); color: var(--go); border-radius: var(--radius-s); padding: 8px 12px; margin: -6px 0 16px; font-weight: 600; font-size: 15px; }
.code-entry { margin: -6px 0 16px; }
.code-entry summary { color: var(--red-text); cursor: pointer; font-size: 15.5px; }
.code-entry form { display: flex; gap: 8px; margin-top: 10px; }
.code-entry input { max-width: 220px; text-transform: uppercase; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
dialog.wide { max-width: min(680px, calc(100% - 24px)); }

/* Trainer notes (admin and member app) */
.notes { list-style: none; margin: 0; padding: 0; }
.note { padding: 12px 0; border-top: 1px solid var(--line); }
.note:first-child { border-top: 0; }
.note-meta { font-size: 14px; color: var(--muted); }
.note-meta .tag { margin-left: 4px; vertical-align: 1px; }
.note-meta strong { color: var(--ink); }
.note-body { white-space: pre-wrap; margin: 4px 0 6px; overflow-wrap: anywhere; }

/* Documents */
.files { list-style: none; margin: 0; padding: 0; }
.file { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--line); }
.file:first-child { border-top: 0; }
.file .grow { min-width: 0; flex: 1; }
.file .title { overflow-wrap: anywhere; font-weight: 600; }
.thumb { flex: none; width: 56px; height: 56px; border-radius: var(--radius-s); overflow: hidden; background: var(--surface); display: grid; place-items: center; text-decoration: none; border: 1px solid var(--line); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.doc-icon { font: 700 14px var(--display); color: var(--red-text); letter-spacing: 0.04em; }
.upload-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 8px; }
.file-btn { cursor: pointer; }
@media (hover: hover) and (pointer: fine) { .only-touch { display: none !important; } }
.trainer-pick { margin-bottom: 12px; }
.trainer-pick .label { display: block; margin-bottom: 6px; }
.trainer-pick .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.trainer-pick .chip { min-height: 38px; padding: 0 14px; border-radius: 99px; border: 1.5px solid #c9cdd2; background: var(--white); font: 600 15px var(--body); color: var(--ink); cursor: pointer; display: inline-flex; align-items: center; gap: 7px; }
.trainer-pick .chip[aria-pressed=true] { background: var(--ink); border-color: var(--ink); color: #fff; }
.trainer-pick .dot { width: 10px; height: 10px; border-radius: 99px; }
.file-btn.loading { opacity: 0.6; pointer-events: none; }
/* Training plan (member app) */
.plan .plan-goal { margin-bottom: 8px; }
.plan .count-days { color: var(--red-text); font-weight: 600; }
.plan .coach-note { background: var(--surface); border-radius: var(--radius-s); padding: 10px 12px; white-space: pre-wrap; }
.plan h3 { margin-top: 14px; }
.plan h4 { font: 700 18px var(--display); margin: 14px 0 0; }
.plan details { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 10px; }
.plan ul.sessions, .plan ul.plain { list-style: none; padding: 0; margin: 6px 0; }
.plan ul.plain li { padding: 6px 0; }
.plan ul.sessions li { display: flex; gap: 10px; padding: 9px 0 9px 10px; border-top: 1px solid var(--line); border-left: 4px solid var(--k, #8a9099); }
.plan ul.sessions .day { font: 700 16px var(--display); width: 34px; flex: none; }
.plan .kind-tag { font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; margin-left: 4px; }
.plan .k-strength { --k: #1f6feb; } .plan .k-cardio { --k: #1a7f37; } .plan .k-intensity { --k: #d81f33; } .plan .k-long { --k: #8250df; }
.plan .k-skill { --k: #9a6700; } .plan .k-mobility { --k: #8a9099; } .plan .k-race { --k: #16181b; }
.plan-week.current h4 { color: var(--red-text); }

/* Workouts (admin board and member app) */
.ex-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.ex-card { border: 1.5px solid var(--line); border-radius: var(--radius-m); padding: 12px 14px; background: var(--white); }
.ex-card.done { border-color: #b7dfc8; background: var(--go-tint); }
.ex-card.pain { border-color: #f3b6bd; }
.ex-head { display: flex; gap: 10px; align-items: flex-start; }
.ex-num { flex: none; width: 26px; height: 26px; border-radius: 99px; background: var(--ink); color: #fff; display: grid; place-items: center; font: 700 14px var(--display); }
.ex-name { font-size: 17px; }
.ex-dose { font: 700 18px var(--display); color: var(--red-text); margin-top: 2px; }
.ex-card .cues { margin: 6px 0; padding-left: 20px; font-size: 14.5px; }
.ex-card .cues li { margin: 1px 0; }
.ex-note { font-size: 14px; background: var(--warn-tint); color: var(--warn); border-radius: 6px; padding: 6px 8px; margin: 6px 0; }
.ex-log { font-size: 14px; color: var(--go); font-weight: 600; margin-top: 4px; }
.ex-actions { margin-top: 8px; }
.rungs { display: inline-flex; gap: 3px; vertical-align: middle; margin-left: 6px; }
.rungs i { width: 8px; height: 8px; border-radius: 99px; background: var(--line); display: block; }
.rungs i.on { background: var(--red); }
.ex-role { list-style: none; font: 700 20px var(--display); margin-top: 8px; }
.ex-log-form { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; margin-top: 8px; }
.ex-log-form label { display: flex; flex-direction: column; font-size: 13px; font-weight: 600; color: var(--muted); }
.ex-log-form input { width: 74px; min-height: 40px; padding: 6px 8px; font-size: 16px; }
.rate { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.rate .chip, .rpe .chip { min-height: 36px; padding: 0 12px; border-radius: 99px; border: 1.5px solid #c9cdd2; background: var(--white); font: 600 14px var(--body); color: var(--ink); cursor: pointer; }
.rate .chip[aria-pressed=true] { background: var(--ink); border-color: var(--ink); color: #fff; }
.rate .chip-pain { border-color: #f3b6bd; color: #b3192b; }
.rate .chip-pain[aria-pressed=true] { background: #b3192b; border-color: #b3192b; color: #fff; }
.rpe { display: flex; gap: 4px; flex-wrap: wrap; }
.rpe .chip-check span { min-width: 36px; text-align: center; padding: 6px 0; font-size: 15px; font-weight: 600; }
.rpe .chip-check input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip-check input { position: absolute; opacity: 0; }
.chip-check span { display: inline-block; border: 1.5px solid #c9cdd2; border-radius: 99px; cursor: pointer; background: var(--white); }
.chip-check input:focus-visible + span { outline: 3px solid var(--red); outline-offset: 1px; }
.trainer-about { background: var(--surface); border-radius: 10px; padding: 10px 12px; margin: -4px 0 14px; }
.trainer-about p { margin: 6px 0 0; white-space: pre-line; }
.chip .tag { font-size: 11px; padding: 0 6px; margin-left: 4px; }
.trainer-photo { width: 56px; height: 56px; border-radius: 99px; object-fit: cover; float: left; margin: 0 12px 6px 0; }
.trainer-about::after { content: ''; display: block; clear: both; }
.rate-stars { display: flex; gap: 4px; margin: 6px 0 10px; }
.rate-stars button { font-size: 34px; line-height: 1; background: none; border: 0; padding: 2px 4px; color: #d9dce0; cursor: pointer; }
.rate-stars button.on { color: #d69e2e; }
.rate-card .link { margin-top: 6px; }
.rate-card .link { background: none; border: 0; padding: 0; color: var(--muted); text-decoration: underline; cursor: pointer; font: inherit; font-size: 14px; }
.rate-radio { border: 0; padding: 0; margin: 8px 0 14px; }
.rate-radio label { cursor: pointer; }
.rate-radio input { position: absolute; opacity: 0; }
.rate-radio span[aria-hidden] { font-size: 40px; line-height: 1; color: #d9dce0; padding: 0 3px; }
.rate-radio label:has(~ label input:checked) span[aria-hidden], .rate-radio label:has(input:checked) span[aria-hidden] { color: #d69e2e; }
.rate-radio input:focus-visible + span { outline: 2px solid var(--ink); border-radius: 6px; }

.where-tag { font-size: 12px; font-weight: 600; padding: 1px 8px; border-radius: 99px; background: var(--surface); color: var(--muted); }
.where-tag.own { background: #eef6ff; color: #1d4f91; }

.ex-rest { font-weight: 500; color: var(--muted); font-size: 0.9em; }

/* Exercise demos */
.ex-media{margin:6px 0}
.ex-media summary{cursor:pointer;font-weight:600;color:var(--accent,#1f6f5c)}
.ex-media-list{display:grid;gap:8px;margin-top:6px}
.ex-media figure{margin:0}
.ex-media video,.ex-media img{width:100%;max-height:340px;object-fit:contain;background:#000;border-radius:8px}

/* Pre-visit intake */
#ik h2 { margin: 18px 0 6px; }
#ik label:not(.check) { display: block; margin: 10px 0; font-weight: 600; }
#ik label:not(.check) input, #ik label:not(.check) select, #ik label:not(.check) textarea { display: block; width: 100%; margin-top: 4px; font-weight: 400; }
#ik fieldset { border: 0; padding: 0; margin: 12px 0; }
#ik legend { font-weight: 700; margin-bottom: 6px; }
#ik .check { margin: 6px 0; font-weight: 400; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.intake-cta { border-color: #9cc9b8; background: #f2faf6; }
.sessions .pace { color: var(--ink); margin-top: 2px; }
details.heat summary { color: #9a5b00; }
.slots button.full { color: var(--muted, #6b7370); border-style: dashed; }
.slots button.full small { font-weight: 400; }
.legal-page h2 { margin-top: 20px; }
.legal-page li { margin: 4px 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.legal-text { max-height: 55vh; overflow: auto; }
.legal-text h1 { font-size: 22px; } .legal-text h2 { font-size: 17px; margin-top: 16px; } .legal-text h3 { font-size: 15px; }
.eula-row { flex-wrap: wrap; } .eula-row > [data-field] { flex-basis: 100%; }
.sessions .effort { color: var(--ink); margin-top: 2px; }
.sessions .change, .change { color: #7a5a00; }
.sessions li.skipped { opacity: .55; }
.where-tag.group { background: #e8f0fe; color: #1a4fb5; }

/* ---------- Platform: phones, tablets, home-screen installs (see js/platform.js) ---------- */
/* Taps respond immediately (no double-tap-to-zoom delay) and don't flash grey on iOS. */
a, button, label, summary, .btn, [role=button] { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
/* iPhones zoom the whole page when a field under 16px gets focus; keep every field at 16px on touch screens. */
@media (pointer: coarse) {
  input:not([type=checkbox]):not([type=radio]):not([type=range]), select, textarea { font-size: 16px !important; }
}
/* Notch / rounded corners in landscape: keep content clear of the sides. */
.appbar { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
main { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
/* Installed to the home screen: no rubber-band reveal behind the app bar, no long-press callouts on buttons. */
html.standalone body { overscroll-behavior-y: none; }
html.standalone .btn, html.standalone button { -webkit-touch-callout: none; }
.install-actions { margin-top: 10px; display: flex; gap: 8px; }
/* "A new version is ready" (an installed app has no reload button of its own). */
.update-bar { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 60;
  display: flex; gap: 12px; align-items: center; background: var(--graphite); color: #fff; padding: 10px 12px 10px 16px; border-radius: var(--radius-m);
  box-shadow: 0 8px 30px rgba(0,0,0,.25); font-size: 15px; width: max-content; max-width: calc(100% - 24px); }
.update-bar .btn { background: var(--red); border-color: var(--red); color: #fff; }
.studio-where { margin: 12px 0 0; }
/* Phones: dialogs come up from the bottom like a native sheet, and scroll inside if tall. */
@media (max-width: 560px) {
  dialog { margin: auto 0 0; max-width: 100%; width: 100%; border-radius: 16px 16px 0 0; max-height: 92dvh; overflow-y: auto; overscroll-behavior: contain;
    padding-bottom: env(safe-area-inset-bottom); }
  dialog.wide { max-width: 100%; }
  dialog .dlg-actions { position: sticky; bottom: 0; background: inherit; padding-top: 10px; margin-bottom: -4px; }
  dialog .dlg-actions .btn { flex: 1; }
}

/* Sign-up: open step tabs, chosen plan, info drawers */
.steps.open li button { all: unset; cursor: pointer; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.steps.open li button:hover { text-decoration: underline; }
.steps.open li button:focus-visible { outline: 2px solid var(--ink); outline-offset: -4px; }
.chosen { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; margin: 0 0 22px; }
details.info { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; margin: 14px 0; background: var(--white); }
details.info > summary { cursor: pointer; font-weight: 600; }
details.info[open] > summary { margin-bottom: 8px; }
/* Member sign-in help */
.code-help { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 14px; }
.notice { margin-top: 16px; padding: 12px 14px; border-radius: 10px; background: var(--red-tint); color: var(--ink); font-size: 15px; }
.ways, .todo { padding-left: 20px; margin: 8px 0; }
.ways li, .todo li { margin: 6px 0; }

.billing-banner { margin: 12px auto 12px; max-width: 1100px; }
.billing-banner a { font-weight: 600; margin-left: 6px; }
