/* Flow Performance & Wellness - brand: black, white, Flow red, Montserrat */
:root {
  --accent: #d2222c; --accent-d: #a8141d; --accent-l: #fdecec;
  --ink: #111; --ink-2: #3a3a3a; --muted: #6f6f6f; --line: #e6e6e6; --line-2: #f1f1f1;
  --bg: #f5f5f4; --card: #fff; --green: #15803d; --green-l: #e8f6ee; --amber: #b45309; --amber-l: #fef3e2; --blue: #1d4ed8; --blue-l: #e8efff;
  --build: #111; --burn: #d2222c;
  --r: 16px; --r-sm: 10px; --shadow: 0 1px 2px rgba(0,0,0,.05), 0 4px 16px rgba(0,0,0,.04);
  --head: 'Montserrat', system-ui, sans-serif; --body: 'Roboto', system-ui, -apple-system, sans-serif;
  --tabbar-h: 64px; --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; -webkit-tap-highlight-color: transparent; overscroll-behavior-y: none; font: 15px/1.45 var(--body); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
body.modal-open { overflow: hidden; }
h1, h2, h3, h4 { font-family: var(--head); margin: 0 0 .4em; line-height: 1.15; letter-spacing: -.01em; }
h1 { font-size: 1.6rem; font-weight: 800; } h2 { font-size: 1.2rem; font-weight: 700; } h3 { font-size: 1rem; font-weight: 700; } h4 { font-size: .9rem; font-weight: 700; }
p { margin: 0 0 .5em; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; text-align: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ico { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; vertical-align: -4px; }
.muted { color: var(--muted); } .sm { font-size: .82rem; } .center { text-align: center; display: block; } .one { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.red { color: var(--accent); }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font: 600 .72rem var(--head); color: var(--muted); margin-bottom: .3em; }

/* ---------- Logo ---------- */
.logo { display: inline-flex; align-items: center; gap: 8px; font-family: var(--head); }
.logo b { font-weight: 900; font-size: 1.35rem; letter-spacing: .06em; border-bottom: 3px solid var(--accent); line-height: 1; padding-bottom: 2px; }
.logo small { font-size: .55rem; line-height: 1.1; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 600; }

/* ---------- Buttons & controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 999px; background: var(--card); border: 1.5px solid var(--ink); font: 700 .9rem var(--head); white-space: nowrap; transition: transform .1s, background .15s; }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-d); }
.btn.ghost { border-color: var(--line); }
.btn.danger { color: var(--accent); }
.btn.sm { min-height: 36px; padding: 0 14px; font-size: .8rem; }
.btn.block { display: flex; width: 100%; margin: 12px 0; white-space: normal; text-align: center; padding-top: 8px; padding-bottom: 8px; line-height: 1.25; }
.btn.big { min-height: 54px; font-size: 1rem; }
.btn.icon { width: 44px; padding: 0; flex: none; }
.btn:disabled { opacity: .5; pointer-events: none; }
.icon-btn { width: 40px; height: 40px; display: inline-grid; place-items: center; border-radius: 50%; color: var(--ink-2); flex: none; }
.icon-btn:hover { background: var(--line-2); } .icon-btn:disabled { opacity: .3; }
.link { color: var(--accent); font-weight: 600; padding: 8px 0; }
.link.sm { font-size: .8rem; padding: 4px 0; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--card); font-weight: 500; font-size: .85rem; display: inline-flex; align-items: center; gap: 4px; }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip.on.green { background: var(--green); border-color: var(--green); } .chip.on.red { background: var(--accent); border-color: var(--accent); }
.pill { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 999px; font: 700 .7rem var(--head); background: var(--line-2); color: var(--ink-2); white-space: nowrap; letter-spacing: .02em; }
.pill.red { background: var(--accent); color: #fff; } .pill.green { background: var(--green-l); color: var(--green); } .pill.amber { background: var(--amber-l); color: var(--amber); } .pill.blue { background: var(--blue-l); color: var(--blue); }
.seg { display: flex; background: #e9e9e7; padding: 4px; border-radius: 999px; margin: 0 0 14px; gap: 2px; }
.seg button { flex: 1; min-height: 38px; border-radius: 999px; font: 600 .82rem var(--head); color: var(--ink-2); text-align: center; display: inline-flex; align-items: center; justify-content: center; gap: 4px; padding: 0 8px; }
.seg button.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.seg.small button { min-height: 32px; font-size: .78rem; }
.avatar { width: 40px; height: 40px; border-radius: 50%; display: inline-grid; place-items: center; background: #ececea; color: var(--ink); font: 700 .8rem var(--head); flex: none; }
.avatar.coach { background: var(--ink); color: #fff; } .avatar.sm { width: 32px; height: 32px; font-size: .7rem; } .avatar.lg { width: 64px; height: 64px; font-size: 1.2rem; }

/* ---------- Forms ---------- */
.form label, label.lbl { display: flex; flex-direction: column; gap: 4px; font-size: .82rem; font-weight: 500; color: var(--ink-2); margin-bottom: 12px; }
input, select, textarea { width: 100%; min-height: 44px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: var(--r-sm); background: #fff; font-size: 16px; color: var(--ink); }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--ink); outline: none; }
.checks { border: 0; padding: 0; margin: 0 0 12px; } .checks legend { font-size: .82rem; font-weight: 500; margin-bottom: 6px; }
.checks label { flex-direction: row; align-items: center; gap: 8px; margin: 0 0 6px; } .checks input { width: 20px; min-height: 20px; accent-color: var(--accent); }
.inline-form { display: flex; gap: 8px; margin: 10px 0; align-items: center; } .inline-form select, .inline-form input { flex: 1; }
label.inline { display: flex; align-items: center; gap: 8px; font-weight: 600; } label.inline select { width: auto; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; } .grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 10px; }

/* ---------- Cards & lists ---------- */
.card { background: var(--card); border-radius: var(--r); padding: 16px; box-shadow: var(--shadow); margin-bottom: 12px; display: block; width: 100%; }
.card.flat { box-shadow: none; border: 1px solid var(--line); }
.card-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.card-h h3, .card-h h2 { margin: 0; }
.section { margin: 22px 0 10px; }
.list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.row { display: flex; align-items: center; gap: 12px; background: var(--card); border-radius: 14px; padding: 12px 14px; box-shadow: var(--shadow); width: 100%; text-align: left; }
button.row:hover, tr[data-act]:hover { background: #fafafa; }
.row .grow, .grow { flex: 1; min-width: 0; } .row p { margin: 0; }
.tl { text-align: left; }
.time { width: 52px; flex: none; display: flex; flex-direction: column; font-family: var(--head); }
.time b { font-size: 1rem; font-weight: 800; } .time small { color: var(--muted); font-size: .72rem; }
.row.mine { box-shadow: inset 4px 0 0 var(--accent), var(--shadow); }
.row.live { box-shadow: inset 4px 0 0 var(--accent), var(--shadow); }
.empty { text-align: center; color: var(--muted); padding: 28px 16px; background: var(--card); border-radius: var(--r); border: 1.5px dashed var(--line); margin-bottom: 12px; }
.empty .ico { width: 28px; height: 28px; opacity: .5; } .empty p { margin: 6px 0 0; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); display: inline-block; flex: none; }
.bar { height: 6px; background: var(--line-2); border-radius: 99px; overflow: hidden; margin: 6px 0; } .bar span { display: block; height: 100%; background: var(--ink); border-radius: 99px; transition: width .3s; }
.bar.full span { background: var(--accent); } .bar.protein span { background: var(--accent); } .bar.carbs span { background: #f59e0b; } .bar.fat span { background: #6b7280; }
.delta { font-size: .72rem; font-weight: 700; } .delta.good { color: var(--green); } .delta.bad { color: var(--amber); }
.flags { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }

/* ---------- Toast / modal ---------- */
.toast { position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + 20px + var(--safe-b)); transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; font-weight: 500; opacity: 0; transition: .25s; z-index: 1000; max-width: min(92vw, 440px); box-shadow: 0 8px 30px rgba(0,0,0,.25); }
.toast.show { opacity: 1; transform: translate(-50%, 0); } .toast.ok { background: #0f5132; } .toast.err { background: var(--accent-d); }
.modal-wrap { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 500; display: flex; align-items: flex-end; justify-content: center; opacity: 0; transition: opacity .2s; }
.modal-wrap.show { opacity: 1; }
.modal { position: relative; background: var(--card); width: 100%; max-width: 560px; max-height: 92vh; max-height: 92dvh; overscroll-behavior: contain; overflow-y: auto; border-radius: 22px 22px 0 0; padding: 24px 18px calc(24px + var(--safe-b)); transform: translateY(30px); transition: transform .25s; }
.modal-wrap.show .modal { transform: none; }
.modal.wide { max-width: 760px; }
.modal-x { position: absolute; right: 12px; top: 12px; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; }
.modal-x:hover { background: var(--line-2); }
.modal h2 { padding-right: 40px; }
.modal-foot { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.full-img { width: 100%; border-radius: var(--r-sm); }
@media (min-width: 700px) { .modal-wrap { align-items: center; } .modal { border-radius: 22px; padding: 28px; } }

/* ---------- Member shell (phone-first) ---------- */
.app.member { max-width: 560px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; background: var(--bg); position: relative; }
@media (min-width: 600px) { body:has(.app.member) { background: #e7e6e3; } .app.member { box-shadow: 0 0 40px rgba(0,0,0,.08); } }
.top { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 10px; background: rgba(245,245,244,.92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.top-r { display: flex; gap: 10px; align-items: center; }
.view { padding: 8px 16px calc(var(--tabbar-h) + 28px + var(--safe-b)); }
.tabbar { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 560px; display: flex; background: rgba(255,255,255,.96); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--line); padding-bottom: var(--safe-b); z-index: 60; }
.nav-btn { flex: 1; min-height: var(--tabbar-h); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font: 600 .66rem var(--head); color: var(--muted); position: relative; }
.nav-btn .ico { width: 23px; height: 23px; }
.nav-btn.on { color: var(--accent); }
.badge { position: absolute; top: 9px; left: calc(50% + 6px); min-width: 9px; height: 9px; padding: 0 4px; border-radius: 99px; background: var(--accent); color: #fff; font: 700 .6rem/9px var(--head); font-style: normal; }
.badge:not(:empty) { height: 16px; line-height: 16px; min-width: 16px; text-align: center; top: 6px; }
.page-title { margin: 6px 0 14px; }
.demo-switch { position: fixed; right: 12px; bottom: calc(var(--tabbar-h) + 12px + var(--safe-b)); z-index: 70; background: var(--ink); color: #fff; font: 600 .72rem var(--head); padding: 8px 12px; border-radius: 99px; display: flex; gap: 6px; align-items: center; box-shadow: 0 4px 16px rgba(0,0,0,.25); opacity: .85; }
.demo-switch .ico { width: 15px; height: 15px; }
.demo-switch:hover { opacity: 1; }
@media (min-width: 900px) { .app.coach ~ .demo-switch { bottom: 16px; } }

/* Home */
.hero { margin: 4px 0 16px; } .hero h1 { margin-bottom: 4px; }
.next { border: 2px solid var(--ink); } .next.live { border-color: var(--accent); }
.next-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.next h3 { font-size: 1.15rem; margin-bottom: 2px; }
.next-when { font-weight: 700; margin: 0; }
.locked { display: flex; gap: 8px; align-items: center; margin-top: 12px; padding: 12px; background: var(--line-2); border-radius: var(--r-sm); font-size: .85rem; color: var(--ink-2); }
.cta { text-align: center; } .cta .btn { margin-top: 6px; }
.card.alert { display: flex; gap: 12px; align-items: center; background: var(--amber-l); box-shadow: none; } .card.alert .ico { color: var(--amber); } .card.alert p { margin: 0; font-size: .85rem; } .card.alert > div { flex: 1; }
.water { display: flex; align-items: center; gap: 10px; margin: 6px 0 12px; font-weight: 500; font-size: .9rem; }
.water > span { width: 64px; flex: none; }
.glasses { display: flex; gap: 4px; flex: 1; }
.glass { flex: 1; height: 30px; border: 2px solid #bfdbfe; border-radius: 4px 4px 8px 8px; background: #fff; max-width: 30px; }
.glass.on { background: linear-gradient(#93c5fd, #3b82f6); border-color: #3b82f6; }
.scale { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: .9rem; font-weight: 500; }
.scale > span { width: 64px; flex: none; }
.scale .chips { gap: 4px; flex-wrap: nowrap; flex: 1; } .scale .chip { flex: 1; padding: 0 2px; justify-content: center; min-width: 0; font-size: .8rem; }
.tile { text-align: left; display: flex; flex-direction: column; gap: 2px; }
.tile-k { font-size: .75rem; color: var(--ink-2); } .tile-v { font: 800 1.5rem var(--head); } .tile-v small { font-size: .8rem; color: var(--muted); font-weight: 600; }
.ai-promo { display: flex; align-items: center; gap: 12px; background: var(--ink); color: #fff; cursor: pointer; }
.ai-promo p { margin: 0; font-size: .82rem; opacity: .75; } .ai-promo > div { flex: 1; }
.ai-dot { width: 42px; height: 42px; border-radius: 50%; background: var(--accent); display: grid; place-items: center; flex: none; }
.news h3 { margin-bottom: 4px; }

/* Booking */
.loc { margin-bottom: 12px; }
.days { display: flex; gap: 6px; overflow-x: auto; padding: 2px 2px 10px; margin: 0 -16px 8px; padding-left: 16px; padding-right: 16px; scrollbar-width: none; scroll-snap-type: x mandatory; }
.days::-webkit-scrollbar { display: none; }
.day { flex: none; width: 52px; height: 64px; border-radius: 14px; background: var(--card); display: flex; flex-direction: column; align-items: center; justify-content: center; box-shadow: var(--shadow); position: relative; scroll-snap-align: start; }
.day small { font-size: .68rem; color: var(--muted); font-weight: 600; text-transform: uppercase; } .day b { font: 800 1.15rem var(--head); }
.day.on { background: var(--ink); color: #fff; } .day.on small { color: #ccc; }
.day .dot { position: absolute; bottom: 6px; width: 6px; height: 6px; }
.session .cap { max-width: 160px; } .session .cap .bar { height: 4px; margin: 4px 0 0; }
.policy { display: flex; gap: 6px; align-items: flex-start; margin: 8px 0 16px; }
.day-h { margin: 18px 0 8px; font-size: .9rem; color: var(--ink-2); }
.types { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.type { text-align: left; border: 2px solid transparent; margin: 0; } .type.on { border-color: var(--accent); }
.type small { display: block; font-weight: 600; color: var(--accent); margin: 2px 0 4px; } .type p { margin: 0; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.slot { background: var(--card); border-radius: 12px; padding: 10px; box-shadow: var(--shadow); display: flex; flex-direction: column; border: 1.5px solid transparent; }
.slot:hover { border-color: var(--accent); } .slot b { font: 800 1rem var(--head); } .slot small { font-size: .7rem; color: var(--muted); }

/* Train */
.workout { border-top: 4px solid var(--accent); }
.workout h2 { font-size: 1.35rem; }
.coach-note { background: var(--line-2); padding: 10px 12px; border-radius: var(--r-sm); font-size: .88rem; display: flex; gap: 8px; }
.block { padding: 12px 0; border-top: 1px solid var(--line); }
.block h4 { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; color: var(--ink-2); }
.kind { display: inline-block; padding: 3px 9px; border-radius: 6px; font: 900 .68rem var(--head); letter-spacing: .1em; text-transform: uppercase; color: #fff; background: var(--build); }
.kind.burn { background: var(--burn); }
.ex { display: grid; grid-template-columns: 1fr auto; gap: 0 10px; padding: 6px 0; } .ex span { font-weight: 700; font-family: var(--head); font-size: .85rem; }
.locked-card { display: flex; gap: 12px; align-items: flex-start; background: var(--ink); color: #fff; } .locked-card .muted { color: #bbb; } .locked-card p { margin: 0; } .locked-card .ico { margin-top: 2px; color: var(--accent); }
.prs { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.pr { background: var(--card); padding: 12px; border-radius: 14px; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.pr small { font-size: .72rem; color: var(--muted); } .pr b { font: 800 1.3rem var(--head); }
details.log { display: block; } details.log summary { display: flex; align-items: center; gap: 12px; list-style: none; cursor: pointer; } details.log summary::-webkit-details-marker { display: none; }
details.log[open] summary .ico { transform: rotate(90deg); }
.sets { width: 100%; margin-top: 10px; border-collapse: collapse; font-size: .85rem; } .sets th { text-align: left; font-weight: 600; padding: 4px 8px 4px 0; width: 45%; } .sets td { padding: 4px 0; color: var(--ink-2); }
.wl-ex { border: 1px solid var(--line); border-radius: 12px; padding: 10px; margin-bottom: 10px; }
.wl-name { font-weight: 700; margin-bottom: 8px; }
.wl-set { display: grid; grid-template-columns: 22px 1fr 1fr; gap: 6px; align-items: center; margin-bottom: 6px; } .wl-set span { color: var(--muted); font-weight: 700; text-align: center; }

/* Food */
.datenav { display: flex; align-items: center; gap: 8px; justify-content: center; margin-bottom: 12px; }
.datenav b { min-width: 140px; text-align: center; font-family: var(--head); }
.food-sum { display: flex; gap: 18px; align-items: center; }
.ring { position: relative; width: 120px; height: 120px; flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 10; } .ring .bg { stroke: var(--line-2); } .ring .fg { stroke: var(--ink); stroke-linecap: round; transition: stroke-dashoffset .5s; }
.ring.over .fg { stroke: var(--accent); }
.ring-txt { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring-txt b { font: 800 1.5rem var(--head); } .ring-txt small { font-size: .7rem; color: var(--muted); }
.macros { flex: 1; display: flex; flex-direction: column; gap: 6px; font-size: .8rem; }
.macros > div { display: grid; grid-template-columns: 1fr auto; } .macros .bar { grid-column: span 2; margin: 2px 0 0; } .macros b small { color: var(--muted); font-weight: 400; }
.meal { margin: 16px 0; } .meal-h { display: flex; justify-content: space-between; align-items: baseline; } .meal-h h3 { margin-bottom: 8px; }
.food-row { margin-bottom: 8px; } .thumb { width: 46px; height: 46px; border-radius: 10px; object-fit: cover; flex: none; }
.add-meal { width: 100%; padding: 14px; border: 1.5px dashed var(--line); border-radius: 14px; color: var(--muted); font-weight: 500; text-align: center; }
.add-meal:hover { border-color: var(--accent); color: var(--accent); }
.photo-pick { display: flex; gap: 12px; align-items: center; margin-bottom: 4px; } .photo-pick .btn { cursor: pointer; } .photo-pick img { width: 72px; height: 72px; object-fit: cover; border-radius: 12px; }
.food-tbl { width: 100%; border-collapse: collapse; margin-top: 14px; font-size: .85rem; }
.food-tbl th { text-align: left; font-size: .72rem; color: var(--muted); font-weight: 600; padding: 4px; }
.food-tbl td { padding: 4px; vertical-align: top; } .food-tbl td:first-child { width: auto; } .food-tbl td:nth-child(2) { width: 70px; } .food-tbl td:nth-child(3) { width: 58px; } .food-tbl td:last-child { width: 40px; } .food-tbl { table-layout: fixed; } .food-tbl th:nth-child(2) { width: 70px; } .food-tbl th:nth-child(3) { width: 58px; } .food-tbl th:last-child { width: 40px; }
.food-tbl input { min-height: 40px; padding: 6px 8px; font-size: 16px; } .food-tbl small input { border: 0; padding: 2px 8px; min-height: 28px; font-size: 16px; color: var(--muted); }
.food-tbl tfoot th { font-size: .9rem; color: var(--ink); border-top: 1.5px solid var(--ink); padding-top: 8px; }
.ai-note { background: var(--accent-l); color: var(--accent-d); padding: 10px 12px; border-radius: var(--r-sm); font-size: .85rem; margin: 10px 0; display: flex; gap: 6px; }
.spin { width: 16px; height: 16px; border: 2.5px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; }
.btn:not(.primary) .spin { border-color: rgba(0,0,0,.15); border-top-color: var(--ink); }
@keyframes spin { to { transform: rotate(360deg); } }

/* Progress */
.stat { text-align: center; padding: 14px 8px; } .stat b { display: block; font: 800 1.5rem var(--head); } .stat small { font-size: .72rem; color: var(--muted); }
.ib-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0; }
.ib { background: var(--line-2); border-radius: 12px; padding: 10px; text-align: left; display: flex; flex-direction: column; border: 2px solid transparent; }
.ib.on { border-color: var(--ink); background: #fff; }
.ib small { font-size: .7rem; color: var(--muted); } .ib b { font: 800 1.15rem var(--head); } .ib b i { font-style: normal; font-size: .7rem; color: var(--muted); margin-left: 2px; }
.chart-t { margin: 12px 0 4px; font-size: .82rem; color: var(--ink-2); }
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid line { stroke: var(--line); stroke-dasharray: 3 3; } .chart text { font-size: 9px; fill: var(--muted); font-family: var(--body); }
.chart .line { fill: none; stroke: var(--c); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.chart .area { fill: var(--c); opacity: .08; } .chart .dot { fill: #fff; stroke: var(--c); stroke-width: 2; pointer-events: none; }
.chart .hit { fill: transparent; cursor: pointer; } .chart .pt { outline: none; } .chart .pt.on .dot, .chart .pt:focus-visible .dot { fill: var(--c); stroke: #fff; transform: scale(1.7); }
.chart .dot { transform-box: fill-box; transform-origin: center; transition: transform .12s; }
.chart-wrap { position: relative; }
.chart-tip { position: absolute; transform: translate(-50%, -100%); background: var(--ink, #111); color: #fff; border-radius: 10px; padding: 7px 11px; font-size: .78rem; line-height: 1.3; text-align: center; pointer-events: none; white-space: nowrap; box-shadow: 0 6px 18px rgba(0,0,0,.2); z-index: 5; }
.ex-pick select { width: 100%; min-height: 46px; font: 600 16px var(--head); padding: 0 12px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--card); margin-bottom: 10px; }
.ex-sum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 2px 0 10px; }
.ex-sum div { background: var(--line-2); border-radius: 10px; padding: 8px 10px; } .ex-sum small { display: block; color: var(--muted); font-size: .72rem; }
.ex-sum b { font: 700 1.05rem var(--head); } .ex-sum b.up { color: #15803d; } .ex-sum b.down { color: var(--accent); }
.chart-hint { margin: 6px 0 0; text-align: center; }
.chart-tip.below { transform: translate(-50%, 0); }
.chart-tip small { display: block; opacity: .7; font-size: .7rem; } .chart-tip b { display: block; font: 700 .95rem var(--head); }
.chart-tip i { font-style: normal; background: var(--accent); border-radius: 4px; padding: 0 4px; font-size: .65rem; vertical-align: 2px; } .chart-tip span { display: block; opacity: .85; font-size: .72rem; }
.chart-empty { padding: 24px; text-align: center; color: var(--muted); font-size: .85rem; background: var(--line-2); border-radius: 12px; }

/* Chat */
.chat { display: flex; flex-direction: column; gap: 8px; padding-bottom: 80px; }
.bubble { max-width: 84%; padding: 10px 14px; border-radius: 18px; font-size: .92rem; word-wrap: break-word; }
.bubble.me { align-self: flex-end; background: var(--ink); color: #fff; border-bottom-right-radius: 6px; }
.bubble.them { align-self: flex-start; background: var(--card); box-shadow: var(--shadow); border-bottom-left-radius: 6px; }
.bubble .who { display: block; font: 700 .7rem var(--head); color: var(--accent); margin-bottom: 2px; }
.bubble .ts { display: block; font-size: .66rem; opacity: .55; margin-top: 4px; }
.typing { display: flex; gap: 4px; padding: 14px; } .typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite; } .typing span:nth-child(2) { animation-delay: .2s; } .typing span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.prompts { margin-top: 8px; } .prompts .chip { font-size: .8rem; }
.composer { position: fixed; left: 50%; transform: translateX(-50%); width: 100%; max-width: 560px; bottom: calc(var(--tabbar-h) + var(--safe-b)); display: flex; gap: 8px; padding: 10px 16px; background: rgba(245,245,244,.95); backdrop-filter: blur(10px); z-index: 55; }
.composer input { border-radius: 999px; padding-left: 18px; }
.app.member .chat ~ .link { margin-bottom: 70px; }
.profile { display: flex; gap: 14px; align-items: center; } .profile h2 { margin: 0; }

/* ---------- Coach shell ---------- */
.app.coach { min-height: 100vh; }
.app.coach .view { padding: 16px 16px calc(var(--tabbar-h) + 28px + var(--safe-b)); }
.side { display: none; }
.mobile-only { display: flex; }
.app.coach .tabbar { max-width: none; }
.page-h { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.page-h h1 { margin: 0; } .page-h p { margin: 4px 0 0; max-width: 640px; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; } .row-actions input[type=search] { width: 220px; border-radius: 99px; }
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 8px; }
.kpi { margin: 0; text-align: left; display: flex; flex-direction: column; gap: 2px; }
.kpi small { font-size: .74rem; color: var(--muted); } .kpi b { font: 800 1.7rem var(--head); } .kpi b.sm { font-size: 1rem; }
.cols { display: grid; gap: 0 20px; }
.today-prog { display: flex; justify-content: space-between; align-items: center; gap: 12px; border-left: 4px solid var(--accent); }
.today-prog h3 { margin: 2px 0; } .today-prog p { margin: 0; }
.week { display: grid; grid-template-columns: 1fr; gap: 12px; }
.wday { background: var(--card); border-radius: var(--r); padding: 10px; box-shadow: var(--shadow); }
.wday.today { outline: 2px solid var(--accent); }
.wday-h { display: flex; justify-content: space-between; align-items: center; gap: 6px; margin-bottom: 8px; font-family: var(--head); }
.prog-tag { font-size: .68rem; font-weight: 700; background: var(--ink); color: #fff; padding: 3px 8px; border-radius: 6px; max-width: 70%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prog-tag.missing { background: var(--amber-l); color: var(--amber); }
.wsess { display: block; width: 100%; text-align: left; padding: 7px 9px; margin-bottom: 5px; border-radius: 8px; background: var(--line-2); border-left: 3px solid var(--c); font-size: .8rem; }
.wsess:hover { background: #ececea; } .wsess small { display: block; color: var(--muted); font-size: .7rem; }
.roster .row { box-shadow: none; border: 1px solid var(--line); flex-wrap: wrap; }
.att { display: flex; gap: 4px; }
.prog-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.prog-day { margin: 0; } .prog-day.today { outline: 2px solid var(--accent); }
.prog h3 { font-size: .95rem; } .prog p { margin: 0 0 5px; }
.pblock { border: 1.5px solid var(--line); border-left: 5px solid var(--build); border-radius: 12px; padding: 12px; margin-bottom: 12px; }
.pblock.burn { border-left-color: var(--burn); }
.pblock-h { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.pblock-h .seg { margin: 0; flex: 0 0 160px; }
.mins { display: flex !important; flex-direction: row !important; align-items: center; gap: 4px !important; margin: 0 0 0 auto !important; font-size: .8rem; }
.mins input { width: 64px; min-height: 40px; padding: 4px 8px; font-size: 16px; }
.pex { display: grid; grid-template-columns: 28px 1.3fr 1fr; gap: 6px; align-items: center; margin-bottom: 6px; } .pex span { font: 800 .8rem var(--head); color: var(--muted); }
.table-wrap { display: none; overflow-x: auto; background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); }
.tbl { width: 100%; border-collapse: collapse; font-size: .85rem; }
.tbl th { text-align: left; font: 600 .72rem var(--head); color: var(--muted); padding: 12px; border-bottom: 1px solid var(--line); white-space: nowrap; text-transform: uppercase; letter-spacing: .04em; }
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.tbl tr[data-act] { cursor: pointer; }
.tbl.sm th, .tbl.sm td { padding: 6px; }
.who { display: flex; gap: 10px; align-items: center; } .who b { display: block; } .who small { display: block; }
.who.big h1 { margin: 0; } .who.big p { margin: 2px 0 6px; } .who.big .flags { justify-content: flex-start; }
.cards-mobile { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.back { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 8px; }
.food-week { display: flex; gap: 6px; align-items: flex-end; } .food-week > div { flex: 1; display: flex; flex-direction: column; align-items: center; font-size: .68rem; }
.fw-bar { width: 100%; height: 70px; background: var(--line-2); border-radius: 6px; display: flex; align-items: flex-end; overflow: hidden; } .fw-bar span { width: 100%; background: var(--ink); border-radius: 6px; }
.inbox { display: grid; gap: 16px; }
.inbox .thread { display: none; } .inbox.has-thread .threads { display: none; } .inbox.has-thread .thread { display: block; }
.thread-h { display: flex; gap: 10px; align-items: center; background: var(--card); padding: 10px; border-radius: 14px; margin-bottom: 12px; box-shadow: var(--shadow); } .thread-h p { margin: 0; }
.threads .row.on { outline: 2px solid var(--ink); }
.quick { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; } .quick .chip { flex: none; }
.app.coach .composer { max-width: none; }
.app.coach .chat { padding-bottom: 20px; }

@media (min-width: 640px) {
  .kpis { grid-template-columns: repeat(3, 1fr); }
  .week { grid-template-columns: repeat(2, 1fr); } .prog-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  body:has(.app.coach) { --tabbar-h: 0px; }
  .mobile-only, .app.coach .tabbar { display: none !important; }
  .app.coach { display: grid; grid-template-columns: 240px 1fr; }
  .side { display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; background: var(--ink); color: #fff; padding: 22px 14px; gap: 22px; }
  .side .logo small { color: #aaa; }
  .side nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
  .side .nav-btn { flex-direction: row; justify-content: flex-start; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: 10px; font-size: .88rem; color: #bbb; flex: none; }
  .side .nav-btn:hover { background: #222; color: #fff; }
  .side .nav-btn.on { background: var(--accent); color: #fff; }
  .side .badge { position: static; margin-left: auto; height: 18px !important; line-height: 18px !important; min-width: 18px; background: #fff; color: var(--accent); }
  .side-user { display: flex; gap: 10px; align-items: center; padding: 10px; border-radius: 12px; background: #1d1d1d; text-align: left; }
  .side-user .avatar { background: var(--accent); } .side-user small { display: block; color: #999; font-size: .72rem; }
  .app.coach .view { padding: 28px 32px 40px; max-width: 1400px; }
  .kpis { grid-template-columns: repeat(6, 1fr); }
  .cols { grid-template-columns: 1.4fr 1fr; }
  .week { grid-template-columns: repeat(6, 1fr); gap: 8px; } .wday { padding: 8px; }
  .prog-grid { grid-template-columns: repeat(3, 1fr); }
  .table-wrap { display: block; } .cards-mobile { display: none; }
  .inbox { grid-template-columns: 340px 1fr; } .inbox .threads, .inbox.has-thread .threads { display: flex; } .inbox .thread { display: block; }
  .app.coach .composer { position: static; transform: none; padding: 10px 0; background: none; }
  .toast { bottom: 24px; }
}

/* ---------- Session timer ---------- */
.timer { position: fixed; inset: 0; z-index: 900; background: #0b0b0b; color: #fff; display: flex; flex-direction: column; overflow-y: auto; font-family: var(--head); }
.timer.burn.phase-work { background: radial-gradient(circle at 50% 30%, #3a0a0d, #0b0b0b 70%); }
.timer.build.phase-work { background: radial-gradient(circle at 50% 30%, #262626, #0b0b0b 70%); }
.t-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: calc(14px + env(safe-area-inset-top, 0px)) 18px 14px; flex-wrap: wrap; }
.t-top small { display: block; color: #999; font-family: var(--body); font-size: .8rem; }
.t-steps { display: flex; gap: 6px; } .t-steps span { font-size: .65rem; font-weight: 800; letter-spacing: .1em; padding: 5px 10px; border-radius: 6px; background: #222; color: #777; }
.t-steps span.cur { background: #fff; color: #000; } .t-steps span.cur.burn { background: var(--accent); color: #fff; } .t-steps span.done { background: #1d3b29; color: #7ee2a8; }
.t-top-btns { display: flex; gap: 6px; }
.t-icon { width: 44px; height: 44px; border-radius: 50%; background: #1e1e1e; display: grid; place-items: center; color: #fff; }
.t-center { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 10px 18px 40px; gap: 10px; }
.t-kicker { color: #aaa; font-weight: 600; letter-spacing: .04em; margin: 0; font-size: clamp(.85rem, 1.6vw, 1.2rem); }
.t-kind { font-size: clamp(3rem, 11vw, 8rem); font-weight: 900; letter-spacing: .12em; margin: 0; line-height: 1; }
.t-kind.burn { color: var(--accent); }
.t-clock { position: relative; width: min(56vw, 46vh, 420px); aspect-ratio: 1; margin: 8px 0; }
.t-clock svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.t-clock circle { fill: none; stroke-width: 5; } .t-clock .bg { stroke: #222; } .t-clock .fg { stroke: #fff; stroke-linecap: round; transition: stroke-dashoffset .3s linear; }
.timer.burn .t-clock .fg { stroke: var(--accent); }
.t-clock span { position: absolute; inset: 0; display: grid; place-items: center; font-size: clamp(3.5rem, 13vw, 9rem); font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.t-clock.warn span { color: #ffb703; animation: pulse 1s infinite; }
@keyframes pulse { 50% { transform: scale(1.05); } }
.t-ex { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
.t-ex > div { background: #1a1a1a; border-radius: 16px; padding: 14px 22px; display: flex; flex-direction: column; min-width: 200px; }
.t-ex span { color: var(--accent); font-weight: 900; font-size: .9rem; } .t-ex b { font-size: clamp(1.2rem, 3vw, 2.2rem); } .t-ex small { color: #aaa; font-family: var(--body); font-size: clamp(.85rem, 1.5vw, 1.1rem); }
.t-note { color: #bbb; max-width: 640px; font-family: var(--body); }
.t-ctrl { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 10px; }
.t-ctrl button { min-height: 52px; padding: 0 22px; border-radius: 99px; background: #1e1e1e; color: #fff; font-weight: 700; display: inline-flex; align-items: center; gap: 8px; }
.t-ctrl button:hover { background: #2a2a2a; }
.t-ctrl .t-pp { background: #fff; color: #000; min-width: 150px; justify-content: center; }
.t-go { min-height: 64px; padding: 0 36px; border-radius: 99px; background: var(--accent); color: #fff !important; font-size: 1.25rem; font-weight: 800; display: inline-flex; align-items: center; gap: 10px; margin-top: 16px; }
.t-go.sm { min-height: 52px; font-size: 1rem; margin: 0; padding: 0 24px; }
.t-go:hover { background: var(--accent-d) !important; }
.t-change { font-size: 1.3rem; color: #ccc; } .t-change b { color: #fff; font-variant-numeric: tabular-nums; }
.celebrate h1 { font-size: clamp(3rem, 10vw, 7rem); font-weight: 900; margin: 0; animation: pop .6s cubic-bezier(.2, 1.6, .4, 1); }
.t-trophy { font-size: clamp(4rem, 12vw, 9rem); animation: pop .6s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes pop { from { transform: scale(.3); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* Narrow phones */
.top .pill { display: none; }
@media (min-width: 420px) { .top .pill { display: inline-flex; } }
.top-r { gap: 4px; }
html, body { overflow-x: clip; }
.cols > *, .app.coach > main, .inbox > * { min-width: 0; }
@media (min-width: 900px) { .kpis { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); } }
@media (min-width: 900px) and (max-width: 1180px) { .cols { grid-template-columns: 1fr; } .week { grid-template-columns: repeat(3, 1fr); } .prog-grid { grid-template-columns: repeat(2, 1fr); } }

.t-main { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.work .t-kind { font-size: clamp(2.2rem, 8vh, 7rem); }
@media (orientation: landscape) {
  .t-main { flex-direction: row; gap: clamp(20px, 4vw, 60px); }
  .t-main .t-ex { flex-direction: column; }
  .t-clock { width: min(42vw, 52vh, 460px); }
}
.t-clock { container-type: inline-size; }
.t-clock span { font-size: 25cqi; }

.clear-ai { display: block; margin: -6px 0 8px auto; }
.btn.big { flex-wrap: wrap; column-gap: 8px; row-gap: 0; padding-top: 10px; padding-bottom: 10px; }
.btn-sub { flex-basis: 100%; font: 500 .75rem var(--body); opacity: .85; }
[hidden] { display: none !important; }

/* Build / Burn options per block */
.block h4 { justify-content: space-between; }
.options { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.opt { position: relative; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; text-align: left; padding: 10px; border-radius: 12px; border: 2px solid var(--line); background: #fff; min-width: 0; }
button.opt:active { transform: scale(.98); }
.opt.on.build { border-color: var(--build); background: #f6f6f6; }
.opt.on.burn { border-color: var(--burn); background: var(--accent-l); }
.opt-ex { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.opt-ex b { font-size: .86rem; } .opt-ex small { font-size: .74rem; color: var(--muted); }
.opt-tick { position: absolute; top: 8px; right: 8px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: #fff; }
.opt.burn .opt-tick { background: var(--burn); }
.opt-tick .ico { width: 14px; height: 14px; stroke-width: 3; }
.split { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0 0; }
.pcols { display: grid; grid-template-columns: 1fr; gap: 10px; }
.pcol { display: flex; flex-direction: column; gap: 6px; padding: 10px; border-radius: 10px; background: var(--line-2); border-left: 4px solid var(--build); }
.pcol.burn { border-left-color: var(--burn); background: var(--accent-l); }
.pcol .kind { align-self: flex-start; }
.pcol .pex { grid-template-columns: 1.3fr 1fr; margin: 0; }
.pblock { border-left-width: 1.5px; }
.prog-b { padding: 6px 0; border-top: 1px solid var(--line-2); }
.prog-b p { margin: 3px 0 0; }
@media (min-width: 640px) { .pcols { grid-template-columns: 1fr 1fr; } .pcol .pex { grid-template-columns: 1fr; } }

/* Timer: Build and Burn side by side */
.t-block { font-size: clamp(2.6rem, 9vw, 6.5rem); font-weight: 900; letter-spacing: .08em; margin: 0; line-height: 1; }
.t-block small { font-size: .35em; color: #888; letter-spacing: .04em; }
.t-block.sm { font-size: clamp(1.6rem, 5vh, 3.5rem); }
.t-opts { display: flex; gap: 14px; align-items: stretch; justify-content: center; flex-wrap: wrap; }
.t-or { align-self: center; color: #777; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; font-size: .9rem; }
.t-opt { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.t-opt h2 { margin: 0; font-size: clamp(1.4rem, 4vw, 3rem); font-weight: 900; letter-spacing: .14em; }
.t-opt.burn h2 { color: var(--accent); }
.t-opt .t-ex { flex-direction: column; gap: 8px; }
.t-opt .t-ex > div { min-width: 0; border-left: 4px solid #fff; text-align: left; padding: 10px 16px; }
.t-opt.burn .t-ex > div { border-left-color: var(--accent); }
.t-split { color: #aaa; margin: 0; font-family: var(--body); }
.t-main { display: grid; grid-template-columns: 1fr 1fr; grid-template-areas: "clock clock" "build burn"; gap: 14px; align-items: start; width: 100%; max-width: 1400px; }
.t-main .t-clock { grid-area: clock; justify-self: center; }
.t-main .t-opt.build { grid-area: build; } .t-main .t-opt.burn { grid-area: burn; }
@media (orientation: landscape) {
  .t-main { grid-template-columns: 1fr auto 1fr; grid-template-areas: "build clock burn"; align-items: center; }
  .t-main .t-ex { flex-direction: column; }
}
img.avatar { object-fit: cover; background: #ddd; }
.avatar.xs { width: 22px; height: 22px; font-size: .55rem; }
.coach-tag { display: inline-flex; align-items: center; gap: 6px; vertical-align: middle; color: var(--ink-2); }
.slot-c { display: flex; align-items: center; gap: 4px; } .slot-c .avatar.xs { width: 18px; height: 18px; font-size: .5rem; }
.chip .avatar.xs { margin-left: -8px; margin-right: 2px; }
.bubble .who { display: flex; align-items: center; gap: 6px; }
.flat-row { box-shadow: none; border: 1px solid var(--line); flex-wrap: wrap; }
.flat-row .btn { cursor: pointer; }
.check-row { flex-direction: row !important; align-items: center; gap: 8px !important; } .check-row input { width: 20px; min-height: 20px; accent-color: var(--accent); }
.photo-edit { position: relative; cursor: pointer; flex: none; }
.photo-badge { position: absolute; right: -2px; bottom: -2px; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; border: 2px solid #fff; }
.photo-badge .ico { width: 14px; height: 14px; }
.photo-links { margin: 4px 0 0; } .photo-links .link { padding: 0; cursor: pointer; }
.t-opts { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 12px; width: 100%; max-width: 980px; flex-wrap: nowrap; }
.t-opts .t-or { font-size: .75rem; }
.t-ex > div { min-width: 0; }
.t-opts { margin-top: 14px; }

/* ---------- Timer v2: TV-first, exercises as big as possible ---------- */
.timer { overflow: hidden; }
.t-top { padding: calc(1.2vh + env(safe-area-inset-top, 0px)) 2vw 1.2vh; }
.t-title b { font-size: clamp(.9rem, 1.4vw, 1.6rem); } .t-title small { font-size: clamp(.7rem, 1vw, 1.1rem); }
.t-steps span { font-size: clamp(.65rem, 1vw, 1.1rem); padding: .5vh 1vw; }
.timer .t-main { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 27vw) minmax(0, 1fr); grid-template-areas: "build mid burn"; gap: 2vw; padding: 0 2vw 1.5vh; align-items: stretch; max-width: none; }
.timer .t-opt { grid-area: build; display: flex; flex-direction: column; gap: 1.6vh; min-height: 0; }
.timer .t-opt.burn { grid-area: burn; }
.timer .t-opt h2 { font-size: min(4.2vw, 7vh); letter-spacing: .14em; margin: 0; display: flex; align-items: baseline; gap: 1vw; }
.timer .t-opt h2 small { font-size: .35em; letter-spacing: .04em; color: #888; font-weight: 600; }
.t-card { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: center; gap: 1vh; background: #161616; border-radius: 1.4vw; padding: 2vh 1.8vw; border-left: .7vw solid #fff; }
.t-opt.burn .t-card { border-left-color: var(--accent); }
.t-card b { font-size: min(4.6vw, 9vh); line-height: 1.02; font-weight: 800; text-wrap: balance; overflow-wrap: anywhere; }
.t-card span { font-size: min(3.4vw, 6.5vh); line-height: 1.05; font-weight: 700; color: #ffd166; font-family: var(--head); }
.t-mid { grid-area: mid; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.6vh; min-width: 0; text-align: center; }
.timer .t-clock { width: 100%; max-width: min(27vw, 64vh); margin: 0; }
.timer .t-clock span { font-size: 26cqi; }
.timer .t-clock circle { stroke-width: 6; }
.timer .t-clock.warn span { color: #ff6b6b; }
.t-mid .t-block { font-size: min(5vw, 9vh); letter-spacing: .06em; display: flex; flex-direction: column; align-items: center; }
.t-mid .t-block small { font-size: .32em; margin-top: .6vh; }
.t-mid .t-go { margin: 1vh 0 0; font-size: min(2.4vw, 4.5vh); min-height: min(7vw, 12vh); padding: 0 3vw; }
.t-hint { color: #999; margin: 0; font-size: clamp(.8rem, 1.2vw, 1.4rem); }
.t-note { text-align: center; padding: 0 2vw 1.5vh; margin: 0; font-size: clamp(.8rem, 1.2vw, 1.4rem); }
.timer > .t-ctrl { margin: 0 0 calc(1.5vh + env(safe-area-inset-bottom, 0px)); opacity: .55; transition: opacity .2s; }
.timer > .t-ctrl:hover, .timer > .t-ctrl:focus-within { opacity: 1; }
.timer > .t-ctrl button { min-height: 44px; }
@media (orientation: portrait) {
  .timer .t-main { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto 1fr; grid-template-areas: "mid mid" "build burn"; gap: 2vh 3vw; }
  .timer .t-clock { max-width: min(62vw, 34vh); }
  .timer .t-opt h2 { font-size: min(7vw, 4vh); }
  .t-card { border-radius: 3vw; padding: 1.6vh 3vw; border-left-width: 1.4vw; }
  .t-card b { font-size: min(6.4vw, 4.2vh); } .t-card span { font-size: min(5vw, 3.2vh); }
  .t-mid .t-block { font-size: min(10vw, 6vh); } .t-mid .t-go { font-size: min(5vw, 3vh); min-height: 56px; padding: 0 8vw; }
}
.pcol .pex { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name name" "detail type"; }
.pcol .pex input:first-child { grid-area: name; } .pcol .pex input + input { grid-area: detail; } .pcol .pex select { grid-area: type; width: auto; font-size: 16px; padding: 6px 8px; }
.pcol .pex + .pex { margin-top: 6px; padding-top: 8px; border-top: 1px dashed rgba(0,0,0,.12); }
@media (min-width: 640px) { .pcol .pex { grid-template-columns: minmax(0, 1fr) auto; } }
.wl-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; margin-bottom: 8px; }
.wl-head .wl-name { margin: 0; } .wl-type { width: auto; padding: 6px 8px; font-size: 16px; }
.wl-set.cols-1 { grid-template-columns: 22px 1fr; }
.wl-ex.cardio { border-left: 4px solid var(--accent); } .wl-ex.bodyweight { border-left: 4px solid #6b7280; }
.t-confirm { position: absolute; inset: 0; background: rgba(0,0,0,.8); display: grid; place-items: center; z-index: 5; text-align: center; padding: 20px; }
.t-confirm > div { background: #1a1a1a; border-radius: 20px; padding: 28px 32px; max-width: 520px; }
.t-confirm h2 { font-size: clamp(1.4rem, 2.6vw, 2.4rem); margin-bottom: 6px; } .t-confirm p { color: #aaa; font-family: var(--body); }
.t-flash { position: absolute; left: 50%; bottom: 80px; transform: translateX(-50%); background: #fff; color: #000; padding: 12px 18px; border-radius: 12px; font: 600 .95rem var(--body); z-index: 6; max-width: 90vw; text-align: center; }
.t-top-btns { position: relative; z-index: 3; }
.t-icon:hover { background: #2a2a2a; }
.type-solo { border-left: 4px solid var(--blue); } .type-solo small { display: block; font-weight: 600; color: var(--blue); margin: 2px 0 4px; } .type-solo p { margin: 0; }
.wl-labels { margin-bottom: 2px; } .wl-labels small { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding-left: 4px; }

/* In-app confirm dialog (sits above modals and the timer) */
.confirm-wrap { position: fixed; inset: 0; z-index: 1100; background: rgba(0,0,0,.5); display: grid; place-items: center; padding: 20px; opacity: 0; transition: opacity .15s; }
.confirm-wrap.show { opacity: 1; }
.confirm { background: var(--card); border-radius: 20px; padding: 24px 22px 20px; width: 100%; max-width: 400px; box-shadow: 0 20px 60px rgba(0,0,0,.3); transform: scale(.96); transition: transform .15s; }
.confirm-wrap.show .confirm { transform: none; }
.confirm h2 { margin-bottom: 6px; } .confirm p { color: var(--ink-2); margin-bottom: 18px; }
.confirm-btns { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.confirm-btns .btn { flex: 1 1 auto; }
.btn.danger-fill { background: var(--accent); border-color: var(--accent); color: #fff; }
.list-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 12px 0; }
.joined-sel select { min-width: 170px; font-weight: 600; }

/* ---------- Member app: desktop layout ---------- */
.mcols { display: block; }
.mcol { min-width: 0; }
.side-note { font: 600 .72rem var(--head); color: #999; padding: 0 12px; }
@media (min-width: 900px) {
  body:has(.app.member) { --tabbar-h: 0px; background: var(--bg); }
  .app.member { max-width: none; display: grid; grid-template-columns: 240px minmax(0, 1fr); box-shadow: none; }
  .app.member .tabbar { display: none !important; }
  .app.member .view { padding: 28px 32px 48px; max-width: 1240px; width: 100%; }
  .mcols { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 0 24px; align-items: start; }
  .mcols.food-cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); }
  .mcols .mcol > .section:first-child, .mcols .mcol > .card-h:first-child .section, .mcols .mcol > .day-h:first-child { margin-top: 0; }
  .hero h1 { font-size: 2rem; }
  /* Booking: whole fortnight visible, sessions in two columns */
  .days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); margin: 0 0 12px; padding: 0 0 4px; overflow: visible; }
  .day { width: auto; }
  .session-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); }
  .types { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
  .slots { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
  /* Chat: comfortable reading width, message box inside the page */
  .chat-page { max-width: 780px; }
  .app.member .composer { position: sticky; bottom: 0; transform: none; left: auto; max-width: none; padding: 12px 0 4px; background: linear-gradient(transparent, var(--bg) 30%); }
  .app.member .chat { padding-bottom: 8px; min-height: 50vh; }
  .bubble { max-width: 70%; }
  .demo-btn.mobile-only { display: none; }
  .toast { bottom: 24px; }
}
@media (min-width: 1300px) { .app.member .view { padding: 32px 48px 56px; } }

/* Availability: show only the fields that fit the chosen repeat */
.avail-form .once-only { display: none; }
.avail-form:has(select[name=repeat] option[value=once]:checked) .once-only { display: flex; }
.avail-form:has(select[name=repeat] option[value=once]:checked) .rep-only { display: none; }
.glance { display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 4px; }
.gl-day { border-radius: 8px; background: var(--line-2); padding: 6px 2px; text-align: center; display: flex; flex-direction: column; min-width: 0; }
.gl-day small { font-size: .65rem; color: var(--muted); font-weight: 700; } .gl-day b { font: 800 .95rem var(--head); }
.gl-day span { font-size: .6rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 1em; }
.gl-day.on { background: var(--blue-l); } .gl-day.on span { color: var(--blue); font-weight: 700; }
.gl-day.off { background: var(--amber-l); } .gl-day.off span { color: var(--amber); font-weight: 700; }
@media (max-width: 640px) { .glance { grid-template-columns: repeat(7, minmax(0, 1fr)); } }

/* Opening hours */
.day .mon { font-size: .6rem; font-weight: 600; }
.day.shut { opacity: .55; } .day.shut b { text-decoration: line-through; text-decoration-thickness: 2px; }
.day.special:not(.on) { box-shadow: inset 0 0 0 2px var(--amber-l), var(--shadow); }
.day-banner { margin: 0 0 10px; } .day-banner b { font: 700 1rem var(--head); display: block; } .day-banner p { margin: 2px 0 0; font-size: .85rem; display: flex; align-items: center; gap: 6px; }
.day-banner.special p { color: var(--amber); font-weight: 600; } .day-banner.shut p { color: var(--accent); font-weight: 600; }
.day-banner .ico, .day-banner svg { width: 16px; height: 16px; flex: none; }
.hours-card h3 { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; } .hours-card h3 svg { width: 18px; height: 18px; }
.hc-row { display: grid; grid-template-columns: 1fr auto; gap: 0 8px; padding: 6px 0; border-top: 1px solid var(--line-2); font-size: .88rem; }
.hc-row span { font-weight: 700; } .hc-row span.shut { color: var(--accent); } .hc-row small { grid-column: 1 / -1; color: var(--muted); }
.hours-tag { display: block; width: 100%; text-align: left; font-size: .7rem; font-weight: 700; padding: 4px 8px; border-radius: 6px; margin-bottom: 6px; background: var(--amber-l); color: var(--amber); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hours-tag.closed { background: var(--accent-l); color: var(--accent); }
.wsess.clash { outline: 2px dashed var(--accent); outline-offset: -2px; }
.gl-label { margin: 10px 0 4px; font: 700 .8rem var(--head); } .gl-label:first-of-type { margin-top: 0; }
.gl-day.special { background: var(--amber-l); } .gl-day.special span { color: var(--amber); font-weight: 700; }
.gl-day.shut { background: var(--accent-l); } .gl-day.shut span { color: var(--accent); font-weight: 700; }
.key { display: inline-block; width: 10px; height: 10px; border-radius: 3px; vertical-align: -1px; margin-left: 8px; } .key.special { background: var(--amber-l); border: 1px solid var(--amber); } .key.shut { background: var(--accent-l); border: 1px solid var(--accent); }
.hrs-row { display: grid; grid-template-columns: 130px 1fr auto 1fr; align-items: center; gap: 8px; padding: 6px 0; border-top: 1px solid var(--line-2); }
.hrs-row input[type=time] { min-width: 0; width: 100%; } .hrs-row .check-row { margin: 0; font-weight: 600; }
.hrs-row .shut-lbl { display: none; color: var(--muted); font-size: .85rem; }
.hrs-row:has(input[type=checkbox]:not(:checked)) > input, .hrs-row:has(input[type=checkbox]:not(:checked)) > span.muted { display: none; }
.hrs-row:has(input[type=checkbox]:not(:checked)) .shut-lbl { display: block; grid-column: 2 / -1; }
@media (max-width: 480px) { .hrs-row { grid-template-columns: 1fr 1fr auto 1fr; } .hrs-row .check-row { grid-column: 1 / -1; } }
.radio-seg { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; } .radio-seg legend { font-size: .85rem; font-weight: 600; margin-bottom: 6px; padding: 0; }
.radio-seg label { display: flex; align-items: center; gap: 8px; border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 12px; font-weight: 600; font-size: .88rem; cursor: pointer; }
.radio-seg label:has(input:checked) { border-color: var(--ink); background: var(--line-2); }
.closure-form:has(input[value=closed]:checked) .special-only { display: none; }
.day { height: 70px; } .day .dot { bottom: auto; top: 6px; right: 6px; }

/* Coach assignment + InBody due */
.ib-due { display: flex; align-items: center; gap: 12px; } .ib-due > svg { width: 26px; height: 26px; flex: none; color: var(--blue); }
.ib-due b { display: block; } .ib-due p { margin: 2px 0 0; font-size: .85rem; color: var(--ink-2); } .ib-due > div { flex: 1; min-width: 0; }
.ib-due.overdue { border-left: 4px solid var(--accent); } .ib-due.overdue > svg { color: var(--accent); }
.ib-due.soon, .ib-due.none { border-left: 4px solid var(--blue); } .ib-due.booked > svg { color: var(--green); }
.ib-next { display: flex; align-items: center; gap: 6px; font-size: .85rem; font-weight: 600; margin: 0 0 6px; color: var(--blue); } .ib-next svg { width: 16px; height: 16px; } .ib-next.overdue { color: var(--accent); }
.my-coach { display: flex; align-items: center; gap: 14px; } .my-coach h3 { margin: 0 0 6px; }
.who.sm { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; white-space: nowrap; }
.red-t { color: var(--accent); font-weight: 600; }
.coach-pick { margin-top: 6px; } .coach-pick select { min-height: 36px; }

/* Rota & hours */
.rota-seg { max-width: 360px; }
.rota-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-bottom: 12px; } .rota-bar .datenav { margin: 0; }
.rota-alert { align-items: flex-start; } .assign-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; font-size: .88rem; } .assign-row select { min-height: 36px; }
.rota-wrap { overflow-x: auto; background: var(--card); border-radius: 16px; box-shadow: var(--shadow); }
.rota { display: grid; grid-template-columns: 120px repeat(var(--cols), minmax(118px, 1fr)) 84px; min-width: 1040px; }
.rota > div { border-bottom: 1px solid var(--line-2); border-right: 1px solid var(--line-2); padding: 8px; }
.rh { font: 600 .78rem var(--head); color: var(--ink-2); background: var(--line-2); text-align: center; } .rh b { font-size: .95rem; color: var(--ink); } .rh small { color: var(--muted); }
.rh.today { background: var(--ink); color: #fff; } .rh.today b, .rh.today small { color: #fff; } .rh.corner { text-align: left; }
.rname { display: flex; align-items: center; gap: 8px; border-left: 4px solid var(--cc); font-family: var(--head); }
.rc { display: flex; flex-direction: column; gap: 4px; min-width: 0; } .rc.off { background: repeating-linear-gradient(135deg, var(--amber-l) 0 8px, #fff 8px 16px); }
.rc-shift { font-size: .7rem; font-weight: 700; color: var(--ink-2); } .rc-off { font-size: .72rem; font-weight: 700; color: var(--amber); }
.rc-s { text-align: left; font-size: .75rem; padding: 4px 6px; border-radius: 6px; background: var(--line-2); border-left: 3px solid var(--c); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rc-s small { float: right; color: var(--muted); margin-left: 4px; } .rc-s.clash { outline: 2px dashed var(--accent); outline-offset: -2px; } .rc-s:hover { background: #ececea; }
.rc-cover { font-size: .68rem; color: var(--blue); background: var(--blue-l); border-radius: 6px; padding: 3px 6px; }
.rtotal { text-align: center; display: flex; flex-direction: column; justify-content: center; } .rtotal b { font: 800 1.05rem var(--head); } .rtotal small { color: var(--muted); font-size: .7rem; }
.rota-mobile { display: none; } .rm-row { background: var(--card); border-radius: 12px; box-shadow: var(--shadow); padding: 10px; margin-bottom: 8px; display: grid; grid-template-columns: 96px 1fr; gap: 8px; } .rm-row .rname { border-left-width: 3px; padding-left: 6px; }
@media (max-width: 760px) { .rota-wrap { display: none; } .rota-mobile { display: block; } }
.hours-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-bottom: 12px; }
.hours-c { border-top: 4px solid var(--cc); } .hours-c .who { display: flex; align-items: center; gap: 8px; }
.hc-big { margin: 10px 0; } .hc-big b { font: 800 2rem var(--head); display: block; line-height: 1; } .hc-big small { color: var(--muted); font-size: .8rem; }
.hc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; } .hc-grid div { background: var(--line-2); border-radius: 10px; padding: 8px; } .hc-grid b { font: 700 1.05rem var(--head); display: block; } .hc-grid small { color: var(--muted); font-size: .72rem; }
.legend { display: flex; gap: 12px; font-size: .78rem; flex-wrap: wrap; } .legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }
.wk-bars { display: grid; grid-template-columns: repeat(8, 1fr); gap: 8px; align-items: end; height: 200px; margin-top: 8px; }
.wk-col { display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; } .wk-col b { font-size: .75rem; } .wk-col small { font-size: .65rem; color: var(--muted); }
.wk-stack { width: 100%; max-width: 46px; flex: 1; display: flex; flex-direction: column-reverse; border-radius: 6px 6px 0 0; overflow: hidden; } .wk-stack span { display: block; width: 100%; }
@media print { .side, .tabbar, .topbar, .rota-seg, .rota-bar button, .rota-alert, .page-h p { display: none !important; } .rota-wrap { box-shadow: none; overflow: visible; } .rota { min-width: 0; } body { background: #fff; } }
.assign-row select { width: auto; min-width: 180px; } .assign-row span { min-width: 190px; font-weight: 600; }
.rm-row { grid-template-columns: 1fr; gap: 6px; } .rm-row .rname { padding: 2px 0 2px 8px; }
