/* =========================================================
   Motion House Planner (from GUTIANDRES.com) · forest green · sand · cream
   ========================================================= */
:root {
  --bg: #0F1712; --bg2: #131D16; --card: #17221B; --card2: #1D2A22; --card3: #26352B;
  --line: rgba(246,243,236,.08); --line2: rgba(246,243,236,.15);
  --text: #F6F3EC; --text2: #DAD6C8; --muted: #9AA394; --dim: #5E6B60;
  --gold: #BEB98F; --gold2: #A39F78; --gold-ink: #17221B; --gold-soft: rgba(190,185,143,.10); --gold-line: rgba(190,185,143,.40);
  --ok: #8fbf9a; --warn: #d98c5f; --bad: #e06c6c;
  --r: 14px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Manrope', 'Inter', system-ui, sans-serif;
  --ease: cubic-bezier(.2,.7,.2,1);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text); font: 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--display); margin: 0; letter-spacing: -.015em; line-height: 1.15; }
p { margin: 0 0 12px; }
img { display: block; }
.ic { flex: none; }
.muted { color: var(--muted); } .sm { font-size: 13px; } .nowrap { white-space: nowrap; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.ok-t { color: var(--ok); } .warn-t { color: var(--warn); } .danger-t { color: var(--bad) !important; }
.eyebrow { font-size: 11.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); font-weight: 600; }
.display { font-size: clamp(26px, 4vw, 34px); font-weight: 800; }
.grow { flex: 1; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
body.noscroll { overflow: hidden; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 256px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 22px 14px;
  border-right: 1px solid var(--line); background: rgba(13,16,20,.72); backdrop-filter: blur(12px); overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 11px; padding: 4px 10px 24px; }
.brand-mark { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; flex: none;
  background: var(--gold); color: var(--gold-ink); font: 800 14px var(--display);
}
.brand-t { line-height: 1; }
.brand-by { font: 500 8.5px var(--font); letter-spacing: .34em; text-transform: uppercase; color: var(--text2); line-height: 1.2; margin-top: 6px; white-space: nowrap; }
/* GUTIANDRES brand: wide typeface, GUTI white + ANDRES gold, GA brush monogram */
.brand-name { font: 400 15px/1 'Michroma', var(--display); letter-spacing: .14em; white-space: nowrap; }
.brand-name b { font-weight: 400; color: var(--gold); }
.brand .brand-name { font-size: 12.5px; letter-spacing: .08em; }   /* Motion House: a longer name than GUTIANDRES */
.ga-mark { display: block; width: auto; flex: none; }
.lockup { display: grid; justify-items: center; text-align: center; }
.lockup-ga { height: 74px; width: auto; }
.lockup-name .brand-name { font-size: 22px; letter-spacing: .16em; }
.lockup-sub { margin-top: 8px; font: 500 10px var(--font); letter-spacing: .5em; text-transform: uppercase; color: var(--text2); padding-left: .5em; }
.lockup-rule { width: 38px; height: 2px; background: var(--gold); margin: 10px 0 8px; display: block; }
.lockup-cert { font: 400 11px 'Michroma', var(--display); letter-spacing: .3em; color: var(--gold); padding-left: .3em; }
/* brand slogan: CONSISTENCY IS (white) MY PACE (gold) */
.slogan { font: 400 11px 'Michroma', var(--display); letter-spacing: .22em; text-transform: uppercase; color: var(--text); }
.slogan b { font-weight: 400; color: var(--gold); }
.welcome .slogan { margin: 10px 0 4px; }
.login-hero h1.slogan-h { font-family: 'Michroma', var(--display); font-weight: 400; text-transform: uppercase; letter-spacing: .04em; line-height: 1.3; font-size: clamp(17px, 2.6vw, 28px); }
.login-hero h1.slogan-h em { font-style: normal; color: var(--gold); display: block; }
.lockup.lg .lockup-ga { height: 110px; } .lockup.lg .lockup-name .brand-name { font-size: 30px; }
.brand-s { font-size: 10.5px; color: var(--muted); letter-spacing: .14em; text-transform: uppercase; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a, .nav button { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; color: var(--muted);
  font-weight: 500; transition: background .2s, color .2s; border: 0; background: none; cursor: pointer; text-align: left; }
.nav a:hover, .nav button:hover { background: var(--card); color: var(--text); }
.nav a.on { background: var(--gold-soft); color: var(--gold); }
.nav.sheet a, .nav.sheet button { padding: 14px 12px; font-size: 16px; }
.side-f { margin-top: auto; display: flex; flex-direction: column; gap: 10px; padding-top: 16px; border-top: 1px solid var(--line); }
.me { display: flex; align-items: center; gap: 10px; padding: 6px 4px; min-width: 0; }
.main { min-width: 0; }
.page { max-width: 1140px; margin: 0 auto; padding: 32px 32px 120px; animation: pagein .5s var(--ease); }
@keyframes pagein { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.mtop, .bottom { display: none; }
.center-page { min-height: calc(100vh - 40px); display: grid; place-items: center; padding: 24px 16px; }

@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { display: none; }
  .mtop { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; position: sticky; top: 0; z-index: 20;
    background: rgba(9,11,14,.86); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
  .mtop .brand { padding: 0; }
  .page { padding: 20px 16px 120px; }
  .bottom { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: rgba(13,16,20,.94); backdrop-filter: blur(16px); border-top: 1px solid var(--line);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .bottom a, .bottom button { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px; font-size: 10.5px;
    color: var(--muted); background: none; border: 0; cursor: pointer; text-align: center; line-height: 1.15; min-width: 0; }
  .bottom span { overflow: hidden; text-overflow: ellipsis; max-width: 100%; white-space: nowrap; }
  .bottom .on { color: var(--gold); }
}

/* ---------- surfaces & controls ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; }
a.card { display: block; transition: border-color .25s, transform .25s var(--ease); }
a.card:hover { border-color: var(--gold-line); }
.card-h { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 700; margin-bottom: 14px; }
.card-h .ic { color: var(--gold); }
.card-h.sm { font-size: 14px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 18px; border-radius: 12px;
  border: 1px solid transparent; background: var(--gold); color: var(--gold-ink); font-weight: 600; cursor: pointer; white-space: nowrap;
  transition: transform .15s var(--ease), filter .2s, background .2s, border-color .2s; }
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: scale(.98); }
.btn:disabled, .btn.disabled { opacity: .5; cursor: default !important; filter: none; transform: none; }
.btn.disabled { pointer-events: none; }
/* Sign-in button (login screen). Has its own class on purpose: the generic ".block"
   modifier collides with the workout ".block" card style, which painted it near-black. */
.btn.signin-btn { width: 100%; height: 50px; padding: 0 22px; border-radius: 12px; background: #BEB98F; border: 1px solid #BEB98F;
  color: #101010; font-weight: 700; font-size: 15.5px; letter-spacing: .02em; }
.btn.signin-btn:hover { background: #D4B46D; border-color: #D4B46D; filter: none; }
.btn.signin-btn:active { background: #B8964F; border-color: #B8964F; transform: scale(.99); }
.btn.signin-btn:focus-visible { outline: 3px solid #FFFFFF; outline-offset: 3px; }
.btn.signin-btn:disabled { opacity: 1; background: #A39F78; border-color: #A39F78; color: #101010; cursor: progress; transform: none; }
.btn-spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(16,16,16,.3); border-top-color: #101010; animation: rot .8s linear infinite; flex: none; }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--line2); }
.btn.ghost:hover { background: var(--card2); }
.btn.danger { background: transparent; color: var(--bad); border-color: rgba(255,107,107,.35); }
.btn.sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn.block { width: 100%; }
.icon-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; border: 1px solid var(--line);
  background: var(--card); color: var(--text); cursor: pointer; transition: border-color .2s, background .2s; flex: none; }
.icon-btn:hover { border-color: var(--line2); background: var(--card2); }
.icon-btn:disabled { opacity: .35; cursor: default; }
.icon-btn.sm { width: 32px; height: 32px; border-radius: 9px; }
.icon-btn.on { color: var(--gold); border-color: var(--gold-line); }
.linkish { background: none; border: 0; color: var(--gold); cursor: pointer; padding: 0; font-size: 12.5px; display: inline-flex; gap: 4px; align-items: center; }
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 13px; margin-bottom: 8px; }
.back:hover { color: var(--text); }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; min-width: 0; }
.field.mt { margin-top: 14px; margin-bottom: 0; }
.lbl { font-size: 12.5px; font-weight: 600; color: var(--muted); letter-spacing: .02em; }
.hint { font-size: 12px; color: var(--dim); }
input, select, textarea { width: 100%; background: var(--bg2); border: 1px solid var(--line2); border-radius: 12px; padding: 11px 13px; outline: none;
  transition: border-color .2s, box-shadow .2s; min-width: 0; }
input::placeholder, textarea::placeholder { color: var(--dim); }
input:focus, select:focus, textarea:focus { border-color: var(--gold-line); box-shadow: 0 0 0 3px var(--gold-soft); }
textarea { resize: vertical; min-height: 80px; line-height: 1.5; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--gold); flex: none; }
input[type=date] { color-scheme: dark; }
.pw { position: relative; }
.pw input { padding-right: 46px; }
.pw button { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--muted); cursor: pointer; padding: 6px; display: grid; }
.search { position: relative; display: flex; align-items: center; min-width: 220px; }
.search .ic { position: absolute; left: 12px; color: var(--dim); }
.search input { padding-left: 36px; }

.chip { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 600;
  background: var(--card3); color: var(--muted); border: 1px solid var(--line); white-space: nowrap; }
button.chip { cursor: pointer; transition: filter .2s; } button.chip:hover { filter: brightness(1.2); }
.chip.gold { background: var(--gold-soft); color: var(--gold); border-color: transparent; }
.chip.ok { background: rgba(67,214,149,.12); color: var(--ok); border-color: transparent; }
.chip.warn { background: rgba(242,180,83,.12); color: var(--warn); border-color: transparent; }
.chip.bad { background: rgba(255,107,107,.12); color: var(--bad); border-color: transparent; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.seg { display: inline-flex; background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 3px; flex-wrap: wrap; }
.seg button { border: 0; background: none; padding: 7px 14px; border-radius: 9px; color: var(--muted); cursor: pointer; font-weight: 600; font-size: 13px; transition: all .2s; }
.seg button.on { background: var(--card3); color: var(--text); box-shadow: 0 1px 0 rgba(255,255,255,.05) inset; }
/* Workout: CAP or my plan today (Nov 17) */
.wk-choice-wrap { display: flex; flex-direction: column; gap: 6px; }
.wk-choice { display: flex; width: 100%; flex-wrap: nowrap; }
.wk-choice button { flex: 1; min-width: 0; padding: 11px 12px; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wk-choice button.on { box-shadow: inset 0 -2px 0 var(--gold); }
.wk-choice-hint { margin: 0 2px; }

.row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.between { justify-content: space-between; } .wrap { flex-wrap: wrap; }
.stack > * + * { margin-top: 16px; }
.grid2 { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 16px; align-items: start; }
.grid2.tight { gap: 12px; }
@media (max-width: 760px) { .grid2 { grid-template-columns: minmax(0,1fr); } .grid2.tight { grid-template-columns: minmax(0,1fr) minmax(0,1fr); } }
@media (max-width: 420px) { .grid2.tight { grid-template-columns: minmax(0,1fr); } }
.ph { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.ph h1 { font-size: clamp(26px, 3.4vw, 34px); font-weight: 800; margin-top: 4px; }
.sec-h { font: 600 12px var(--font); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 30px 0 12px; }
.toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.toolbar .search { flex: 1; }
.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 18px; padding: 16px 18px 2px; }

/* ---------- avatars ---------- */
.av { display: inline-grid; place-items: center; border-radius: 50%; overflow: hidden; flex: none; font-weight: 700;
  background: var(--card3); color: var(--gold); border: 1px solid var(--line2); }
.av img { width: 100%; height: 100%; object-fit: cover; }
.av.more { color: var(--muted); }
.av.fb img, .coach-av.fb img { object-position: 50% 8%; transform: scale(1.9); transform-origin: 50% 10%; }
/* Official coach avatar: transparent PNG/WebP shown as-is (no box, no crop). */
.figure.coach-figure { border: 0; background: transparent; border-radius: 0; aspect-ratio: auto; object-fit: contain; width: auto; }

/* ---------- subtle idle animation (whole image only: no part is moved on its own) ---------- */
.fig-anim { position: relative; display: inline-flex; flex-direction: column; align-items: center; flex: none;
  background: none; border: 0; padding: 0; cursor: pointer; border-radius: 16px; animation: fa-enter .9s var(--ease) both; }
.fig-anim.static-host { cursor: default; }
.fa-float { display: block; animation: fa-float 6s ease-in-out infinite; will-change: transform; }
.fa-breathe { display: block; transform-origin: 50% 100%; animation: fa-breathe 4.8s ease-in-out infinite; will-change: transform; }
.fa-shadow { display: block; width: 58%; height: 10px; margin-top: -6px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(0,0,0,.55), transparent); animation: fa-shadow 6s ease-in-out infinite; }
.fig-anim.tapping .fa-float { animation: fa-tap .6s var(--ease) 1; }
.fig-anim:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
@keyframes fa-enter { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes fa-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes fa-breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.012); } }
@keyframes fa-shadow { 0%, 100% { transform: scaleX(1); opacity: .9; } 50% { transform: scaleX(.92); opacity: .7; } }
@keyframes fa-tap { 0% { transform: translateY(0) scale(1); } 35% { transform: translateY(-9px) scale(1.02); } 100% { transform: translateY(0) scale(1); } }
@media (prefers-reduced-motion: reduce) {
  .fig-anim, .fa-float, .fa-breathe, .fa-shadow, .fig-anim.tapping .fa-float { animation: none !important; transform: none !important; }
}
.login-phrase { min-height: 3em; margin: 0; color: var(--text2); font-weight: 500; max-width: 440px; animation: fadeup .45s var(--ease); }
.figure { display: block; aspect-ratio: 2 / 3; width: auto; max-width: 100%; object-fit: cover; border-radius: 16px;
  background: var(--card2); border: 1px solid var(--line2); }
.says-av.fig { border-radius: 16px; }
.welcome-av .figure { max-height: 46vh; }
.avstack { display: inline-flex; }
.avstack .av { margin-left: -8px; border: 2px solid var(--card); }
.avstack .av:first-child { margin-left: 0; }
.coach-av { display: inline-block; border-radius: 50%; overflow: hidden; flex: none;
  background: var(--card2); border: 1px solid var(--gold-line); box-shadow: 0 0 0 5px var(--gold-soft); }
.coach-av img { width: 100%; height: 100%; object-fit: cover; }
.coach-av.full { border-radius: 0; background: none; border: 0; box-shadow: none; overflow: visible; filter: drop-shadow(0 20px 30px rgba(0,0,0,.45)); }

/* ---------- stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; }
@media (max-width: 820px) { .stats { grid-template-columns: repeat(2, minmax(0,1fr)); } }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; }
.stat .ic { color: var(--gold); margin-bottom: 10px; }
.stat .v { font: 800 30px/1.1 var(--display); }
.stat .v small { font-size: 16px; color: var(--muted); font-weight: 700; }
.stat .l { font-size: 12.5px; color: var(--muted); margin-top: 2px; }

/* ---------- athlete home ---------- */
.datebar { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; flex-wrap: wrap; }
.date-cal { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; flex: none;
  background: var(--gold-soft); color: var(--gold); border: 1px solid var(--gold-line); transition: transform .25s var(--ease), background .2s; }
.date-cal:hover { background: rgba(190,185,143,.16); }
.datebar-t { min-width: 0; }
.date-h { font-size: clamp(22px, 3.4vw, 32px); font-weight: 800; }
.datebar-nav { margin-left: auto; display: flex; gap: 8px; }
.hero { display: flex; align-items: center; justify-content: space-between; gap: 22px; flex-wrap: wrap;
  background: var(--card); }
.hero-t { min-width: 220px; flex: 1; }
.hero-t p { margin: 8px 0 0; }
.says { display: flex; align-items: center; gap: 16px; max-width: 520px; flex: 1 1 320px; }
.says-av { background: none; border: 0; padding: 0; cursor: pointer; border-radius: 50%; transition: transform .3s var(--ease); flex: none; }
.says-av:hover { opacity: .9; }
.says-av:active { transform: scale(.95); }
.says-b { position: relative; background: var(--card3); border: 1px solid var(--line2); border-radius: 18px; padding: 14px 16px;
  font-weight: 600; font-size: 15px; line-height: 1.4; animation: fadeup .45s var(--ease); }
.says-b::before { content: ""; position: absolute; left: -7px; top: 50%; width: 12px; height: 12px; background: var(--card3);
  border-left: 1px solid var(--line2); border-bottom: 1px solid var(--line2); transform: translateY(-50%) rotate(45deg); }
.says-hint { display: block; font-size: 11px; font-weight: 500; color: var(--dim); margin-top: 6px; }
@keyframes fadeup { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.weekstrip { display: grid; grid-template-columns: repeat(7, minmax(0,1fr)); gap: 8px; margin: 18px 0 6px; }
.wd { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 2px 8px; display: flex; flex-direction: column;
  align-items: center; gap: 3px; cursor: pointer; color: var(--muted); transition: all .2s; min-width: 0; }
.wd:hover { border-color: var(--line2); }
.wd span { font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; }
.wd b { font: 700 18px var(--display); color: var(--text); }
.wd.sel { border-color: var(--gold-line); background: var(--gold-soft); }
.wd.today b { color: var(--gold); }
.dot { width: 7px; height: 7px; border-radius: 50%; display: block; border: 1.5px solid transparent; }
.st-pending .dot { border-color: var(--gold); }
.st-done .dot { background: var(--gold); border-color: var(--gold); }
.st-partial .dot { background: linear-gradient(90deg, var(--gold) 50%, transparent 50%); border-color: var(--gold); }
.st-missed .dot { background: var(--warn); border-color: var(--warn); }
.st-draft .dot { border: 1.5px dashed var(--muted); }
.wcard { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.wcard-main { flex: 1; min-width: 200px; }
.wcard h3 { font-size: 20px; font-weight: 800; margin-bottom: 8px; }
.quick { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; margin-top: 16px; }
@media (max-width: 760px) { .quick { grid-template-columns: minmax(0,1fr); } }
.qlink { display: flex !important; align-items: center; gap: 14px; padding: 16px 18px; }
.qlink > .ic:first-child { color: var(--gold); }
.qlink div { flex: 1; display: flex; flex-direction: column; min-width: 0; }

/* ---------- ring & bars ---------- */
.ring { position: relative; display: inline-grid; place-items: center; flex: none; }
.ring svg { position: absolute; inset: 0; }
.ring-bg { fill: none; stroke: var(--card3); }
.ring-fg { fill: none; stroke: var(--gold); stroke-linecap: round; transition: stroke-dashoffset .8s var(--ease); }
.ring-l { position: relative; font: 700 13px var(--display); color: var(--text); display: grid; place-items: center; }
.ring-l .ic { color: var(--gold); }
.pbar { flex: 1; height: 6px; background: var(--card3); border-radius: 99px; overflow: hidden; min-width: 60px; }
.pbar i { display: block; height: 100%; background: var(--gold); border-radius: 99px; transition: width .8s var(--ease); }

/* ---------- empty / errors / spinner ---------- */
.empty { text-align: center; padding: 44px 22px; border: 1px dashed var(--line2); border-radius: var(--r); color: var(--muted); }
.empty > .ic { color: var(--gold); opacity: .85; margin-bottom: 12px; }
.empty h3 { color: var(--text); font-size: 18px; margin-bottom: 6px; }
.empty p { max-width: 420px; margin: 0 auto; }
.err-box > .ic { color: var(--bad); }
.err { background: rgba(255,107,107,.1); border: 1px solid rgba(255,107,107,.3); color: #ffb9b9; padding: 10px 12px; border-radius: 12px; font-size: 14px; margin-bottom: 14px; }
.spin { display: grid; place-items: center; padding: 60px; }
.spin i { width: 28px; height: 28px; border-radius: 50%; border: 2.5px solid var(--card3); border-top-color: var(--gold); animation: rot .8s linear infinite; }
@keyframes rot { to { transform: rotate(360deg); } }
.demo-banner { display: flex; align-items: center; justify-content: center; gap: 8px; background: rgba(242,180,83,.1); color: var(--warn);
  border-bottom: 1px solid rgba(242,180,83,.25); text-align: center; font-size: 12px; padding: 7px 12px; font-weight: 600; letter-spacing: .02em; }

/* ---------- calendar ---------- */
.cal-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; gap: 10px; }
.cal-title { font: 700 18px var(--display); }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0,1fr)); gap: 6px; }
.cal-wd { text-align: center; font-size: 11px; color: var(--dim); text-transform: uppercase; letter-spacing: .06em; padding-bottom: 4px; }
.cal-d { aspect-ratio: 1 / 1; position: relative; border: 1px solid transparent; background: var(--bg2); border-radius: 12px; display: flex;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px; cursor: pointer; color: var(--text); transition: all .15s; padding: 0; min-width: 0; }
.cal-d:hover { border-color: var(--line2); }
.cal-d.out { opacity: .32; }
.cal-d.today span { color: var(--gold); font-weight: 700; }
.cal-d.sel { border-color: var(--gold); background: var(--gold-soft); }
.cal-d em { position: absolute; top: 3px; right: 6px; font-size: 10px; font-style: normal; color: var(--muted); }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 16px; }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.split { display: grid; grid-template-columns: minmax(0,1.05fr) minmax(0,1fr); gap: 20px; align-items: start; }
@media (max-width: 900px) { .split { grid-template-columns: minmax(0,1fr); } }
.day-h { font-size: 22px; font-weight: 800; margin: 4px 0 14px; }
.lcard { padding: 18px; }

/* ---------- workout ---------- */
.wk-card { padding: 22px; }
.wk-head { display: flex; align-items: center; gap: 18px; margin-bottom: 18px; }
.wk-title { font-size: clamp(22px, 3vw, 28px); font-weight: 800; }
.done-banner { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; margin-bottom: 16px;
  background: var(--gold-soft); color: var(--gold); font-weight: 600; animation: fadeup .5s var(--ease); }
.wk-notes { color: var(--text2); white-space: pre-wrap; margin: 0 0 16px; padding: 12px 14px; border-left: 2px solid var(--gold-line); background: var(--bg2); border-radius: 0 12px 12px 0; }
.coach-note { border: 1px solid var(--gold-line); border-left: 3px solid var(--gold); border-radius: var(--r); background: var(--card2); padding: 18px 20px; margin-bottom: 18px; }
.coach-note.important { background: rgba(190,185,143,.07); }
.coach-note-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.coach-note-h h3 { font: 600 13px var(--font); letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }
.coach-note-h .ic { color: var(--gold); }
.chip.important { background: var(--gold); color: var(--gold-ink); border-color: transparent; letter-spacing: .04em; }
.chip.important .ic, .coach-note-h .chip.important .ic { color: var(--gold-ink); }
.note-body { color: var(--text); font-size: 15px; line-height: 1.6; }
.note-body p { margin: 0 0 8px; }
.note-body ul { margin: 0 0 8px; padding-left: 20px; }
.note-body li { margin: 2px 0; }
.note-body li::marker { color: var(--gold); }
.note-para + .note-para { margin-top: 6px; }
.dim-note { font-size: 12px; color: var(--dim); margin-top: 6px; }
.note-alert { display: flex; align-items: center; gap: 14px; padding: 14px 18px; margin-bottom: 18px; border: 1px solid var(--gold-line); border-radius: var(--r); background: rgba(190,185,143,.07); }
.note-alert > .ic { color: var(--gold); }
.note-alert div { flex: 1; min-width: 0; }
.note-ed { border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: var(--bg2); }
.note-ed + .note-ed { margin-top: 12px; }
.note-ed textarea { min-height: 110px; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 600; font-size: 13.5px; }
.block { border: 1px solid var(--line); border-radius: 16px; background: var(--bg2); margin-bottom: 14px; overflow: hidden; }
.block-h { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); background: var(--card); flex-wrap: wrap; }
/* the athlete's day: blocks fold to one line */
.block-h.tap { cursor: pointer; -webkit-tap-highlight-color: transparent; row-gap: 8px; }
.block-h.tap .block-hd { min-width: 45%; } /* the chips go to a second line instead of covering the name */
.block.folded .block-h { border-bottom: 0; }
.block-st { gap: 4px; max-width: 100%; white-space: normal; }
.block-chev { margin-left: auto; color: var(--muted); display: inline-flex; }
.wk-fold { display: flex; justify-content: flex-end; margin: 0 2px 8px; }
.wk-fold .linkish { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; }
.block-idx { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--gold-soft); color: var(--gold); font: 800 13px var(--display); flex: none; }
.block-hd { flex: 1; min-width: 0; }
.block-name { font: 700 15.5px var(--display); }
.block-title { font-size: 13px; color: var(--muted); }
.block-ins { white-space: pre-wrap; margin: 0; padding: 14px 16px 2px; color: var(--text2); font-size: 14px; }
.block-notes { margin: 0; padding: 2px 16px 14px; color: var(--muted); font-size: 13px; white-space: pre-wrap; display: flex; gap: 6px; }
.items { padding: 6px 8px; }
.item { border-radius: 12px; padding: 12px 10px; transition: background .25s; }
.item + .item { border-top: 1px solid var(--line); }
.item.open { background: var(--card); }
.item-row { display: flex; align-items: flex-start; gap: 12px; }
.item-st { width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--dim); display: grid; place-items: center; flex: none; margin-top: 1px; transition: all .3s var(--ease); }
.is-completed .item-st { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); }
.is-incomplete .item-st { border-color: var(--warn); color: var(--warn); }
.is-score .item-name { color: var(--gold); }
.item-main { flex: 1; min-width: 0; }
.item-name { font-weight: 600; }
.item-target { font-size: 13px; color: var(--gold); margin-top: 1px; }
.item-notes { font-size: 12.5px; color: var(--muted); white-space: pre-wrap; margin-top: 2px; }
.item-res { font-size: 13px; margin-top: 6px; color: var(--text2); }
.logger { margin: 14px 0 4px 36px; display: flex; flex-direction: column; gap: 12px; animation: fadeup .3s var(--ease); }
.logger-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; }
.logger-f { display: flex; justify-content: flex-end; gap: 8px; }
@media (max-width: 600px) { .logger-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } .logger { margin-left: 0; } .wk-card { padding: 16px; } .item-row .btn { padding: 0 10px; } }
.mini { display: flex; flex-direction: column; gap: 4px; font-size: 11.5px; color: var(--muted); font-weight: 600; min-width: 0; }
.mini input, .mini textarea { padding: 9px 10px; font-size: 14px; color: var(--text); font-weight: 400; border-radius: 10px; }
.mini textarea { min-height: 56px; }
.preview-head { margin-bottom: 4px; }

