/* =========================================================
   GUTIANDRES Personal Training · CF-L3 · Athlete coaching platform
   Black · white · muted gold · Manrope (display) + Inter (text)
   ========================================================= */
:root {
  --bg: #101010; --bg2: #141414; --card: #1B1B1B; --card2: #212121; --card3: #282828;
  --line: rgba(255,255,255,.08); --line2: rgba(255,255,255,.14);
  --text: #FFFFFF; --text2: #d9d9d9; --muted: #9b9b9b; --dim: #6a6a6a;
  --gold: #C6A45B; --gold2: #a88a4a; --gold-ink: #101010; --gold-soft: rgba(198,164,91,.10); --gold-line: rgba(198,164,91,.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); }
.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: #C6A45B; border: 1px solid #C6A45B;
  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: #9C8550; border-color: #9C8550; 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; }

.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(198,164,91,.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(198,164,91,.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(198,164,91,.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; }
.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;
  background: radial-gradient(circle at 50% 35%, rgba(198,164,91,.26), transparent 60%), rgba(12,12,12,.97); 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); }
.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; }
/* 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; }
/* 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; }
.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 */
.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-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%; } }
.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(198,164,91,.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: #C6A45B; } .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: #C6A45B; } .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: baseline; gap: 10px; 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); }
/* ---------- 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(198,164,91,.12), rgba(198,164,91,.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(198,164,91,.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-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; }
/* 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: 130px !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: 56px; } /* room for the coach at the bottom corner */
  .wb-l { font-size: 17px; } .wb-block { font-size: 16px; } .wb-title { font-size: 19px; }
  .wb-move, .wb-then, .wb-more, .wb-note { 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; }
}