@font-face { font-family: Inter; font-weight: 400; font-display: swap; src: url(fonts/inter-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: Inter; font-weight: 600; font-display: swap; src: url(fonts/inter-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: Inter; font-weight: 700; font-display: swap; src: url(fonts/inter-latin-700-normal.woff2) format('woff2'); }
@font-face { font-family: Montserrat; font-weight: 800; font-display: swap; src: url(fonts/montserrat-latin-800-normal.woff2) format('woff2'); }

:root {
  --navy: #0B1E2D; --navy-2: #1E3A52; --blue: #38B6FF; --cyan: #00E5FF; --white: #FEFEFE;
  --bg: #F3F7FA; --card: #FFFFFF; --line: #D5DEE6; --soft: #E3F4FF; --muted: #4F5F6E; --danger: #B3261E;
  --radius: 16px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--navy); font: 16px/1.45 Inter, system-ui, -apple-system, sans-serif; -webkit-text-size-adjust: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3 { font-family: Montserrat, Inter, sans-serif; font-weight: 800; margin: 0; line-height: 1.2; }
h1 { font-size: 26px; } h2 { font-size: 18px; } h3 { font-size: 16px; }
p { margin: 0; }
a { color: var(--navy); }
.muted { color: var(--muted); font-size: 14px; }
.small { font-size: 13px; }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Shared bits ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: 14px; border: none; background: var(--blue); color: var(--navy); font-weight: 700; cursor: pointer; text-decoration: none; }
.btn:disabled { opacity: .55; cursor: default; }
.btn.dark { background: #fff; color: var(--navy); border: 2px solid var(--blue); }
.btn.cyan { background: var(--cyan); color: var(--navy); }
.btn.ghost { background: var(--card); border: 1px solid var(--line); }
.btn.block { width: 100%; }
.btn.small { min-height: 40px; padding: 0 14px; font-size: 14px; border-radius: 10px; }
.linkbtn { background: none; border: none; padding: 8px 0; font-weight: 600; text-decoration: underline; cursor: pointer; min-height: 44px; }
.card { background: var(--card); border-radius: var(--radius); padding: 16px 18px; }
.card.dark { background: var(--blue); color: var(--navy); }
.card.dark .muted { color: var(--navy); }
.card.dark .bar { background: rgba(255,255,255,.5); }
.card.dark .bar > span { background: var(--navy); }
.card.dark .btn.cyan { background: #fff; }
.card.dark .status-pill.ready { background: #fff; }
.card.blue { background: var(--blue); }
.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; align-items: center; gap: 12px; }
.between { justify-content: space-between; }
.eyebrow { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
label.field { display: block; font-size: 14px; font-weight: 600; }
.field input, .field textarea, .field select { display: block; width: 100%; margin-top: 6px; border: 1px solid #B9C6D2; border-radius: 12px; min-height: 48px; padding: 10px 14px; background: #fff; font-weight: 400; font-size: 16px; }
.field textarea { resize: vertical; min-height: 90px; }
.field input:focus, .field textarea:focus, .btn:focus-visible, button:focus-visible, a:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.error { background: #FDECEA; color: var(--danger); border-radius: 12px; padding: 12px 14px; font-size: 14px; }
.notice { background: var(--soft); border-radius: 12px; padding: 12px 14px; font-size: 14px; }
.toast { position: fixed; left: 50%; bottom: 100px; transform: translateX(-50%); background: var(--navy); color: var(--white); padding: 12px 18px; border-radius: 12px; font-size: 14px; z-index: 50; max-width: calc(100% - 32px); box-shadow: 0 8px 24px rgba(11,30,45,.25); }

/* ---------- Demo bar ---------- */
.demobar { background: var(--navy); color: var(--white); font-size: 13px; padding: 8px 16px; display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; justify-content: center; }
.demobar button { background: none; border: 1px solid #5E7A90; color: var(--white); border-radius: 8px; padding: 6px 10px; cursor: pointer; font-size: 13px; }
.demobar button[aria-pressed="true"] { background: var(--cyan); color: var(--navy); border-color: var(--cyan); }

/* ---------- Login ---------- */
.auth { max-width: 420px; margin: 0 auto; padding: 48px 20px; }
.auth .logo { width: 140px; display: block; margin: 0 auto 28px; }

/* ---------- Client app ---------- */
.app { max-width: 560px; margin: 0 auto; min-height: 100vh; padding-bottom: 96px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 18px 20px 6px; padding-top: calc(18px + env(safe-area-inset-top)); }
.topbar .logo { height: 26px; }
.sync { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 0 12px; min-height: 36px; font-size: 13px; font-weight: 600; border: none; cursor: pointer; background: var(--card); }
.sync.off { background: var(--navy); color: var(--white); }
.sync.wait { background: var(--cyan); color: var(--navy); }
.sync .dot { width: 8px; height: 8px; border-radius: 9px; background: #2E9E5B; }
.sync.off .dot { background: var(--cyan); }
.sync.wait .dot { background: var(--navy); }
.screen { padding: 12px 20px 24px; display: flex; flex-direction: column; gap: 14px; }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; background: var(--card); border-top: 1px solid #E1E8EF; display: flex; justify-content: center; padding-bottom: env(safe-area-inset-bottom); z-index: 10; }
.tabbar .inner { display: flex; justify-content: space-around; width: 100%; max-width: 560px; }
.tab { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 10px 0 12px; font-size: 11px; font-weight: 600; color: #5B6B7A; background: none; border: none; cursor: pointer; min-height: 60px; }
.tab[aria-current="page"] { color: var(--navy); }
.tab[aria-current="page"]::after { content: ''; width: 5px; height: 5px; border-radius: 9px; background: var(--blue); }
.tab svg { width: 24px; height: 24px; }

.habit { width: 100%; text-align: left; border: 1px solid var(--line); background: var(--card); border-radius: 16px; padding: 14px 16px; display: flex; align-items: center; gap: 14px; cursor: pointer; min-height: 64px; }
.habit.done { background: var(--soft); border-color: var(--blue); }
.habit .box { width: 28px; height: 28px; flex: none; border-radius: 9px; border: 2px solid var(--navy); display: flex; align-items: center; justify-content: center; background: #fff; }
.habit.done .box { background: var(--navy); }
.habit .name { display: block; font-weight: 600; }
.habit .note { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }
.days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.day { border: none; background: var(--card); border-radius: 12px; padding: 8px 0; text-align: center; font-size: 12px; font-weight: 600; cursor: pointer; min-height: 56px; }
.day b { display: block; font-family: Montserrat, sans-serif; font-size: 15px; margin-top: 2px; }
.day[aria-pressed="true"] { background: var(--blue); }
.day:disabled { opacity: .45; cursor: default; }
.day.is-today:not([aria-pressed="true"]) { box-shadow: inset 0 0 0 2px var(--blue); }
.weeknav { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.wk-label { font-weight: 700; font-size: 15px; }
.wk-arrow { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); font-size: 22px; line-height: 1; cursor: pointer; color: var(--navy); }
.wk-arrow:disabled { opacity: .35; cursor: default; }
.card .weeknav { gap: 12px; }
.catchup { background: #FFF4D6; border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.chip-btn { border: 1px solid #E5C76B; background: #fff; border-radius: 999px; padding: 0 14px; min-height: 40px; font-weight: 600; font-size: 14px; cursor: pointer; }
.catchup-card { border: none; background: #FFF4D6; display: flex; justify-content: space-between; align-items: center; text-align: left; cursor: pointer; width: 100%; font-size: 15px; }
.catchup-card > span:last-child { font-size: 24px; }
.seg { display: inline-flex; background: #E1E8EF; border-radius: 12px; padding: 3px; }
.seg button { border: none; background: none; border-radius: 9px; padding: 0 12px; min-height: 38px; font-weight: 600; font-size: 13px; cursor: pointer; }
.seg button[aria-pressed="true"] { background: #fff; box-shadow: 0 1px 3px rgba(11,30,45,.15); }
.week-table { overflow-x: auto; }
.week-table table { border-collapse: collapse; width: 100%; }
.week-table th { font-size: 12px; font-weight: 700; padding: 4px 1px; text-align: center; }
.week-table .card, .card:has(.week-table) { padding-left: 12px; padding-right: 12px; }
.week-table th.is-today { color: var(--navy); text-decoration: underline; text-decoration-color: var(--blue); text-decoration-thickness: 3px; text-underline-offset: 4px; }
.week-table th[scope="row"] { text-align: left; font-size: 12px; font-weight: 600; padding-right: 4px; width: 26%; line-height: 1.2; word-break: break-word; }
.week-table td { padding: 3px 1px; text-align: center; }
.gcell { width: 30px; height: 36px; border-radius: 10px; border: 2px solid #B9C6D2; background: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; font-size: 11px; font-weight: 700; padding: 0; color: var(--navy); }
.gcell.on { background: var(--navy); border-color: var(--navy); color: var(--white); }
.gcell.part { background: var(--soft); border-color: var(--blue); }
.gcell.typed:not(.on):not(.part) { color: var(--muted); font-size: 16px; }
.gcell.future { border-style: dashed; opacity: .4; cursor: default; }
.bar { height: 8px; border-radius: 99px; background: #E1E8EF; overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--blue); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font-size: 13px; padding: 6px 10px; border-radius: 99px; border: 1px solid #C9D4DE; }
.chip.on { background: var(--soft); border-color: var(--soft); }

.scale { border: none; margin: 0; padding: 0; }
.scale legend { font-size: 14px; font-weight: 600; padding: 0; margin-bottom: 6px; }
.scale .opts { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.scale button { height: 46px; border-radius: 10px; border: 1px solid #B9C6D2; background: #fff; font-weight: 700; cursor: pointer; }
.scale button[aria-pressed="true"] { background: var(--blue); border-color: var(--blue); }
.photos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.photo-slot { position: relative; aspect-ratio: 3 / 4; border-radius: 12px; border: 2px dashed #9FB3C4; background: var(--bg); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; cursor: pointer; overflow: hidden; }
.photo-slot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photo-slot input, .video-pick input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.video-pick { position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; border-radius: 12px; border: 1px solid #B9C6D2; background: #fff; font-weight: 600; font-size: 14px; cursor: pointer; padding: 8px 12px; text-align: center; }
.status-pill { display: inline-block; font-size: 12px; font-weight: 700; padding: 4px 9px; border-radius: 8px; background: #E1E8EF; white-space: nowrap; }
.status-pill.ready { background: var(--cyan); }
.status-pill.wait { background: #FFE9B8; }

/* habits you type into */
div.habit { cursor: default; flex-wrap: wrap; }
.habit-num { display: flex; align-items: center; gap: 6px; }
.habit-num input { width: 96px; min-height: 44px; border: 1px solid #B9C6D2; border-radius: 10px; padding: 0 10px; text-align: right; font-size: 16px; background: #fff; }
.habit-num .unit { font-size: 13px; color: var(--muted); }
.habit-text textarea { flex: 1 1 100%; min-height: 64px; border: 1px solid #B9C6D2; border-radius: 10px; padding: 10px 12px; font-size: 16px; resize: vertical; background: #fff; }
.habit input:focus, .habit textarea:focus { outline: 3px solid var(--blue); outline-offset: 1px; }

/* food */
.food-item { display: flex; align-items: center; gap: 10px; border-top: 1px solid #EEF2F6; padding-top: 8px; }
.food-item .muted.small { display: block; }
.food-del { width: 44px; height: 44px; flex: none; border: none; background: none; font-size: 22px; color: var(--muted); cursor: pointer; border-radius: 10px; }
.food-del:hover { background: var(--bg); }
.food-add { background: var(--bg); border-radius: 12px; padding: 12px; }
.food-result { display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%; text-align: left; border: none; background: #fff; border-radius: 10px; padding: 10px 12px; min-height: 52px; cursor: pointer; }
.food-result b { display: block; font-weight: 600; }
.food-result .muted.small { display: block; }

/* ---------- Coach ---------- */
.coach { display: flex; flex-wrap: wrap; min-height: 100vh; }
.coach nav.side { flex: 1 1 220px; background: var(--blue); color: var(--navy); padding: 24px 18px; display: flex; flex-direction: column; gap: 6px; }
.coach nav.side .logo { height: 30px; align-self: flex-start; margin-bottom: 18px; }
.coach nav.side button { display: flex; justify-content: space-between; align-items: center; background: none; border: none; color: var(--navy); text-align: left; border-radius: 10px; padding: 0 12px; min-height: 44px; font-weight: 600; cursor: pointer; }
.coach nav.side button[aria-current="page"] { background: rgba(255,255,255,.55); }
.coach nav.side .count { color: var(--navy); font-size: 13px; font-weight: 700; }
.coach nav.side .foot { margin-top: auto; padding-top: 18px; font-size: 13px; color: var(--navy); }
.coach nav.side .foot button { min-height: 36px; padding: 0; text-decoration: underline; font-weight: 400; color: var(--navy); }
.coach main { flex: 999 1 560px; min-width: 0; padding: 28px; display: flex; flex-direction: column; gap: 20px; }
.split { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.split > .list { flex: 1 1 320px; min-width: 0; }
.split > .detail { flex: 2 1 460px; min-width: 0; }
.list { background: var(--card); border-radius: 18px; padding: 8px; display: flex; flex-direction: column; gap: 4px; }
.list h3 { padding: 10px 12px 4px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-family: Inter, sans-serif; font-weight: 700; }
.item { border: none; background: #fff; text-align: left; border-radius: 12px; padding: 10px 12px; display: flex; align-items: center; gap: 12px; cursor: pointer; min-height: 60px; width: 100%; }
.item[aria-current="true"] { background: var(--soft); }
.avatar { width: 40px; height: 40px; border-radius: 99px; background: var(--blue); flex: none; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; }
.item .t { flex: 1; min-width: 0; }
.item .t b { display: block; }
.item .t span { display: block; font-size: 13px; color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; }
.stat { background: var(--bg); border-radius: 12px; padding: 12px; }
.stat p:first-child { font-size: 12px; color: var(--muted); }
.stat p:nth-child(2) { font-family: Montserrat, sans-serif; font-weight: 800; font-size: 18px; margin-top: 4px; }
.media { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.media .ph { aspect-ratio: 3 / 4; background: #DCE5EC; border-radius: 12px; overflow: hidden; display: flex; align-items: center; justify-content: center; font-size: 13px; color: #33424F; }
.media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.media a { display: block; height: 100%; }
video.checkin-video { width: 100%; max-height: 480px; border-radius: 12px; background: #000; }
.week-grid { overflow-x: auto; }
.week-grid table { border-collapse: collapse; width: 100%; font-size: 14px; }
.week-grid th, .week-grid td { padding: 8px 6px; text-align: center; border-bottom: 1px solid #EEF2F6; }
.week-grid th:first-child, .week-grid td:first-child { text-align: left; }
.tick { display: inline-block; width: 22px; height: 22px; border-radius: 6px; background: #E1E8EF; vertical-align: middle; }
.tick.on { background: var(--blue) url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27white%27 stroke-width=%273%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Cpath d=%27M6 12.5l4 4 8-9%27/%3E%3C/svg%3E") center / 16px no-repeat; }
.habit-edit { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 2fr) auto auto; gap: 8px; align-items: end; padding-bottom: 10px; border-bottom: 1px solid #EEF2F6; }
.field select { appearance: auto; }
.cellval { display: inline-block; min-width: 34px; padding: 2px 6px; border-radius: 6px; background: #E1E8EF; font-size: 12px; font-weight: 700; }
.cellval.on { background: var(--blue); color: #fff; }
.calorie-settings { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.calorie-settings .field { flex: 1 1 150px; }
.check { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; min-height: 48px; flex: 1 1 100%; cursor: pointer; }
.check input { width: 22px; height: 22px; accent-color: var(--navy); }
.food-day { border-top: 1px solid #EEF2F6; padding-top: 10px; display: flex; flex-direction: column; gap: 4px; }
@media (max-width: 760px) {
  .coach main { padding: 18px 14px; }
  .habit-edit { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

/* ---------- Train ---------- */
.train-card { border: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; text-align: left; cursor: pointer; width: 100%; }
.hist-item { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-top: 1px solid #EEF2F6; }
.hist-item:first-child { border-top: none; }
.cue { background: var(--bg); border-radius: 10px; padding: 8px 10px; }
.last-line { color: var(--muted); font-weight: 600; }
.set-head, .set-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) minmax(0, 1fr) 48px; gap: 8px; align-items: center; }
.set-head { font-size: 12px; font-weight: 700; color: var(--muted); padding: 0 6px; }
.set-row { padding: 4px 6px; border-radius: 12px; }
.set-row.done { background: var(--soft); }
.set-n { font-weight: 700; text-align: center; }
.set-row input { width: 100%; min-height: 46px; border: 1px solid #B9C6D2; border-radius: 10px; text-align: center; font-size: 17px; background: #fff; }
.set-row input::placeholder { color: #8A99A8; }
.set-tick { width: 46px; height: 46px; border-radius: 12px; border: 2px solid #B9C6D2; background: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.set-tick svg path { stroke: #B9C6D2; }
.set-tick[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); }
.set-tick[aria-pressed="true"] svg path { stroke: #fff; }
.small-field { font-size: 13px; }
.small-field input { min-height: 44px; font-size: 15px; }
.rest-bar { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(76px + env(safe-area-inset-bottom)); width: calc(100% - 32px); max-width: 520px; background: var(--navy); color: var(--white); border-radius: 16px; padding: 10px 12px 10px 18px; display: flex; align-items: center; gap: 12px; z-index: 20; box-shadow: 0 10px 30px rgba(11,30,45,.3); }
.rest-bar b { font-family: Montserrat, sans-serif; font-size: 26px; flex: 1; font-variant-numeric: tabular-nums; }
.rest-bar button { background: rgba(255,255,255,.15); color: var(--white); border: none; border-radius: 10px; min-height: 44px; padding: 0 14px; font-weight: 700; cursor: pointer; }
.rest-bar.over { background: var(--cyan); color: var(--navy); }
.app:has(.rest-bar) .screen { padding-bottom: 96px; }

/* ---------- Coach: exercises & workouts ---------- */
.ex-edit { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 2fr) minmax(0, 1fr) auto auto; gap: 8px; align-items: end; }
.ex-block { display: flex; flex-direction: column; gap: 10px; padding-bottom: 14px; border-bottom: 1px solid #EEF2F6; }
.ex-vid { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.file-btn { position: relative; overflow: hidden; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.ex-video { width: 100%; max-height: 360px; border-radius: 12px; background: #000; display: block; }
.ex-video.coach { max-width: 420px; }
.vid-btn { align-self: flex-start; }
.vid-status { font-size: 13px; font-weight: 600; border-radius: 12px; padding: 10px 12px; background: var(--soft); }
.vid-status.wait { background: #FFF4D6; }
.vid-status.busy { background: var(--soft); }
.vid-status:empty { display: none; }
.editor { background: var(--bg); border-radius: 14px; padding: 14px; }
.wi-row { display: grid; grid-template-columns: minmax(0, 2.2fr) 70px 90px 90px minmax(0, 2fr) auto; gap: 8px; align-items: end; padding-bottom: 10px; border-bottom: 1px solid #DCE5EC; }
.wi-btns { display: flex; gap: 4px; }
.wi-btns .btn.small { padding: 0 10px; }
.w-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid #EEF2F6; flex-wrap: wrap; }
.w-row:first-of-type { border-top: none; }
details.sess { border-top: 1px solid #EEF2F6; padding: 10px 0; }
details.sess summary { cursor: pointer; min-height: 32px; }
details.sess p { margin-top: 4px; }
@media (max-width: 900px) {
  .ex-edit { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .ex-edit .field { grid-column: 1 / -1; }
  .wi-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .wi-row .wi-ex, .wi-row .wi-notes { grid-column: 1 / -1; }
}
.tpl-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.tpl-pick { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; cursor: pointer; background: #fff; min-height: 52px; }
.tpl-pick:has(input:checked) { border-color: var(--blue); background: var(--soft); }
.tpl-pick input { width: 20px; height: 20px; accent-color: var(--navy); flex: none; }
.add-saved { border-top: 1px solid #EEF2F6; padding-top: 12px; }
.add-saved h3 { font-size: 15px; }

.pg-workout { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.card.w-done { background: var(--soft); }
.assign-panel { background: var(--soft); border-radius: 12px; padding: 12px 14px; margin-bottom: 8px; }

/* ---------- Gym & equipment ---------- */
.eq-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.eq-cat-name { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 6px; }
.eq-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.eq-tog { border: 1px solid #B9C6D2; background: #fff; border-radius: 999px; padding: 0 12px; min-height: 36px; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(79,95,110,.5); }
.eq-tog[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: var(--white); text-decoration: none; }
.gym-facts { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; background: var(--bg); border-radius: 12px; padding: 10px 12px; }
.kit-warn { display: block; font-size: 13px; font-weight: 600; color: #7A4A00; background: #FFF4D6; border-radius: 8px; padding: 6px 10px; margin-top: 6px; }
.ex-eq { display: flex; flex-direction: column; gap: 10px; }
.ex-eq .linkbtn { text-align: left; }
.gym-box summary { cursor: pointer; display: flex; flex-direction: column; gap: 2px; list-style: none; }
.gym-box summary::-webkit-details-marker { display: none; }
.gym-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; padding-bottom: 12px; border-bottom: 1px solid #EEF2F6; }
.gym-row .field { flex: 0 1 340px; }
.kit-panel { background: var(--bg); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.gym-box { background: var(--card); border-radius: 12px; padding: 10px 14px; font-size: 14px; }
.gym-box summary { flex-direction: row; justify-content: space-between; align-items: center; min-height: 28px; }
.builder-gym { display: flex; flex-direction: column; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
p.builder-gym { border: none; padding: 0; background: none; }
.builder-gym .field { max-width: 420px; }
.kit-peek summary { cursor: pointer; font-size: 13px; }

/* ---------- Training aims ---------- */
.aim-badge { display: inline-block; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding: 2px 7px; border-radius: 4px; vertical-align: middle; border: 1px solid transparent; }
.aim-form { background: #E3F4FF; color: var(--navy); border-color: #9ED8FF; }
.aim-hypertrophy { background: #CFEAFF; color: var(--navy); border-color: #7CC6F5; }
.aim-strength { background: var(--navy); color: var(--white); }
.aim-foundation { background: #FFF4D6; color: #5C3D00; border-color: #E5C76B; }
.aim-box { border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.aim-box.aim-strength .eyebrow, .aim-box.aim-strength p { color: var(--white); }
.aim-field { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 10px; align-items: start; }
.aim-field textarea { min-height: 64px; }
@media (max-width: 760px) { .aim-field { grid-template-columns: minmax(0, 1fr); } }
.pg-aim { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 6px; }
.aim-msg { background: var(--soft); border-radius: 8px; padding: 8px 10px; }
.ad-card summary { cursor: pointer; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; }
.ad-row { display: grid; grid-template-columns: 170px 90px 120px 120px; gap: 10px; align-items: end; }
.ad-row .aim-badge { align-self: center; justify-self: start; }
@media (max-width: 640px) { .ad-row { grid-template-columns: repeat(3, minmax(0, 1fr)); } .ad-row .aim-badge { grid-column: 1 / -1; } }

/* ---------- Button roles ----------
   blue (.btn)        = the main action
   white (.ghost)     = normal action
   text (.quiet)      = minor action / cancel
   red (.danger)      = deletes or removes something
   dashed (.add)      = adds something new          */
.btn .bi { width: 16px; height: 16px; flex: none; }
.btn.small .bi { width: 15px; height: 15px; }
.btn.quiet { background: none; border: none; color: var(--navy); text-decoration: underline; text-underline-offset: 3px; padding: 0 8px; font-weight: 600; }
.btn.quiet:hover { background: var(--bg); }
.btn.danger { background: #fff; border: 1px solid #F1B8B3; color: var(--danger); }
.btn.danger:hover { background: #FDECEA; }
.btn.add { background: transparent; border: 2px dashed #8CCFF5; color: var(--navy); }
.btn.add:hover { background: var(--soft); border-color: var(--blue); }
.btn.icon { width: 40px; padding: 0; text-decoration: none; }
.btn.icon.quiet { border: 1px solid var(--line); background: #fff; }
.btn.icon.danger { font-size: 15px; }
.btn.ghost { border: 1px solid #B9C6D2; }
.btn.small.ghost:hover, .btn.ghost:hover { background: var(--bg); }
.btn:not(.ghost):not(.quiet):not(.danger):not(.add):not(.dark):not(.cyan):hover { filter: brightness(.96); }

/* ---------- Swaps & library ---------- */
.swap-btn { flex: none; }
.swap-list { background: var(--bg); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 6px; }
.swap-opt { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; width: 100%; border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 10px 12px; min-height: 48px; cursor: pointer; }
.swap-opt:hover { border-color: var(--blue); }
.swapped-note { color: #7A4A00; font-weight: 600; margin-top: 4px; }
.swap-pick { background: var(--bg); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.swap-search, .ex-search { min-height: 44px; border: 1px solid #B9C6D2; border-radius: 10px; padding: 0 12px; font-size: 15px; background: #fff; }
.ex-search { min-width: 240px; }
.swap-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px 12px; max-height: 260px; overflow-y: auto; }
.swap-check { display: flex; align-items: center; gap: 8px; font-size: 14px; min-height: 32px; cursor: pointer; }
.swap-check input { width: 18px; height: 18px; accent-color: var(--navy); }
.ex-group { display: flex; flex-direction: column; gap: 12px; }
.ex-group-title { font-size: 15px; margin-top: 10px; padding-bottom: 4px; border-bottom: 2px solid var(--blue); }
.starter { border: 2px dashed #8CCFF5; }
.gym-row div.field { font-size: 14px; font-weight: 600; }

/* ---------- Client profile ---------- */
.client-head { display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap; background: var(--card); border-radius: 18px; padding: 18px 20px; }
.avatar.big { width: 64px; height: 64px; font-size: 22px; font-family: Montserrat, sans-serif; font-weight: 800; }
.ctabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 2px solid #DCE5EC; }
.ctab { border: none; background: none; padding: 12px 16px; font-weight: 700; font-size: 15px; color: var(--muted); cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -2px; white-space: nowrap; min-height: 48px; }
.ctab[aria-selected="true"] { color: var(--navy); border-bottom-color: var(--blue); }
.ctab:hover { color: var(--navy); }
.info-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; align-items: start; }
.info-grid .wide { grid-column: 1 / -1; }
.info-grid div.field { font-size: 14px; font-weight: 600; }
.info-grid div.field input { min-height: 48px; border: 1px solid #B9C6D2; border-radius: 12px; padding: 0 12px; font-size: 16px; }
.info-val { font-weight: 400; margin-top: 12px; }
.snap-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.snap { display: flex; flex-direction: column; gap: 8px; }
.snap h3 { font-size: 16px; }
.snap-big { font-family: Montserrat, sans-serif; font-weight: 800; font-size: 22px; }
.snap-big .muted { font-family: Inter, sans-serif; font-weight: 400; }
.gym-line { background: var(--bg); border-radius: 10px; padding: 8px 12px; }
.seg.wrap { flex-wrap: wrap; }
.plan-box summary { cursor: pointer; }

.back-link { align-self: flex-start; }
.chip-row { border: none; background: none; padding: 0; margin-top: 8px; cursor: pointer; text-align: left; font: inherit; color: inherit; }
.chip-row:hover .chip { border-color: var(--blue); }
.head-edit { align-items: flex-start; border: 2px solid var(--blue); }
.seg-opt { position: relative; }
.seg-opt input { position: absolute; opacity: 0; pointer-events: none; }
.seg-opt span { display: inline-flex; align-items: center; border-radius: 9px; padding: 0 14px; min-height: 38px; font-weight: 600; font-size: 13px; cursor: pointer; }
.seg-opt input:checked + span { background: #fff; box-shadow: 0 1px 3px rgba(11,30,45,.15); }
.seg-opt input:focus-visible + span { outline: 3px solid var(--blue); }
.info-grid div.field { display: flex; flex-direction: column; align-items: flex-start; }

/* habit types: only show the fields that type uses */
.habit-edit .opt-field { display: none; }
.habit-edit:has(select[name=kind] option[value=choice]:checked) .opt-field { display: block; }
.habit-edit:has(select[name=kind] option[value=choice]:checked) { grid-template-columns: minmax(0, 2.2fr) minmax(0, 1.2fr) minmax(0, 3fr) auto auto; }
.habit-edit:not(:has(select[name=kind] option[value=number]:checked)) label.field:has(input[name=target]),
.habit-edit:not(:has(select[name=kind] option[value=number]:checked)) label.field:has(input[name=unit]) { display: none; }
.habit-edit:not(:has(select[name=kind] option[value=number]:checked)):not(:has(select[name=kind] option[value=choice]:checked)) { grid-template-columns: minmax(0, 2.2fr) minmax(0, 1.2fr) auto auto; }
.choice-row { display: flex; flex-wrap: wrap; gap: 6px; flex: 1 1 100%; }
.choice { border: 1px solid #B9C6D2; background: #fff; border-radius: 999px; padding: 0 16px; min-height: 44px; font-weight: 600; cursor: pointer; }
.choice[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: var(--white); }
.choice-select { flex: 1 1 100%; min-height: 46px; border: 1px solid #B9C6D2; border-radius: 10px; padding: 0 10px; font-size: 16px; background: #fff; }
.cell-choice { font-size: 11px; max-width: 70px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.habit-edit:has(select[name=kind] option[value=number]:checked) { grid-template-columns: minmax(0, 2.2fr) minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr) auto auto; }
@media (max-width: 760px) { .habit-edit { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important; } .habit-edit .opt-field { grid-column: 1 / -1; } }
.food-result.add-own { border: 2px dashed #8CCFF5; background: transparent; }

/* ---------- Progress chart ---------- */
.pc-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.pc-wrap { display: flex; flex-direction: column; gap: 6px; }
.pc { width: 100%; height: auto; max-height: 280px; }
.pc-grid { stroke: #E1E8EF; stroke-width: 1; }
.pc-axis { font: 12px Inter, sans-serif; fill: var(--muted); }
.pc-label { font: 700 13px Inter, sans-serif; fill: var(--navy); }
.pc-line { fill: none; stroke: var(--blue); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.pc-area { fill: rgba(56,182,255,.12); stroke: none; }
.pc-dot { fill: #fff; stroke: var(--blue); stroke-width: 2.5; }
.pc-best { fill: var(--navy); stroke: #fff; stroke-width: 2; }
.table-wrap { overflow-x: auto; }
.prog-table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.prog-table th, .prog-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid #EEF2F6; white-space: nowrap; }
.prog-table thead th { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.prog-table tr.sel { background: var(--soft); }
.prog-table .up { color: #1C7A45; font-weight: 700; }
.prog-table .down { color: var(--danger); font-weight: 700; }

/* ---------- Photo compare ---------- */
.cmp-controls { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.cmp-controls label.field { flex: 1 1 200px; }
.cmp-controls div.field { font-size: 14px; font-weight: 600; display: flex; flex-direction: column; }
.cmp-side { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.cmp-side figure { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.cmp-side img, .cmp-empty { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 12px; background: #DCE5EC; }
.cmp-empty { display: flex; align-items: center; justify-content: center; font-size: 13px; color: #33424F; text-align: center; padding: 10px; }
.cmp-side figcaption { font-size: 13px; }
.cmp-slider { position: relative; width: 100%; max-width: 480px; margin: 0 auto; aspect-ratio: 3 / 4; border-radius: 12px; overflow: hidden; background: #DCE5EC; }
.cmp-slider img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cmp-tag { position: absolute; top: 10px; background: rgba(11,30,45,.75); color: #fff; font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 6px; }
.cmp-tag.left { left: 10px; } .cmp-tag.right { right: 10px; }
.cmp-range { width: 100%; max-width: 480px; display: block; margin: 0 auto; accent-color: var(--navy); min-height: 32px; }
.cmp-line { position: absolute; top: 0; bottom: 0; width: 3px; margin-left: -1.5px; background: #fff; box-shadow: 0 0 0 1px rgba(11,30,45,.35); pointer-events: none; }

/* ---------- Q&A ---------- */
.qa-form { gap: 22px; }
.qa-q { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.qa-q > label, .qa-q > legend { font-weight: 700; display: flex; gap: 10px; align-items: baseline; padding: 0; line-height: 1.35; }
.qa-q > legend { margin-bottom: 8px; }
.qa-q input:not([type=radio]):not([type=checkbox]), .qa-q textarea { width: 100%; min-height: 46px; border: 1px solid #B9C6D2; border-radius: 10px; padding: 10px 12px; font: inherit; font-size: 16px; background: #fff; }
.qa-q textarea { resize: vertical; }
.qa-q.missing input:not([type=radio]):not([type=checkbox]), .qa-q.missing textarea { border-color: #C2410C; }
.qa-q.missing > label, .qa-q.missing > legend { color: #C2410C; }
.qa-q.missing .qa-opt span { border-color: #E8A27F; }
.qa-num { flex: none; display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #E6F5FF; color: #0B6FA8; font-size: 13px; font-weight: 700; }
.qa-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.qa-opt { position: relative; }
.qa-opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.qa-opt span { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border: 1px solid #B9C6D2; border-radius: 999px; background: #fff; font-weight: 600; }
.qa-opt i { width: 16px; height: 16px; border: 2px solid #9FB0C0; border-radius: 4px; display: inline-block; }
.qa-opt input:checked + span { background: var(--blue); border-color: var(--blue); color: var(--navy); }
.qa-opt input:checked + span i { border-color: var(--navy); background: var(--navy); box-shadow: inset 0 0 0 3px var(--blue); }
.qa-opt input:focus-visible + span { outline: 3px solid #0B6FA8; outline-offset: 2px; }
.qb-row { border: 1px solid #E1E8EF; border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.qb-top { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.qb-top .qa-num { align-self: center; margin-top: 18px; }
.qa-item { border: 1px solid #E1E8EF; border-radius: 12px; padding: 0 14px; }
.qa-item summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; cursor: pointer; list-style: none; }
.qa-item summary::-webkit-details-marker { display: none; }
.qa-item[open] { padding-bottom: 14px; }
.qa-item > p, .qa-item > button { margin-top: 4px; }
.qa-answers { display: grid; gap: 10px; margin: 0; }
.qa-answers div { border-top: 1px solid #EEF2F6; padding-top: 10px; }
.qa-answers dt { font-size: 13px; color: #5A6B7B; font-weight: 600; }
.qa-answers dd { margin: 2px 0 0; }

/* ---------- coach menu groups ---------- */
.coach nav.side > button:not(.sub) { font-size: 17px; font-weight: 700; }
.coach nav.side .nav-head { margin: 16px 12px 2px; font-size: 17px; font-weight: 700; color: var(--navy); }
.coach nav.side button.sub { padding-left: 24px; min-height: 36px; font-size: 14px; font-weight: 500; }
.coach nav.side .foot button { font-size: 13px; }
.coach nav.side button.sub[aria-current="page"] { font-weight: 700; }
.chip.off { color: #8A99A8; background: #F4F6F8; border-color: #E1E8EF; text-decoration: line-through; text-decoration-color: rgba(138,153,168,.5); }
.plain-list { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.coach nav.side button[data-act="coach-refresh"] { font-size: 14px; font-weight: 500; margin-top: 8px; }

/* ================= Client app: Kahunas-style layout ================= */
.kapp { --kbg: #F3F5F9; --ktext: #16202A; --kmuted: #6B7785; padding-bottom: 120px; }
body:has(.kapp) { background: #F3F5F9; }
.kapp .screen { gap: 14px; padding-top: calc(14px + env(safe-area-inset-top)); }
.kapp .card, .kcard { background: #fff; border-radius: 18px; border: none; box-shadow: 0 1px 2px rgba(22,32,42,.04); }
.kcard { padding: 18px; display: block; width: 100%; text-align: left; color: var(--ktext); font: inherit; }
button.kcard { cursor: pointer; }
.kmuted { color: var(--kmuted); }
.keyebrow { display: block; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; color: #3B4754; }
.ktitle { display: block; font-size: 19px; font-weight: 600; margin-top: 8px; color: var(--ktext); }
.krow { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.chev { flex: none; color: var(--ktext); }
/* page header */
.phead { display: grid; grid-template-columns: 52px 1fr auto; align-items: center; gap: 8px; min-height: 52px; }
.phead h1 { font-size: 20px; text-align: center; font-weight: 800; }
.phead .sync { min-height: 32px; padding: 0 10px; font-size: 12px; justify-self: end; }
.phead-gap { width: 52px; }
.round-btn { width: 48px; height: 48px; border-radius: 50%; border: none; background: #fff; box-shadow: 0 2px 8px rgba(22,32,42,.10); display: grid; place-items: center; cursor: pointer; color: var(--ktext); }
.round-btn.blue { background: var(--blue); color: var(--navy); box-shadow: none; }
.ktimer { justify-self: end; background: #DDF1FF; color: #0B4F7A; border-radius: 999px; padding: 8px 14px; font-weight: 600; font-variant-numeric: tabular-nums; font-size: 15px; }
/* home */
.khello { display: flex; align-items: center; gap: 14px; }
.klogo { width: 64px; height: 64px; border-radius: 16px; background: #fff; border: 1px solid #E3E8EE; display: grid; place-items: center; flex: none; }
.klogo img { width: 46px; }
.kname { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 17px; line-height: 1.3; }
.kname b { font-weight: 500; font-size: 19px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.khello .sync { min-height: 32px; padding: 0 10px; font-size: 12px; }
.ksec { display: flex; align-items: center; justify-content: space-between; background: none; border: none; padding: 0; margin-top: 10px; color: var(--ktext); font: inherit; cursor: default; }
button.ksec { cursor: pointer; }
.ksec h2 { font-family: Inter, sans-serif; font-weight: 600; font-size: 21px; }
.kday-strip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.kday { background: #fff; border: 2px solid transparent; border-radius: 12px; padding: 10px 0 8px; display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; font: inherit; color: var(--ktext); min-width: 0; }
.kday.today { border-color: var(--blue); }
.kdot { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: #DDF1FF; }
.kdot svg { width: 14px; height: 14px; }
.kdot.s2 { background: var(--blue); }
.kdot.s1 { background: linear-gradient(90deg, var(--blue) 50%, #DDF1FF 50%); }
.kdn { font-size: 12px; font-weight: 500; }
.kdd { font-size: 13px; color: #3B4754; }
.kstreak { font-weight: 600; color: #3B4754; letter-spacing: .02em; margin: 0; }
.kbanner { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; border: none; border-radius: 14px; padding: 22px 20px; background: var(--blue); color: var(--navy); font: inherit; font-size: 17px; font-weight: 600; text-align: left; cursor: pointer; }
.kbanner .chev { color: var(--navy); }
.kbanner.soft { background: #fff; color: var(--ktext); font-weight: 500; cursor: default; }
.ktiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ktile { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.kbig { font-size: 26px; font-weight: 700; color: var(--ktext); line-height: 1.15; margin-top: 4px; }
.kbig small { font-size: 15px; font-weight: 500; color: var(--kmuted); }
.kspark { width: 100%; height: 44px; margin-top: 8px; }
.kspark-big .kspark { height: 110px; }
.kbar { display: block; height: 8px; border-radius: 9px; background: #DDF1FF; margin-top: 10px; overflow: hidden; }
.kbar > span { display: block; height: 100%; background: var(--blue); border-radius: 9px; }
/* lists (More) */
.kprofile { display: flex; align-items: center; gap: 16px; }
.kavatar { width: 56px; height: 56px; border-radius: 50%; border: 3px solid var(--blue); color: var(--blue); display: grid; place-items: center; font-weight: 800; font-size: 22px; flex: none; }
.klist { padding: 4px 18px; }
.kline { display: flex; align-items: center; gap: 14px; width: 100%; background: none; border: none; padding: 12px 0; font: inherit; color: var(--ktext); text-align: left; cursor: pointer; }
.kline > span:first-of-type { flex: 1; }
.kline.big { font-size: 18px; min-height: 64px; }
.klist .kline + .kline { border-top: 1px solid #EEF1F5; }
div.kline { cursor: default; justify-content: space-between; }
.kpill { display: inline-block; background: var(--blue); color: var(--navy); border-radius: 999px; font-size: 12px; font-weight: 700; padding: 2px 8px; vertical-align: middle; }
/* tab bar */
.ktabbar { position: fixed; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; padding: 0 12px calc(12px + env(safe-area-inset-bottom)); pointer-events: none; z-index: 20; }
.ktabbar .inner { pointer-events: auto; display: flex; width: 100%; max-width: 540px; background: rgba(255,255,255,.96); backdrop-filter: blur(10px); border: 1px solid #E3E8EE; border-radius: 40px; padding: 6px; box-shadow: 0 6px 24px rgba(22,32,42,.10); }
.ktab { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0; border: none; background: none; border-radius: 30px; font: inherit; font-size: 12px; font-weight: 500; color: var(--ktext); cursor: pointer; }
.ktab svg { width: 26px; height: 26px; }
.ktab[aria-current="page"] { background: #E8ECF1; color: #1E9BE6; }
/* calendar */
.kcal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.kcal-head b { font-size: 19px; font-weight: 600; }
.kc-arrow { width: 44px; height: 44px; border-radius: 10px; border: none; background: #E8ECF1; color: #1E9BE6; font-size: 24px; cursor: pointer; }
.kc-arrow:disabled { opacity: .35; cursor: default; }
.kcal { background: #fff; border-radius: 14px; overflow: hidden; border: 1px solid #E3E8EE; }
.kc-wd, .kc-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.kc-wd span { text-align: center; padding: 10px 0; font-size: 13px; font-weight: 500; border-bottom: 1px solid #E3E8EE; }
.kc-cell { min-height: 64px; border: none; border-right: 1px solid #EEF1F5; border-bottom: 1px solid #EEF1F5; background: #fff; padding: 4px 3px; display: flex; flex-direction: column; gap: 3px; align-items: stretch; font: inherit; color: var(--ktext); cursor: pointer; min-width: 0; text-align: left; }
.kc-cell:nth-child(7n) { border-right: none; }
.kc-cell.empty { background: #fff; }
.kc-cell:disabled { color: #9AA6B2; cursor: default; }
.kc-cell.today { background: #EAF6FF; }
.kc-cell.sel { box-shadow: inset 0 0 0 2px var(--blue); }
.kc-n { font-size: 13px; text-align: right; display: flex; justify-content: flex-end; align-items: center; gap: 3px; padding-right: 2px; }
.kc-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--blue); display: inline-block; }
.kc-ev { background: #C9CFD6; border-radius: 4px; font-size: 11px; padding: 2px 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kc-ev.ci { background: #BEE6FF; }
.kc-more { font-size: 11px; color: #1E9BE6; }
/* progress bars */
.kbars { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 6px; height: 150px; align-items: end; }
.kbar-col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; }
.kbar-v { width: 70%; background: var(--blue); border-radius: 4px 4px 0 0; min-height: 2px; }
.kbar-n { font-size: 12px; font-weight: 600; }
.kbar-l { font-size: 10px; color: var(--kmuted); white-space: nowrap; }
/* workout session */
.ex-top { display: flex; gap: 14px; align-items: flex-start; }
.ex-thumb { width: 96px; height: 76px; flex: none; border-radius: 10px; border: none; background: linear-gradient(135deg, #2A3742, #16202A); color: #fff; display: grid; place-items: center; cursor: pointer; }
.ex-thumb svg { width: 30px; height: 30px; }
.ex-thumb.none { background: #E8ECF1; color: #8A99A8; cursor: default; }
.ex-letter { flex: none; width: 34px; height: 34px; border-radius: 6px; background: var(--blue); color: var(--navy); font-weight: 700; display: grid; place-items: center; }
.ex-card h2 { font-family: Inter, sans-serif; font-weight: 700; font-size: 18px; }
.ex-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ex-chips span { background: #DDF1FF; color: var(--ktext); border-radius: 8px; padding: 5px 10px; font-size: 14px; }
.kapp .set-row { padding: 6px 4px; border-radius: 10px; }
.kapp .set-row.done { background: #ECF7EE; }
.kapp .set-n { font-size: 17px; font-variant-numeric: tabular-nums; }
.kapp .set-row input { border: 1px solid #DCE2E8; border-radius: 8px; font-size: 18px; }
.kapp .set-row.done input { border-color: #CFE7D4; background: #F6FBF7; }
.kapp .set-tick { width: 40px; height: 40px; border-radius: 50%; border: 2px solid #6B7785; background: #fff; justify-self: center; }
.kapp .set-tick svg path { stroke: #6B7785; }
.kapp .set-tick[aria-pressed="true"] { background: #34B05A; border-color: #34B05A; }
.kapp .set-tick[aria-pressed="true"] svg path { stroke: #fff; }
.add-set-btn { width: 100%; min-height: 50px; border: none; border-radius: 10px; background: #DDF1FF; color: var(--ktext); font: inherit; font-size: 17px; cursor: pointer; }
@media (max-width: 380px) { .kday { padding: 8px 0 6px; } .kdot { width: 22px; height: 22px; } .kbig { font-size: 22px; } .ex-thumb { width: 76px; height: 64px; } }
.kapp ~ .rest-bar, .kapp .rest-bar { bottom: calc(100px + env(safe-area-inset-bottom)); }

/* ---------- satisfying taps ---------- */
button, .btn, .kcard, .ktab, .kday, .kline, .kbanner, .set-tick, .choice, .qa-opt span, .chip-btn, .add-set-btn, .round-btn, .seg button, .ex-thumb, .kc-cell, .habit, .tab, .coach nav.side button {
  transition: transform .12s cubic-bezier(.3,.7,.4,1.5), background-color .15s ease, box-shadow .15s ease, border-color .15s ease;
  -webkit-tap-highlight-color: transparent;
}
button:active:not(:disabled), .btn:active, .ktab:active, .kline:active, .seg button:active, .add-set-btn:active, .qa-opt:active span { transform: scale(.96); }
.kcard:active:is(button), .kbanner:active, .habit:active, .kc-cell:active:not(:disabled) { transform: scale(.98); }
.set-tick:active, .round-btn:active, .kday:active, .choice:active { transform: scale(.88); }
.kline:active { background: #F6F8FA; }
@keyframes pop { 0% { transform: scale(.82); } 55% { transform: scale(1.12); } 100% { transform: scale(1); } }
@keyframes ring { 0% { box-shadow: 0 0 0 0 rgba(52,176,90,.45); } 100% { box-shadow: 0 0 0 14px rgba(52,176,90,0); } }
@keyframes ringBlue { 0% { box-shadow: 0 0 0 0 rgba(56,182,255,.5); } 100% { box-shadow: 0 0 0 14px rgba(56,182,255,0); } }
@keyframes tickDraw { from { stroke-dashoffset: 24; } to { stroke-dashoffset: 0; } }
.pop, .pop * { animation-delay: var(--pop-delay, 0ms) !important; }
.pop { animation: pop .32s cubic-bezier(.3,.7,.4,1.4); }
.set-tick.pop[aria-pressed="true"] { animation: pop .32s cubic-bezier(.3,.7,.4,1.4), ring .5s ease-out; }
.habit.pop.done .box, .choice.pop[aria-pressed="true"] { animation: pop .32s cubic-bezier(.3,.7,.4,1.4), ringBlue .5s ease-out; }
.pop[aria-pressed="true"] svg path, .habit.pop.done .box svg path { stroke-dasharray: 24; animation: tickDraw .28s ease-out .05s both; }
.set-row.done { transition: background-color .25s ease; }
.qa-opt input:checked + span { animation: pop .3s cubic-bezier(.3,.7,.4,1.4); }
.ktab.pop svg { animation: pop .3s cubic-bezier(.3,.7,.4,1.4); }
.ktab.pop { animation: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  button:active, .btn:active { transform: none !important; }
}

/* ---------- days tracker ---------- */
.kday.full { background: var(--blue); }
.kday.full .kdot { background: #fff; }
.kday.full .kdot svg path { stroke: var(--blue); }
.kday.full .kdn, .kday.full .kdd { color: var(--navy); font-weight: 700; }
.kday.full.today { border-color: var(--navy); }
.ktrack { display: flex; align-items: center; gap: 14px; }
.ktrack-flame { font-size: 34px; line-height: 1; width: 56px; height: 56px; border-radius: 16px; background: #FFF1E3; display: grid; place-items: center; flex: none; }
.ktrack-flame.cold { filter: grayscale(1); opacity: .5; }
.ktrack-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ktrack.big .ktrack-flame { width: 72px; height: 72px; font-size: 44px; }
.tk-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.tk-stat { padding: 14px; display: flex; flex-direction: column; }
.tk-stat .kbig { font-size: 24px; margin: 0; }
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 10px; }
.badge { background: #fff; border-radius: 14px; padding: 10px 4px; display: flex; flex-direction: column; align-items: center; color: #9AA6B2; }
.badge-medal { font-size: 26px; filter: grayscale(1); opacity: .45; }
.badge b { font-size: 18px; line-height: 1.1; margin-top: 4px; }
.badge span:last-child { font-size: 11px; }
.badge.got { color: var(--ktext, #16202A); box-shadow: inset 0 0 0 2px var(--blue); }
.badge.got .badge-medal { filter: none; opacity: 1; }
.lb { display: flex; flex-direction: column; }
.lb-row { display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 10px; padding: 10px 6px; border-radius: 10px; }
.lb-row + .lb-row { border-top: 1px solid #EEF1F5; }
.lb-row.me { background: #EAF6FF; border-top-color: transparent; }
.lb-rank { font-weight: 700; text-align: center; font-size: 17px; }
.lb-name { font-weight: 500; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-days { font-weight: 700; font-variant-numeric: tabular-nums; }
.lb-days small { font-weight: 400; color: #6B7785; }
body:has(.kapp) .toast { bottom: calc(108px + env(safe-area-inset-bottom)); }

/* ---------- ghost numbers ---------- */
.kapp .set-row input::placeholder { color: #A9B4BF; font-style: italic; }
.set-n { position: relative; display: flex; align-items: center; gap: 2px; }
.beat { font-style: normal; font-size: 11px; font-weight: 800; line-height: 1; padding: 3px 4px; border-radius: 6px; animation: pop .3s cubic-bezier(.3,.7,.4,1.4); }
.beat.up { background: #34B05A; color: #fff; }
.beat.same { background: #E8ECF1; color: #3B4754; }
.kapp .set-row.beat-up input { border-color: #34B05A; }
.ghost-tip { margin: 0; background: #fff; border-radius: 14px; padding: 12px 14px; font-size: 14px; color: #3B4754; }
.ghost-tip b:first-child { color: var(--ktext, #16202A); }
/* shorter weight/reps boxes */
.kapp .set-row { padding: 3px 4px; }
.kapp .set-row input { min-height: 36px; height: 36px; padding: 0 8px; font-size: 16px; }
.kapp .set-tick { width: 34px; height: 34px; }
.kapp .set-tick svg { width: 14px; height: 14px; }
.kapp .set-head, .kapp .set-row { grid-template-columns: 44px minmax(0, 1fr) minmax(0, 1fr) 40px; }
/* rest timer sits at the top of the screen */
.kapp .rest-bar, .kapp ~ .rest-bar { top: calc(10px + env(safe-area-inset-top)); bottom: auto; z-index: 30; box-shadow: 0 8px 24px rgba(22,32,42,.25); }
@keyframes restIn { from { transform: translate(-50%, -120%); } to { transform: translate(-50%, 0); } }
.app:has(.rest-bar) .screen { padding-bottom: 24px; }

/* ================= Client app: finishing pass (all screens one style) ================= */
.kapp h2, .kapp h3 { font-family: Inter, system-ui, sans-serif; font-weight: 600; color: var(--ktext); }
.kapp .card h2 { font-size: 18px; }
.kapp .eyebrow { font-weight: 500; font-size: 13px; letter-spacing: .04em; color: #3B4754; }
.kapp .muted { color: var(--kmuted); }
.kapp .card { padding: 18px; }
/* inputs */
.kapp .field { font-weight: 500; color: #3B4754; }
.kapp .field input, .kapp .field textarea, .kapp .field select, .kapp .qa-q input:not([type=radio]):not([type=checkbox]), .kapp .qa-q textarea,
.kapp .habit-num input, .kapp .habit-text textarea, .kapp .choice-select { border: 1px solid #DCE2E8; border-radius: 12px; background: #fff; color: var(--ktext); }
.kapp .field input:focus, .kapp .field textarea:focus, .kapp .habit input:focus, .kapp .habit textarea:focus, .kapp .qa-q input:focus, .kapp .qa-q textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(56,182,255,.25); }
/* buttons */
.kapp .btn { border-radius: 14px; min-height: 52px; font-weight: 600; }
.kapp .btn.small { min-height: 40px; border-radius: 10px; }
.kapp .btn.ghost { background: #fff; border: 1px solid #DCE2E8; }
.kapp .btn.danger { min-height: 46px; }
.kapp .btn.quiet { min-height: 40px; }
.kapp .seg { background: #E8ECF1; border-radius: 999px; padding: 4px; }
.kapp .seg button { border-radius: 999px; padding: 0 16px; font-weight: 500; font-size: 14px; color: var(--ktext); }
.kapp .seg button[aria-pressed="true"] { background: #fff; color: #1E9BE6; font-weight: 600; box-shadow: 0 1px 3px rgba(22,32,42,.12); }
/* week navigation + day strip (habits, food) */
.kapp .weeknav { background: #fff; border-radius: 14px; padding: 4px; }
.kapp .wk-arrow { border: none; background: #E8ECF1; color: #1E9BE6; border-radius: 10px; }
.kapp .wk-label { font-weight: 600; }
.kapp .day { background: #fff; border: 2px solid transparent; border-radius: 12px; padding: 9px 0 8px; font-weight: 500; font-size: 12px; color: var(--ktext); text-transform: uppercase; }
.kapp .day b { font-family: Inter, sans-serif; font-weight: 600; font-size: 14px; margin-top: 3px; color: #3B4754; }
.kapp .day[aria-pressed="true"] { background: #fff; border-color: var(--blue); }
.kapp .day[aria-pressed="true"] b { color: #1E9BE6; }
.kapp .day.is-today:not([aria-pressed="true"]) { box-shadow: none; border-color: #BFE6FF; }
.kapp .day:disabled { opacity: .4; }
/* summary cards (habits / food) */
.ksum .kbig { margin-top: 6px; }
.ksum.all { box-shadow: inset 0 0 0 2px var(--blue); }
.ksum-badge { background: var(--blue); color: var(--navy); font-weight: 700; font-size: 13px; border-radius: 999px; padding: 6px 12px; white-space: nowrap; }
.kbar.thin { height: 6px; margin-top: 8px; }
/* habit rows: round ticks like the home strip */
.kapp .habit { border: none; border-radius: 16px; padding: 16px; box-shadow: 0 1px 2px rgba(22,32,42,.04); gap: 14px; color: var(--ktext); }
.kapp .habit.done { background: #fff; box-shadow: inset 0 0 0 2px var(--blue); }
.kapp .habit .box { width: 30px; height: 30px; border-radius: 50%; border: 2px solid #9AA6B2; background: #fff; }
.kapp .habit.done .box { background: var(--blue); border-color: var(--blue); }
.kapp .habit.done .box svg path { stroke: #fff; }
.kapp .habit .name { font-weight: 600; font-size: 16px; }
.kapp .habit .note { color: var(--kmuted); }
.kapp .habit-num input { width: 92px; min-height: 42px; }
.kapp .choice { border: 1px solid #DCE2E8; font-weight: 500; min-height: 42px; color: var(--ktext); }
.kapp .choice[aria-pressed="true"] { background: var(--blue); border-color: var(--blue); color: var(--navy); font-weight: 600; }
.kapp .week-grid { background: #fff; border-radius: 16px; padding: 8px; }
/* catch-up: friendly white card with blue chips instead of yellow */
.kapp .catchup { background: #fff; border-radius: 16px; padding: 14px 16px; box-shadow: inset 4px 0 0 var(--blue); }
.kapp .chip-btn { border: none; background: #DDF1FF; color: var(--ktext); font-weight: 600; min-height: 38px; }
/* food */
.kapp .food-item { border-top-color: #EEF1F5; padding-top: 10px; }
.kapp .meal-card .add-set-btn { min-height: 46px; font-size: 15px; font-weight: 500; }
.kapp .plan-box summary { list-style: none; display: flex; justify-content: space-between; align-items: center; font-size: 17px; }
.kapp .plan-box summary::-webkit-details-marker { display: none; }
.kapp .plan-box summary::after { content: '›'; font-size: 24px; line-height: 1; transform: rotate(90deg); transition: transform .15s; }
.kapp .plan-box:not([open]) summary::after { transform: none; }
/* workout list */
.wk-card { align-items: center; }
.wk-go { flex: none; width: 46px; height: 46px; border-radius: 50%; background: var(--blue); color: var(--navy); display: grid; place-items: center; }
.wk-go svg { width: 20px; height: 20px; }
.wk-go.done { background: #34B05A; }
.wk-go.done svg { width: 18px; height: 18px; }
.kapp .card.w-done, .kcard.w-done { background: #fff; opacity: .8; }
.kapp .gym-box { border-radius: 16px; padding: 14px 16px; }
.kapp .aim-box { border-radius: 14px; }
.kapp .hist-item b { font-weight: 600; }
/* check-in */
.kapp .scale legend { font-weight: 500; color: #3B4754; }
.kapp .scale .opts { background: #E8ECF1; border-radius: 999px; padding: 4px; gap: 2px; }
.kapp .scale button { height: 40px; border: none; border-radius: 999px; background: none; font-weight: 600; color: var(--ktext); }
.kapp .scale button[aria-pressed="true"] { background: var(--blue); color: var(--navy); box-shadow: 0 1px 3px rgba(22,32,42,.15); }
.kapp .photo-slot { border: 2px dashed #A8D9F7; background: #F5FBFF; border-radius: 14px; color: #1E9BE6; font-weight: 600; font-size: 14px; }
.ps-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.kapp .video-pick { border-radius: 14px; }
.kapp .fb-card { box-shadow: inset 4px 0 0 var(--blue); }
.kapp .fb-card .btn { align-self: flex-start; }
.kapp .status-pill { border-radius: 999px; padding: 4px 10px; font-weight: 600; }
.kapp .status-pill.ready { background: #DDF1FF; color: #0B4F7A; }
/* Q&A form inside the client app */
.kapp .qa-form { gap: 20px; }
.kapp .qa-opt span { border-color: #DCE2E8; font-weight: 500; }
.kapp .qa-num { background: #DDF1FF; color: #0B4F7A; }
.kapp .bar { background: #DDF1FF; height: 8px; border-radius: 9px; }
.kapp .bar > span { background: var(--blue); border-radius: 9px; }
.kapp .chip { background: #F3F5F9; border: none; color: var(--ktext); font-weight: 500; }
.kapp .chip.on { background: #DDF1FF; }
.kapp .gcell { border: 2px solid #DCE2E8; border-radius: 50%; width: 34px; height: 34px; }
.kapp .gcell.on { background: var(--blue); border-color: var(--blue); color: var(--navy); }
.kapp .gcell.on svg path { stroke: #fff; }
.kapp .gcell.part { background: #DDF1FF; border-color: #A8D9F7; }
.kapp .gcell.future { border-style: dashed; border-color: #DCE2E8; }
.kapp .week-table th { font-weight: 500; }
.kapp .screen > div > h1 { font-family: Inter, sans-serif; font-weight: 700; font-size: 24px; color: var(--ktext); }
.kapp .krow > .kmuted.small { white-space: nowrap; }
/* login */
body:has(.kauth) { background: #F3F5F9; }
.kauth { gap: 16px; }
.kauth .klogo.big { width: 88px; height: 88px; border-radius: 22px; align-self: center; margin: 12px 0 4px; box-shadow: 0 4px 16px rgba(22,32,42,.08); border: none; }
.kauth .klogo.big img { width: 64px; }
.kauth .kcard { padding: 22px; }
.kauth h1 { font-family: Inter, sans-serif; font-weight: 700; font-size: 24px; }
.kauth .btn { min-height: 52px; border-radius: 14px; }
.kauth .field input { border: 1px solid #DCE2E8; border-radius: 12px; }

/* ================= Coach side: same soft, clean style as the client app ================= */
body:has(.coach) { background: #F3F5F9; }
.coach main h1 { font-family: Montserrat, sans-serif; font-weight: 800; font-size: 28px; color: #16202A; }
.coach main h2, .coach main h3 { font-family: Inter, system-ui, sans-serif; font-weight: 600; color: #16202A; }
.coach main h2 { font-size: 19px; }
.coach .card { background: #fff; border: none; border-radius: 18px; box-shadow: 0 1px 2px rgba(22,32,42,.05); }
.coach .field { font-weight: 500; color: #3B4754; }
.coach .field input, .coach .field textarea, .coach .field select { border: 1px solid #DCE2E8; border-radius: 12px; }
.coach .field input:focus, .coach .field textarea:focus, .coach .field select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(56,182,255,.25); }
.coach .btn { font-weight: 600; }
.coach .btn.ghost { border-color: #DCE2E8; }
.coach .seg { background: #E8ECF1; border-radius: 999px; padding: 4px; }
.coach .seg button { border-radius: 999px; font-weight: 500; }
.coach .seg button[aria-pressed="true"] { color: #1E9BE6; font-weight: 600; }
.coach .ctabs button[aria-current="page"], .coach .ctabs [aria-selected="true"] { color: #16202A; }
.coach .w-row { border-top-color: #EEF1F5; }
.coach .notice { background: #fff; border: none; box-shadow: inset 4px 0 0 var(--blue); border-radius: 14px; }
.coach .chip { border-radius: 999px; }
.coach .status-pill { border-radius: 999px; padding: 4px 10px; }
/* coach menu: full side menu on computers, a tidy drop-down on phones */
.coach nav.side .nav-top { display: flex; align-items: center; justify-content: space-between; }
.coach nav.side .nav-items { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.coach nav.side .nav-toggle { display: none; }
@media (max-width: 760px) {
  .coach nav.side { flex-basis: 100%; padding: 12px 16px; position: sticky; top: 0; z-index: 25; }
  .coach nav.side .logo { margin-bottom: 0; height: 26px; }
  .coach nav.side .nav-toggle { display: inline-flex; gap: 10px; align-items: center; min-height: 44px; padding: 0 14px; background: rgba(255,255,255,.55); border-radius: 999px; font-weight: 600; }
  .coach nav.side .nav-items { display: none; padding-top: 10px; }
  .coach nav.side.open .nav-items { display: flex; }
  .coach nav.side .foot { padding-top: 10px; }
  .coach main { padding: 16px; }
}
/* client page: sub-tabs under the main tabs */
.subtabs { display: flex; flex-wrap: wrap; gap: 6px; background: #E8ECF1; border-radius: 999px; padding: 4px; align-self: flex-start; max-width: 100%; }
.subtabs button { border: none; background: none; border-radius: 999px; min-height: 38px; padding: 0 16px; font: inherit; font-size: 14px; font-weight: 500; color: #16202A; cursor: pointer; }
.subtabs button[aria-selected="true"] { background: #fff; color: #1E9BE6; font-weight: 600; box-shadow: 0 1px 3px rgba(22,32,42,.12); }
@media (max-width: 520px) { .subtabs { border-radius: 16px; } .subtabs button { flex: 1 1 auto; } }
/* client workouts tab */
.cw-list { display: flex; flex-direction: column; }
.cw-row { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px; padding: 14px 0; border-top: 1px solid #EEF1F5; }
.cw-row:first-child { border-top: none; padding-top: 4px; }
.cw-save { flex-basis: 100%; text-align: left; color: #5A6B7B; margin-top: -4px; }
.empty-state { background: #F5FBFF; border: 2px dashed #BFE6FF; border-radius: 14px; padding: 18px; display: flex; flex-direction: column; gap: 4px; }
.opt-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.opt-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; text-align: left; background: #fff; border: 2px solid #E3E8EE; border-radius: 14px; padding: 14px; font: inherit; color: #16202A; cursor: pointer; }
.opt-tile svg { color: #1E9BE6; }
.opt-tile b { font-size: 15px; font-weight: 600; }
.opt-tile span { font-size: 13px; color: #5A6B7B; }
.opt-tile:hover:not(:disabled) { border-color: #A8D9F7; }
.opt-tile[aria-pressed="true"] { border-color: var(--blue); background: #F5FBFF; }
.opt-tile:disabled { opacity: .55; cursor: default; }
.opt-panel { background: #F5FBFF; border-radius: 14px; padding: 16px; gap: 12px; }

/* ---------- reminders ---------- */
.switch { position: relative; flex: none; width: 52px; height: 32px; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch i { position: absolute; inset: 0; background: #CBD3DC; border-radius: 999px; transition: background .2s; }
.switch i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .2s cubic-bezier(.3,.7,.4,1.3); }
.switch input:checked + i { background: #34B05A; }
.switch input:checked + i::after { transform: translateX(20px); }
.switch input:focus-visible + i { outline: 3px solid var(--blue); outline-offset: 2px; }
.rem-row { padding: 14px 0; display: flex; flex-direction: column; gap: 10px; }
.rem-row + .rem-row { border-top: 1px solid #EEF1F5; }
.rem-main { display: flex; align-items: center; justify-content: space-between; gap: 14px; cursor: pointer; }
.rem-time { display: flex; align-items: center; gap: 10px; font-size: 14px; color: #3B4754; }
.rem-time select { min-height: 40px; border: 1px solid #DCE2E8; border-radius: 10px; padding: 0 10px; font: inherit; background: #fff; }
.push-card { gap: 14px; }
.push-card.on { box-shadow: inset 0 0 0 2px #34B05A; }
.push-bell { font-size: 28px; }
.steps { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: 15px; }
.kbanner.nudge { background: #FFF1E3; color: #16202A; font-size: 15px; padding: 16px 18px; }
.kbanner.nudge .chev { color: #16202A; }
.rem-c { border: 1px solid #EEF1F5; border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 12px; }
/* your own reminders */
.day-picks { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.day-pick { min-width: 52px; min-height: 40px; border: 1px solid #DCE2E8; background: #fff; border-radius: 999px; font: inherit; font-weight: 600; font-size: 14px; color: #16202A; cursor: pointer; padding: 0 12px; }
.day-pick[aria-pressed="true"] { background: var(--blue); border-color: var(--blue); color: var(--navy); }
.day-pick.wide { padding: 0 18px; }
.kbanner.nudge.custom { background: #fff; box-shadow: inset 4px 0 0 var(--blue); cursor: default; }
.nudge-x { flex: none; width: 36px; height: 36px; border-radius: 50%; border: none; background: #F3F5F9; font-size: 20px; line-height: 1; color: #3B4754; cursor: pointer; }
.w-row .switch { margin: 0; }
/* invites */
.btn.wa { background: #25D366; color: #06311A; }
.btn.wa .bi { width: 16px; height: 16px; }
.inv-row { align-items: center; }
.inv-prev { display: flex; flex-direction: column; gap: 4px; max-height: 260px; overflow: auto; }
.inv-line { display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 10px; padding: 8px 12px; font-size: 14px; }
.inv-line > span:first-child { color: #34B05A; font-weight: 700; }
.inv-line.bad { background: #FFF6E5; }
.inv-line.bad > span:first-child, .inv-line.bad > span:last-child { color: #9A5B00; }
.small-head { font-size: 14px; margin-top: 4px; }
.small-det summary { cursor: pointer; font-weight: 600; font-size: 14px; padding: 6px 0; }
.field input.locked { background: #F3F5F9; color: #3B4754; }

/* ---------- assessment week ---------- */
.assess-bar { display: flex; align-items: center; gap: 10px; width: 100%; border: none; border-radius: 14px; padding: 10px 14px; background: linear-gradient(90deg, #16202A, #24394B); color: #fff; font: inherit; font-size: 14px; cursor: pointer; text-align: left; }
.assess-tag { background: var(--blue); color: var(--navy); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; border-radius: 999px; padding: 4px 10px; flex: none; }
.assess-day { flex: 1; min-width: 0; font-weight: 600; }
.assess-play { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13px; opacity: .9; flex: none; }
.assess-play svg { width: 14px; height: 14px; }
.assess-lock { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 28px 22px; }
.assess-lock-ic { font-size: 40px; }
.assess-lock h2 { font-size: 20px; }
.assess-modal { position: fixed; inset: 0; z-index: 60; background: rgba(13,22,31,.6); display: flex; align-items: flex-end; justify-content: center; padding: 12px; }
.assess-modal.anim { animation: fadeIn .2s ease; }
.assess-sheet { background: #fff; border-radius: 22px; padding: 22px; width: 100%; max-width: 520px; max-height: calc(100vh - 24px); overflow: auto; gap: 14px; }
.assess-modal.anim .assess-sheet { animation: sheetUp .3s cubic-bezier(.3,.7,.4,1.1); }
.assess-sheet h2 { font-family: Montserrat, sans-serif; font-weight: 800; font-size: 24px; }
.assess-video { width: 100%; border-radius: 14px; background: #000; max-height: 50vh; }
.assess-novid { background: #F3F5F9; border-radius: 14px; padding: 18px; font-size: 14px; color: #3B4754; }
.assess-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.assess-list li { display: flex; gap: 10px; align-items: center; font-weight: 500; }
.assess-list li::before { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 800; }
.assess-list li.yes::before { content: '✓'; background: #34B05A; color: #fff; }
.assess-list li.no::before { content: '–'; background: #E8ECF1; color: #5A6B7B; }
.assess-list li.no { color: #5A6B7B; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes sheetUp { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.assess-strip { display: flex; align-items: center; justify-content: space-between; gap: 14px; background: #fff; border-radius: 14px; padding: 12px 16px; margin-top: -8px; }
.assess-strip.on { box-shadow: inset 4px 0 0 var(--blue); background: #F5FBFF; }
.assess-pill { display: inline-block; margin-left: 6px; background: #DDF1FF; color: #0B4F7A; border-radius: 999px; padding: 2px 8px; font-size: 12px; font-weight: 600; vertical-align: middle; }
.kday.pre { opacity: .35; cursor: default; }

/* ---------- exercise covers ---------- */
.ex-cover { position: relative; display: block; flex: none; width: 96px; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; background: #16202A; }
.ex-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ex-cover.lg { width: 132px; }
.ex-cover.sm { width: 72px; border-radius: 8px; }
.ex-cover.blank { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #3B4754; text-align: center; padding: 6px; }
.ex-cover.blank span { font-size: 11px; font-weight: 600; line-height: 1.2; }
.ex-cover.sm.blank span { display: none; }
.ex-block { display: flex; flex-direction: row; gap: 16px; align-items: flex-start; }
.ex-cover-col { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: none; }
.ex-cover-btn { position: relative; border: none; padding: 0; background: none; cursor: pointer; border-radius: 10px; }
.ex-cover-play { position: absolute; inset: 0; display: grid; place-items: center; }
.ex-cover-play svg { width: 34px; height: 34px; padding: 9px; border-radius: 50%; background: rgba(255,255,255,.92); color: #16202A; box-shadow: 0 2px 8px rgba(0,0,0,.25); }
.ex-main { flex: 1; min-width: 0; }
.ex-title { font-weight: 700; font-size: 17px; margin: 0 0 6px; }
@media (max-width: 560px) { .ex-cover.lg { width: 96px; } .ex-block { gap: 12px; } }
/* client workout card: cover with a play button on top */
.ex-thumb.has-cover { position: relative; padding: 0; overflow: hidden; background: #16202A; }
.ex-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.thumb-play { position: relative; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.92); color: #16202A; }
.thumb-play svg { width: 16px; height: 16px; }
.ex-thumb:not(.has-cover) .thumb-play { background: none; color: #fff; }
.ex-thumb.none.has-cover { cursor: default; }
/* muscle group tabs (Gym exercises) */
.muscle-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 2px 2px 8px; scrollbar-width: thin; }
.muscle-tabs button { flex: none; border: 1px solid #DCE2E8; background: #fff; border-radius: 999px; min-height: 40px; padding: 0 14px; font: inherit; font-size: 14px; font-weight: 600; color: #16202A; cursor: pointer; }
.muscle-tabs button span { font-weight: 500; color: #8A99A8; margin-left: 2px; }
.muscle-tabs button[aria-selected="true"] { background: var(--blue); border-color: var(--blue); color: var(--navy); }
.muscle-tabs button[aria-selected="true"] span { color: var(--navy); opacity: .7; }
.muscle-tabs button.empty { color: #9AA6B2; }
/* gym check (client) */
.gc-cur { display: flex; flex-direction: column; gap: 2px; background: #F5FBFF; border-radius: 14px; padding: 14px 16px; box-shadow: inset 4px 0 0 var(--blue); }
.gc-cur b { font-size: 18px; }
.gc-kit { background: #F3F5F9; border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; max-height: 240px; overflow: auto; }
.assess-sheet .eq-cats { max-height: 44vh; overflow: auto; padding-right: 4px; }
.gym-box.gym-empty { display: flex; justify-content: space-between; align-items: center; width: 100%; border: 2px dashed #A8D9F7; background: #F5FBFF; font: inherit; font-size: 15px; color: #16202A; cursor: pointer; text-align: left; }
/* equipment ticks: clear on/off, no crossed-out text */
.eq-tog { text-decoration: none !important; background: #fff; border: 1px solid #DCE2E8; color: #3B4754; font-weight: 500; }
.eq-tog[aria-pressed="true"] { background: var(--blue); border-color: var(--blue); color: var(--navy); font-weight: 600; }
.eq-tog[aria-pressed="true"]::before { content: '✓ '; }

/* ---------- profile photos ---------- */
.avatar.has-photo { padding: 0; overflow: hidden; background: #E8ECF1; }
.avatar.has-photo img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 50%; }
.avatar.xl { width: 96px; height: 96px; font-size: 32px; flex: none; display: inline-grid; place-items: center; border-radius: 50%; background: var(--blue); color: var(--navy); font-weight: 800; }
.prof-photo { display: flex; align-items: center; gap: 18px; }
.kname { background: none; border: none; padding: 0; font: inherit; text-align: left; color: inherit; cursor: pointer; }
.kname-chev { font-weight: 400; color: #8A99A8; }
button.kprofile { border: none; font: inherit; color: inherit; text-align: left; cursor: pointer; width: 100%; display: flex; align-items: center; }
.kavatar.photo { padding: 0; overflow: hidden; border-width: 3px; }
.kavatar.photo img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
/* client exercise library */
.lib-search { width: 100%; min-height: 48px; border: 1px solid #DCE2E8; border-radius: 14px; padding: 0 16px; font: inherit; font-size: 16px; background: #fff; }
.lib-search:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(56,182,255,.25); }
.lib-note { white-space: nowrap; }
.gym-row { flex-wrap: wrap; }

/* ---- Design pass (Nov) ---- */
.chip-row { width: 100%; }
.chip { white-space: nowrap; }
@media (max-width: 640px) {
  .client-head { padding: 16px; gap: 12px; }
  .client-head > div:nth-child(2) { flex: 1 1 calc(100% - 92px); }
  .client-head > .row { width: 100%; order: 3; }
  .client-head h1 { font-size: 26px; line-height: 1.15; }
}
.item .t .assess-pill { display: inline-block; margin: 3px 0 0; color: #0B4F7A; font-size: 12px; }
.cl-row { flex-wrap: wrap; }
.cl-stats { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.cl-stat { display: flex; flex-direction: column; align-items: center; min-width: 78px; padding: 5px 10px; border-radius: 10px; background: #F1F5F9; font-weight: 700; font-size: 14px; color: var(--ink, #0B1B2B); }
.cl-stat small { font-size: 11px; font-weight: 500; color: var(--muted); }
.cl-stat.ok { background: #E3F6EA; color: #13703A; }
.cl-stat.warn { background: #FFF3DC; color: #8A5A00; }
.cl-stat.bad { background: #FDE6E6; color: #B42318; }
.cl-stat.go { background: #DDF1FF; color: #0B4F7A; }
@media (max-width: 640px) { .cl-stats { width: 100%; justify-content: flex-start; padding-left: 52px; } .cl-stat { min-width: 0; flex: 1; } }
.ex-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-bottom: 8px; }
.ex-tile { display: flex; flex-direction: column; align-items: stretch; gap: 6px; text-align: left; border: 1px solid #E1E8EF; background: #fff; border-radius: 14px; padding: 8px; cursor: pointer; font: inherit; color: inherit; transition: border-color .15s, box-shadow .15s, transform .1s; }
.ex-tile:hover { border-color: var(--blue); box-shadow: 0 4px 14px rgba(56,182,255,.18); }
.ex-tile:active { transform: scale(.98); }
.ex-tile[hidden] { display: none; }
.ex-cover.tile { width: 100%; }
.ex-tile-name { font-weight: 700; font-size: 14px; line-height: 1.25; padding: 0 2px; }
.ex-tile-meta { font-size: 12px; color: var(--muted); padding: 0 2px; }
.ex-tile-meta.has { color: #0B7FC2; font-weight: 600; }
.ex-editor .ex-block { border: none; padding: 0; }
@media (max-width: 520px) { .ex-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }
.stat p.was { font-family: inherit; font-weight: 500; font-size: 12px; color: var(--muted); margin-top: 2px; }
.media-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: -8px; }
.media.was .ph { aspect-ratio: 3 / 4; opacity: .92; }
.finish-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; justify-content: center; padding: 0 12px calc(12px + env(safe-area-inset-bottom)); pointer-events: none; }
.finish-bar .inner { pointer-events: auto; display: flex; align-items: center; gap: 12px; width: 100%; max-width: 540px; background: rgba(255,255,255,.97); backdrop-filter: blur(10px); border: 1px solid #E3E8EE; border-radius: 40px; padding: 8px 8px 8px 20px; box-shadow: 0 6px 24px rgba(22,32,42,.12); }
.finish-bar .fb-count { flex: 1; font-size: 14px; color: var(--muted); }
.finish-bar .fb-count b { color: var(--ktext, #16202A); font-size: 17px; }
.finish-bar .btn { border-radius: 30px; padding-left: 26px; padding-right: 26px; }
.note-add { align-self: flex-start; }
.kc-ics { display: flex; flex-wrap: wrap; gap: 3px; justify-content: center; margin-top: 2px; }
.kc-ic { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; background: var(--blue); color: #fff; flex: none; }
.kc-ic svg { width: 14px; height: 14px; }
.kc-ic.ci { background: #22A55A; }
.kc-legend { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.kc-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.prof-sec { font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); border-top: 1px solid #EEF2F6; padding: 16px 0 8px; margin: 4px 0 0; line-height: 1.2; }
.prof-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.prof-form .field { gap: 6px; }
@media (max-width: 360px) { .prof-two { grid-template-columns: minmax(0, 1fr); } }
.past-fb summary { list-style: none; display: flex; align-items: center; justify-content: space-between; cursor: pointer; }
.past-fb summary::-webkit-details-marker { display: none; }
.past-fb[open] summary svg { transform: rotate(90deg); }
.past-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid #EEF2F6; }
.past-row:first-of-type { margin-top: 10px; }
.past-row .btn svg { width: 14px; height: 14px; }
@media (max-width: 640px) {
  .inv-row { flex-wrap: wrap; }
  .inv-row > div:first-child { flex: 1 1 100% !important; }
  .card .row.between > h2 { min-width: 0; }
}

/* ---- Cycle tracker ---- */
.cyc-ic { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: #FDE8EE; color: #D6336C; flex: none; }
.cyc-card .cyc-q { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-weight: 600; }
.cyc-card .cyc-q .choice-row { flex: 0 1 auto; }
.cyc-card .choice { min-height: 38px; padding: 0 14px; font-size: 14px; }
.cyc-card .choice[aria-pressed="true"] { background: #D6336C; border-color: #D6336C; color: #fff; }
.cyc-card .seg button[aria-pressed="true"] { color: #D6336C; }
.cyc-note { background: #FFF4F7; border-radius: 12px; padding: 10px 12px; font-size: 14px; }
.cyc-mini { align-items: center; gap: 12px; }
.kc-dot.per { background: #D6336C; }
.tick.per { background: #D6336C; }
.cyc-strip { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; background: #fff; border-radius: 14px; padding: 12px 16px; border-left: 4px solid #F3B4C7; }
.cyc-stats { display: flex; gap: 10px; flex-wrap: wrap; }
.cyc-stats span { background: #FFF4F7; color: #8A1C44; border-radius: 10px; padding: 4px 10px; font-size: 13px; font-weight: 600; }
.coach-pill { display: inline-block; background: var(--navy); color: #fff; border-radius: 999px; padding: 1px 8px; font-size: 11px; font-weight: 700; vertical-align: middle; margin-left: 4px; }
.my-strip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.my-day { border: 1px solid #E1E8EF; background: #fff; border-radius: 12px; padding: 8px 2px; display: flex; flex-direction: column; align-items: center; gap: 2px; cursor: pointer; font: inherit; color: inherit; }
.my-day span { font-size: 12px; color: var(--muted); }
.my-day b { font-size: 14px; }
.my-day.all { background: var(--blue); border-color: var(--blue); color: #fff; }
.my-day.all span { color: #E6F6FF; }
.my-day.sel { outline: 2px solid var(--navy); outline-offset: 1px; }
.my-habits .habit { width: 100%; }
.coach-pill { display: inline-block; background: var(--navy); color: #fff; border-radius: 999px; padding: 1px 8px; font-size: 11px; font-weight: 700; vertical-align: middle; margin-left: 4px; }
.my-strip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.my-day { border: 1px solid #E1E8EF; background: #fff; border-radius: 12px; padding: 8px 2px; display: flex; flex-direction: column; align-items: center; gap: 2px; cursor: pointer; font: inherit; color: inherit; }
.my-day span { font-size: 12px; color: var(--muted); }
.my-day b { font-size: 14px; }
.my-day.all { background: var(--blue); border-color: var(--blue); color: #fff; }
.my-day.all span { color: #E6F6FF; }
.my-day.sel { outline: 2px solid var(--navy); outline-offset: 1px; }
.day-btn { min-height: 54px; font-size: 17px; }
.day-done { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: #E3F6EA; color: #13703A; border-radius: 14px; padding: 14px 16px; font-weight: 600; }
.logged-row td { border-top: 2px solid #E1E8EF; }

/* ---- Barcode scanner & weighing food ---- */
.scan-btn { display: flex; align-items: center; justify-content: center; gap: 8px; }
.scan-note { background: #FFF6E5; color: #6B4A00; border-radius: 10px; padding: 8px 12px; }
.scan-open { overflow: hidden; }
.scan-wrap { position: fixed; inset: 0; z-index: 100; background: #0B1E2D; color: #fff; display: flex; flex-direction: column; padding: calc(10px + env(safe-area-inset-top)) 16px calc(16px + env(safe-area-inset-bottom)); gap: 12px; }
.scan-top { display: flex; align-items: center; justify-content: space-between; font-size: 18px; }
.scan-x { width: 44px; height: 44px; border-radius: 50%; border: none; background: rgba(255,255,255,.12); color: #fff; font-size: 18px; cursor: pointer; }
.scan-cam { position: relative; flex: 1; min-height: 0; border-radius: 18px; overflow: hidden; background: #000; }
.scan-cam video { width: 100%; height: 100%; object-fit: cover; display: block; }
.scan-box { position: absolute; left: 10%; right: 10%; top: 30%; bottom: 30%; border: 3px solid var(--blue); border-radius: 14px; box-shadow: 0 0 0 999px rgba(0,0,0,.35); }
.scan-msg { position: absolute; left: 0; right: 0; bottom: 14px; text-align: center; font-weight: 600; padding: 0 16px; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.scan-type { display: flex; gap: 8px; align-items: flex-end; }
.scan-type label { flex: 1; display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: #C9D6E2; }
.scan-type input { min-height: 46px; border-radius: 12px; border: none; padding: 0 12px; font-size: 17px; }
.scan-type .btn { min-height: 46px; }
.food-mode { align-self: flex-start; }
.grams-in { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.grams-in input { max-width: 140px; font-size: 20px; font-weight: 700; }
.grams-in span { font-weight: 600; color: var(--muted); }
.grams-calc { min-height: 20px; }
.kpill.soft { background: #E3F6EA; color: #13703A; }
.scan-type .btn { white-space: nowrap; }
.habit.done.part { background: #FFF8EC; border-color: #F2C98A; }
.habit.done.part .box { background: #F2A93B; border-color: #F2A93B; color: #fff; }
.habit.done.part .note { color: #8A5A00; }
.cellval.on.part { background: #F2A93B; }
.kapp .habit.done.part { background: #FFF8EC; box-shadow: inset 0 0 0 2px #F2C98A; }
.kapp .habit.done.part .box { background: #F2A93B; border-color: #F2A93B; }

/* ---- Coach top bar (replaces the side menu) ---- */
.coach.topnav { display: block; min-height: 100vh; }
.coach.topnav main { max-width: 1200px; margin: 0 auto; padding: 24px 28px 48px; }
.cbar { position: sticky; top: 0; z-index: 30; background: #fff; border-bottom: 1px solid #E6EBF0; }
.cbar-in { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; gap: 16px; padding: 10px 28px; }
.cbar-logo { height: 26px; flex: none; }
.cnav { display: flex; gap: 4px; flex: 1; justify-content: center; min-width: 0; }
.cnav button { position: relative; display: inline-flex; align-items: center; gap: 8px; border: none; background: none; color: #4A5866; font: inherit; font-size: 15px; font-weight: 600; padding: 0 14px; min-height: 44px; border-radius: 12px; cursor: pointer; white-space: nowrap; }
.cnav button:hover { background: #F1F5F9; color: #16202A; }
.cnav button[aria-current="page"] { background: #E6F5FF; color: #0B7FC2; }
.cnav svg { flex: none; }
.cn-badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: #F04438; color: #fff; font-size: 12px; font-weight: 700; display: inline-grid; place-items: center; }
.cacct { position: relative; flex: none; }
.cacct-btn { width: 40px; height: 40px; border-radius: 50%; border: none; background: var(--navy); color: #fff; font-weight: 700; cursor: pointer; }
.cacct-menu { position: absolute; right: 0; top: 48px; width: 220px; background: #fff; border-radius: 14px; box-shadow: 0 10px 30px rgba(22,32,42,.16); padding: 12px; display: flex; flex-direction: column; gap: 4px; }
.cacct-menu p { padding: 4px 8px 8px; border-bottom: 1px solid #EEF1F5; margin-bottom: 4px; }
.cacct-menu button { text-align: left; border: none; background: none; font: inherit; font-weight: 600; padding: 10px 8px; border-radius: 8px; cursor: pointer; }
.cacct-menu button:hover { background: #F1F5F9; }
.csub { border-top: 1px solid #F0F3F6; background: #fff; }
.csub-in { max-width: 1200px; margin: 0 auto; display: flex; gap: 6px; padding: 8px 28px; overflow-x: auto; scrollbar-width: none; }
.csub-in::-webkit-scrollbar { display: none; }
.csub button { border: 1px solid #DCE2E8; background: #fff; color: #3B4754; font: inherit; font-size: 14px; font-weight: 600; padding: 0 14px; min-height: 36px; border-radius: 999px; cursor: pointer; white-space: nowrap; }
.csub button[aria-current="page"] { background: var(--navy); border-color: var(--navy); color: #fff; }

/* Half a laptop screen: icons with small labels underneath */
@media (max-width: 1050px) {
  .cbar-in { padding: 8px 16px; gap: 10px; }
  .cnav { gap: 2px; }
  .cnav button { flex-direction: column; gap: 2px; padding: 6px 8px; min-height: 52px; font-size: 12px; min-width: 64px; }
  .cn-badge { position: absolute; top: 2px; right: 8px; height: 18px; min-width: 18px; font-size: 11px; padding: 0 5px; }
  .csub-in { padding: 8px 16px; }
  .coach.topnav main { padding: 20px 18px 40px; }
}
/* Phone: menu moves to the bottom, like the client app */
@media (max-width: 600px) {
  .cbar-in { justify-content: space-between; }
  .cnav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: rgba(255,255,255,.97); border-top: 1px solid #E6EBF0; padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); justify-content: space-around; backdrop-filter: blur(10px); }
  .cnav button { min-width: 0; flex: 1; padding: 6px 2px; font-size: 11px; }
  .coach.topnav main { padding: 16px 14px 96px; }
}
.wn-card { box-shadow: inset 4px 0 0 #F2A93B, 0 1px 2px rgba(22,32,42,.05); }
.wn { padding-top: 12px; border-top: 1px solid #EEF1F5; }
.wn:first-of-type { border-top: none; padding-top: 0; }
.wn-text { white-space: pre-line; background: #FFF8EC; border-radius: 10px; padding: 8px 12px; margin-top: 6px; }
details.sess.hl { background: #FFF8EC; border-radius: 12px; }
.my-app { box-shadow: inset 4px 0 0 var(--blue), 0 1px 2px rgba(22,32,42,.05); }
.me-list { margin-bottom: 16px; }
.to-coach { align-items: center; background: var(--navy); color: #fff; }
.to-coach .kmuted { color: #C9D9E8; }
.to-coach svg { color: #fff; }

/* ---- Rating 1–10 ---- */
.qa-rate { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 6px; }
.qa-rate .qa-opt span { justify-content: center; padding-left: 0; padding-right: 0; min-width: 0; }
.qa-rate-ends { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 4px; }
@media (max-width: 420px) { .qa-rate { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.habit-rate { flex-wrap: wrap; }
.rate-row { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 4px; width: 100%; }
.rate-row .choice { min-width: 0; padding: 0; min-height: 40px; font-size: 15px; }
@media (max-width: 420px) { .rate-row { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; } }
.cellval small { font-size: 10px; opacity: .8; }
.qa-rate .qa-opt span { display: flex; width: 100%; }

/* ---- Workout sections (warm-up, supersets) ---- */
.sec-head { font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #0B7FC2; margin: 10px 4px -4px; }
.sec-head.ss { color: #8A4FD8; }
.sec-head span { text-transform: none; letter-spacing: 0; font-weight: 600; color: var(--muted); }
.ex-card.in-ss { box-shadow: inset 4px 0 0 #B18CF0, 0 1px 2px rgba(22,32,42,.05); }
.wi-sec { flex: 0 1 150px; }