/* ---------- lists ---------- */
.list { display: flex; flex-direction: column; }
.lrow { display: flex; align-items: center; gap: 14px; padding: 13px 4px; border-bottom: 1px solid var(--line); min-width: 0; }
.lrow:last-child { border-bottom: 0; }
a.lrow:hover, .lrow.click:hover { background: rgba(255,255,255,.02); }
.lrow.click { cursor: pointer; }
.expand { padding: 4px 0 16px; animation: fadeup .3s var(--ease); }
.rrow { display: flex; gap: 12px; padding: 14px 2px; border-bottom: 1px solid var(--line); align-items: flex-start; }
.rrow:last-child { border-bottom: 0; }
.rrow-main { flex: 1; min-width: 0; }
.rrow-t { font-weight: 600; }
.rrow-s { font-size: 12.5px; }
.rrow-v { font-size: 14px; margin-top: 2px; color: var(--text2); }
.rrow-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: none; }
.pb { font: 800 18px var(--display); color: var(--gold); }
.cgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.ccard { display: flex !important; align-items: center; gap: 14px; padding: 16px; }
.ccard > .ic { color: var(--dim); }
.client-head { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.client-name { font-size: clamp(22px, 3vw, 28px); font-weight: 800; }
.client-head > div:nth-child(2) { flex: 1 1 220px; }
@media (max-width: 760px) { .client-head > .row:last-child { width: 100%; } .client-head > .row:last-child .btn { flex: 1 1 auto; } }
.profile-head { display: flex; align-items: center; gap: 18px; }
.prow { display: flex; align-items: center; gap: 12px; padding: 16px 18px; }
.prow-main { flex: 1; min-width: 0; }
.prow .acts { flex: none; }
@media (max-width: 600px) { .prow { flex-wrap: wrap; } .prow .acts { width: 100%; justify-content: flex-end; } }
.acts { display: flex; gap: 4px; align-items: center; }
.coach-av-card { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.coach-av-prev { padding: 8px; }
.upload { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.hist { list-style: none; padding: 0; margin: 0; }
.hist li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.compl { display: flex; align-items: center; gap: 8px; min-width: 130px; }

/* ---------- table & tabs ---------- */
.tscroll { overflow-x: auto; padding: 8px; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 720px; }
.table th { text-align: left; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.table td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr.click { cursor: pointer; }
.table tr.click:hover td { background: rgba(255,255,255,.02); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 22px 0; overflow-x: auto; scrollbar-width: none; }
.tabs a { padding: 10px 14px; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; white-space: nowrap; transition: color .2s; }
.tabs a:hover { color: var(--text); }
.tabs a.on { color: var(--text); border-color: var(--gold); }

/* ---------- modal & toasts ---------- */
.modal-bg { position: fixed; inset: 0; z-index: 60; background: rgba(3,5,7,.72); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 16px; animation: fade .2s; }
.modal { width: 100%; max-width: 520px; max-height: calc(100vh - 32px); display: flex; flex-direction: column; background: var(--card);
  border: 1px solid var(--line2); border-radius: 20px; animation: pop .3s var(--ease); box-shadow: 0 30px 80px rgba(0,0,0,.5); }
.modal.wide { max-width: 840px; }
.modal-h { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); gap: 12px; }
.modal-h h3 { font-size: 17px; }
.modal-b { padding: 20px; overflow: auto; }
.modal-f { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.toasts { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: max-content; max-width: calc(100vw - 32px); }
.toast { display: flex; align-items: center; gap: 10px; background: var(--card3); border: 1px solid var(--line2); padding: 11px 16px; border-radius: 14px;
  box-shadow: 0 14px 34px rgba(0,0,0,.45); animation: pop .35s var(--ease); font-weight: 500; font-size: 14px; }
.toast.ok .ic { color: var(--gold); }
.toast.err { border-color: rgba(255,107,107,.45); }
.toast.err .ic { color: var(--bad); }

/* ---------- welcome ---------- */
.welcome { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 24px; text-align: center; cursor: pointer;
  background: var(--bg);
  transition: opacity .65s var(--ease), transform .65s var(--ease), filter .65s; }
.welcome.out { opacity: 0; }
.welcome-in { max-width: 620px; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.welcome-av { animation: rise .9s var(--ease) both; }
.welcome-hi { animation: rise .9s .2s var(--ease) both; color: var(--gold); letter-spacing: .16em; text-transform: uppercase; font-size: 12.5px; font-weight: 600; }
.welcome-q { margin: 0; font: 800 clamp(24px, 5vw, 40px)/1.18 var(--display); letter-spacing: -.02em; animation: rise .9s .4s var(--ease) both; }
.welcome-date { color: var(--muted); animation: rise .9s .6s var(--ease) both; }
.welcome-bar { width: 120px; height: 3px; background: var(--card3); border-radius: 9px; overflow: hidden; }
.welcome-bar i { display: block; height: 100%; background: var(--gold); animation: bar 4.2s linear forwards; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
@keyframes bar { from { width: 0; } to { width: 100%; } }

/* ---------- login ---------- */
.login { min-height: calc(100vh - 32px); display: grid; grid-template-columns: 1.1fr 1fr; }
.login-art { position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 28px; padding: 36px 44px;
  border-right: 1px solid var(--line); overflow: hidden;
  background: var(--bg2); }
.login-art .brand { padding: 0; }
.login-hero { display: flex; flex-direction: column; align-items: flex-start; gap: 22px; }
.login-hero h1 { font-size: clamp(32px, 4.6vw, 54px); font-weight: 800; line-height: 1.04; letter-spacing: -.03em; max-width: 560px; }
.login-hero h1 em { font-style: normal; color: var(--gold); display: block; }
.login-hero p { max-width: 440px; }
.login-form { display: flex; align-items: center; justify-content: center; padding: 32px 20px; }
.login-card { width: 100%; max-width: 400px; }
@media (max-width: 880px) {
  .login { grid-template-columns: minmax(0,1fr); }
  .login-art { padding: 20px; border-right: 0; border-bottom: 1px solid var(--line); gap: 18px; }
  .login-hero { flex-direction: row; align-items: center; gap: 16px; }
  .login-hero .coach-figure { height: 150px !important; width: auto; }
  .login-hero .coach-av:not(.full) { width: 76px !important; height: 76px !important; }
  .login-hero h1 { font-size: 26px; }
  .login-hero p, .login-art > .muted { display: none; }
}

/* ---------- editor ---------- */
.ed-top { margin-bottom: 4px; }
.ed-block { border: 1px solid var(--line2); border-radius: 18px; background: var(--card); margin-bottom: 14px; animation: fadeup .35s var(--ease); }
.ed-bh { display: grid; grid-template-columns: auto minmax(0,1fr) 190px auto; gap: 10px; align-items: center; padding: 14px; border-bottom: 1px solid var(--line); }
.ed-bh input { font-weight: 700; font-family: var(--display); }
.ed-bb { padding: 16px; }
.ed-meta { display: grid; grid-template-columns: minmax(0,1fr); gap: 12px; }
.ed-meta.with-metcon { grid-template-columns: minmax(0,2fr) minmax(0,1fr) minmax(0,1fr); }
.ed-ex { border: 1px solid var(--line); border-radius: 14px; padding: 12px; margin-bottom: 10px; background: var(--bg2); }
.ed-exg { display: grid; grid-template-columns: minmax(0,2.4fr) repeat(3, minmax(0,1fr)) auto; gap: 8px; align-items: end; }
.ed-exg2 { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 8px; margin-top: 10px; }
.span-all { grid-column: 1 / -1; }
.add-block { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 16px 18px; border-style: dashed; }
.pick { max-height: 280px; overflow: auto; border: 1px solid var(--line); border-radius: 12px; }
.pick label { display: flex; align-items: center; gap: 10px; padding: 9px 12px; cursor: pointer; border-bottom: 1px solid var(--line); }
.pick label:last-child { border-bottom: 0; }
.pick label:hover { background: var(--card2); }
.sticky-bar { position: sticky; bottom: 12px; z-index: 15; display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; align-items: center;
  padding: 12px; margin-top: 22px; background: rgba(18,22,27,.92); backdrop-filter: blur(14px); border: 1px solid var(--line2); border-radius: 16px; box-shadow: 0 16px 40px rgba(0,0,0,.4); }
@media (max-width: 900px) { .sticky-bar { bottom: calc(76px + env(safe-area-inset-bottom)); } }
@media (max-width: 760px) {
  .ed-bh { grid-template-columns: auto minmax(0,1fr) auto; }
  .ed-bh select { grid-column: 1 / -1; grid-row: 2; }
  .ed-meta.with-metcon { grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
  .ed-meta.with-metcon > :first-child { grid-column: 1 / -1; }
  .ed-exg { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .ed-exg .nm { grid-column: 1 / -1; }
  .ed-exg .acts { grid-column: 1 / -1; justify-content: flex-end; }
  .ed-exg2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .sticky-bar .grow { display: none; }
  .sticky-bar .btn { flex: 1 1 auto; }
}

/* ---------- charts ---------- */
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid { stroke: var(--line); }
.chart .ln { fill: none; stroke: var(--gold); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.chart .ar { fill: url(#ga); }
.chart .pt { fill: var(--bg); stroke: var(--gold); stroke-width: 2; }
.chart text { fill: var(--dim); font-size: 11px; font-family: var(--font); }
.chart.bars { max-height: 230px; }
.bars .b-bg { fill: var(--card3); }
.bars .b-fg { fill: var(--gold); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---------- loading screen, avatar error, profile photos ---------- */
.boot-screen { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; background: var(--bg); }
.boot-screen .figure.coach-figure { max-height: 46vh; }
.av-error { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; padding: 10px;
  border: 1px dashed var(--bad); border-radius: 14px; color: var(--bad); font-size: 12px; background: rgba(224,108,108,.06); }
.av-error code { color: var(--muted); font-size: 11px; word-break: break-all; }
.photo-row { display: flex; gap: 24px; flex-wrap: wrap; margin-bottom: 12px; }
.photo-col { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-width: 120px; }
.gold-t { color: var(--gold) !important; }

/* ---------- exercise reference videos ---------- */
.ed-video { margin-top: 8px; }
.ed-video span .ic { vertical-align: -2px; color: var(--gold); }
.video-ok { color: var(--ok); font-weight: 500; font-size: 11.5px; }
.video-ok a { color: var(--gold); }
.video-bad { color: var(--warn); font-weight: 500; font-size: 11.5px; }
/* WOD blocks: movements read like the whiteboard, one score for the whole WOD */
.wod-moves { padding: 4px 18px 8px; }
.move { padding: 10px 0; }
.move + .move { border-top: 1px dashed var(--line); }
.move-name { font-weight: 600; font-size: 15.5px; }
.move-reps { color: var(--gold); font-weight: 700; margin-right: 8px; }
.move .ex-video { margin-top: 6px; }
.wod-scale { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 12px 0 10px; }
.wod-hint { display: flex; gap: 6px; align-items: center; color: var(--muted); font-size: 12.5px; margin: 8px 0 4px; }
.wod-hint .ic { color: var(--gold); flex: none; }
.ed-exg.wod { grid-template-columns: minmax(0,2.4fr) repeat(2, minmax(0,1fr)) auto; }
@media (max-width: 760px) { .ed-exg.wod { grid-template-columns: repeat(2, minmax(0,1fr)); } }
/* coach video message */
.coach-video { border: 1px solid var(--gold); border-radius: 16px; padding: 14px 16px; margin-bottom: 16px; background: var(--card, #1B1B1B); }
.coach-video-h { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.coach-video-h h3 { margin: 0; font-size: 16px; flex: 1; }
.coach-video-h .ic { color: var(--gold); }
.coach-video-player { display: block; width: 100%; max-width: 420px; max-height: 70vh; border-radius: 12px; background: #000; }
.cv-box { display: grid; gap: 10px; justify-items: start; margin-top: 6px; }
.cv-progress { width: 100%; max-width: 420px; height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.cv-progress > div { height: 100%; background: var(--gold); transition: width .3s; }
.cv-link { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
label.btn { cursor: pointer; }
.cv-pending { display: flex; gap: 6px; align-items: center; color: var(--gold); font-size: 13px; margin: 0; }
.rec-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #e5484d; flex: none; }
.rec-square { display: inline-block; width: 10px; height: 10px; border-radius: 2px; background: currentColor; flex: none; }
.rec-wrap { position: relative; display: grid; place-items: center; background: #000; border-radius: 14px; overflow: hidden; min-height: 240px; }
.rec-preview { width: 100%; max-height: 62vh; object-fit: contain; display: block; }
.rec-preview.mirror { transform: scaleX(-1); }
.rec-wait { position: absolute; inset: 0; display: grid; place-items: center; }
.rec-badge { position: absolute; top: 10px; left: 10px; display: flex; gap: 8px; align-items: center; padding: 5px 10px;
  border-radius: 999px; background: rgba(0,0,0,.6); color: #fff; font-weight: 600; font-size: 13px; font-variant-numeric: tabular-nums; }
.rec-badge .rec-dot { animation: rec-blink 1s infinite; }
@keyframes rec-blink { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .rec-badge .rec-dot { animation: none; } }
/* PR celebration */
.pr-celebrate { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 20px; overflow: hidden;
  /* fully opaque: the page behind must not show through the text */
  background: radial-gradient(circle at 50% 35%, rgba(190,185,143,.26), transparent 60%), #0c0c0c; animation: prfade .35s var(--ease); }
@keyframes prfade { from { opacity: 0; } }
.pr-in { position: relative; text-align: center; max-width: 420px; display: grid; gap: 6px; justify-items: center; animation: prpop .6s var(--ease); }
@keyframes prpop { from { transform: scale(.85); opacity: 0; } }
.pr-av { margin-bottom: 4px; }
.pr-eyebrow { font: 800 15px var(--display); letter-spacing: .32em; color: var(--gold); text-transform: uppercase; }
.pr-big { font: 800 clamp(54px, 15vw, 84px)/1 var(--display); letter-spacing: -.02em; }
.pr-name { font: 700 20px var(--display); }
.pr-msg { margin: 14px 0 18px; padding: 14px 18px; border-left: 3px solid var(--gold); background: var(--gold-soft); border-radius: 0 12px 12px 0; text-align: left; font-size: 15px; }
.pr-msg cite { display: block; margin-top: 6px; font-style: normal; color: var(--gold); font-size: 13px; font-weight: 600; }
.confetti { position: absolute; inset: 0; pointer-events: none; }
.confetti i { position: absolute; top: -20px; left: calc(var(--i) * 3.4% + 1%); width: 8px; height: 14px; border-radius: 2px;
  background: var(--gold); opacity: .9; animation: confetti 2.8s linear infinite; animation-delay: calc(var(--i) * -0.19s); }
.confetti i:nth-child(3n) { background: #fff; width: 6px; height: 10px; }
.confetti i:nth-child(4n) { background: #e8cf8f; }
@keyframes confetti { to { transform: translateY(110vh) rotate(720deg); } }
@media (prefers-reduced-motion: reduce) { .confetti { display: none; } .pr-in, .pr-celebrate { animation: none; } }
.share-preview { display: block; width: 100%; max-width: 300px; margin: 0 auto; border-radius: 14px; border: 1px solid var(--line2); }
.week-share { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.week-share.hl { border-color: var(--gold-line); background: linear-gradient(120deg, var(--gold-soft), transparent 70%), var(--card); }
.week-share-v { margin-top: 4px; } .week-share-v b { font: 800 20px var(--display); }
.gold-t { color: var(--gold); }
/* benchmarks & ranking */
.bench-line { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 4px 18px 10px; font-size: 14px; }
.bench-check { display: flex; gap: 8px; align-items: flex-start; margin: 8px 0 4px; }
.ranking { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.ranking-h { font-size: 15px; margin: 0 0 8px; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.rank-pos { width: 30px; text-align: center; font-weight: 700; flex: none; }
.rank-score { font-weight: 600; color: var(--gold); text-align: right; font-size: 13.5px; }
/* daily check-in */
.ci-invite { display: flex; gap: 14px; align-items: center; width: 100%; cursor: pointer; border: 1px dashed var(--gold-line); font: inherit; color: inherit; }
.ci-invite-emoji { font-size: 30px; }
.ci-done { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 12px 16px; font-size: 14px; }
.ci-done > .ic { color: var(--ok); }
.ci-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.ci-faces { display: flex; gap: 6px; }
.ci-face { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line2); background: var(--card2); font-size: 22px; cursor: pointer; transition: transform .15s, border-color .15s; }
.ci-face.on { border-color: var(--gold); background: var(--gold-soft); transform: scale(1.08); }
.ci-pain { margin-top: 12px; }
.ci-pain input[type=range] { width: 100%; accent-color: var(--gold); }
.ci-alert { background: rgba(217,140,95,.08); border-radius: 12px; }
.ci-line { white-space: nowrap; }
/* technique reviews */
.tech-link { margin-top: 8px; font-size: 13px; }
.tech-chip { display: inline-flex; gap: 6px; align-items: center; margin-top: 8px; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line2);
  background: var(--card2); color: var(--muted); font-size: 12.5px; cursor: pointer; }
.tech-chip.replied { color: var(--gold); border-color: var(--gold-line); }
.tech-chip.new { background: var(--gold); color: var(--gold-ink); font-weight: 700; }
.tech-reply { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); display: grid; gap: 8px; justify-items: start; }
.tech-reply textarea { width: 100%; }
.tech-reply-text { margin: 0; padding: 10px 14px; border-radius: 12px; background: var(--gold-soft); border-left: 3px solid var(--gold); }
.tech-alert .ic { color: var(--gold); }
label.btn.disabled { opacity: .5; pointer-events: none; }
/* programs / tracks */
.tr-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--tc, var(--gold)); flex: none; }
.tr-chip { justify-self: start; display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 700;
  color: var(--tc); border: 1px solid var(--tc); width: fit-content; }
.tr-banner { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 10px 14px; margin-bottom: 12px;
  border-radius: 12px; border: 1px solid var(--tc); background: var(--card); }
.tr-banner .tr-dot { --tc: inherit; background: var(--tc); }
.my-track { display: inline-flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 8px 0 10px; padding: 6px 12px;
  border-radius: 999px; border: 1px solid var(--tc); background: color-mix(in srgb, var(--tc) 12%, transparent); max-width: 100%; }
.my-track-l { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted, inherit); }
.my-track b { color: var(--tc); font-size: 16px; letter-spacing: .04em; }
.wcard-main .tr-chip { margin-bottom: 4px; }
/* suggested videos review */
.vr-card { margin-bottom: 16px; border-color: var(--gold); }
.vr-list { display: grid; gap: 12px; margin-top: 14px; }
.vr-item { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 14px; align-items: center; padding: 10px; border-radius: 12px; background: rgba(255,255,255,.04); }
.vr-media { aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: #000; }
.vr-media iframe { width: 100%; height: 100%; border: 0; display: block; }
.vr-thumb { position: relative; display: block; width: 100%; height: 100%; padding: 0; border: 0; cursor: pointer; background: #000; }
.vr-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: .85; }
.vr-play { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; }
.vr-dur { position: absolute; right: 6px; bottom: 6px; padding: 1px 6px; border-radius: 4px; background: rgba(0,0,0,.75); color: #fff; font-size: 12px; font-weight: 700; }
.vr-name { font-size: 16px; }
.vr-acts { margin-top: 8px; gap: 8px; }
@media (max-width: 640px) { .vr-item { grid-template-columns: 1fr; } }
/* weekly work table */
.wt { display: grid; gap: 12px; }
.wt-tray { display: grid; gap: 10px; border-style: dashed; }
.wt-tray.over, .wt-day.over { border-color: var(--gold); background: rgba(190,185,143,.08); }
.wt-cards { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.wt-card { border-radius: 10px; background: var(--card2); border: 1px solid var(--line); cursor: grab; min-width: 0; }
.wt-card:active { cursor: grabbing; }
.wt-card.open { border-color: var(--gold-line); }
.wt-card-main { display: grid; gap: 3px; width: 100%; text-align: left; padding: 9px 10px; background: none; border: 0; color: inherit; font: inherit; cursor: inherit; }
.wt-moves { overflow-wrap: anywhere; }
.wt-acts { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 10px 10px; }
.wt-move { max-width: 100%; font-size: 13px; padding: 4px 8px; height: auto; }
.wt-add { display: flex; flex-wrap: wrap; gap: 4px; }
.wt-add .chip { font-size: 11px; padding: 2px 8px; }
.wt-time { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 4px; }
.wt-time.over { color: #e06c6c; font-weight: 700; }
.wt-tpl-line { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.wt-tpl-line .chip { font-size: 11px; padding: 2px 8px; }
.wt-warn-n { color: #e0a84f; }
.wt-focus { display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; padding: 1px 6px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); vertical-align: middle; }
.wt-focus.f-lift { color: #e0a84f; border-color: rgba(224,168,79,.45); }
.wt-focus.f-gym { color: #6cb4e0; border-color: rgba(108,180,224,.45); }
.wt-focus.f-long { color: #7cc48a; border-color: rgba(124,196,138,.45); }
.wt-focus.f-teams { color: #c58be0; border-color: rgba(197,139,224,.45); }
.wt-warn { font-size: 12px; line-height: 1.35; color: #e0a84f; background: rgba(224,168,79,.08); border: 1px solid rgba(224,168,79,.3); border-radius: 8px; padding: 5px 8px; }
.wt-tpl { display: grid; gap: 8px; }
.wt-tpl-row { display: grid; grid-template-columns: 110px 1fr; align-items: center; gap: 10px; }
.wt-mono { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.wt-mono li { display: grid; gap: 6px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.wt-swap { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.wt-swap .chip { font-size: 12px; padding: 2px 8px; }
/* consistency medals: a round medal with a ribbon-coloured rim, the number and its unit */
.medal { --ms: 64px; --m1: #c98a4b; --m2: #7a4a22; width: var(--ms); height: var(--ms); flex: none; border-radius: 50%; display: inline-grid; place-content: center; text-align: center;
  background: radial-gradient(circle at 32% 28%, rgba(255,255,255,.55), transparent 42%), linear-gradient(145deg, var(--m1), var(--m2));
  box-shadow: inset 0 0 0 calc(var(--ms) * .06) rgba(255,255,255,.28), 0 6px 18px rgba(0,0,0,.35); color: #1a1408; }
.medal.tier-silver { --m1: #e6e9ee; --m2: #8a929c; }
.medal.tier-gold { --m1: #f3d27a; --m2: #b8862b; }
.medal.tier-black { --m1: #4a4f57; --m2: #111317; color: var(--gold); }
.medal.tier-fire { --m1: #ff9a4d; --m2: #c2381e; color: #fff; }
.medal.locked { filter: grayscale(1) brightness(.45); opacity: .65; }
.medal-n { font: 800 calc(var(--ms) * .36)/1 var(--display); }
.medal-u { font: 700 calc(var(--ms) * .14)/1.1 var(--font); text-transform: uppercase; letter-spacing: .06em; }
.medal-celebrate .medal { margin: 6px auto 4px; }
.cons-top { display: flex; align-items: center; gap: 14px; }
.cons-name { font: 800 22px var(--display); color: var(--gold); line-height: 1.1; }
.cons-last { display: inline-flex; align-items: center; gap: 6px; }
.cons-next { margin-top: 10px; display: grid; gap: 5px; }
.cons-bar { height: 8px; border-radius: 99px; background: var(--card2); overflow: hidden; }
.cons-bar i { display: block; height: 100%; background: var(--gold); border-radius: 99px; }
.medal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 12px; margin-top: 12px; }
.medal-cell { display: grid; justify-items: center; text-align: center; gap: 4px; font-size: 13px; }
.medal-cell.locked b { color: var(--muted); }
.cons-wrap { overflow-x: auto; }
.cons-tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.cons-tbl th, .cons-tbl td { padding: 8px 6px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.cons-tbl th { color: var(--muted); font-weight: 600; font-size: 12px; }
.cons-who { display: inline-flex; align-items: center; gap: 8px; color: inherit; }
/* what a notice points to: a gold glow that fades */
.focus-flash { animation: focusFlash 2.8s ease-out 1; border-radius: 12px; scroll-margin-top: 84px; /* clear of the phone's top bar */ }
@keyframes focusFlash { 0%, 35% { box-shadow: 0 0 0 2px var(--gold), 0 0 24px rgba(190,185,143,.45); } 100% { box-shadow: 0 0 0 0 transparent; } }
@media (prefers-reduced-motion: reduce) { .focus-flash { animation: none; box-shadow: 0 0 0 2px var(--gold); } }
/* coach bell: what's new (comments, videos). The list floats over the page, even from the sidebar */
.side-bell { padding: 0 6px 14px; }
.mtop .bell { margin-right: 10px; }
.bell-btn { position: relative; }
.bell-btn.has { color: var(--gold); }
.bell-count { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: #e06c6c; color: #fff;
  font: 700 11px/18px var(--font); text-align: center; }
.bell-bg { position: fixed; inset: 0; z-index: 60; }
.bell-panel { position: fixed; z-index: 61; width: min(360px, calc(100vw - 24px)); max-height: min(70vh, 520px); overflow-y: auto;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 18px 50px rgba(0,0,0,.45); }
.bell-panel.bell-left { left: 262px; top: 20px; }
.bell-panel.bell-right { right: 12px; top: 62px; }
.bell-h { padding: 12px 14px 8px; border-bottom: 1px solid var(--line); }
.bell-list { display: grid; }
.bell-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 10px 14px; color: inherit; text-decoration: none; border-bottom: 1px solid var(--line); }
.bell-row:hover { background: var(--card2); }
.bell-ic { font-size: 18px; line-height: 1.2; }
.bell-txt { min-width: 0; font-size: 14px; }
.bell-quote { display: block; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; margin-top: 2px; }
.bell-at { white-space: nowrap; }
.tg-steps { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 10px; }
.tg-opts { display: grid; gap: 6px; }
.cal-note { margin: 8px 0 0; font-size: 13px; color: var(--muted); font-style: italic; }
.machine-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.wt-view { display: inline-flex; gap: 4px; align-items: center; }
/* days: at least 200 px each; when the 7 don't fit, the strip scrolls sideways (the tray stays above) */
.wt-days-wrap { overflow-x: auto; padding: 2px 2px 10px; margin: 0 -2px; scroll-snap-type: x proximity; }
.wt-days-wrap .wt-days { grid-template-columns: repeat(7, minmax(200px, 1fr)); }
.wt-days-wrap .wt-day { scroll-snap-align: start; }
@media (max-width: 600px) { .wt-days-wrap { overflow-x: visible; } .wt-days-wrap .wt-days { grid-template-columns: minmax(0, 1fr); } }
.wt-card.detail .wt-card-main { gap: 1px; }
.wtl-b + .wtl-m, .wtl-m + .wtl-b, .wtl-x + .wtl-b { margin-top: 2px; }
.wtl-b { font-size: 13px; overflow-wrap: anywhere; }
.wtl-m + .wtl-b, .wtl-x.note + .wtl-b { margin-top: 6px; }
.wtl-fmt { color: var(--gold); font-weight: 700; font-size: 12px; }
.wtl-m { font-size: 13px; line-height: 1.35; overflow-wrap: anywhere; }
.wtl-m.sub { padding-left: 10px; }
.wtl-load { color: var(--gold); font-size: 12px; }
.wtl-lv { font-size: 11px; font-weight: 800; letter-spacing: .05em; color: var(--muted); margin-top: 3px; }
.wtl-x { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.wtl-x.then { font-size: 11px; font-weight: 700; text-transform: uppercase; margin: 3px 0 1px; }
.wtl-x.note { font-style: italic; }
.wtl-team { float: right; }
.wt-busy { position: sticky; bottom: 90px; justify-self: center; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; }
/* notes for coaches */
.coach-only-toggle { display: inline-flex; gap: 8px; align-items: center; color: var(--text); }
.coach-only-card textarea { width: 100%; }
.coach-note.coach-only { border-color: #6FA8DC; background: rgba(111,168,220,.08); }
.coach-note.coach-only .coach-note-h h3, .coach-note.coach-only .ic { color: #6FA8DC; }
/* warm-up picker */
.wp-list { display: grid; gap: 6px; }
.wp-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 10px; align-items: center; padding: 10px 12px; border-radius: 10px; background: rgba(255,255,255,.04); border: 1px solid transparent; }
.wp-list.best .wp-row { border-color: var(--gold); }
.wp-main { display: grid; gap: 2px; text-align: left; background: none; border: 0; padding: 0; color: inherit; cursor: pointer; min-width: 0; font: inherit; }
.wp-name { font-weight: 700; }
.wp-moves { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wp-row.open .wp-moves { white-space: normal; }
.wp-preview { grid-column: 1 / -1; }
/* warm-up bank + suggestions */
.wu-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.wu-item.on { border-color: var(--gold); }
.wu-zones { margin: 6px 0 8px; }
.wu-zones .chip { font-size: 11px; padding: 2px 8px; }
.wu-new { margin: 8px 0 0; }
/* Team WODs bank (2024-II programming) */
.tw-chips { margin-bottom: 6px; }
.tw-src { margin: 8px 0 0; font-size: 11px; opacity: .8; }
.wu-suggest { margin: 12px 0; display: grid; gap: 8px; border-color: var(--gold); }
/* class time */
.ct-card { margin-top: 16px; }
.ct-card.over { border-color: #e06c6c; }
.ct-toggle { display: inline-flex; gap: 8px; align-items: center; color: var(--text); }
.ct-bar { height: 8px; border-radius: 999px; background: rgba(255,255,255,.08); margin-top: 10px; overflow: hidden; }
.ct-bar i { display: block; height: 100%; background: var(--gold); border-radius: inherit; }
.ct-card.over .ct-bar i { background: #e06c6c; }
.ct-warn { color: #e06c6c; margin: 6px 0 0; font-size: 13px; }
.ct-rows { margin-top: 10px; display: grid; gap: 4px; }
.ct-row { display: flex; justify-content: space-between; gap: 12px; padding: 6px 10px; border-radius: 8px; font-size: 14px; }
.ct-row.block { background: rgba(255,255,255,.05); font-weight: 600; }
.ct-row.routine { color: var(--muted); }
/* view as athlete */
.phone-frame { margin: 0 auto; width: min(100%, 410px); border-radius: 36px; padding: 12px; background: #111; border: 2px solid #333; box-shadow: 0 20px 50px rgba(0,0,0,.45); }
.phone-screen { border-radius: 26px; background: var(--bg); max-height: 70vh; overflow-y: auto; padding: 14px 12px; }
.phone-date { margin: 4px 4px 12px; }
.phone-screen .wk-card { margin: 0; padding: 14px; }
/* inside the phone the whiteboard uses its phone layout, whatever the computer's screen size */
.phone-screen .wb { grid-template-columns: 1fr; position: relative; }
.phone-screen .wb-coach { position: absolute; right: -6px; bottom: 6px; margin: 0; z-index: 1; pointer-events: none; }
.phone-screen .wb-coach .coach-figure { height: 112px !important; }
.phone-screen .wb-coach .coach-av { width: 64px !important; height: 64px !important; }
.phone-screen .wb-surface { padding: 14px 14px 16px; border-width: 7px; }
.phone-screen .wb-surface::after { content: ''; display: block; height: 84px; }
.phone-screen .wb-l { font-size: 17px; } .phone-screen .wb-block { font-size: 16px; } .phone-screen .wb-title { font-size: 19px; }
.phone-screen .wb-move, .phone-screen .wb-then, .phone-screen .wb-more, .phone-screen .wb-note { padding-left: 14px; }
.phone-screen .logger-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
.phone-screen .logger { margin-left: 0; }
.chip.tr-toggle { border: 1px solid var(--tc); color: var(--tc); background: transparent; font-weight: 700; }
.chip.tr-toggle.on { background: var(--tc); color: #111; }
.wb-track { display: inline-block; padding: 1px 10px 2px; border-radius: 4px; background: var(--tc, #BEB98F); color: #fff; font-family: 'Permanent Marker', cursive;
  font-size: 15px; letter-spacing: .05em; box-shadow: 0 2px 3px rgba(0,0,0,.25); transform: rotate(-2deg); text-shadow: 0 1px 1px rgba(0,0,0,.35); }
.tr-swatch { width: 30px; height: 30px; border-radius: 50%; background: var(--tc); border: 2px solid transparent; cursor: pointer; }
.tr-swatch.on { border-color: var(--text); box-shadow: 0 0 0 2px var(--bg) inset; }
.tr-export { width: 100%; font: 12.5px/1.5 ui-monospace, 'Cascadia Mono', Menlo, Consolas, monospace; }
.tr-assign-hint { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--text2); margin: 0 0 10px; }
/* personal version of a program day (section 35) */
.pc-banner { border-color: var(--gold); font-size: 14px; line-height: 1.5; }
.pc-chip { font-size: 11px; padding: 1px 7px; margin-left: 6px; vertical-align: 1px; }
p.tr-assign-hint { flex-wrap: wrap; gap: 4px; }
.pl-pc-hint { font-size: 12px; color: var(--gold); margin-top: 4px; }
.pl-shared { border-style: dashed; }
/* per-side / alternating reps */
.rep-hints { display: grid; gap: 4px; margin-top: 4px; }
.rep-hint { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.rep-tag { display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--gold-line);
  color: var(--gold); font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.bt-write-btn { margin: 0 0 14px; }
.bt-top { margin: 0 0 14px; align-items: center; }
.bt-top .bt-write-btn { margin: 0; }
/* block writer at the top of the editor */
.bt-writer { margin-bottom: 16px; border-color: var(--gold-line); background: linear-gradient(120deg, var(--gold-soft), transparent 60%), var(--card); }
.bt-notes-in { width: 100%; }
.bt-notes { margin: 8px 0 0; font-size: 13.5px; color: var(--text2); white-space: pre-line; }
/* quick add at the top of the editor */
.bt-top { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 14px;
  border-color: var(--gold-line); background: linear-gradient(120deg, var(--gold-soft), transparent 70%), var(--card); }
/* percentage loads */
.pct-load { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; margin-top: 4px; }
.rm-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; margin: 10px 0 4px; padding: 8px 10px;
  border-radius: 10px; background: var(--card2); border: 1px solid var(--line); font-size: 14px; }
.rm-row.beats { border-color: var(--gold-line); background: var(--gold-soft); }
.pct-kg { font: 800 16px var(--display); color: var(--gold); }
/* circuits */
.circuit-h { padding: 6px 18px 0; font: 700 13px var(--font); letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.circuit-loads { display: grid; gap: 8px; margin-top: 6px; }
.circuit-load { display: grid; grid-template-columns: minmax(0, 1fr) 120px; gap: 10px; align-items: center; }
.circuit-load span { font-weight: 600; min-width: 0; }
.circuit-load .move-reps { margin-right: 6px; }
.convert-hint { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 10px 12px; margin-bottom: 12px;
  border: 1px dashed var(--gold-line); border-radius: 12px; background: var(--gold-soft); font-size: 13.5px; }
/* block tools: write as text + library */
.retext-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 10px 12px; margin-bottom: 12px;
  border: 1px dashed var(--gold-line); border-radius: 12px; background: var(--gold-soft); }
.retext-row .retext-btn { flex: none; }
.retext-row .muted { flex: 1 1 200px; }
.bt-actions { margin: 8px 0 12px; gap: 8px; }
.bt-text { width: 100%; font: 15px/1.5 ui-monospace, 'Cascadia Mono', Menlo, Consolas, monospace; }
.bt-examples { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.bt-preview { border: 1px solid var(--gold-line); border-radius: 12px; padding: 12px 14px; background: var(--gold-soft); margin-top: 6px; }
.bt-moves { margin: 8px 0 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.bt-moves li { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.bt-vid { color: var(--gold); }
.bt-item { border: 1px solid var(--line2); border-radius: 14px; padding: 12px; }
.bt-item .bt-preview { background: transparent; border-color: var(--line); }
/* weekly planner */
.pl-bar { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 14px; }
.pl-range { min-width: 130px; text-align: center; }
.pl-who { max-width: 260px; }
.pl-who-pick { position: relative; min-width: 0; }
button.pl-who { display: inline-flex; align-items: center; gap: 8px; min-width: 200px; padding: 9px 12px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--bg2); color: inherit; font: inherit; cursor: pointer; text-align: left; }
button.pl-who .ellipsis { flex: 1; min-width: 0; }
.pl-who-bg { position: fixed; inset: 0; z-index: 39; }
.pl-who-pop { position: absolute; z-index: 40; top: calc(100% + 6px); right: 0; width: min(340px, 90vw); padding: 8px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(0,0,0,.45); }
.pl-who-pop .search { margin-bottom: 6px; }
.pl-who-list { max-height: 320px; overflow: auto; }
.pl-who-kind { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 10px 10px 4px; }
.pl-who-opt { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 10px; border: 0; border-radius: 8px;
  background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.pl-who-opt:hover, .pl-who-opt.on { background: var(--gold-soft); }
.pl-grid { display: grid; gap: 10px; grid-template-columns: repeat(7, minmax(0, 1fr)); }
@media (max-width: 1100px) { .pl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .pl-grid { grid-template-columns: minmax(0, 1fr); } .pl-who { max-width: none; width: 100%; }
  /* the program picker on a phone: full width, and its list opens under it inside the screen (it opened off the left edge) */
  .pl-who-pick { width: 100%; }
  .pl-who-pop { left: 0; right: 0; width: auto; }
  .pl-who-list { max-height: min(320px, 50vh); }
  .pl-who-opt { padding: 11px 10px; } }
.pl-day { padding: 12px; display: grid; gap: 8px; align-content: start; min-height: 120px; }
.pl-day.today { border-color: var(--gold-line); }
.pl-day.past { opacity: .75; }
.pl-day-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 6px; }
.pl-day-h b { font: 800 22px var(--display); }
.pl-prog { display: grid; gap: 3px; padding: 9px 10px; border-radius: 10px; background: var(--card2); border: 1px solid var(--line); min-width: 0; }
.pl-prog:hover { border-color: var(--gold-line); }
.pl-rest { margin: 0; }
/* movement bank */
.bank-save { margin-top: 6px; }
.bank-in { display: inline-flex; gap: 4px; align-items: center; margin-top: 6px; color: var(--muted); font-size: 11.5px; }
.mv-row a { color: var(--gold); display: inline-flex; gap: 4px; align-items: center; }
#mv-form .ed-video { margin-top: 4px; display: block; }
.ex-video { margin-top: 8px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.video-btn { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--gold-line); background: var(--gold-soft); color: var(--gold); font-weight: 600; font-size: 12.5px; transition: background .2s; }
.video-btn:hover, .video-btn.on { background: rgba(190,185,143,.18); }
.video-frame { width: 100%; max-width: 560px; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; border: 1px solid var(--line2); background: #000; }
.video-frame iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ---------- multi-part WODs ---------- */
.part-sep { display: flex; align-items: center; gap: 10px; margin: 2px 0 10px; color: var(--gold); font-size: 12.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.part-sep::before, .part-sep::after { content: ''; flex: 1; height: 1px; background: var(--gold-line); }
.bt-preview + .part-sep { margin-top: 10px; }
.block.linked { margin-top: -6px; border-top: 0; }
.part-tag { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; background: var(--gold-soft); color: var(--gold); vertical-align: middle; }
.part-link { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin: 4px 0 10px; }
.part-link .part-rest { width: 170px; }
.attempts { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin-top: 6px; }
.attempts-total { margin-top: 8px; color: var(--text2); }
.attempts-total b { color: var(--gold); }

/* ---------- bank suggestions while writing ---------- */
.bk-suggest { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 6px 0 2px; }
.bk-suggest .chip { cursor: pointer; }
.bk-checks { margin-top: 12px; display: grid; gap: 6px; }
.bk-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13.5px; padding: 6px 10px; border-radius: 10px; background: var(--card2); }
.bk-row.warn { background: rgba(242,180,83,.08); }
.bk-row.new { background: var(--card2); }
.bk-row .chip { cursor: pointer; }
.bk-ic { width: 20px; text-align: center; }
.bt-lib { font-size: 12px; font-weight: 700; color: var(--gold); margin-bottom: 6px; }
.bt-lib-hint { margin: 8px 0 0; }

/* ---------- movement categories + week balance ---------- */
.mod-G { --pc: #B48EAD; } .mod-W { --pc: #BEB98F; } .mod-M { --pc: #5FC4C4; }
.zone-upper_push { --pc: #6FA8DC; } .zone-upper_pull { --pc: #8FBF9A; } .zone-lower_squat { --pc: #E8A04F; } .zone-lower_hinge { --pc: #E06C6C; } .zone-core { --pc: #9b9b9b; }
.load-light { --pc: #e6d3a3; } .load-medium { --pc: #BEB98F; } .load-heavy { --pc: #8a6424; } .load-unknown { --pc: #5a5a5a; }
.pat-chip { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; vertical-align: middle;
  color: var(--pc, var(--muted)); background: color-mix(in srgb, var(--pc, #9b9b9b) 14%, transparent); border: 1px solid transparent; }
.pat-chip.guess { background: transparent; border-color: color-mix(in srgb, var(--pc, #9b9b9b) 45%, transparent); }
.pat-chip.none { color: var(--dim); border-color: var(--line2); background: transparent; }
.bal { margin-bottom: 16px; }
.bal-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.bal-toggle { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; flex: 1; min-width: 0; text-align: left; font-size: 15px; }
.bal-weeks { display: flex; gap: 6px; }
.bal-weeks .chip { cursor: pointer; }
.bal-sec { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.bal-sec .bal-grid { margin-top: 8px; }
.bal-k { min-width: 110px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.bal-bar { display: flex; }
.ld { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--pc); margin-right: 2px; }
.mod-tag { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 4px; font-size: 10px; font-weight: 800; color: #101010; background: var(--pc); margin-right: 2px; }
.bal-src { margin: 12px 0 0; font-size: 11.5px; }
.zone-picks { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 6px; }
.bal-warn { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 6px; }
.bal-warn li { padding: 8px 12px; border-radius: 10px; background: rgba(242,180,83,.10); color: var(--warn); font-size: 13.5px; font-weight: 600; }
.bal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px 18px; margin-top: 12px; }
.bal-row { display: grid; grid-template-columns: 10px 150px minmax(0, 1fr) 34px; align-items: center; gap: 8px; font-size: 13px; }
.bal-row.zero { opacity: .55; }
.pat-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--pc); }
.bal-l { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bal-bar { height: 8px; border-radius: 999px; background: var(--card3); overflow: hidden; }
.bal-bar i { display: block; height: 100%; background: var(--pc); }
.bal-bar i:first-child { border-radius: 999px 0 0 999px; } .bal-bar i:last-child { border-radius: 0 999px 999px 0; } .bal-bar i:only-child { border-radius: 999px; }
.bal-sec .bal-chips { margin-top: 8px; }
.bal-n { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.bal-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 12px; }

/* ---------- comments on results ---------- */
.cm { margin-top: 6px; }
.cm-btn { font-size: 13px; }
.cm-btn.new { color: var(--gold); font-weight: 700; }
.cm-badge { display: inline-block; padding: 0 7px; border-radius: 999px; background: var(--gold); color: var(--gold-ink); font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.cm-thread { margin-top: 8px; display: grid; gap: 8px; max-width: 560px; }
.cm-msg { padding: 8px 12px; border-radius: 12px; background: var(--card2); border: 1px solid var(--line); }
.cm-msg.coach { background: var(--gold-soft); border-color: var(--gold-line); }
.cm-who { display: flex; gap: 8px; align-items: baseline; font-size: 12.5px; }
.cm-body { margin-top: 2px; white-space: pre-wrap; overflow-wrap: anywhere; }
.cm-new { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: end; }
.cm-new textarea { min-height: 0; }

/* ---------- 1RM history ---------- */
.mx-row + .mx-row { border-top: 1px solid var(--line); }
.mx-name { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; text-align: left; gap: 1px; color: var(--text); }
.mx-note { padding: 0 0 8px 2px; }
.mx-hist { padding: 4px 0 12px; display: grid; gap: 6px; }
.mx-spark { width: 220px; max-width: 100%; height: 44px; color: var(--gold); }
.mx-h { display: flex; align-items: center; gap: 10px; font-size: 13.5px; }
.mx-h .grow { flex: 1; min-width: 0; }
.mx-pick { margin-top: 8px; }
.mx-pats { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.mx-pats .chip { cursor: pointer; }
.mx-list { display: flex; flex-wrap: wrap; gap: 6px; max-height: 168px; overflow-y: auto; padding: 2px; }
.mx-item { border: 1px solid var(--line2); background: var(--card2); color: var(--text2); border-radius: 999px; padding: 5px 12px; font-size: 13px; cursor: pointer; }
.mx-item.on { border-color: var(--gold); color: var(--gold); background: var(--gold-soft); }
/* ---------- week context in the editor ---------- */
.wctx { margin-bottom: 16px; }
.wctx-h { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.wctx-toggle { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; text-align: left; font-size: 15px; color: var(--text); }
.wctx-days { display: grid; gap: 8px; margin-top: 12px; }
.wctx-day { display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--card2); border: 1px solid var(--line); color: var(--text); text-decoration: none; }
.wctx-day:hover { border-color: var(--gold-line); }
.wctx-date { font-weight: 800; color: var(--gold); text-transform: capitalize; font-size: 13px; }
.wctx-b { font-size: 13px; line-height: 1.35; }
.wctx-b + .wctx-b { margin-top: 3px; }
.wctx-moves { display: block; color: var(--text2); font-size: 12.5px; }
.wctx-bal { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.wctx-bal .chip.warn { opacity: .7; }
.wctx-warn { font-size: 12.5px; color: var(--warn); font-weight: 600; }
.bk-checks.repeats .bk-row { background: rgba(242,180,83,.08); }
@media (max-width: 560px) { .wctx-day { grid-template-columns: 1fr; gap: 4px; } }

/* ---------- compact Coach's Notes ---------- */
.note-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.note-chips .chip { cursor: pointer; }
.notes-card .note-ed { margin-top: 12px; }

/* ---------- AHAFA note + weight per set ---------- */
.intensity-note { font-size: 11.5px; color: var(--gold); opacity: .85; margin-top: 2px; font-style: italic; }
.same-weight { margin: 8px 0 2px; }

/* ---------- coach video: general + personal ---------- */
.cv-targets { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 4px 0 6px; }
.cv-targets .chip { cursor: pointer; }
.cv-target-hint { margin: 0 0 10px; }
.coach-video.personal { border-color: var(--gold); background: linear-gradient(180deg, rgba(190,185,143,.12), rgba(190,185,143,.04)); }

/* ---------- WOD levels + every-minute movements ---------- */
.lvl-tabs { display: flex; gap: 6px; margin: 4px 0 12px; }
.lvl-tab { flex: 1; max-width: 120px; height: 36px; border-radius: 10px; border: 1px solid var(--line2); background: var(--card2); color: var(--text2); font-weight: 800; letter-spacing: .06em; cursor: pointer; }
.lvl-tab.on { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); }
.lvl-tag { display: inline-block; margin-right: 6px; padding: 0 6px; border-radius: 6px; font-size: 10.5px; font-weight: 800; letter-spacing: .05em; background: var(--gold-soft); color: var(--gold); vertical-align: middle; }
.every-box { margin-top: 12px; padding: 10px 14px; border: 1px dashed var(--gold-line); border-radius: 12px; background: rgba(190,185,143,.05); }
.every-h { color: var(--gold); font-weight: 700; font-size: 13.5px; margin-bottom: 4px; }

/* ---------- the day on a CrossFit whiteboard ---------- */
.wb { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: end; gap: 6px; margin: 4px 0 22px; }
.wb-coach { align-self: end; margin-bottom: 18px; }
.wb-coach .fig-anim { display: block; }
.wb-board { min-width: 0; }
.wb-surface { position: relative; padding: 18px 22px 20px; border-radius: 6px; color: #1d1d1d;
  background: radial-gradient(120% 90% at 18% 10%, #ffffff 0%, #f4f5f3 55%, #e9ebe8 100%);
  border: 9px solid #b9bec4; border-color: #d4d8dc #a9aeb4 #9aa0a6 #c4c8cd;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.12), inset 0 2px 10px rgba(0,0,0,.06), 0 10px 26px rgba(0,0,0,.45); }
/* faint traces of yesterday's erased workout */
.wb-surface::before { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background: linear-gradient(100deg, transparent 20%, rgba(120,130,140,.07) 28%, transparent 36%), linear-gradient(80deg, transparent 58%, rgba(120,130,140,.06) 66%, transparent 74%); }
.wb-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin-bottom: 8px; padding-bottom: 6px; border-bottom: 2px solid rgba(30,79,191,.55); border-radius: 0 0 40% 0 / 0 0 4px 0; }
.wb-date { font-family: 'Permanent Marker', 'Kalam', cursive; font-size: 15px; color: #1e4fbf; text-transform: uppercase; letter-spacing: .03em; }
.wb-title { font-family: 'Permanent Marker', cursive; font-size: 22px; color: #c62828; line-height: 1.1; }
.wb-l { font-family: 'Kalam', 'Comic Sans MS', cursive; font-size: 19px; line-height: 1.25; overflow-wrap: anywhere; }
.wb-block { font-family: 'Permanent Marker', cursive; color: #c62828; font-size: 18px; margin-top: 10px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.wb-block:first-of-type { margin-top: 2px; }
.wb-letter { color: #1d1d1d; }
.wb-q { color: #1e4fbf; }
.wb-fmt { color: #1e4fbf; font-size: 16px; }
.wb-move { padding-left: 22px; color: #1d1d1d; font-weight: 700; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 8px; }
.wb-qty { color: #1e4fbf; }
.wb-load { color: #1f7a3a; }
.wb-then { padding-left: 22px; margin-top: 4px; color: #1e4fbf; font-family: 'Permanent Marker', cursive; font-size: 15px; text-transform: lowercase; }
.wb-then::before { content: '↓ '; }
.wb-more, .wb-note { padding-left: 22px; color: #6b6b6b; font-size: 16px; }
.wb-tray { position: relative; height: 12px; margin: -2px 8px 0; border-radius: 0 0 6px 6px; background: linear-gradient(#b4b9bf, #8d9399); box-shadow: 0 4px 8px rgba(0,0,0,.35);
  display: flex; align-items: flex-start; gap: 6px; padding: 0 14px; }
.wb-tray .mk { width: 34px; height: 7px; margin-top: -4px; border-radius: 3px 5px 5px 3px; background: var(--mk); box-shadow: inset -7px 0 0 rgba(255,255,255,.75); }
.wb-tray .mk.red { --mk: #c62828; } .wb-tray .mk.blue { --mk: #1e4fbf; } .wb-tray .mk.black { --mk: #222; } .wb-tray .mk.green { --mk: #1f7a3a; }
.wb-tray .eraser { width: 40px; height: 9px; margin: -6px 0 0 auto; border-radius: 3px; background: linear-gradient(#3b3b3b 0 45%, #e8e2d0 45%); }
.wb-lvl { color: #c62828; font-family: 'Permanent Marker', cursive; font-size: .8em; }
.wb-lvlhead { padding-left: 22px; margin-top: 8px; color: #c62828; font-family: 'Permanent Marker', cursive; font-size: 17px; letter-spacing: .04em; text-decoration: underline; text-underline-offset: 3px; }
.wb-move.wb-sub { padding-left: 40px; }
/* levels side by side: one column per level, like lanes drawn on the board; they wrap to a new row when narrow */
.wb-levels { display: grid; grid-template-columns: repeat(auto-fit, minmax(138px, 1fr)); gap: 6px 16px; margin: 2px 0 4px 22px; }
.wb-lvcol { min-width: 0; padding-left: 10px; border-left: 2px solid rgba(29,29,29,.10); }
.wb-lvcol .wb-lvlhead { padding-left: 0; margin-top: 4px; }
.wb-lvcol .wb-move, .wb-lvcol .wb-move.wb-sub { padding-left: 0; }
/* inside a column a line flows as text: the reps stay with the name, and a long name wraps with a hanging indent */
.wb-lvcol .wb-move, .wb-cols .wb-move { display: block; padding-left: 1.1em !important; text-indent: -1.1em; font-size: 17.5px; line-height: 1.2; margin-bottom: 2px; }
.wb-lvcol .wb-move > span, .wb-cols .wb-move > span { margin-right: .3em; }
.wb-lvcol .wb-qty, .wb-cols .wb-qty { white-space: nowrap; }
/* the coach's comment under a movement, smaller in a column so the movements stand out */
.wb-lvcol .wb-cmt, .wb-cols .wb-cmt { font-size: 13.5px; line-height: 1.2; padding-left: 1.1em; text-indent: -.8em; margin: 0 0 4px; }
.wb-lvcol .wb-emove.wb-sub { padding-left: 14px; }
/* a long list of one level: two columns, read top to bottom (one column when the board is narrow) */
.wb-cols { columns: 2 220px; column-gap: 28px; padding-left: 22px; }
@media (max-width: 640px) { .wb-cols { padding-left: 14px; } }
.phone-screen .wb-cols { padding-left: 14px; }
.wb-cols > * { break-inside: avoid; }
@media (max-width: 640px) { .wb-levels { margin-left: 4px; gap: 6px 8px; } .wb-lvcol { padding-left: 6px; }
  .wb-lvcol .wb-move { font-size: 15px; line-height: 1.18; } .wb-lvcol .wb-lvlhead { font-size: 14px; } }
.phone-screen .wb-levels { margin-left: 14px; gap: 6px 10px; }
/* a long WOD: every name stays on the board, written a little smaller and tighter */
.wb-long .wb-l { font-size: 17px; line-height: 1.18; }
.wb-long .wb-move, .wb-long .wb-emove { font-size: 16.5px; }
@media (max-width: 640px) { .wb-long .wb-l { font-size: 15.5px; } .wb-long .wb-move, .wb-long .wb-emove { font-size: 15px; } }
.wb-emove.wb-sub { padding-left: 58px; }
.wb-every { padding-left: 22px; margin-top: 6px; color: #1e4fbf; font-family: 'Permanent Marker', cursive; font-size: 15px; text-transform: uppercase; }
.wb-every::before { content: '⏱ '; }
.wb-emove { padding-left: 40px; }
/* a part of a WOD done in rounds ("A1) AMRAP 3'") and the rests between the parts */
.wb-part { padding-left: 22px; margin-top: 6px; color: #1e4fbf; font-family: 'Permanent Marker', cursive; font-size: 17px; text-transform: uppercase; }
.wb-rest { padding-left: 22px; margin-top: 4px; color: #6b6b6b; font-family: 'Permanent Marker', cursive; font-size: 15px; }
/* first view: each line is written left to right */
.wb.writing .wb-head, .wb.writing .wb-l { clip-path: inset(0 100% 0 0); animation: wbWrite .5s steps(14, end) forwards; }
@keyframes wbWrite { to { clip-path: inset(0 0 0 0); } }
@media (prefers-reduced-motion: reduce) { .wb.writing .wb-head, .wb.writing .wb-l { animation: none; clip-path: none; } }
@media (max-width: 560px) {
  .wb { grid-template-columns: 1fr; position: relative; }
  .wb-coach { position: absolute; right: -6px; bottom: 6px; margin: 0; z-index: 1; pointer-events: none; }
  .wb-coach .coach-figure { height: 112px !important; }
  .wb-coach .coach-av { width: 64px !important; height: 64px !important; }
  .wb-surface { padding: 14px 14px 16px; border-width: 7px; }
  .wb-surface::after { content: ''; display: block; height: 84px; } /* room for the coach at the bottom corner: no line runs under him */
  .wb-l { font-size: 17px; } .wb-block { font-size: 16px; } .wb-title { font-size: 19px; }
  .wb-move, .wb-then, .wb-more, .wb-note, .wb-part, .wb-rest { padding-left: 14px; }
}

@media (max-width: 560px) {
  .bal-row { grid-template-columns: 10px 128px minmax(0, 1fr) 30px; }
  .bal-k { min-width: 0; width: 100%; }
  .cm-new { grid-template-columns: 1fr; }
}
/* ---------- self-paced plans ---------- */
.plan-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.plan-card { display: block; color: inherit; text-decoration: none; }
.plan-card:hover { border-color: var(--gold); }
.plan-name { font-size: 17px; }
.plan-who { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.plan-bar { height: 6px; border-radius: 6px; background: var(--line); overflow: hidden; margin: 6px 0; }
.plan-bar i { display: block; height: 100%; background: var(--gold); border-radius: 6px; }
.plan-arow.off { opacity: .55; }
.plan-sessions { display: flex; flex-direction: column; gap: 8px; }
.plan-srow { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg2); }
.plan-next { margin-bottom: 14px; border-color: rgba(190,185,143,.45); }
.plan-feel { margin-top: 14px; text-align: center; }
.plan-feel .row { justify-content: center; flex-wrap: wrap; }
.plan-feel .btn.on { border-color: var(--gold); color: var(--gold); }

/* WOD logger: score "5+25" and machine per movement */
.score-in small { display: block; margin-top: 4px; }
.machine-same { margin: 4px 0 8px; }
.machine-row { display: flex; flex-direction: column; gap: 6px; padding: 8px 0; border-top: 1px solid var(--line); }

/* coaches: videos only for them, class plan, comments on the class */
.cov-item { border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin: 8px 0; background: var(--bg2); }
.cov-title { flex: 1; min-width: 160px; }
.cov-watch { margin: 6px 0; display: grid; gap: 6px; }
.cc-plan { display: grid; gap: 2px; margin-top: 4px; }
.cc-row { display: grid; grid-template-columns: 38px 1fr auto; gap: 8px; padding: 6px 8px; border-radius: 8px; font-size: 14px; }
.cc-row.block { background: rgba(190,185,143,.08); font-weight: 600; }
.cc-row.routine { color: var(--muted); }
.cc-at { color: var(--gold); font-variant-numeric: tabular-nums; }
.cf-row { border-top: 1px solid var(--line); padding: 8px 0; }
.cf-row.new b { color: var(--gold); }
.coach-class textarea { width: 100%; }
.plan-pick { display: grid; gap: 8px; margin-bottom: 14px; }
.plan-pick-list { max-height: 220px; overflow: auto; display: grid; gap: 2px; padding: 4px 2px; border: 1px solid var(--line); border-radius: 10px; }
.plan-pick-list .check { padding: 6px 8px; }

/* "Ideas" while writing as text */
.ideas { border: 1px solid var(--line); border-radius: 12px; padding: 10px; margin: 10px 0; background: var(--bg2); }
.ideas-list { max-height: 300px; overflow: auto; display: grid; gap: 6px; }
.idea { border-top: 1px solid var(--line); padding: 8px 2px; }
.idea:first-child { border-top: 0; }
.idea-name { text-align: left; font-weight: 600; }
.idea-text { margin: 4px 0 0; white-space: pre-wrap; font: 13px/1.45 inherit; color: var(--muted); }
.idea-text.short { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* benchmark + WOD / Team WOD on a WOD block: name it and keep it in the library */
.bench-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 8px 0 4px; }
.bench-row .bench-check { margin: 0; }
.lb-row .lb-score { width: 220px; }
.lvgen-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 6px 0 10px; }
.lvgen-head { display: flex; align-items: center; gap: 8px; width: 100%; margin: 12px 0 6px; padding: 8px 10px;
  background: var(--card2); border: 1px solid var(--line2); border-radius: 10px; color: inherit; font: inherit; cursor: pointer; text-align: left; }
.lvgen-head.on { border-color: var(--gold-line); }
.lib-wod { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.lib-wod-name { flex: 1 1 200px; max-width: 320px; }
/* whiteboard comment: under its line, in the comment marker colour */
.wb-cmt { padding-left: 40px; font-size: 16px; color: #b3261e; }
.phone-screen .wb-cmt { padding-left: 26px; }
@media (max-width: 560px) { .wb-cmt { padding-left: 26px; } }
.wb-cmt::before { content: '↳ '; }
.ed-board { display: flex; flex-direction: column; margin-top: 6px; }
/* the day's video cards: one line each until opened */
.fold-card { padding-block: 12px; }
.fold-card .coach-only-toggle { width: 100%; flex-wrap: wrap; text-align: left; }
/* athlete workouts folded to a title line (several programs on a day) */
.wk-tap { cursor: pointer; }
.wk-chev { color: var(--muted); align-self: center; }
.wk-folded .wk-head { margin-bottom: 0; }
.wk-folded .wk-title { font-size: 20px; }
.wk-min { margin-top: 14px; }
/* bank usage over the last 30 days */
.use-chip { font-size: 11px; padding: 2px 7px; vertical-align: middle; }
.use-chip.used, .use-line.used { color: #c98a14; }
.use-chip.fresh, .use-line.fresh { color: #3f9a5a; }
.use-line { font-size: 12.5px; font-weight: 600; margin-bottom: 6px; }
/* phones: the part the browser bars cover is not screen (dvh), so the windows fit what is visible and
   open from the bottom with their buttons always in sight; "More" in two columns; the editor's bar in one row */
.modal { max-height: calc(100dvh - 32px); }
.modal-b { min-height: 0; overscroll-behavior: contain; }
@media (max-width: 600px) {
  .modal-bg { place-items: end center; padding: 0; padding-top: env(safe-area-inset-top); }
  .modal, .modal.wide { max-width: none; border-radius: 20px 20px 0 0; max-height: calc(100dvh - 12px - env(safe-area-inset-top)); }
  .modal-h { padding: 14px 16px; }
  .modal-b { padding: 16px; }
  .modal-f { padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
  .more-sheet { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
  .nav.sheet.more-sheet a, .nav.sheet.more-sheet button { padding: 12px 10px; font-size: 14.5px; gap: 10px; }
}
@media (max-width: 760px) {
  .sticky-bar { flex-wrap: nowrap; gap: 6px; padding: 8px; }
  .sticky-bar .btn { flex: 0 0 auto; }
  .sticky-bar .btn.ghost { padding-inline: 12px; }
  .sticky-bar .btn.ghost .sb-l { display: none; }
  .sticky-bar .sb-main { flex: 1 1 auto; min-width: 0; justify-content: center; }
}
/* a block's header on a phone: the name gets the whole first row; format and its buttons share the second */
@media (max-width: 600px) {
  .ed-bh > input { grid-column: 2 / -1; }
  .ed-bh select { grid-column: 1 / 3; grid-row: 2; }
  .ed-bh .acts { grid-column: 3; grid-row: 2; }
}
.circuit-rm .pct-load { margin-top: 2px; }

/* ---------- 36. Mapa Saints + Perfil del atleta (2026-11-09; skillmaplite.js, bodyprofile.js) ---------- */
:root { --bp-accent: var(--gold); }
.bp-overlay { position: fixed; inset: 0; z-index: 90; background: rgba(0,0,0,.72); display: grid; place-items: center; padding: 16px; overflow-y: auto; }
.bp-box { width: min(440px, 100%); background: var(--card); border: 1px solid var(--line); border-top: 3px solid var(--bp-accent); border-radius: var(--r); padding: 20px; box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.bp-box h2 { margin: 0 0 6px; }
.bp-muted { color: var(--muted); font-size: 13px; line-height: 1.45; }
.bp-xs { font-size: 11.5px; margin: 8px 0 0; }
.bp-err { color: var(--bad); font-size: 13px; margin: 8px 0; }
.bp-field { display: block; margin: 12px 0; }
.bp-field > span { display: block; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.bp-field input { width: 100%; }
.bp-seg { display: flex; gap: 6px; } .bp-seg button { flex: 1; min-height: 42px; border-radius: var(--r); border: 1px solid var(--line2); background: var(--card2); color: var(--text); font-weight: 700; cursor: pointer; }
.bp-seg button.on { background: var(--bp-accent); border-color: var(--bp-accent); color: var(--gold-ink); }
.bp-later { margin-top: 8px; }
.bp-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.bp-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 12px 0; }
.bp-stats div { background: var(--card2); border-radius: var(--r); padding: 10px 8px; text-align: center; }
.bp-stats b { display: block; font-size: 17px; } .bp-stats span { font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.bp-sub { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.bp-wchart { display: block; width: 100%; max-width: 420px; height: auto; margin: 4px auto 0; color: var(--bp-accent); }
.bp-wv { font-size: 10px; fill: var(--text); font-weight: 700; } .bp-wd { font-size: 9px; fill: var(--muted); text-transform: uppercase; }
.bp-add { display: flex; gap: 8px; margin-top: 8px; } .bp-add input { flex: 1; min-width: 0; }
.bp-radar { display: block; width: min(340px, 100%); margin: 6px auto 0; overflow: visible; }
.bp-ring { fill: none; stroke: var(--line2); stroke-width: 1; }
.bp-shape { fill: rgba(190,185,143,.28); stroke: var(--bp-accent); stroke-width: 2.5; stroke-linejoin: round; }
.bp-lab { font-size: 10.5px; font-weight: 700; fill: var(--text); } .bp-val { fill: var(--bp-accent); font-size: 12px; }
.bp-sum { display: flex; flex-wrap: wrap; gap: 6px 14px; justify-content: center; font-size: 13.5px; font-weight: 600; margin: 4px 0 10px; }
.bp-axes { list-style: none; margin: 0; padding: 0; }
.bp-axes li { display: grid; grid-template-columns: 1fr 110px 30px; align-items: center; gap: 4px 10px; padding: 6px 0; border-top: 1px solid var(--line); font-size: 13px; }
.bp-axes i { height: 6px; border-radius: 3px; background: var(--card3); overflow: hidden; } .bp-axes i b { display: block; height: 100%; background: var(--bp-accent); }
.bp-axes em { font-style: normal; font-weight: 800; text-align: right; } .bp-axes small { grid-column: 1 / -1; color: var(--muted); font-size: 11px; margin-top: -2px; }

.gm-head { display: flex; align-items: center; gap: 16px; }
.gm-ring { flex: none; width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(closest-side, var(--card) 78%, transparent 80%), conic-gradient(var(--gold) calc(var(--p) * 1%), var(--card3) 0); }
.gm-ring b { font-size: 18px; }
.gm-of { font-family: var(--display); font-size: 20px; font-weight: 800; margin-top: 2px; }
.gm-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; } .gm-chips span { font-size: 11.5px; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: var(--gold-soft); color: var(--gold); }
.gm-tier { color: var(--gold); } .gm-tier.t-god { color: #C9A6FF; }
.gm-tiers { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin: 12px 0 4px; }
.gm-tiers span { display: flex; flex-direction: column; align-items: center; padding: 6px 1px; border-radius: 10px; background: var(--card); border: 1px solid var(--line); font-size: 9px; font-weight: 700; color: var(--dim); text-transform: uppercase; }
.gm-tiers b { font-size: 14px; } .gm-tiers span.on { color: var(--gold); border-color: var(--gold-line); background: var(--gold-soft); }
.gm-tiers span.on.t-god { color: #fff; border-color: #B280FF; background: rgba(178,128,255,.25); }
.gm-fam { margin-top: 12px; } .gm-fam.god { border-color: rgba(178,128,255,.45); }
.gm-famh { display: flex; align-items: center; gap: 10px; } .gm-famh h3 { margin: 0; flex: 1; } .gm-ic { font-size: 22px; }
.gm-list { list-style: none; margin: 8px 0 0; padding: 0; }
.gm-list li { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line); }
.gm-dot { flex: none; width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--dim); background: var(--card); color: var(--gold-ink); font-weight: 900; cursor: pointer; }
.gm-dot.lv-h { border-color: var(--gold-line); } .gm-dot.lv-e { border-color: rgba(255,95,162,.7); } .gm-dot.lv-g { border-color: rgba(178,128,255,.8); }
.gm-list li.done .gm-dot { background: var(--gold); border-color: var(--gold); }
.gm-list li.done .gm-dot.lv-e { background: #FF5FA2; border-color: #FF5FA2; } .gm-list li.done .gm-dot.lv-g { background: #B280FF; border-color: #B280FF; }
.gm-nm { flex: 1; min-width: 0; font-size: 14px; color: var(--text2); } .gm-list li.done .gm-nm { color: var(--text); font-weight: 600; }
.gm-lv { font-style: normal; font-size: 9.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: 2px 5px; border-radius: 4px; background: var(--gold-soft); color: var(--gold); white-space: nowrap; }
.gm-lv.lv-e { background: rgba(255,95,162,.16); color: #FF7DB5; } .gm-lv.lv-g { background: rgba(178,128,255,.2); color: #D9C2FF; }
.gm-stars { display: flex; align-items: center; gap: 2px; margin-top: 3px; flex-wrap: wrap; }
.gm-stars button { background: none; border: 0; padding: 2px 3px; font-size: 18px; line-height: 1; color: var(--dim); cursor: pointer; }
.gm-stars button.on { color: var(--gold); } .gm-stars small { color: var(--muted); font-size: 11.5px; margin-left: 4px; }
.gm-vid { flex: none; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--card2); color: var(--muted); font-size: 11px; text-decoration: none; }
@media (max-width: 480px) { .gm-tiers span { font-size: 7.5px; } .gm-tiers b { font-size: 12px; } }
/* Social Saints: how the block is scored and what the athlete fills (scorerule.js, Nov 11) */
.score-preview { margin: 8px 0 10px; padding: 8px 12px; border-left: 3px solid var(--accent, #06B1CF); background: rgba(6,177,207,.08); border-radius: 6px; font-size: 13px; }
.score-preview p { margin: 0 0 4px; }
.score-preview ul { margin: 4px 0 0; padding-left: 18px; }

/* "Write as text": tap a line of the preview to say what it is (textlearn.js, Nov 12) */
.bt-preview .fixable { cursor: pointer; border-radius: 6px; }
.bt-preview .fixable:hover { background: rgba(212,175,95,.08); }
.fx-menu { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 8px; }
