/*!
 * ZITLAS — Personal Coaching Workspace (assets/css/coaching-workspace.css)
 *
 * Full-screen overlay shared by BOTH the athlete (cprofile) and the coach
 * (expert-dashboard). Injected + driven by components/coaching-workspace.js.
 * Uses the ZITLAS light design system; every var() carries an explicit
 * fallback because host pages define slightly different token sets.
 */

/* ── Overlay shell ── */
.cw-overlay {
  position: fixed; inset: 0; z-index: 10800;
  display: none;
  background: #F4F1EA;
  background: linear-gradient(180deg, #F7F4EC 0%, #F1EEE6 100%);
  flex-direction: column;
  opacity: 0;
  transition: opacity 0.22s ease;
}
.cw-overlay.open { opacity: 1; }

/* ── Header ── */
.cw-header {
  flex-shrink: 0;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(30,41,59,0.08);
  padding: 12px 14px 10px;
  padding-top: calc(12px + env(safe-area-inset-top, 0px));
}
.cw-hdr-row {
  display: flex; align-items: center; gap: 10px;
}
.cw-back {
  width: 36px; height: 36px; flex-shrink: 0;
  border-radius: 50%;
  background: rgba(30,41,59,0.06);
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--text, #1E293B);
}
.cw-back:active { background: rgba(30,41,59,0.12); }
.cw-avatar {
  width: 40px; height: 40px; flex-shrink: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, #6BA539, #578A2C);
  color: #fff; font-weight: 800; font-size: 15px;
  display: flex; align-items: center; justify-content: center;
}
.cw-hdr-info { flex: 1; min-width: 0; }
.cw-hdr-name-row { display: flex; align-items: center; gap: 6px; min-width: 0; }
.cw-hdr-name {
  display: block; font-size: 15px; font-weight: 800;
  color: var(--text, #1E293B);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  min-width: 0;
}
#cwNameBadge { flex-shrink: 0; display: inline-flex; }
.cw-hdr-sub {
  display: flex; align-items: center; gap: 6px;
  font-size: 11.5px; color: var(--text-sec, #64748B); font-weight: 600;
}
.cw-live-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #4CAF50; flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(76,175,80,0.18);
}
.cw-plan-chip {
  flex-shrink: 0;
  padding: 5px 11px; border-radius: 999px;
  background: rgba(107,165,57,0.13);
  border: 1px solid rgba(107,165,57,0.3);
  color: #578A2C; font-size: 11px; font-weight: 800;
  white-space: nowrap;
}

/* Summary strip */
.cw-summary {
  display: flex; gap: 8px; margin-top: 10px;
  overflow-x: auto; scrollbar-width: none;
}
.cw-summary::-webkit-scrollbar { display: none; }
.cw-sum-item {
  flex-shrink: 0;
  background: rgba(255,255,255,0.85);
  border: 1px solid rgba(30,41,59,0.07);
  border-radius: 14px;
  padding: 7px 12px;
  display: flex; flex-direction: column; gap: 1px;
  min-width: 74px;
}
.cw-sum-val { font-size: 13px; font-weight: 800; color: var(--text, #1E293B); white-space: nowrap; }
.cw-sum-lbl { font-size: 10px; font-weight: 700; color: var(--text-sec, #94A3B8); text-transform: uppercase; letter-spacing: 0.4px; white-space: nowrap; }

/* ── Tabs ── */
.cw-tabs {
  flex-shrink: 0;
  display: flex; gap: 6px;
  padding: 10px 14px 2px;
  max-width: 760px; width: 100%; margin: 0 auto;
}
.cw-tab {
  flex: 1;
  padding: 10px 4px;
  border-radius: 14px;
  border: 1px solid transparent;
  background: transparent;
  font-size: 12.5px; font-weight: 700;
  color: var(--text-sec, #64748B);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 5px;
  position: relative;
  transition: background 0.18s, color 0.18s;
}
.cw-tab.active {
  background: rgba(255,255,255,0.95);
  border-color: rgba(30,41,59,0.08);
  color: var(--text, #1E293B);
  box-shadow: 0 6px 18px rgba(30,41,59,0.08);
}
.cw-tab-badge {
  position: absolute; top: 4px; right: 8px;
  min-width: 15px; height: 15px; padding: 0 4px;
  border-radius: 999px;
  background: #E5484D; color: #fff;
  font-size: 9.5px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.cw-lock { font-size: 10px; opacity: 0.7; }

/* ── Body ── */
.cw-body {
  flex: 1; overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 12px 14px calc(24px + env(safe-area-inset-bottom, 0px));
  max-width: 760px; width: 100%; margin: 0 auto;
}
.cw-body.cw-body--chat { padding: 0; display: flex; flex-direction: column; overflow: hidden; }

/* ── Generic cards ── */
.cw-card {
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(30,41,59,0.07);
  border-radius: 20px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 8px 24px rgba(30,41,59,0.05);
}
.cw-card-title {
  font-size: 13px; font-weight: 800; color: var(--text, #1E293B);
  margin: 0 0 12px; display: flex; align-items: center; gap: 7px;
}
.cw-empty {
  text-align: center; padding: 36px 20px;
  color: var(--text-sec, #64748B); font-size: 13px; line-height: 1.6;
}
.cw-empty-icon { font-size: 34px; display: block; margin-bottom: 10px; }

/* ── Overview ── */
.cw-metric-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
}
.cw-metric {
  background: rgba(30,41,59,0.03);
  border-radius: 14px; padding: 10px 8px;
  text-align: center;
}
.cw-metric-val { display: block; font-size: 14.5px; font-weight: 800; color: var(--text, #1E293B); }
.cw-metric-lbl { display: block; font-size: 9.5px; font-weight: 700; color: var(--text-sec, #94A3B8); text-transform: uppercase; letter-spacing: 0.4px; margin-top: 2px; }
.cw-kv-row {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  padding: 8px 0; border-bottom: 1px solid rgba(30,41,59,0.05);
  font-size: 13px;
}
.cw-kv-row:last-child { border-bottom: none; }
.cw-kv-row span { color: var(--text-sec, #64748B); font-weight: 600; flex-shrink: 0; }
.cw-kv-row b { color: var(--text, #1E293B); font-weight: 700; text-align: right; }
.cw-swot-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cw-swot-quad {
  border-radius: 14px; padding: 10px 11px;
  background: rgba(30,41,59,0.03);
}
.cw-swot-quad h4 { margin: 0 0 6px; font-size: 11px; font-weight: 800; }
.cw-swot-quad ul { margin: 0; padding-left: 15px; }
.cw-swot-quad li { font-size: 11.5px; color: var(--text-sec, #475569); line-height: 1.5; margin-bottom: 3px; }
.cw-swot-quad--s h4 { color: #2E7D32; }
.cw-swot-quad--w h4 { color: #C62828; }
.cw-swot-quad--o h4 { color: #1565C0; }
.cw-swot-quad--t h4 { color: #B45309; }

/* ── Day pills (shared by diet + training) ── */
.cw-day-pills {
  display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none;
  margin-bottom: 12px; padding-bottom: 2px;
}
.cw-day-pills::-webkit-scrollbar { display: none; }
.cw-day-pill {
  flex-shrink: 0; padding: 8px 14px;
  border-radius: 999px; border: 1px solid rgba(30,41,59,0.1);
  background: rgba(255,255,255,0.85);
  font-size: 12px; font-weight: 700; color: var(--text-sec, #64748B);
  cursor: pointer;
}
.cw-day-pill.active {
  background: linear-gradient(135deg, #6BA539, #578A2C);
  border-color: transparent; color: #fff;
  box-shadow: 0 6px 16px rgba(107,165,57,0.35);
}
.cw-day-pill .cw-day-dot {
  display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: #E5484D; margin-left: 5px; vertical-align: middle;
}

/* Read-only lock note */
.cw-readonly-note {
  display: flex; align-items: center; gap: 8px;
  background: rgba(30,41,59,0.04);
  border-radius: 14px; padding: 10px 13px;
  font-size: 12px; font-weight: 600; color: var(--text-sec, #64748B);
  margin-bottom: 12px;
}

/* ── Diet: viewer meal card ── */
.cw-meal-card {
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(30,41,59,0.07);
  border-radius: 18px; padding: 14px;
  margin-bottom: 10px;
  box-shadow: 0 6px 18px rgba(30,41,59,0.04);
}
.cw-meal-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.cw-meal-name { font-size: 13.5px; font-weight: 800; color: #578A2C; flex: 1; }
.cw-meal-time { font-size: 11px; font-weight: 700; color: var(--text-sec, #94A3B8); }
.cw-meal-food { font-size: 13.5px; font-weight: 600; color: var(--text, #1E293B); line-height: 1.5; margin: 0 0 4px; }
.cw-meal-macros { font-size: 11.5px; font-weight: 700; color: var(--text-sec, #64748B); margin-bottom: 4px; }
.cw-meal-notes { font-size: 12px; color: var(--text-sec, #64748B); line-height: 1.5; margin: 0 0 8px; font-style: italic; }
.cw-meal-actions { display: flex; gap: 8px; }
.cw-meal-btn {
  flex: 1; padding: 9px 10px;
  border-radius: 12px; font-size: 12px; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.cw-meal-btn--swap {
  background: rgba(107,165,57,0.1);
  border: 1px solid rgba(107,165,57,0.35);
  color: #578A2C;
}
.cw-meal-btn--ask {
  background: transparent;
  border: 1px solid rgba(30,41,59,0.14);
  color: var(--text-sec, #475569);
}
.cw-meal-btn:active { transform: scale(0.97); }
.cw-meal-pending {
  font-size: 11px; font-weight: 700; color: #B45309;
  background: rgba(245,158,11,0.12); border-radius: 999px;
  padding: 3px 9px;
}
.cw-opt-count { font-size: 10.5px; font-weight: 700; color: var(--text-sec, #94A3B8); }

/* ── Diet/Training: editor ── */
.cw-ed-meal {
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(30,41,59,0.08);
  border-radius: 18px; padding: 13px;
  margin-bottom: 10px;
}
.cw-ed-row { display: flex; gap: 8px; margin-bottom: 8px; }
.cw-input, .cw-textarea, .cw-select {
  width: 100%;
  background: rgba(30,41,59,0.035);
  border: 1px solid rgba(30,41,59,0.1);
  border-radius: 11px;
  padding: 9px 11px;
  font-size: 13px; font-family: inherit;
  color: var(--text, #1E293B);
  outline: none;
}
.cw-input:focus, .cw-textarea:focus { border-color: #6BA539; }
.cw-input--sm { max-width: 88px; }
.cw-textarea { resize: vertical; min-height: 40px; }
.cw-ed-meal-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.cw-ed-meal-head .cw-input { font-weight: 700; }
.cw-icon-btn {
  width: 32px; height: 32px; flex-shrink: 0;
  border-radius: 10px; border: 1px solid rgba(30,41,59,0.1);
  background: rgba(255,255,255,0.8);
  color: var(--text-sec, #64748B); font-size: 13px; font-weight: 700;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.cw-icon-btn:active { background: rgba(30,41,59,0.06); }
.cw-icon-btn--danger { color: #D93036; border-color: rgba(229,72,77,0.3); }
.cw-opt-block {
  border: 1px dashed rgba(107,165,57,0.4);
  border-radius: 13px; padding: 9px;
  margin-bottom: 8px;
  background: rgba(107,165,57,0.04);
}
.cw-opt-block-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 6px;
}
.cw-opt-label { font-size: 11px; font-weight: 800; color: #578A2C; text-transform: uppercase; letter-spacing: 0.4px; }
.cw-add-btn {
  width: 100%; padding: 10px;
  border-radius: 13px;
  border: 1.5px dashed rgba(107,165,57,0.5);
  background: rgba(107,165,57,0.05);
  color: #578A2C; font-size: 12.5px; font-weight: 700;
  cursor: pointer; margin-bottom: 10px;
}
.cw-add-btn:active { background: rgba(107,165,57,0.12); }
.cw-req-banner {
  background: rgba(245,158,11,0.1);
  border: 1px solid rgba(245,158,11,0.35);
  border-radius: 14px; padding: 10px 13px;
  font-size: 12.5px; font-weight: 600; color: #92600A;
  margin-bottom: 10px; line-height: 1.5;
}

/* Save bar */
.cw-save-bar {
  position: sticky; bottom: 0;
  display: flex; gap: 8px;
  padding: 10px 0 4px;
  background: linear-gradient(180deg, rgba(241,238,230,0), rgba(241,238,230,0.96) 35%);
}
.cw-save-btn {
  flex: 1; padding: 13px;
  border-radius: 15px; border: none; cursor: pointer;
  background: linear-gradient(135deg, #6BA539, #578A2C);
  color: #fff; font-size: 14px; font-weight: 800;
  box-shadow: 0 10px 26px rgba(107,165,57,0.35);
}
.cw-save-btn:disabled { opacity: 0.55; box-shadow: none; }
.cw-save-btn:active { transform: scale(0.98); }
.cw-ghost-btn {
  padding: 13px 16px;
  border-radius: 15px; cursor: pointer;
  background: rgba(255,255,255,0.9);
  border: 1px solid rgba(30,41,59,0.12);
  color: var(--text, #1E293B); font-size: 13px; font-weight: 700;
}

/* ── Training viewer ── */
.cw-ex-row {
  display: flex; align-items: baseline; gap: 10px;
  padding: 9px 0; border-bottom: 1px solid rgba(30,41,59,0.05);
}
.cw-ex-row:last-child { border-bottom: none; }
.cw-ex-num {
  width: 22px; height: 22px; flex-shrink: 0; align-self: center;
  border-radius: 50%; background: rgba(107,165,57,0.12);
  color: #578A2C; font-size: 11px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.cw-ex-info { flex: 1; min-width: 0; }
.cw-ex-name { display: block; font-size: 13.5px; font-weight: 700; color: var(--text, #1E293B); }
.cw-ex-meta { display: block; font-size: 11.5px; font-weight: 600; color: var(--text-sec, #64748B); margin-top: 1px; }
.cw-ex-notes { display: block; font-size: 11.5px; color: var(--text-sec, #64748B); font-style: italic; margin-top: 2px; }
.cw-rest-day {
  text-align: center; padding: 26px;
  font-size: 14px; font-weight: 700; color: var(--text-sec, #64748B);
}

/* ── Chat tab ── */
.cw-chat-msgs {
  flex: 1; overflow-y: auto;
  padding: 14px 14px 6px;
  display: flex; flex-direction: column; gap: 4px;
}
.cw-bubble {
  max-width: 78%; padding: 9px 13px;
  border-radius: 16px;
  font-size: 13.5px; line-height: 1.45;
  word-wrap: break-word; white-space: pre-wrap;
}
.cw-bubble--me {
  align-self: flex-end;
  background: linear-gradient(135deg, #6BA539, #578A2C);
  color: #fff; border-bottom-right-radius: 5px;
}
.cw-bubble--them {
  align-self: flex-start;
  background: rgba(255,255,255,0.95);
  border: 1px solid rgba(30,41,59,0.07);
  color: var(--text, #1E293B); border-bottom-left-radius: 5px;
}
.cw-bubble-ts { display: block; font-size: 9.5px; opacity: 0.65; margin-top: 3px; text-align: right; }
.cw-bubble img {
  max-width: 100%; border-radius: 10px; display: block; margin-bottom: 4px;
  cursor: pointer;
}
.cw-chat-bar {
  flex-shrink: 0;
  display: flex; align-items: flex-end; gap: 8px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
  background: rgba(255,255,255,0.94);
  border-top: 1px solid rgba(30,41,59,0.07);
}
.cw-chat-input {
  flex: 1;
  background: rgba(30,41,59,0.04);
  border: 1px solid rgba(30,41,59,0.1);
  border-radius: 20px; padding: 10px 14px;
  font-size: 13.5px; font-family: inherit;
  color: var(--text, #1E293B);
  resize: none; max-height: 92px; outline: none;
}
.cw-chat-send {
  width: 40px; height: 40px; flex-shrink: 0;
  border-radius: 50%; border: none; cursor: pointer;
  background: linear-gradient(135deg, #6BA539, #578A2C);
  color: #fff; display: flex; align-items: center; justify-content: center;
}
.cw-chat-attach {
  width: 38px; height: 38px; flex-shrink: 0;
  border-radius: 50%; cursor: pointer;
  background: rgba(30,41,59,0.05);
  border: 1px solid rgba(30,41,59,0.1);
  color: var(--text-sec, #64748B);
  display: flex; align-items: center; justify-content: center;
}
.cw-chat-locked {
  flex-shrink: 0; text-align: center;
  padding: 12px calc(12px + env(safe-area-inset-bottom, 0px));
  background: rgba(255,255,255,0.94);
  border-top: 1px solid rgba(30,41,59,0.07);
  font-size: 12.5px; font-weight: 700; color: var(--text-sec, #64748B);
}

/* ── Bottom sheet (option picker / ask expert / history) ── */
.cw-sheet-backdrop {
  position: fixed; inset: 0; z-index: 11600;
  background: rgba(30,41,59,0.5);
  backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px);
  display: none; align-items: flex-end; justify-content: center;
  opacity: 0; transition: opacity 0.2s ease;
}
.cw-sheet-backdrop.open { opacity: 1; }
.cw-sheet {
  background: rgba(255,255,255,0.97);
  border-radius: 24px 24px 0 0;
  padding: 18px 16px calc(18px + env(safe-area-inset-bottom, 0px));
  width: 100%; max-width: 560px;
  max-height: 78vh; overflow-y: auto;
  transform: translateY(30px);
  transition: transform 0.22s ease;
  box-shadow: 0 -18px 60px rgba(30,41,59,0.25);
}
.cw-sheet-backdrop.open .cw-sheet { transform: translateY(0); }
.cw-sheet-title { font-size: 15px; font-weight: 800; color: var(--text, #1E293B); margin: 0 0 4px; }
.cw-sheet-sub { font-size: 12px; color: var(--text-sec, #64748B); margin: 0 0 14px; line-height: 1.5; }
.cw-opt-choice {
  display: block; width: 100%; text-align: left;
  background: rgba(30,41,59,0.03);
  border: 1.5px solid rgba(30,41,59,0.08);
  border-radius: 15px; padding: 12px 13px;
  margin-bottom: 9px; cursor: pointer;
  font-family: inherit;
}
.cw-opt-choice.selected {
  border-color: #6BA539;
  background: rgba(107,165,57,0.08);
}
.cw-opt-choice-label { display: block; font-size: 10.5px; font-weight: 800; color: #578A2C; text-transform: uppercase; letter-spacing: 0.4px; margin-bottom: 3px; }
.cw-opt-choice-name { display: block; font-size: 13.5px; font-weight: 700; color: var(--text, #1E293B); line-height: 1.4; }
.cw-opt-choice-meta { display: block; font-size: 11.5px; font-weight: 600; color: var(--text-sec, #64748B); margin-top: 3px; }
.cw-ver-row {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 4px; border-bottom: 1px solid rgba(30,41,59,0.06);
  font-size: 12.5px;
}
.cw-ver-row:last-child { border-bottom: none; }
.cw-ver-info { flex: 1; }
.cw-ver-date { display: block; font-weight: 700; color: var(--text, #1E293B); }
.cw-ver-by { display: block; font-size: 11px; color: var(--text-sec, #64748B); margin-top: 1px; }
.cw-ver-restore {
  padding: 7px 13px; border-radius: 10px; cursor: pointer;
  background: rgba(107,165,57,0.1); border: 1px solid rgba(107,165,57,0.35);
  color: #578A2C; font-size: 11.5px; font-weight: 700;
}

/* ── Meal Check-In / Daily Meal Compliance ── */
.meal-coach-row {
  padding: 0 18px 14px 74px; /* aligns under meal-info, past the icon circle */
  display: flex; flex-direction: column; gap: 8px;
}
.pc-checkin-btn { width: 100%; }
.pc-checkin-thumb {
  width: 100%; max-height: 220px; object-fit: cover;
  border-radius: 14px; cursor: pointer;
}
.pc-checkin-pending {
  font-size: 12px; font-weight: 700; color: #92600A;
  background: rgba(245,158,11,0.12); border-radius: 12px;
  padding: 8px 12px;
}
.pc-checkin-feedback {
  background: rgba(107,165,57,0.07);
  border: 1px solid rgba(107,165,57,0.25);
  border-radius: 14px; padding: 10px 13px;
}
.pc-checkin-reaction { font-size: 13px; font-weight: 800; color: var(--text, #1E293B); margin-right: 8px; }
.pc-checkin-score { font-size: 12.5px; font-weight: 800; color: #578A2C; }
.pc-checkin-comment { font-size: 12.5px; color: var(--text-sec, #475569); margin: 6px 0 0; line-height: 1.5; }
.cw-daily-score {
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(255,255,255,0.85);
  border: 1px solid rgba(30,41,59,0.07);
  border-radius: 14px; padding: 10px 14px;
  margin-bottom: 10px; font-size: 12.5px; font-weight: 700;
  color: var(--text, #1E293B);
}
.cw-daily-score b { color: #578A2C; }
.cw-coverage-row { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.cw-coverage-chip {
  flex: 1; min-width: 76px; text-align: center;
  padding: 8px 6px; border-radius: 12px;
  background: rgba(30,41,59,0.03);
  font-size: 11px; font-weight: 700; color: var(--text-sec, #64748B);
}
.cw-coverage-chip.done { background: rgba(107,165,57,0.1); color: #578A2C; }
.cw-coverage-chip.missing { background: rgba(229,72,77,0.08); color: #D93036; }
.cw-review-card {
  display: flex; gap: 11px; align-items: center;
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(30,41,59,0.07);
  border-radius: 16px; padding: 10px; margin-bottom: 9px;
  cursor: pointer;
}
.cw-review-thumb { width: 54px; height: 54px; border-radius: 12px; object-fit: cover; flex-shrink: 0; }
.cw-review-info { flex: 1; min-width: 0; }
.cw-review-title { display: block; font-size: 13px; font-weight: 800; color: var(--text, #1E293B); }
.cw-review-sub { display: block; font-size: 11.5px; color: var(--text-sec, #64748B); margin-top: 2px; }
.cw-review-status {
  flex-shrink: 0; font-size: 10.5px; font-weight: 800;
  padding: 4px 9px; border-radius: 999px;
}
.cw-review-status--pending { background: rgba(245,158,11,0.14); color: #92600A; }
.cw-review-status--done { background: rgba(107,165,57,0.12); color: #578A2C; }
.cw-review-sec-title { font-size: 11px; font-weight: 800; color: var(--text-sec, #94A3B8); text-transform: uppercase; letter-spacing: 0.5px; margin: 14px 0 8px; }
.cw-review-sec-title:first-child { margin-top: 0; }
.cw-review-img-lg { width: 100%; max-height: 44vh; object-fit: cover; border-radius: 16px; margin-bottom: 12px; }
.cw-reaction-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.cw-reaction-btn {
  padding: 11px 8px; border-radius: 13px; cursor: pointer;
  background: rgba(30,41,59,0.03); border: 1.5px solid rgba(30,41,59,0.08);
  font-size: 12.5px; font-weight: 700; color: var(--text, #1E293B);
}
.cw-reaction-btn.selected { border-color: #6BA539; background: rgba(107,165,57,0.1); }
.cw-score-label { font-size: 11px; font-weight: 800; color: var(--text-sec, #94A3B8); text-transform: uppercase; letter-spacing: 0.4px; margin-bottom: 8px; display: block; }
.cw-week-stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 16px; }
.cw-week-stat {
  background: rgba(30,41,59,0.03); border-radius: 14px; padding: 12px;
  display: flex; flex-direction: column; gap: 3px;
}
.cw-week-stat-label { font-size: 10.5px; font-weight: 700; color: var(--text-sec, #94A3B8); text-transform: uppercase; }
.cw-week-stat-val { font-size: 18px; font-weight: 900; color: var(--text, #1E293B); }
.cw-workout-reviews { margin-top: 16px; }
.cw-workout-ex-list { margin-bottom: 14px; }
.cw-workout-ex-row {
  padding: 9px 12px; border-radius: 10px; margin-bottom: 6px;
  background: rgba(30,41,59,0.03); font-size: 13px; font-weight: 600; color: var(--text, #1E293B);
}
.cw-workout-ex-meta { color: var(--text-sec, #94A3B8); font-weight: 500; }
.cw-score-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-bottom: 14px; }
.cw-score-btn {
  padding: 10px 0; border-radius: 11px; cursor: pointer; text-align: center;
  background: rgba(30,41,59,0.03); border: 1.5px solid rgba(30,41,59,0.08);
  font-size: 13px; font-weight: 800; color: var(--text, #1E293B);
}
.cw-score-btn.selected { border-color: #6BA539; background: #6BA539; color: #fff; }

/* ── Medical profile / sticky warning ── */
.cw-med-banner {
  flex-shrink: 0;
  margin: 8px 14px 0;
  max-width: 760px; width: calc(100% - 28px);
  align-self: center;
  border-radius: 14px;
  padding: 10px 14px;
  font-size: 12.5px; font-weight: 700; line-height: 1.5;
}
.cw-med-banner--critical { background: rgba(229,72,77,0.1); border: 1.5px solid rgba(229,72,77,0.4); color: #B3261E; }
.cw-med-banner--moderate { background: rgba(245,158,11,0.1); border: 1.5px solid rgba(245,158,11,0.4); color: #92600A; }
.cw-med-banner--minor    { background: rgba(107,165,57,0.1); border: 1.5px solid rgba(107,165,57,0.4); color: #578A2C; }
.cw-med-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 11px; border-radius: 999px;
  font-size: 11.5px; font-weight: 800;
  margin: 0 6px 6px 0;
}
.cw-med-badge--critical { background: rgba(229,72,77,0.12); color: #B3261E; border: 1px solid rgba(229,72,77,0.35); }
.cw-med-badge--moderate { background: rgba(245,158,11,0.12); color: #92600A; border: 1px solid rgba(245,158,11,0.35); }
.cw-med-badge--minor    { background: rgba(107,165,57,0.12); color: #578A2C; border: 1px solid rgba(107,165,57,0.35); }
.cw-med-badge--healthy  { background: rgba(107,165,57,0.12); color: #578A2C; border: 1px solid rgba(107,165,57,0.35); }
.cw-med-list { margin: 0; padding-left: 18px; }
.cw-med-list li { font-size: 12.5px; color: var(--text-sec, #64748B); line-height: 1.6; margin-bottom: 3px; }
.cw-chat-pin {
  flex-shrink: 0;
  margin: 10px 14px 0;
  background: rgba(255,255,255,0.94);
  border: 1.5px solid rgba(245,158,11,0.4);
  border-radius: 14px; padding: 10px 13px;
  font-size: 12px; color: var(--text-sec, #64748B); line-height: 1.6;
}
.cw-chat-pin b { color: var(--text, #1E293B); }
.cw-stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.cw-stat-chip {
  background: rgba(255,255,255,0.9);
  border: 1px solid rgba(30,41,59,0.07);
  border-radius: 14px; padding: 10px 8px; text-align: center;
}
.cw-stat-chip b { display: block; font-size: 15px; font-weight: 800; color: #578A2C; }
.cw-stat-chip span { display: block; font-size: 9.5px; font-weight: 700; color: var(--text-sec, #94A3B8); text-transform: uppercase; letter-spacing: 0.4px; margin-top: 2px; }

/* ── Toast ── */
.cw-toast {
  position: fixed; left: 50%; bottom: 90px; z-index: 12500;
  transform: translateX(-50%) translateY(12px);
  background: rgba(30,41,59,0.93);
  color: #fff; font-size: 13px; font-weight: 600;
  padding: 11px 18px; border-radius: 14px;
  max-width: 86vw; text-align: center; line-height: 1.45;
  opacity: 0; pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}
.cw-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Desktop */
@media (min-width: 761px) {
  .cw-header > * { max-width: 760px; margin-left: auto; margin-right: auto; }
  .cw-sheet { border-radius: 24px; margin-bottom: 5vh; }
  .cw-sheet-backdrop { align-items: center; }
}
@media (prefers-reduced-motion: reduce) {
  .cw-overlay, .cw-sheet, .cw-sheet-backdrop, .cw-toast { transition: none; }
}
