/* DF COACH — black / charcoal / cream. Mobile-first. */
:root {
  --bg: #111111;
  --panel: #1b1b1b;
  --panel-2: #242424;
  --line: #2f2d2a;
  --line-2: #3d3934;
  --cream: #f5e8d5;
  --cream-dim: #d9cbb7;
  --text: #f3efe9;
  --muted: #9d958a;
  --danger: #e59b8f;
  --radius: 14px;
  --tap: 46px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.45 var(--font); -webkit-font-smoothing: antialiased; min-height: 100dvh; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
code { background: var(--panel-2); padding: 1px 5px; border-radius: 5px; font-size: .9em; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.block { display: block; }
.grow { flex: 1; min-width: 0; }
.center { text-align: center; }
.prewrap { white-space: pre-wrap; margin: 0; }
.row { display: flex; align-items: center; gap: 10px; }
.row.between { justify-content: space-between; }

/* ---------- shell ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between;
  padding: calc(10px + var(--safe-t)) 16px 10px; background: rgba(17,17,17,.88); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--cream); letter-spacing: .28em; font-size: 13px; font-weight: 500; }
.brand img { width: 32px; height: 32px; border-radius: 8px; object-fit: cover; }
.sync-chip { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--line-2); background: transparent; color: var(--cream-dim); font-size: 12px; letter-spacing: .04em; }
.sync-chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.sync-chip.ok .dot { background: var(--cream); }
.sync-chip.busy .dot { background: var(--cream); animation: pulse 1s infinite alternate; }
.sync-chip.warn { border-color: var(--danger); color: var(--danger); }
.sync-chip.warn .dot { background: var(--danger); }
.sync-chip.off { border-color: var(--cream); color: var(--cream); }
@keyframes pulse { to { opacity: .25; } }

main { max-width: 760px; margin: 0 auto; padding: 0 14px calc(96px + var(--safe-b)); }
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; justify-content: center; gap: 12px;
  padding: 6px 12px calc(6px + var(--safe-b)); background: rgba(20,20,20,.94); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line);
}
.tabbar a { flex: 0 1 160px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; color: var(--muted); font-size: 11px; letter-spacing: .05em; }
.tabbar a.on { color: var(--cream); }
body.no-shell .topbar, body.no-shell .tabbar { display: none; }
body.no-shell main { padding-bottom: 30px; }
.boot { display: grid; place-items: center; min-height: 70vh; }
.boot img { width: 84px; border-radius: 18px; opacity: .7; }

/* ---------- typography & layout ---------- */
.page { padding-top: 14px; }
.page-title { font-size: 26px; font-weight: 500; letter-spacing: .01em; margin: 6px 2px 14px; color: var(--cream); }
.subhead { display: grid; grid-template-columns: var(--tap) 1fr var(--tap); align-items: center; gap: 6px; margin: 4px 0 8px; }
.subhead h1 { margin: 0; text-align: center; font-size: 20px; font-weight: 600; color: var(--cream); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 12px 0; }
h3.section { margin: 0 0 10px; font-size: 13px; text-transform: uppercase; letter-spacing: .16em; color: var(--cream-dim); font-weight: 600; }
h4.mini { margin: 16px 0 2px; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .12em; font-weight: 600; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
.span2 { grid-column: 1 / -1; }
.empty { color: var(--muted); text-align: center; padding: 28px 10px; }
.empty-card { text-align: center; padding: 26px 16px; }
.empty-card p { margin: 4px 0 12px; }
.badge { display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 99px; border: 1px solid var(--line-2); color: var(--cream-dim); letter-spacing: .03em; vertical-align: middle; font-weight: 500; }
.banner { background: var(--panel-2); color: var(--cream); border-radius: 10px; padding: 10px 12px; font-size: 14px; margin: 10px 0; }
.err { color: var(--danger); font-size: 14px; }
.hint { color: var(--cream-dim); font-size: 13px; margin: 10px 0 4px; }
.ticks { padding-left: 0; list-style: none; margin: 8px 0 14px; }
.ticks li { padding-left: 22px; position: relative; margin: 6px 0; }
.ticks li::before { content: "✓"; position: absolute; left: 0; color: var(--cream); }

/* ---------- controls ---------- */
.label { display: block; font-size: 12px; color: var(--cream-dim); margin: 12px 0 6px; letter-spacing: .02em; }
.field {
  width: 100%; min-height: var(--tap); padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line-2);
  background: #141414; color: var(--text); outline: none; transition: border-color .15s;
  font-size: 16px; /* 16px stops iOS zooming on focus */
}
.field:focus { border-color: var(--cream); }
.field::placeholder { color: #6d675f; }
.field.bad { border-color: var(--danger); background: #2a1916; }
textarea.field { resize: vertical; min-height: 64px; }
select.field { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 30px; }
select.field.inline { width: auto; min-height: 36px; padding: 4px 30px 4px 10px; font-size: 14px; }
/* iPhone Safari gives date inputs a fixed intrinsic width that ignores width:100% → force them to fit. */
input[type="date"].field { -webkit-appearance: none; appearance: none; display: block; min-width: 0; max-width: 100%; line-height: 1.45; }
input[type="date"].field::-webkit-date-and-time-value { text-align: left; margin: 0; min-height: 1.45em; }
input[type="date"].field::-webkit-datetime-edit { padding: 0; }
input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(.85); margin-left: 4px; }
input.field, select.field, textarea.field { max-width: 100%; min-width: 0; }
input[type="number"].field { -moz-appearance: textfield; }
input[type="number"].field::-webkit-inner-spin-button, input[type="number"].field::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
/* Grid/flex children must be allowed to shrink below their content width. */
.grid2 > *, .log-controls > *, .ex-edit-grid > *, .set-row > *, .stats > *, .add-day > *, .row-actions > *, .quick-row > * { min-width: 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--tap); padding: 0 18px;
  border-radius: 12px; border: 1px solid var(--cream); background: var(--cream); color: #121212; font-weight: 650; font-size: 15px; letter-spacing: .01em;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .45; }
.btn.block { display: flex; width: 100%; margin-top: 10px; }
.btn.secondary { background: transparent; color: var(--cream); border-color: #6e6356; }
.btn.ghost { background: transparent; color: var(--cream-dim); border-color: transparent; }
.btn.danger { background: transparent; color: var(--danger); border-color: #6a3a33; }
.btn.sm { min-height: 38px; font-size: 14px; padding: 0 14px; }
.link { background: none; border: 0; color: var(--cream-dim); text-decoration: underline; text-underline-offset: 3px; padding: 12px; font-size: 14px; display: block; margin: 4px auto 0; }
.icon-btn { width: var(--tap); height: var(--tap); display: inline-grid; place-items: center; border-radius: 12px; border: 1px solid transparent; background: transparent; color: var(--cream); }
.icon-btn.solid { background: var(--cream); color: #121212; }
.icon-btn.sm { width: 38px; height: 38px; color: var(--cream-dim); border-color: var(--line-2); }
.icon-btn:disabled { opacity: .3; }
.icon-btn.flip svg { transform: scaleX(-1); }
.row-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.row-actions > .btn { flex: 1 1 auto; }
.form h3.section { margin-top: 24px; }
.form h3.section:first-child { margin-top: 0; }
.actions { margin-top: 18px; display: flex; justify-content: flex-end; }
.actions .btn { min-width: 160px; }

.seg { display: flex; background: #151515; border: 1px solid var(--line-2); border-radius: 12px; padding: 3px; gap: 3px; margin: 10px 0; }
.seg > button, .seg > label { flex: 1; min-height: 40px; border: 0; border-radius: 9px; background: transparent; color: var(--cream-dim); font-size: 14px; display: grid; place-items: center; position: relative; }
.seg > button.on, .seg > label:has(input:checked) { background: var(--cream); color: #121212; font-weight: 650; }
.seg > label input { position: absolute; opacity: 0; pointer-events: none; }
.seg.small { margin: 0; }
.seg.small > button { min-height: 38px; font-size: 13px; }

.chip { border: 1px solid var(--line-2); background: transparent; color: var(--cream-dim); border-radius: 99px; padding: 6px 12px; font-size: 13px; min-height: 34px; }
.pills { display: flex; gap: 8px; margin: 12px 0; }
.pills.scroll { overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; margin-left: -14px; margin-right: -14px; padding-left: 14px; padding-right: 14px; }
.pills.scroll::-webkit-scrollbar { display: none; }
.pill { flex: none; min-height: 40px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--line-2); background: transparent; color: var(--cream-dim); font-size: 14px; display: inline-flex; align-items: center; white-space: nowrap; }
.pill.on { background: var(--cream); border-color: var(--cream); color: #121212; font-weight: 650; }
.pill.add { border-style: dashed; }

/* ---------- toast ---------- */
.toast { position: fixed; left: 50%; bottom: calc(84px + var(--safe-b)); transform: translate(-50%, 20px); opacity: 0; pointer-events: none; z-index: 50;
  background: var(--cream); color: #121212; padding: 11px 16px; border-radius: 12px; font-size: 14px; font-weight: 600; max-width: calc(100% - 32px); box-shadow: 0 8px 30px rgba(0,0,0,.5); transition: .2s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: #3a201c; color: #ffd9d2; border: 1px solid #7a3e35; }
body.no-shell .toast { bottom: calc(24px + var(--safe-b)); }

/* ---------- welcome ---------- */
.welcome { max-width: 400px; margin: 0 auto; padding: calc(28px + var(--safe-t)) 8px 10px; }
.welcome-hero { text-align: center; margin-bottom: 40px; }
.welcome-logo { width: 150px; height: 150px; object-fit: cover; border-radius: 28px; }
.welcome h1 { margin: 6px 0 2px; font-weight: 400; letter-spacing: .38em; color: var(--cream); font-size: 22px; padding-left: .38em; }
.tagline { margin: 0; color: var(--muted); letter-spacing: .3em; font-size: 11px; }
.welcome { min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; padding-bottom: calc(30px + var(--safe-b)); }
.welcome-actions { display: flex; flex-direction: column; gap: 6px; }
.gbtn { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; min-height: 52px; border-radius: 26px; border: 1px solid #8e918f; background: #131314; color: #e3e3e3; font: 500 16px/1 "Roboto", var(--font); letter-spacing: .01em; }
.gbtn:active { background: #1f1f20; }
.gbtn:disabled { opacity: .5; }
.welcome-actions .btn.block { min-height: 50px; margin-top: 4px; }
.welcome-foot { text-align: center; color: var(--muted); font-size: 12px; margin-top: 28px; }
.welcome-foot a { color: var(--cream-dim); text-decoration: underline; text-underline-offset: 3px; margin-left: 4px; }
.reconnect-bar { display: flex; align-items: center; gap: 10px; justify-content: space-between; border: 1px solid #6a3a33; background: #241715; color: #ffd9d2; border-radius: 12px; padding: 10px 12px; margin-top: 12px; font-size: 13px; }
.reconnect-bar .btn { min-height: 34px; padding: 0 12px; font-size: 13px; flex: none; }

/* ---------- dashboard ---------- */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.stat b { display: block; font-size: 26px; font-weight: 500; color: var(--cream); line-height: 1.1; }
.stat span { font-size: 11px; color: var(--muted); }
.nudge { display: flex; gap: 12px; align-items: center; margin: 12px 0; padding: 14px; border-radius: var(--radius); border: 1px solid #5c5348; background: #1d1b18; color: var(--cream); }
.nudge span { flex: 1; } .nudge .small { color: var(--cream-dim); }
.searchbar { display: flex; gap: 10px; margin-top: 16px; }
.searchbar .icon-btn { flex: none; }
.search { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line-2); background: #141414; color: var(--muted); }
.search:focus-within { border-color: var(--cream); }
.search input { flex: 1; min-width: 0; height: var(--tap); background: transparent; border: 0; outline: none; color: var(--text); font-size: 16px; }
.list { margin-top: 4px; }
.client-row { display: flex; align-items: center; gap: 12px; padding: 12px; margin: 8px 0; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); color: var(--muted); }
.client-row b { color: var(--text); font-weight: 600; }
.client-row:active { background: var(--panel-2); }
.avatar { width: 44px; height: 44px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--panel-2); border: 1px solid var(--line-2); color: var(--cream); font-weight: 600; letter-spacing: .04em; }

/* ---------- client page ---------- */
.client-name .badge { font-size: 10px; }
.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); margin: 0 -14px; padding: 0 14px; position: sticky; top: calc(53px + var(--safe-t)); background: var(--bg); z-index: 10; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { flex: none; padding: 12px 12px 11px; font-size: 14px; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a.on { color: var(--cream); border-color: var(--cream); font-weight: 600; }
.tab-body { padding-top: 4px; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
.fact span { display: block; font-size: 12px; color: var(--muted); }
.fact b { font-weight: 500; overflow-wrap: anywhere; }
.card .fact + .fact { margin-top: 10px; }

/* program builder */
.add-day { display: flex; gap: 8px; }
.add-day .field { flex: 1; }
.add-day .btn { flex: none; padding: 0 14px; }
.quick-names { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.day-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 4px; }
.day-name { flex: 1 1 160px; font-weight: 600; color: var(--cream); font-size: 17px; }
.day-tools { display: flex; gap: 6px; }
.ex-edit { border-top: 1px solid var(--line); padding: 14px 0 12px; }
.ex-edit:first-child { border-top: 0; }
.ex-edit-top { display: flex; align-items: center; gap: 10px; }
.num { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--panel-2); color: var(--cream); font-size: 12px; font-weight: 600; }
.ex-name { font-weight: 600; }
.ex-edit-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 8px 0 8px 36px; }
.ex-edit-grid label span { display: block; font-size: 11px; color: var(--muted); margin-bottom: 3px; }
.ex-edit-grid .field { text-align: center; padding: 8px 6px; }
.ex-notes { margin-left: 36px; width: calc(100% - 36px); min-height: 40px; font-size: 14px; }
.ex-tools { display: flex; gap: 6px; justify-content: flex-end; margin-top: 8px; }
.save-state { text-align: center; margin: 12px 0 0; }

/* workout log */
.log-controls { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 10px; align-items: center; margin: 6px 0 10px; }
.draft-flag { font-size: 13px; color: var(--cream); background: #24201b; border: 1px dashed #6e6356; padding: 8px 12px; border-radius: 10px; margin-bottom: 8px; }
.ex-log { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin: 10px 0; }
.ex-title { display: flex; align-items: center; gap: 10px; }
.ex-title b { flex: 1; min-width: 0; font-size: 16px; }
.target { color: var(--cream-dim); font-size: 13px; white-space: nowrap; }
.last { margin: 6px 0 10px 36px; font-size: 13px; color: var(--cream-dim); }
.last b { color: var(--cream); font-weight: 600; }
.quick-row { display: flex; align-items: center; gap: 10px; margin-left: 36px; }
.quick-row .field.big { flex: 0 1 150px; width: auto; font-size: 20px; font-weight: 600; text-align: center; }
.unit { color: var(--muted); }
.sets { margin-left: 36px; }
.set-row { display: grid; grid-template-columns: 38px minmax(0, 1fr) minmax(0, 1fr); gap: 8px; align-items: center; margin: 6px 0; }
.set-row.head { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 0; }
.set-row.head span:not(:first-child) { text-align: center; }
.set-row .field { text-align: center; font-weight: 600; padding: 8px 6px; }
.set-n { color: var(--cream); font-weight: 600; text-align: center; }
.set-tools { display: flex; gap: 8px; margin-top: 8px; }
.sticky-save { position: sticky; bottom: calc(70px + var(--safe-b)); display: flex; gap: 10px; padding: 10px 0; background: linear-gradient(transparent, var(--bg) 30%); z-index: 5; }
.sticky-save .btn.grow { flex: 1; }

/* history */
details.session { padding: 0; }
details.session summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 14px 16px; cursor: pointer; }
details.session summary::-webkit-details-marker { display: none; }
details.session[open] summary { border-bottom: 1px solid var(--line); }
.session-body { padding: 8px 16px 14px; }
.hist-row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.hist-row b { font-weight: 600; color: var(--cream); text-align: right; }
.session-body .btn { margin-top: 12px; }
.flash { border-color: var(--cream); animation: flash 1.6s ease-out; }
@keyframes flash { from { box-shadow: 0 0 0 4px rgba(245,232,213,.35); } to { box-shadow: 0 0 0 0 transparent; } }

/* progress */
.cmp { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 14px; }
.cmp th { text-align: right; font-size: 11px; color: var(--muted); font-weight: 500; padding: 6px 4px; }
.cmp td { padding: 9px 4px; border-top: 1px solid var(--line); text-align: right; }
.cmp td:first-child { text-align: left; color: var(--cream-dim); }
.cmp .delta { color: var(--cream); font-weight: 600; white-space: nowrap; }
.cmp .delta .muted { font-weight: 400; }
.chart { width: 100%; height: auto; display: block; margin-top: 6px; }
.chart .grid { stroke: var(--line); stroke-dasharray: 3 4; }
.chart .line { fill: none; stroke: var(--cream); stroke-width: 2; stroke-linejoin: round; }
.chart .dot { fill: var(--bg); stroke: var(--cream); stroke-width: 2; }
.chart text { fill: var(--muted); font-size: 10px; }
.m-row { display: flex; align-items: center; gap: 8px; padding: 10px 0; border-top: 1px solid var(--line); }
.m-row:first-of-type { border-top: 0; }

/* settings */
.sync-box { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; background: var(--panel-2); }
.sync-box::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--cream); flex: none; }
.sync-box.error::before, .sync-box.needs-auth::before { background: var(--danger); }
.sync-box.syncing::before { animation: pulse 1s infinite alternate; }

/* ---------- larger screens (tablets, desktop) ---------- */
@media (min-width: 700px) {
  main { padding-left: 24px; padding-right: 24px; }
  .pills.scroll { margin-left: 0; margin-right: 0; padding-left: 0; padding-right: 0; }
  .tabs { margin: 0; padding: 0; }
  .facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ex-log .quick-row, .ex-log .sets { max-width: 420px; }
}
@media (max-width: 360px) {
  main { padding-left: 10px; padding-right: 10px; }
  .card { padding: 13px; }
  .grid2 { grid-template-columns: 1fr; }
  .ex-edit-grid, .ex-notes { margin-left: 0; width: 100%; }
  .last, .quick-row, .sets { margin-left: 0; }
  .day-tools { width: 100%; justify-content: flex-end; }
  .stats { gap: 6px; } .stat b { font-size: 22px; }
  .log-controls { grid-template-columns: 1fr; }
  .pills.scroll { margin-left: -10px; margin-right: -10px; padding-left: 10px; padding-right: 10px; }
  .tabs { margin: 0 -10px; padding: 0 10px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* Client consent checkbox */
.consent { display: flex; gap: 10px; align-items: flex-start; margin: 14px 0 4px; font-size: 14px; color: var(--cream); cursor: pointer; }
.consent input { width: 20px; height: 20px; margin: 1px 0 0; flex: none; accent-color: var(--cream); }

/* Preview builds only */
.preview-bar { display: flex; align-items: center; gap: 10px; justify-content: space-between; background: #3a2f12; color: #f5e8d5; border: 1px dashed #c9a24a; border-radius: 12px; padding: 10px 12px; margin-top: 12px; font-size: 13px; font-weight: 600; }
.preview-bar .btn { min-height: 34px; padding: 0 12px; font-size: 13px; flex: none; }

/* Role choice + login code */
.welcome-hero.compact { margin-bottom: 18px; }
.welcome-hero.compact .welcome-logo { width: 84px; height: 84px; border-radius: 20px; }
.role-title { text-align: center; color: var(--cream); font-weight: 500; font-size: 20px; margin: 6px 0 4px; }
.center { text-align: center; }
.role-options { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.role-card { text-align: left; background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 16px; color: var(--cream); display: flex; flex-direction: column; gap: 4px; cursor: pointer; font: inherit; }
.role-card b { font-size: 17px; font-weight: 600; }
.role-card span { color: var(--cream-dim); font-size: 14px; line-height: 1.45; }
.role-card:hover, .role-card:focus-visible { border-color: var(--cream); }
.role-card:disabled { opacity: .6; }
.join-form { display: flex; flex-direction: column; gap: 12px; margin-top: 18px; }
.code-input { text-align: center; font-size: 26px; letter-spacing: .18em; text-transform: uppercase; font-variant-numeric: tabular-nums; }
/* Coach: client app access */
.code-box { border: 1px dashed var(--cream-dim); border-radius: 12px; padding: 12px 14px; margin: 6px 0 4px; }
.code-box .code { font-size: 24px; letter-spacing: .16em; color: var(--cream); font-variant-numeric: tabular-nums; }
.code-box.ended { opacity: .6; }
/* Client: read-only program */
.ro-ex { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--line); }
.ro-ex:first-of-type { border-top: 0; }
.ro-ex .num { flex: none; width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--line-2); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; color: var(--cream-dim); }
.ro-ex .grow { min-width: 0; }
.ro-note { color: var(--cream-dim); margin-top: 4px; }
.ro-last { flex: none; text-align: right; font-size: 14px; color: var(--cream); max-width: 45%; }
