@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Arabic:wght@400;500;600;700&family=Manrope:wght@400;500;600;700;800&display=swap');

/* OM Workouts / Coach workspace
   Quiet surfaces, deliberate type, and one clear action at a time. */
:root {
  --bg: #f5f5f0;
  --panel: #fff;
  --ink: #202724;
  --muted: #687168;
  --line: #e4e7df;
  --line-strong: #ccd5c7;
  --green: #5b7757;
  --forest: #202724;
  --lime: #bdda9f;
  --mint: #f0f4eb;
  --orange: #93672d;
  --blue: #506c80;
  --radius: 16px;
  --shadow: 0 2px 5px rgb(32 39 36 / 2%);
  --sidebar-width: 244px;
  --gutter: 36px;
  --font-ar: 'IBM Plex Sans Arabic', 'Noto Sans Arabic', sans-serif;
  --font-number: 'Manrope', 'IBM Plex Sans Arabic', sans-serif;
  --ease-out: cubic-bezier(.2, .7, .2, 1);
  color: var(--ink);
  background: var(--bg);
  font-family: var(--font-ar);
  font-synthesis: none;
  color-scheme: light;
}

/* Foundations */
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; font-size: 14px; line-height: 1.75; }
button, input, select, textarea { font: inherit; letter-spacing: normal; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
button { padding: 0; border: 0; background: none; color: inherit; cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .48; }
a { color: inherit; text-decoration: none; }
button svg, a svg { pointer-events: none; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { letter-spacing: normal; }
h1 { font-size: 32px; font-weight: 600; line-height: 1.4; }
h2 { font-size: 18px; font-weight: 600; line-height: 1.6; }
h3 { font-size: 16px; font-weight: 600; line-height: 1.7; }
b, strong { font-weight: 600; }
small { font-size: 12px; }
input, select, textarea { max-width: 100%; }
input::placeholder, textarea::placeholder { color: #7c8579; opacity: 1; }
:focus-visible { outline: 3px solid #789669; outline-offset: 3px; }
::selection { background: #dcebcf; color: var(--ink); }
.mono, .number, [dir='ltr'], input[type='number'] {
  font-family: var(--font-number);
  font-variant-numeric: tabular-nums;
}
svg.icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: middle;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: fixed;
  top: -100px;
  inset-inline-start: 20px;
  z-index: 200;
  padding: 12px 20px;
  border-radius: 8px;
  background: var(--ink);
  color: white;
}
.skip-link:focus { top: 16px; }

/* Frame and navigation */
.app-shell { min-height: 100vh; }
.main-shell {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 100vh;
  margin-inline-start: var(--sidebar-width);
}
main {
  flex: 1;
  width: 100%;
  max-width: 1560px;
  min-width: 0;
  margin: 0 auto;
  padding: 34px var(--gutter) 20px;
}
.page-view, .macro-snapshot, #weight-preview { min-width: 0; }
.sidebar {
  position: fixed;
  z-index: 30;
  inset-block: 0;
  inset-inline-start: 0;
  display: flex;
  flex-direction: column;
  width: var(--sidebar-width);
  padding: 32px 20px 22px;
  overflow-y: auto;
  border-inline-end: 1px solid var(--line);
  background: var(--panel);
}
.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 56px;
  margin-bottom: 32px;
  direction: ltr;
}
.brand-mark {
  position: relative;
  padding-right: 6px;
  transform: skew(-8deg);
  font-family: var(--font-number);
  font-size: 42px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -5px;
}
.brand-mark > span {
  position: absolute;
  right: -2px;
  bottom: -8px;
  width: 17px;
  height: 4px;
  background: var(--lime);
}
.brand-name {
  font-family: var(--font-number);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.7;
  letter-spacing: 1.5px;
}
.brand-name small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0;
}
.workspace-label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  margin-bottom: 28px;
  border: 1px solid var(--line);
  border-radius: 11px;
  font-size: 13px;
  font-weight: 500;
}
.workspace-symbol {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 9px;
  background: var(--mint);
  color: var(--green);
  font-family: var(--font-number);
  font-size: 15px;
  font-weight: 700;
}
.workspace-label small { display: block; color: var(--muted); font-size: 11px; font-weight: 400; }
.workspace-dot, .profile-dot {
  width: 6px;
  height: 6px;
  flex-shrink: 0;
  margin-inline-start: auto;
  border-radius: 50%;
  background: #86a571;
}
.nav-caption { padding-inline: 14px; margin-bottom: 10px; color: var(--muted); font-size: 11px; }
.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  padding: 11px 14px;
  margin: 4px 0;
  border-radius: 9px;
  color: #626b60;
  font-size: 14px;
  font-weight: 400;
  text-align: start;
  transition: background 160ms ease, color 160ms ease;
}
.nav-item.active { background: var(--mint); color: #3c5739; font-weight: 600; }
.nav-item.active::before {
  content: '';
  position: absolute;
  inset-inline-start: 0;
  width: 3px;
  height: 21px;
  border-radius: 3px;
  background: var(--green);
}
.nav-item .icon { width: 19px; height: 19px; }
.nav-badge {
  display: grid;
  place-items: center;
  min-width: 25px;
  min-height: 23px;
  padding: 1px 7px;
  margin-inline-start: auto;
  border-radius: 6px;
  background: #fff;
  color: var(--green);
  font-family: var(--font-number);
  font-size: 11px;
  font-weight: 600;
}
.sidebar-note {
  padding: 21px 17px;
  margin-top: 32px;
  border: 1px solid #e7ebdf;
  border-radius: 12px;
  background: #f6f8f1;
}
.sidebar-note strong { display: block; color: #4d5e45; font-size: 17px; font-weight: 500; line-height: 1.8; }
.sidebar-note p { margin-top: 12px; color: var(--muted); font-size: 12px; line-height: 1.9; }
.sidebar-bottom { padding-top: 28px; margin-top: auto; }
.help-button { margin-bottom: 18px; font-size: 13px; }
.coach-profile { display: flex; align-items: center; gap: 11px; padding: 21px 2px 0; border-top: 1px solid var(--line); }
.coach-profile strong { font-family: var(--font-number); font-size: 13px; font-weight: 700; }
.coach-profile small { display: block; color: var(--muted); font-family: var(--font-number); font-size: 11px; }
.avatar {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 10px;
  background: #edf2e7;
  color: #59734c;
  font-family: var(--font-number);
  font-size: 11px;
  font-weight: 700;
}
.coach-avatar { width: 38px; height: 38px; background: var(--ink); color: var(--lime); }
.avatar.sage { background: #edf2e7; color: #59734c; }
.avatar.clay { background: #f4eee6; color: #856b4f; }
.avatar.blue { background: #edf1f4; color: #5d7489; }
.avatar.lilac { background: #f0edf4; color: #79668d; }

/* Header and actions */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 78px;
  padding: 16px var(--gutter);
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.breadcrumb { display: flex; align-items: center; gap: 12px; min-width: 0; color: var(--muted); font-size: 12px; }
.breadcrumb .icon { width: 13px; height: 13px; color: #8a9486; }
.breadcrumb strong { color: #414b3e; font-size: 13px; font-weight: 500; }
.topbar-end { display: flex; align-items: center; gap: 18px; }
.demo-label { display: inline-flex; align-items: center; gap: 7px; color: var(--green); font-size: 11px; line-height: 1.8; white-space: nowrap; }
.demo-label i { width: 5px; height: 5px; flex-shrink: 0; border-radius: 50%; background: #7b996a; }
.topbar .demo-label { padding: 4px 10px; border-radius: 6px; background: #f2f5ed; }
.topbar-separator { width: 1px; height: 20px; background: var(--line); }
.today { color: var(--muted); font-size: 12px; white-space: nowrap; }
.top-avatar { width: 33px; height: 33px; border: 1px solid #dfe6d7; border-radius: 50%; background: #f5f7f0; color: var(--green); font-size: 11px; }
.page-title { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.page-title > div:first-child { min-width: 0; }
.page-title p { margin-top: 5px; color: var(--muted); font-size: 14px; line-height: 1.8; }
.title-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 17px;
  border: 1px solid transparent;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.6;
  white-space: nowrap;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms var(--ease-out);
}
.btn .icon { width: 18px; height: 18px; }
.btn-primary { border-color: var(--ink); background: var(--ink); color: #fff; }
.btn-outline { border-color: var(--line-strong); background: #fff; color: #485342; }
.btn-light { border-color: var(--lime); background: var(--lime); color: #273422; }
.btn-small { min-height: 36px; padding: 7px 12px; font-size: 12px; }
.btn:not(:disabled):active { transform: translateY(0) scale(.99); }
.text-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 36px; padding: 6px 0; color: var(--green); font-size: 12px; font-weight: 500; white-space: nowrap; }
.text-button .icon { width: 15px; height: 15px; transition: transform 160ms ease; }

/* Cards and main grid */
.panel {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 23px 24px 18px; }
.panel-heading > div { min-width: 0; }
.panel-heading p { margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.8; }
.panel-title-line { display: flex; align-items: center; gap: 10px; }
.count-badge { display: inline-grid; place-items: center; min-width: 26px; min-height: 24px; padding: 2px 7px; border-radius: 6px; background: var(--mint); color: var(--green); font-family: var(--font-number); font-size: 11px; font-weight: 600; }
.panel-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 11px 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.panel-footer .icon { width: 15px; height: 15px; color: #7c8b71; }
.overview-grid, .bottom-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(300px, 1fr); gap: 22px; }
.bottom-grid { margin-top: 22px; }

/* One focused hero and one quiet metrics strip */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 282px;
  align-items: center;
  gap: 32px;
  min-height: 254px;
  padding: 31px 34px;
  margin-bottom: 24px;
  overflow: hidden;
  border: 1px solid #202724;
  border-radius: var(--radius);
  background: var(--forest);
  color: white;
}
.hero-copy, .hero-content { min-width: 0; }
.hero h2 { margin: 0 0 13px; color: #f3f5ed; font-size: 36px; font-weight: 500; line-height: 1.45; letter-spacing: normal; }
.hero h2 span { color: inherit; }
.hero p { max-width: 480px; color: #bdc6ba; font-size: 13px; line-height: 1.85; }
.hero .btn { margin-top: 21px; }
.hero-progress { display: flex; align-items: center; justify-content: center; gap: 19px; min-width: 0; padding-inline-start: 28px; border-inline-start: 1px solid rgb(255 255 255 / 12%); }
.ring-wrap { position: relative; flex-shrink: 0; }
.progress-ring { display: block; width: 120px; height: 120px; flex-shrink: 0; transform: rotate(-90deg); }
.progress-ring circle { fill: none; stroke-width: 4; }
.progress-ring .ring-bg { stroke: rgb(255 255 255 / 12%); }
.progress-ring .ring-value { stroke: var(--lime); stroke-linecap: round; transition: stroke-dasharray 650ms var(--ease-out); }
.ring-text { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring-text strong { font-family: var(--font-number); font-size: 27px; font-weight: 600; line-height: 1.45; direction: ltr; white-space: nowrap; }
.ring-text > span { max-width: 110px; color: #bdc6b8; font-size: 11px; line-height: 1.5; }
.hero-progress-copy { min-width: 0; }
.hero-progress-copy strong { display: block; margin-bottom: 6px; color: #eef2e9; font-size: 13px; font-weight: 500; }
.hero-progress-copy p { font-size: 12px; }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 24px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}
.stat-card { min-width: 0; width: 100%; min-height: 144px; padding: 21px 23px 19px; background: transparent; text-align: start; transition: background 160ms ease; }
.stat-card + .stat-card { border-inline-start: 1px solid var(--line); }
.stat-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 30px; color: #5f685a; font-size: 12px; line-height: 1.5; }
.stat-top > span:first-child { min-width: 0; }
.stat-icon { display: grid; place-items: center; width: 31px; height: 31px; flex-shrink: 0; border-radius: 8px; background: #f2f5ed; color: #69815a; transition: transform 160ms ease; }
.stat-icon .icon { width: 17px; height: 17px; }
.stat-icon.amber { background: #f8f2e7; color: #9c783e; }
.stat-icon.blue { background: #eef2f5; color: #607c92; }
.stat-icon.green { background: #eef4e9; color: #648155; }
.stat-number { margin: 9px 0 3px; font-family: var(--font-number); font-size: 32px; font-weight: 600; line-height: 1.3; letter-spacing: -.5px; }
.stat-bottom { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.stat-bottom > span:first-child { flex: 1; min-width: 0; }
.stat-bottom .icon, .stat-arrow { width: 15px; height: 15px; margin-inline-start: auto; color: #8a987b; transition: transform 160ms ease; }
.mini-line { display: none; }

/* Review table */
.table-wrap { max-width: 100%; overflow-x: auto; overscroll-behavior-inline: contain; }
table { width: 100%; border-collapse: collapse; white-space: nowrap; text-align: start; }
th { padding: 12px 20px; border-block: 1px solid #edf0e8; background: #fafbf7; color: #6c7465; font-size: 11px; font-weight: 500; text-align: start; }
td { height: 74px; padding: 14px 20px; border-bottom: 1px solid #edf0e8; color: #47503f; font-size: 13px; vertical-align: middle; }
tbody tr { transition: background 140ms ease; }
tbody tr:last-child td { border-bottom: 0; }
.compact-table th, .compact-table td { padding-inline: 18px; }
.person-cell { display: flex; align-items: center; gap: 11px; }
.person-cell strong { display: block; color: var(--ink); font-size: 13px; font-weight: 500; }
.person-cell small { display: block; margin-top: 2px; color: #798172; font-family: var(--font-number); font-size: 11px; letter-spacing: .15px; }
.status { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border: 1px solid transparent; border-radius: 6px; font-size: 11px; font-weight: 500; line-height: 1.5; white-space: nowrap; }
.status::before { content: ''; width: 4px; height: 4px; flex-shrink: 0; border-radius: 50%; background: currentColor; }
.status.pending { border-color: #f4ead4; background: #faf3e6; color: #90682e; }
.status.incomplete { border-color: #f3e5db; background: #faf0e9; color: #9c6145; }
.status.reviewed { border-color: #e1ecd9; background: #eef5e9; color: #587949; }
.table-action { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; color: var(--green); font-size: 12px; font-weight: 500; white-space: nowrap; }
.table-action .icon { width: 14px; height: 14px; transition: transform 160ms ease; }

/* Weekly rhythm */
.schedule-preview { padding: 0 23px 22px; }
.days-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 3px; }
.day-tile { min-width: 0; padding: 15px 4px 12px; border: 1px solid var(--line); border-radius: 9px; color: #66715a; font-size: 11px; text-align: center; transition: background 160ms ease, border-color 160ms ease; }
.day-tile strong { display: block; margin: 7px 0 3px; color: var(--ink); font-family: var(--font-number); font-size: 26px; font-weight: 500; line-height: 1.4; }
.day-dots { display: flex; justify-content: center; gap: 3px; height: 4px; margin-top: 8px; }
.day-dots i { width: 4px; height: 4px; border-radius: 50%; background: #a7be92; }
.schedule-policy { display: flex; align-items: flex-start; gap: 9px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; line-height: 1.9; }
.schedule-policy .icon { width: 16px; height: 16px; margin-top: 4px; color: #8a9e79; }
.off-days { display: flex; align-items: center; justify-content: space-between; gap: 9px; margin-top: 15px; padding: 10px 12px; border-radius: 7px; background: #f6f7f2; color: #73806a; font-size: 11px; }
.off-days b { font-family: var(--font-number); font-size: 11px; font-weight: 500; }

/* Charts and nutrition summary */
.chart-card .panel-heading { padding-bottom: 13px; }
.chart-select { max-width: 160px; min-height: 36px; padding: 6px 9px; border: 1px solid var(--line); border-radius: 7px; background: white; color: #5c684c; font-size: 11px; }
.chart-description { display: flex; align-items: center; gap: 18px; padding-inline: 24px; color: #77806d; font-size: 11px; }
.chart-legend { display: inline-flex; align-items: center; gap: 7px; }
.chart-legend i { width: 6px; height: 6px; border-radius: 50%; background: #7f9e65; }
.chart-summary { display: flex; align-items: baseline; gap: 9px; padding: 8px 24px 1px; }
.chart-summary strong { font-family: var(--font-number); font-size: 32px; font-weight: 600; line-height: 1.5; letter-spacing: -.5px; }
.chart-summary small { color: #7d8573; font-size: 12px; }
.chart-summary .delta { margin-inline-start: 5px; padding: 3px 7px; border-radius: 5px; background: #f0f5e9; color: #62844e; font-family: var(--font-number); font-size: 11px; }
.weight-chart { display: block; width: 100%; height: 184px; margin: 2px 0 4px; font-family: var(--font-number); }
.weight-chart text { fill: #6d776d; font-size: 11px; }
.chart-footnote { padding: 0 24px 20px; color: #748069; font-size: 11px; line-height: 1.8; }
.chart-placeholder { display: grid; place-items: center; min-height: 184px; padding: 24px; color: var(--muted); font-size: 13px; }
.segmented { display: inline-flex; gap: 3px; padding: 3px; border: 1px solid var(--line); border-radius: 8px; background: #f4f6ef; }
.segmented button { min-height: 31px; padding: 4px 12px; border-radius: 5px; color: #748067; font-size: 11px; white-space: nowrap; transition: color 160ms ease, background 160ms ease, box-shadow 160ms ease; }
.segmented button.selected { background: white; color: #476333; box-shadow: 0 1px 3px rgb(42 57 26 / 8%); }
.macro-mini { display: flex; align-items: center; gap: 21px; padding: 9px 24px 24px; }
.donut { position: relative; display: grid; place-items: center; width: 124px; height: 124px; flex-shrink: 0; border-radius: 50%; background: #eef1e9; }
.donut::before { content: ''; position: absolute; width: 98px; height: 98px; border-radius: 50%; background: white; }
.donut > span { position: relative; display: block; text-align: center; line-height: 1.5; }
.donut strong { display: block; font-family: var(--font-number); font-size: 23px; font-weight: 700; letter-spacing: -.6px; }
.donut small { color: #77806a; font-family: var(--font-number); font-size: 11px; }
.macro-legend { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: 14px; }
.macro-line { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; }
.macro-line i { width: 6px; height: 6px; flex-shrink: 0; border-radius: 2px; }
.macro-line b { margin-inline-start: auto; color: var(--ink); font-family: var(--font-number); font-size: 12px; font-weight: 600; white-space: nowrap; }
.macro-mini-note { padding: 0 24px 18px; color: #738069; font-size: 11px; line-height: 1.8; }

/* Search, filters and athletes */
.filters { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 22px; }
.search-box { display: flex; align-items: center; gap: 10px; width: 290px; max-width: 100%; min-height: 45px; padding: 9px 13px; border: 1px solid var(--line-strong); border-radius: 9px; background: white; color: #7f8b6f; transition: border-color 160ms ease, box-shadow 160ms ease; }
.search-box .icon { width: 18px; height: 18px; }
.search-box input { min-width: 0; width: 100%; border: 0; outline: none; background: transparent; color: var(--ink); font-size: 13px; }
.search-box input:focus-visible { outline: none; }
.search-box:focus-within { border-color: #8da97b; box-shadow: 0 0 0 3px rgb(141 169 123 / 14%); }
.filter-select { min-height: 45px; padding: 9px 12px; border: 1px solid var(--line-strong); border-radius: 9px; background: white; color: #5f6d50; font-size: 12px; }
.filter-chips { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.chip { min-height: 39px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 7px; background: white; color: #6b755a; font-size: 12px; line-height: 1.6; transition: background 160ms ease, border-color 160ms ease, color 160ms ease; }
.chip.selected { border-color: #ccdcbc; background: #edf4e6; color: #527638; }
.section-note { display: flex; align-items: flex-start; gap: 10px; padding: 16px 18px; margin-bottom: 23px; border: 1px solid #e0e8d6; border-radius: 11px; background: #f0f4ea; color: #657153; font-size: 12px; line-height: 1.9; }
.section-note .icon { width: 18px; height: 18px; margin-top: 3px; }
.empty-state { padding: 64px 24px; color: var(--muted); text-align: center; }
.empty-state .icon { width: 34px; height: 34px; margin-bottom: 13px; }
.empty-state strong { display: block; margin-bottom: 6px; color: var(--ink); font-size: 17px; font-weight: 500; }
.empty-state p { font-size: 13px; }
.player-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.player-card { position: relative; padding: 24px; }
.player-card-top { display: flex; align-items: center; gap: 12px; }
.player-card-top > span { min-width: 0; }
.player-card .avatar { width: 42px; height: 42px; border-radius: 11px; }
.player-card-top strong { display: block; font-size: 15px; font-weight: 500; overflow-wrap: anywhere; }
.player-card-top small { color: #7c866f; font-family: var(--font-number); font-size: 11px; }
.goal-tag { display: inline-block; margin-top: 19px; padding: 4px 9px; border-radius: 5px; background: #f5f7f0; color: #71805f; font-size: 11px; line-height: 1.7; }
.player-data { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 20px 0; }
.player-data span { display: block; margin-bottom: 3px; color: #7b856f; font-size: 11px; }
.player-data b { color: #4e5b3c; font-size: 13px; font-weight: 500; }
.player-card-bottom { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 15px; border-top: 1px solid var(--line); }

/* Calculator */
.nutrition-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); gap: 22px; align-items: start; }
.form-body { padding: 0 24px 25px; }
.nutrition-day { padding: 19px 0; }
.nutrition-day + .nutrition-day { border-top: 1px solid var(--line); }
.nutrition-day-title { display: flex; align-items: center; gap: 9px; margin-bottom: 16px; font-size: 15px; font-weight: 500; }
.nutrition-day-title .icon { width: 18px; height: 18px; color: var(--green); }
.input-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.field { min-width: 0; }
.field label, .field-label { display: block; margin-bottom: 7px; color: #59634e; font-size: 12px; font-weight: 500; }
.input-wrap { display: flex; align-items: center; gap: 5px; min-width: 0; min-height: 54px; padding: 10px 12px; border: 1px solid #d6dfcc; border-radius: 9px; background: white; direction: ltr; transition: border-color 160ms ease, box-shadow 160ms ease; }
.input-wrap input { min-width: 0; width: 100%; padding: 0; border: 0; outline: none; background: transparent; color: var(--ink); font-size: 21px; font-weight: 600; text-align: left; appearance: textfield; }
.input-wrap input::-webkit-inner-spin-button, .input-wrap input::-webkit-outer-spin-button { appearance: none; }
.input-wrap input:focus-visible { outline: none; }
.input-wrap span { color: #7b8469; font-family: var(--font-number); font-size: 12px; }
.input-wrap:focus-within { border-color: #87a56f; box-shadow: 0 0 0 3px rgb(135 165 111 / 15%); }
.input-wrap.invalid { border-color: #bb7b60; background: #fffdfa; }
.day-calories { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-top: 14px; color: var(--muted); font-size: 12px; }
.day-calories strong { color: #52683d; font-family: var(--font-number); font-size: 14px; font-weight: 600; }
.frequency-control { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding-top: 20px; border-top: 1px solid var(--line); }
.frequency-control label { font-size: 14px; }
.frequency-control small { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.frequency-control select { width: 80px; min-height: 45px; flex-shrink: 0; padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: 8px; background: white; color: var(--ink); font-family: var(--font-number); font-size: 16px; text-align: center; }
.form-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.calculator-message { min-height: 21px; margin-top: 11px; color: #9e674d; font-size: 12px; line-height: 1.8; }
.summary-panel { padding: 27px; }
.summary-eyebrow { color: #7c876b; font-size: 11px; }
.summary-panel h2 { margin: 7px 0 21px; font-size: 19px; line-height: 1.7; }
.average-calories { padding: 24px 14px; margin-bottom: 19px; border: 1px solid #e3ecd7; border-radius: 12px; background: #f1f6e9; text-align: center; }
.average-calories strong { display: block; color: #3d5429; font-family: var(--font-number); font-size: 40px; font-weight: 600; line-height: 1.4; letter-spacing: -1px; }
.average-calories span { color: #7a8662; font-size: 11px; }
.macro-summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin-bottom: 20px; text-align: center; }
.macro-summary-grid > div { min-width: 0; padding: 13px 4px 10px; border: 1px solid var(--line); border-radius: 8px; }
.macro-summary-grid strong { display: block; color: var(--ink); font-family: var(--font-number); font-size: 20px; font-weight: 600; }
.macro-summary-grid span { color: #758060; font-family: var(--font-number); font-size: 11px; }
.macro-summary-grid i { display: block; width: 18px; height: 3px; margin: 9px auto 0; border-radius: 3px; background: #86a86e; }
.macro-summary-grid > div:nth-child(2) i { background: #cfbc87; }
.macro-summary-grid > div:nth-child(3) i { background: #9fb5b9; }
.calculation-formula { padding: 13px 11px; border-radius: 8px; background: #f8faf4; color: #788462; font-size: 12px; line-height: 1.9; text-align: center; }
.calculation-formula b { color: #5b7041; font-weight: 500; }
.nutrition-notes { padding: 23px 25px; margin-top: 22px; }
.nutrition-notes h3 { margin-bottom: 17px; }
.notes-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.notes-grid strong { display: block; margin-bottom: 6px; color: #4b5b3d; font-size: 14px; font-weight: 500; }
.notes-grid p { color: var(--muted); font-size: 13px; line-height: 1.95; }

/* Schedule page */
.week-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.calendar-day { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: white; }
.calendar-day-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 18px; border-bottom: 1px solid #e3eadb; background: #f2f6ed; color: #4f633b; font-size: 15px; font-weight: 500; }
.calendar-day-header b { display: grid; place-items: center; min-width: 26px; min-height: 25px; padding: 1px 7px; border: 1px solid #e0e8d6; border-radius: 6px; background: white; font-family: var(--font-number); font-size: 12px; font-weight: 600; }
.calendar-day-body { min-height: 160px; padding: 12px; }
.calendar-person { display: flex; align-items: center; gap: 10px; width: 100%; min-width: 0; padding: 12px 10px; margin-bottom: 9px; border: 1px solid #e7edde; border-radius: 9px; background: white; text-align: start; transition: background 160ms ease, border-color 160ms ease; }
.calendar-person:last-child { margin-bottom: 0; }
.calendar-person > span:not(.avatar) { min-width: 0; }
.calendar-person .avatar { width: 31px; height: 31px; border-radius: 8px; }
.calendar-person strong { display: block; color: #40532d; font-size: 12px; font-weight: 500; overflow-wrap: anywhere; }
.calendar-person small { display: block; margin-top: 2px; color: #7b856b; font-size: 11px; }
.week-policy { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; margin-top: 24px; }
.week-policy .panel { padding: 24px; }
.week-policy h3 { margin-bottom: 9px; font-size: 16px; }
.week-policy p { color: var(--muted); font-size: 13px; line-height: 1.95; }
.calendar-off { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 21px; padding: 17px 20px; border: 1px dashed #d5dfc8; border-radius: 10px; color: #718061; font-size: 13px; }
.calendar-off b { font-family: var(--font-number); font-size: 11px; font-weight: 500; }

/* Dialogs and forms */
dialog {
  width: min(680px, calc(100vw - 40px));
  max-height: calc(100dvh - 48px);
  padding: 0;
  overflow-x: hidden;
  border: 1px solid #dbe3d2;
  border-radius: 18px;
  background: white;
  color: var(--ink);
  box-shadow: 0 24px 80px rgb(23 36 17 / 18%);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 180ms var(--ease-out), transform 180ms var(--ease-out), display 180ms allow-discrete, overlay 180ms allow-discrete;
}
dialog[open] { opacity: 1; transform: translateY(0); }
dialog::backdrop { background: rgb(28 37 26 / 48%); opacity: 0; transition: opacity 180ms ease, display 180ms allow-discrete, overlay 180ms allow-discrete; }
dialog[open]::backdrop { opacity: 1; }
@starting-style {
  dialog[open] { opacity: 0; transform: translateY(8px); }
  dialog[open]::backdrop { opacity: 0; }
}
.modal-header { position: sticky; z-index: 2; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 23px 27px; border-bottom: 1px solid var(--line); background: white; }
.modal-header > div { min-width: 0; }
.modal-header h2 { font-size: 20px; line-height: 1.6; overflow-wrap: anywhere; }
.modal-header small { display: block; margin-top: 3px; color: #7f886e; font-family: var(--font-number); font-size: 11px; }
.close-button { display: grid; place-items: center; width: 38px; height: 38px; flex-shrink: 0; border: 1px solid #e7eddf; border-radius: 9px; background: #f8faf4; color: #707d5b; transition: background 160ms ease, color 160ms ease; }
.close-button .icon { width: 18px; height: 18px; }
.modal-body { padding: 25px 27px 27px; }
.modal-tag-row { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin-bottom: 22px; }
.modal-tag-row .goal-tag { margin: 0; }
.detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.detail-stat { min-width: 0; padding: 17px 10px; border: 1px solid #e5eddb; border-radius: 10px; background: #f7faf2; text-align: center; }
.detail-stat span { color: #728061; font-size: 12px; }
.detail-stat strong { display: block; margin-top: 3px; color: #455734; font-family: var(--font-number); font-size: 27px; font-weight: 600; line-height: 1.5; }
.detail-stat small { color: #7a856a; font-size: 11px; }
.detail-section { margin-top: 23px; padding-top: 20px; border-top: 1px solid var(--line); }
.detail-section h3 { margin-bottom: 10px; font-size: 15px; }
.detail-section p { color: var(--muted); font-size: 13px; line-height: 1.95; }
.detail-lines { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; font-size: 13px; }
.detail-lines > div { min-width: 0; padding: 11px 13px; border: 1px solid var(--line); border-radius: 8px; overflow-wrap: anywhere; }
.detail-lines span { display: block; margin-bottom: 3px; color: #7d876d; font-size: 11px; }
.detail-lines b { color: #4e5c3c; font-weight: 500; }
.detail-section textarea { width: 100%; min-height: 100px; resize: vertical; padding: 12px 14px; border: 1px solid #d9e4cd; border-radius: 9px; background: #fcfdf9; color: var(--ink); font-size: 14px; line-height: 1.8; }
.review-buttons { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 16px; }
.modal-disclaimer { margin-top: 16px; color: #738061; font-size: 12px; line-height: 1.85; }
.standard-field { margin-bottom: 19px; }
.standard-field label { display: block; margin-bottom: 7px; color: #61704b; font-size: 13px; font-weight: 500; }
.standard-field input, .standard-field select { width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid #d6e2ca; border-radius: 8px; background: #fcfdf9; color: var(--ink); font-size: 14px; }
.standard-field small { display: block; margin-top: 7px; }
.add-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.help-intro { color: var(--muted); font-size: 14px; line-height: 1.9; }
.help-list { padding: 0; margin: 9px 0 22px; list-style: none; }
.help-list li { padding: 16px 0; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 13px; line-height: 1.95; }
.help-list strong { display: block; margin-bottom: 3px; color: #465831; font-size: 15px; font-weight: 500; }
.privacy-note { padding: 14px 16px; border: 1px solid #e4ecd9; border-radius: 9px; background: #f2f6ec; color: #6d7a5a; font-size: 12px; line-height: 1.95; }
.live-region { min-height: 25px; margin-top: 10px; color: #9b674d; font-size: 12px; line-height: 1.8; }

/* Toast and footer */
.toast {
  position: fixed;
  z-index: 200;
  bottom: 26px;
  left: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: max-content;
  max-width: min(580px, calc(100vw - 32px));
  padding: 13px 20px;
  border: 1px solid #47523d;
  border-radius: 11px;
  background: var(--ink);
  color: #f1f5eb;
  box-shadow: 0 8px 28px rgb(25 41 15 / 14%);
  font-size: 13px;
  line-height: 1.8;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 10px);
  transition: opacity 180ms ease, transform 180ms var(--ease-out);
}
.toast.visible { opacity: 1; transform: translate(-50%, 0); }
.toast .icon { width: 19px; height: 19px; color: var(--lime); }
.toast > span { min-width: 0; }
.page-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; max-width: 1560px; padding: 25px var(--gutter) 28px; margin: 0 auto; color: #76816d; font-size: 11px; line-height: 1.8; }
.page-footer [dir='ltr'] { font-size: 11px; letter-spacing: .5px; }
.footer-dot { padding: 0 9px; color: #b7c3a9; }
.footer-help { min-height: 36px; padding: 4px 7px; color: #5a7141; font-size: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }

/* A single page transition; controls keep their position while editing. */
.page-view.is-entering { animation: page-enter 240ms var(--ease-out) both; }
@keyframes page-enter {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (hover: hover) and (pointer: fine) {
  .nav-item:hover { background: #f4f6ef; color: #3f5230; }
  .nav-item.active:hover { background: #eaf1e1; }
  .btn:not(:disabled):hover { transform: translateY(-1px); }
  .btn-primary:not(:disabled):hover { background: #33412d; border-color: #33412d; }
  .btn-outline:not(:disabled):hover { background: #f8faf3; border-color: #b8caa7; }
  .btn-light:not(:disabled):hover { background: #cbe3b5; border-color: #cbe3b5; }
  .text-button:hover, .table-action:hover { color: #334f24; }
  .text-button:hover .icon, .table-action:hover .icon { transform: translateX(-2px); }
  .stat-card:hover { background: #fafbf7; }
  .stat-card:hover .stat-icon { transform: translateY(-1px); }
  .stat-card:hover .stat-arrow { transform: translateX(-1px); }
  .day-tile:hover { background: #f1f6e9; border-color: #c8dbb8; }
  .chip:not(.selected):hover { border-color: #c5d7b4; background: #f8fbf3; }
  .calendar-person:hover { border-color: #bdcfae; background: #fbfdf8; }
  .close-button:hover { background: #edf4e4; color: #42662b; }
}

/* Wide desktop */
@media (min-width: 1600px) {
  :root { --gutter: 44px; }
  main { padding-top: 40px; }
  .hero { grid-template-columns: minmax(0, 1fr) 320px; padding: 35px 40px; }
  .hero h2 { font-size: 38px; }
  .hero-progress { gap: 25px; }
  .progress-ring { width: 132px; height: 132px; }
  .stat-card { padding: 23px 28px 21px; }
  .overview-grid, .bottom-grid { gap: 24px; }
  .weight-chart { height: 198px; }
}

/* Smaller laptops */
@media (max-width: 1250px) {
  :root { --gutter: 27px; }
  .hero { grid-template-columns: minmax(0, 1fr) 220px; gap: 23px; padding: 29px; }
  .hero h2 { font-size: 34px; }
  .hero-progress { gap: 13px; padding-inline-start: 20px; }
  .hero-progress-copy { max-width: 90px; }
  .progress-ring { width: 100px; height: 100px; }
  .ring-text strong { font-size: 24px; }
  .stat-card { padding-inline: 17px; }
  .stat-top { font-size: 11px; }
  .overview-grid, .bottom-grid { grid-template-columns: minmax(0, 1.7fr) minmax(285px, 1fr); gap: 18px; }
  .compact-table .goal-column { display: none; }
  .compact-table th, .compact-table td { padding-inline: 15px; }
  .panel-heading { padding-inline: 21px; }
  .panel-heading h2 { font-size: 17px; }
  .macro-mini { gap: 16px; padding-inline: 21px; }
  .donut { width: 108px; height: 108px; }
  .donut::before { width: 84px; height: 84px; }
  .donut strong { font-size: 21px; }
  .player-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .calendar-day-body { padding: 10px; }
  .calendar-person { gap: 8px; padding: 11px 8px; }
}

/* Stack the content before making type smaller. */
@media (max-width: 1050px) {
  :root { --gutter: 24px; }
  .today { display: none; }
  .page-title { align-items: flex-start; }
  h1 { font-size: 30px; }
  .page-title p { font-size: 13px; }
  .hero { grid-template-columns: minmax(0, 1fr) 130px; padding: 27px; }
  .hero-progress { border: 0; padding: 0; }
  .hero-progress-copy { display: none; }
  .progress-ring { width: 116px; height: 116px; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-card { padding: 19px 22px; }
  .stat-card:nth-child(2n + 1) { border-inline-start: 0; }
  .stat-card:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .stat-top { font-size: 12px; }
  .overview-grid, .bottom-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .overview-grid .schedule-panel .schedule-preview { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: start; gap: 24px; }
  .schedule-panel .days-row { margin: 0; }
  .schedule-panel .schedule-policy { margin: 0; padding: 0; border: 0; }
  .schedule-panel .off-days { margin-top: 13px; }
  .macro-mini { gap: 28px; padding-inline: 25px; }
  .donut { width: 124px; height: 124px; }
  .donut::before { width: 98px; height: 98px; }
  .donut strong { font-size: 23px; }
  .macro-legend { max-width: 360px; }
  .nutrition-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .notes-grid { gap: 22px; }
  .week-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .calendar-person strong { font-size: 13px; }
  .calendar-day-body { padding: 14px; }
  .page-footer { flex-wrap: wrap; gap: 7px; }
}

/* Narrow rail retains screen-reader names. */
@media (max-width: 850px) {
  :root { --sidebar-width: 80px; --gutter: 24px; }
  .sidebar { padding: 27px 11px 20px; }
  .brand { gap: 0; min-height: 42px; margin-bottom: 31px; }
  .brand-mark { font-size: 33px; }
  .brand-name, .workspace-label, .nav-caption, .sidebar-note, .coach-profile > span:not(:first-child) { display: none; }
  .sidebar .nav-item { min-height: 49px; justify-content: center; padding-inline: 7px; margin-block: 7px; }
  .sidebar .nav-item .icon { width: 21px; height: 21px; }
  .sidebar .nav-item > span:not(:first-child):not(.nav-badge) { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .sidebar .nav-badge { display: none; }
  .sidebar-bottom { padding-top: 20px; }
  .help-button { margin-bottom: 20px; }
  .coach-profile { justify-content: center; padding: 21px 0 0; }
  .topbar { min-height: 70px; }
  .topbar-end { gap: 13px; }
  main { padding-top: 27px; }
  .hero { grid-template-columns: minmax(0, 1fr) 140px; }
  .stat-card { min-height: 140px; }
  .page-title { align-items: center; }
}

/* Phone: fixed bottom navigation with safe-area support. */
@media (max-width: 650px) {
  :root { --sidebar-width: 0px; --gutter: 18px; }
  body { font-size: 14px; }
  .sidebar { inset-block-start: auto; inset-block-end: 0; inset-inline: 0; width: 100%; height: calc(74px + env(safe-area-inset-bottom, 0px)); flex-direction: row; align-items: center; padding: 5px 6px calc(5px + env(safe-area-inset-bottom, 0px)); overflow: visible; border-top: 1px solid #dce4d1; border-inline: 0; background: white; }
  .brand, .sidebar-bottom { display: none; }
  .sidebar nav { display: flex; align-items: stretch; width: 100%; height: 100%; }
  .sidebar .nav-item { width: 20%; min-width: 0; min-height: 0; flex-direction: column; justify-content: center; gap: 3px; padding: 5px 2px; margin: 0; border-radius: 8px; font-size: 11px; line-height: 1.6; text-align: center; }
  .sidebar .nav-item > span:not(:first-child):not(.nav-badge) { position: static; width: auto; height: auto; padding: 0; margin: 0; overflow: visible; clip-path: none; white-space: nowrap; }
  .sidebar .nav-item .icon { width: 20px; height: 20px; }
  .sidebar .nav-item.active::before { inset-block-start: 0; inset-inline-start: calc(50% - 9px); width: 18px; height: 2px; }
  .main-shell { margin-inline-start: 0; padding-bottom: calc(74px + env(safe-area-inset-bottom, 0px)); }
  .topbar { min-height: 64px; gap: 12px; padding: 12px 19px; }
  .breadcrumb { gap: 8px; font-size: 11px; }
  .breadcrumb strong { font-size: 12px; }
  .topbar-end { gap: 8px; }
  .topbar-separator, .top-avatar, .today { display: none; }
  .topbar .demo-label { padding: 3px 7px; font-size: 11px; }
  main { padding: 25px var(--gutter) 16px; }
  h1 { font-size: 28px; }
  h2 { font-size: 18px; }
  .page-title { align-items: flex-start; flex-wrap: wrap; gap: 14px; margin-bottom: 23px; }
  .page-title > div:first-child { flex: 1 1 170px; }
  .page-title p { margin-top: 4px; font-size: 13px; line-height: 1.8; }
  .title-actions { flex-wrap: wrap; gap: 8px; }
  .title-actions .btn { padding-inline: 13px; font-size: 12px; }
  .btn, .text-button, .table-action, .chip { min-height: 44px; }
  .btn-small { min-height: 40px; }
  .hero { grid-template-columns: minmax(0, 1fr) 88px; gap: 16px; min-height: 0; padding: 25px 20px; margin-bottom: 20px; }
  .hero h2 { margin: 0 0 12px; font-size: 26px; line-height: 1.5; }
  .hero p { max-width: none; font-size: 12px; line-height: 1.9; }
  .hero .btn { margin-top: 18px; padding-inline: 12px; font-size: 12px; }
  .hero .btn .icon { width: 16px; height: 16px; }
  .progress-ring { width: 88px; height: 88px; }
  .ring-text strong { font-size: 21px; }
  .ring-text > span { max-width: 78px; font-size: 11px; }
  .stats-grid { margin-bottom: 20px; }
  .stat-card { min-height: 142px; padding: 17px 18px; }
  .stat-top { font-size: 12px; }
  .stat-icon { width: 28px; height: 28px; border-radius: 7px; }
  .stat-icon .icon { width: 16px; height: 16px; }
  .stat-number { margin-top: 9px; font-size: 32px; }
  .stat-bottom { gap: 6px; font-size: 11px; }
  .overview-grid, .bottom-grid { gap: 18px; }
  .bottom-grid { margin-top: 18px; }
  .panel-heading { gap: 10px; padding: 20px 19px 16px; }
  .panel-heading h2 { font-size: 17px; }
  .panel-heading p { font-size: 12px; }
  .panel-heading .text-button { font-size: 11px; }
  .panel-footer { flex-wrap: wrap; padding-inline: 19px; font-size: 11px; }
  .panel-footer .text-button { min-height: 44px; }
  th, td { padding-inline: 14px; }
  td { height: 70px; padding-block: 13px; font-size: 12px; }
  .compact-table th, .compact-table td { padding-inline: 10px; }
  .compact-table .goal-column, .compact-table .day-column { display: none; }
  .person-cell { gap: 8px; }
  .person-cell .avatar { width: 32px; height: 32px; }
  .person-cell strong { font-size: 12px; }
  .person-cell small { font-size: 11px; }
  .status { gap: 5px; padding: 5px 7px; font-size: 11px; }
  .table-action { min-height: 44px; gap: 4px; font-size: 11px; }
  .table-action .icon { width: 13px; height: 13px; }
  .overview-grid .schedule-panel .schedule-preview { display: block; padding: 0 19px 20px; }
  .schedule-panel .schedule-policy { margin-top: 18px; padding-top: 15px; border-top: 1px solid var(--line); }
  .day-tile { padding-block: 14px 12px; font-size: 11px; }
  .day-tile strong { font-size: 25px; }
  .schedule-policy { font-size: 12px; }
  .off-days { font-size: 11px; }
  .chart-card .panel-heading { flex-wrap: wrap; gap: 8px; }
  .chart-select { max-width: 152px; min-height: 44px; font-size: 11px; }
  .chart-description { flex-wrap: wrap; gap: 10px; padding-inline: 19px; font-size: 11px; }
  .chart-summary { padding-inline: 19px; }
  .chart-summary strong { font-size: 30px; }
  .weight-chart { height: auto; margin-block: 14px; }
  .weight-chart text { font-size: 17px; }
  .chart-footnote { padding-inline: 19px; font-size: 11px; }
  .segmented button { min-height: 44px; padding-inline: 12px; font-size: 11px; }
  .macro-mini { gap: 24px; padding: 7px 23px 23px; }
  .macro-mini-note { padding-inline: 22px; font-size: 11px; }
  .filters { gap: 10px; margin-bottom: 18px; }
  .search-box { width: 100%; min-height: 47px; }
  .search-box input { font-size: 16px; }
  .filter-select { min-height: 44px; flex: 1; font-size: 13px; }
  .filter-chips { width: 100%; gap: 6px; }
  .chip { flex: 1; padding-inline: 8px; font-size: 11px; }
  .section-note { padding: 14px 15px; margin-bottom: 19px; font-size: 12px; }
  .player-grid { grid-template-columns: minmax(0, 1fr); gap: 17px; }
  .player-card { padding: 22px; }
  .player-card-top strong { font-size: 16px; }
  .nutrition-grid { gap: 18px; }
  .form-body { padding: 0 19px 22px; }
  .nutrition-day { padding-block: 18px; }
  .nutrition-day-title { font-size: 15px; }
  .input-grid { gap: 9px; }
  .field label { font-size: 11px; }
  .input-wrap { min-height: 53px; padding: 10px 9px; }
  .input-wrap input { font-size: 20px; }
  .input-wrap span { font-size: 11px; }
  .day-calories { font-size: 11px; }
  .day-calories strong { font-size: 13px; }
  .frequency-control { gap: 14px; }
  .frequency-control label { font-size: 13px; }
  .frequency-control small { font-size: 11px; }
  .frequency-control select { width: 70px; }
  .form-actions { gap: 9px; }
  .form-actions .btn { flex: 1; padding-inline: 10px; font-size: 12px; }
  .summary-panel { padding: 23px; }
  .summary-panel h2 { font-size: 19px; }
  .average-calories strong { font-size: 38px; }
  .macro-summary-grid strong { font-size: 19px; }
  .nutrition-notes { padding: 22px 20px; margin-top: 18px; }
  .notes-grid { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .notes-grid p { font-size: 13px; }
  .week-grid { gap: 13px; }
  .calendar-day-header { padding: 16px; font-size: 15px; }
  .calendar-day-body { min-height: 0; padding: 11px; }
  .calendar-person { gap: 8px; padding: 12px 9px; }
  .calendar-person .avatar { width: 29px; height: 29px; }
  .calendar-person strong { font-size: 12px; }
  .calendar-person small { font-size: 11px; }
  .week-policy { grid-template-columns: minmax(0, 1fr); gap: 17px; margin-top: 19px; }
  .week-policy .panel { padding: 22px; }
  .calendar-off { margin-top: 18px; padding: 15px 17px; font-size: 12px; }
  .calendar-off b { font-size: 11px; }
  dialog { width: calc(100vw - 24px); max-height: calc(100dvh - 28px); border-radius: 16px; }
  .modal-header { gap: 12px; padding: 20px; }
  .modal-header h2 { font-size: 19px; }
  .close-button { width: 44px; height: 44px; }
  .modal-body { padding: 20px; }
  .modal-tag-row { gap: 7px; }
  .detail-grid { gap: 8px; }
  .detail-stat { padding: 13px 7px; }
  .detail-stat span { display: grid; place-items: center; min-height: 3.5em; font-size: 11px; }
  .detail-stat strong { font-size: 24px; }
  .detail-lines { gap: 9px; font-size: 12px; }
  .detail-lines > div { padding: 10px; }
  .detail-lines span { font-size: 11px; }
  .detail-section p { font-size: 13px; }
  .detail-section textarea, .standard-field input, .standard-field select { font-size: 16px; }
  .review-buttons { gap: 8px; }
  .review-buttons .btn { flex-grow: 1; padding-inline: 12px; font-size: 12px; }
  .add-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .toast { bottom: calc(87px + env(safe-area-inset-bottom, 0px)); padding: 12px 16px; font-size: 12px; }
  .page-footer { display: block; padding: 22px 19px; font-size: 11px; text-align: center; }
  .page-footer > span { display: block; margin-top: 6px; }
  .page-footer [dir='ltr'] { font-size: 11px; letter-spacing: .3px; }
  .footer-help { min-height: 44px; }
}

@media (max-width: 520px) {
  .week-grid { grid-template-columns: minmax(0, 1fr); }
  .calendar-person strong { font-size: 14px; }
  .calendar-person .avatar { width: 34px; height: 34px; }
}

@media (max-width: 420px) {
  .compact-table .person-cell .avatar { display: none; }
  .hero { gap: 12px; padding-inline: 18px; }
  .stat-card { padding-inline: 15px; }
  .stat-top { font-size: 11px; }
  .chart-select { max-width: 146px; }
  .weight-chart text { font-size: 19px; }
  .macro-mini { gap: 19px; padding-inline: 20px; }
  .donut { width: 112px; height: 112px; }
  .donut::before { width: 88px; height: 88px; }
  .donut strong { font-size: 21px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
