/* Anderson Huff Family Fitness. Mobile first; wide-screen rules at the bottom. */

:root {
  color-scheme: light dark;
  --bg: #fff8f0;
  --surface: #ffffff;
  --surface-2: #fdeee0;
  --text: #2b2118;
  --muted: #6a594a;
  --border: #ecd9c6;
  --border-strong: #9a826c;
  --primary: #c2410c;
  --primary-hover: #a8370a;
  --primary-text: #ffffff;
  --primary-soft: #ffe6d4;
  --accent: #0b6e80;
  --accent-soft: #d6f1f5;
  --good: #2b8a3e;
  --danger: #b42318;
  --danger-soft: #fde8e6;
  --warn-soft: #fff1c9;
  --focus: #1c6dd0;
  --shadow: 0 1px 2px rgba(80, 40, 10, 0.08), 0 4px 14px rgba(80, 40, 10, 0.06);
  --radius: 16px;
  --tab-h: 64px;
  --header-h: 56px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1a1612;
    --surface: #262019;
    --surface-2: #322a21;
    --text: #f6ece2;
    --muted: #c0af9e;
    --border: #44392d;
    --border-strong: #8a7866;
    --primary: #ff9254;
    --primary-hover: #ffa573;
    --primary-text: #2a1204;
    --primary-soft: #4a2d19;
    --accent: #55cfe3;
    --accent-soft: #173a42;
    --good: #6fdc84;
    --danger: #ff8f84;
    --danger-soft: #4a2420;
    --warn-soft: #4a3d14;
    --focus: #7ab7ff;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 4px 14px rgba(0, 0, 0, 0.3);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; font-size: 106.25%; } /* 17px root: comfortable for older eyes */
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 1rem/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  min-height: 100vh;
  padding-bottom: calc(var(--tab-h) + env(safe-area-inset-bottom));
}
body.modal-open { overflow: hidden; }
body.bare { padding-bottom: 0; }

h1, h2, h3 { line-height: 1.2; margin: 0; }
h1 { font-size: 1.7rem; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1rem; }
p { margin: 0; }
a { color: var(--accent); }
ul, ol { margin: 0; padding: 0; }
ol { padding-left: 1.4em; }
[tabindex="-1"]:focus { outline: none; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }

.hidden { display: none !important; }
.invisible { visibility: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: 0.94rem; }
.center { text-align: center; }
.grow { flex: 1; min-width: 0; }
.noscript { padding: 24px; }

.skip { position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--surface); color: var(--text); border: 2px solid var(--focus); border-radius: 8px; padding: 8px 14px; font: inherit; }
.skip:focus { top: 8px; }

/* ---- header and nav ---- */
.app-header { position: sticky; top: 0; z-index: 20; background: var(--surface); border-bottom: 1px solid var(--border); padding-top: env(safe-area-inset-top); }
body.bare .top-nav, body.bare .me-chip, body.bare .tab-bar { display: none; }
.header-inner { max-width: 1100px; margin: 0 auto; min-height: var(--header-h); display: flex; align-items: center; gap: 12px; padding: 0 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 800; letter-spacing: -0.01em; min-height: 44px; flex: 1; min-width: 0; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--primary); font-size: 1.05rem; flex: none; }
.brand-long { display: none; }
.brand-short { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-nav { display: none; }
.me-chip { display: flex; align-items: center; gap: 8px; min-height: 44px; text-decoration: none; color: var(--text); font-weight: 600; }
.chip-name { display: none; }

.tab-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: grid; grid-template-columns: repeat(5, 1fr); background: var(--surface); border-top: 1px solid var(--border); padding-bottom: env(safe-area-inset-bottom); }
body.bare .tab-bar { display: none; }
.tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: var(--tab-h); padding: 6px 2px; text-decoration: none; color: var(--muted); font-size: 0.8rem; font-weight: 600; }
.tab .icon { width: 26px; height: 26px; }
.tab[aria-current="page"] { color: var(--primary); }
.tab[aria-current="page"] .icon { stroke-width: 2.4; }

.icon { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---- layout ---- */
.main { max-width: 1100px; margin: 0 auto; padding: 18px 16px 32px; }
.screen { display: flex; flex-direction: column; gap: 16px; }
.page-head { display: flex; flex-direction: column; gap: 2px; }
.page-head.split { flex-direction: row; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.cols { display: flex; flex-direction: column; gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.card.stack { gap: 14px; }
.card-title { font-size: 1.15rem; margin-bottom: 8px; }
.card.stack > .card-title { margin-bottom: 0; }
.group-title { font-size: 0.86rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin: 14px 0 6px; font-weight: 700; }
.back-link { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; text-decoration: none; }

/* ---- buttons ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 8px 18px; border-radius: 12px; border: 2px solid transparent; font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; text-align: center; line-height: 1.2; }
.btn-primary { background: var(--primary); color: var(--primary-text); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); box-shadow: 0 1px 0 var(--border); }
.btn-secondary:hover { background: var(--surface-2); }
.btn-ghost { background: transparent; color: var(--accent); }
.btn-danger { background: var(--danger-soft); color: var(--danger); border-color: var(--danger); }
.btn-big { min-height: 56px; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.55; cursor: default; }
.btn.busy { cursor: progress; }
.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; border: 0; background: transparent; color: var(--muted); cursor: pointer; flex: none; }
.icon-btn:hover:not(:disabled) { background: var(--surface-2); color: var(--text); }

.actions-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
.actions-grid .btn { justify-content: flex-start; padding-left: 20px; }
.actions-grid .btn .icon { width: 26px; height: 26px; }

/* ---- forms ---- */
.field { display: flex; flex-direction: column; gap: 6px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field-label { font-weight: 700; font-size: 1rem; padding: 0; }
.field-hint { color: var(--muted); font-size: 0.94rem; }
.input { width: 100%; min-height: 48px; padding: 10px 14px; font: inherit; font-size: 1rem; color: var(--text); background: var(--surface); border: 2px solid var(--border-strong); border-radius: 12px; }
textarea.input { resize: vertical; min-height: 84px; }
.input:focus { border-color: var(--focus); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 30%, transparent); }
select.input { appearance: auto; }
.form-error { background: var(--danger-soft); color: var(--danger); border: 1px solid var(--danger); border-radius: 12px; padding: 10px 14px; font-weight: 600; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.form-actions .btn-primary { flex: 1 1 140px; }
.privacy-note { background: var(--accent-soft); color: var(--text); border-radius: 12px; padding: 10px 14px; font-size: 0.95rem; }
.quick-activity { font-size: 1.25rem; font-weight: 800; }
.count { text-align: right; }
.check-row { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.check-row input { width: 22px; height: 22px; accent-color: var(--primary); }

.seg { border: 0; padding: 0; margin: 0; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.seg-row { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { position: relative; }
.pill input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.pill span { display: flex; align-items: center; min-height: 44px; padding: 8px 16px; border-radius: 999px; border: 2px solid var(--border-strong); background: var(--surface); font-weight: 600; }
.pill input:checked + span { background: var(--primary-soft); border-color: var(--primary); color: var(--text); box-shadow: inset 0 0 0 1px var(--primary); }
.pill input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.date-field { display: flex; flex-direction: column; gap: 8px; }
.date-input { max-width: 220px; }

.stepper { display: flex; align-items: center; gap: 8px; }
.stepper-input { text-align: center; font-size: 1.3rem; font-weight: 800; max-width: 110px; -moz-appearance: textfield; }
.stepper-input::-webkit-outer-spin-button, .stepper-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.step-btn { width: 48px; height: 48px; border-radius: 12px; border: 2px solid var(--border-strong); background: var(--surface); color: var(--text); font-size: 1.5rem; font-weight: 700; cursor: pointer; line-height: 1; }
.step-btn:hover { background: var(--surface-2); }
.chips-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.chip { min-width: 48px; min-height: 44px; padding: 6px 12px; border-radius: 999px; border: 2px solid var(--border-strong); background: var(--surface-2); color: var(--text); font: inherit; font-weight: 700; cursor: pointer; }
.chip:hover { border-color: var(--primary); }

.switch-row { display: flex; gap: 12px; align-items: flex-start; }
.switch { position: relative; display: inline-block; width: 56px; height: 44px; flex: none; }
.switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.switch-track { position: absolute; left: 0; top: 8px; width: 56px; height: 30px; border-radius: 999px; background: var(--border-strong); transition: background 0.15s; }
.switch-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); transition: transform 0.15s; }
.switch input:checked + .switch-track { background: var(--primary); }
.switch input:checked + .switch-track::after { transform: translateX(26px); }
.switch input:focus-visible + .switch-track { outline: 3px solid var(--focus); outline-offset: 2px; }
.switch-text { padding-top: 8px; }
.switch-label { font-weight: 700; }

.rules { list-style: none; display: grid; gap: 2px; font-size: 0.95rem; }
.rule { display: flex; gap: 8px; color: var(--muted); }
.rule-mark { width: 1.2em; text-align: center; }
.rule.ok { color: var(--good); font-weight: 600; }

.auth-card { max-width: 440px; margin: 8px auto 0; display: flex; flex-direction: column; gap: 14px; padding: 24px 20px; }
.auth-mark { font-size: 2.6rem; text-align: center; }
.auth-title { font-size: 1.5rem; text-align: center; }
.auth-form { margin-top: 4px; }

/* ---- dialogs ---- */
dialog.sheet { border: 0; padding: 0; background: var(--surface); color: var(--text); width: 100%; max-width: 560px; max-height: 92vh; margin: auto auto 0; border-radius: 22px 22px 0 0; box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.3); overflow: auto; }
dialog.sheet::backdrop { background: rgba(30, 15, 5, 0.55); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 8px 4px 20px; position: sticky; top: 0; background: var(--surface); z-index: 1; }
.sheet-title { font-size: 1.25rem; }
.sheet-body { padding: 8px 20px calc(20px + env(safe-area-inset-bottom)); }

/* On phones a toast covers the tab bar (not the page content) for a couple of seconds. */
.toasts { position: fixed; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; align-items: stretch; z-index: 60; pointer-events: none; }
.toast { background: var(--text); color: var(--bg); min-height: var(--tab-h); padding: 8px 16px calc(8px + env(safe-area-inset-bottom)); display: flex; align-items: center; justify-content: center; text-align: center; font-weight: 700; }
.toast.error { background: var(--danger); color: #fff; }

/* ---- states ---- */
.loading { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 48px 0; color: var(--muted); }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--border); border-top-color: var(--primary); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } .switch-track, .switch-track::after { transition: none; } }
.empty { text-align: center; padding: 18px 8px; display: flex; flex-direction: column; gap: 6px; align-items: center; }
.empty-title { font-weight: 800; font-size: 1.05rem; }
.error-box { background: var(--danger-soft); border: 1px solid var(--danger); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }

.progress { height: 12px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); overflow: hidden; margin: 6px 0; }
.progress-fill { height: 100%; background: var(--primary); border-radius: 999px; min-width: 0; }
.progress-fill.done { background: var(--good); }

.tag { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); font-size: 0.86rem; font-weight: 600; color: var(--muted); }
.tag-strong { background: var(--primary-soft); border-color: transparent; color: var(--text); }
.tag-warn { background: var(--warn-soft); border-color: transparent; color: var(--text); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }

.avatar { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--primary-soft); font-size: 1.3rem; flex: none; line-height: 1; }
.avatar.lg { width: 52px; height: 52px; font-size: 1.9rem; }

/* ---- today ---- */
.big-number { font-size: 1.1rem; }
.big-number strong { font-size: 2.2rem; letter-spacing: -0.02em; }
.streak { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-weight: 600; }
.streak .icon { color: var(--primary); }
.day-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.day-title { flex: 1; text-align: center; }
.entry-list { list-style: none; display: flex; flex-direction: column; }
.entry { display: flex; align-items: center; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.entry:last-child { border-bottom: 0; }
.entry-main { flex: 1; min-width: 0; }
.entry-title { font-weight: 600; overflow-wrap: anywhere; }
.entry-note { font-size: 0.94rem; color: var(--muted); font-style: italic; overflow-wrap: anywhere; }
.entry-actions { display: flex; flex: none; }
.idea-list { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.idea { display: flex; align-items: center; gap: 12px; justify-content: space-between; padding: 12px; border-radius: 14px; background: var(--surface-2); }
.idea-main { min-width: 0; }
.idea-name { font-weight: 800; color: var(--text); text-decoration: none; font-size: 1.05rem; }
.idea-name:hover { text-decoration: underline; }
.idea .btn { flex: none; }
.idea-done { display: flex; align-items: center; gap: 6px; color: var(--good); font-weight: 700; }
.idea-done .icon { width: 18px; height: 18px; }
.idea.done { background: var(--accent-soft); }
.feed-for { color: var(--muted); font-style: italic; margin-top: 2px; }
.board-note { margin-top: 10px; }

/* ---- family ---- */
.board { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.member { display: flex; gap: 12px; padding: 12px; border-radius: 14px; background: var(--surface-2); }
.member.me { outline: 2px solid var(--primary); outline-offset: -2px; }
.member-body { flex: 1; min-width: 0; }
.member-name { font-weight: 800; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.losses { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0 0; }
.losses dt { font-size: 0.86rem; color: var(--muted); font-weight: 600; }
.losses dd { margin: 0; font-weight: 800; font-size: 1.05rem; }
.feed { list-style: none; display: flex; flex-direction: column; }
.feed-item { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.feed-item:last-child { border-bottom: 0; }
.feed-body { flex: 1; min-width: 0; }
.feed-head { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.feed-who { font-weight: 700; overflow-wrap: anywhere; }
.feed-when { white-space: nowrap; flex: none; }
.feed-quote { overflow-wrap: anywhere; margin-top: 2px; }
.feed-note { font-style: italic; overflow-wrap: anywhere; }
.more { display: flex; justify-content: center; padding-top: 12px; }

/* ---- progress ---- */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); }
.tile-value { font-size: 1.8rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.tile-label { font-size: 0.94rem; color: var(--muted); margin-top: 4px; }
.chart-wrap { margin-top: 8px; }
.chart-host { width: 100%; min-height: 220px; }
.chart-latest { margin-top: 6px; }
.chart-latest strong { font-size: 1.6rem; }
svg.chart { display: block; max-width: 100%; }
.chart .grid-line { stroke: var(--border); stroke-width: 1; }
.chart .axis-text { fill: var(--muted); font-size: 13px; font-family: inherit; }
.chart .line { fill: none; stroke: var(--primary); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.chart .dot { fill: var(--surface); stroke: var(--primary); stroke-width: 2.5; }
.chart .dot.last { fill: var(--primary); }
.chart .bar { fill: var(--primary); opacity: 0.85; }
.chart .bar.met { fill: var(--accent); opacity: 1; }
.chart .goal-line { stroke: var(--accent); stroke-width: 2; stroke-dasharray: 6 5; }
.chart .goal-text { fill: var(--accent); font-weight: 700; }

/* ---- exercises ---- */
.subtabs { display: flex; gap: 8px; flex-wrap: wrap; }
.subtab { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 16px; border-radius: 999px; border: 2px solid var(--border-strong); text-decoration: none; color: var(--text); font-weight: 700; background: var(--surface); }
.subtab.active { background: var(--primary-soft); border-color: var(--primary); }
.filters { display: flex; flex-direction: column; gap: 14px; }
.filter-row { display: flex; flex-direction: column; gap: 10px; }
.ex-grid { list-style: none; display: grid; grid-template-columns: 1fr; gap: 12px; }
.ex-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.ex-link { display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: var(--text); min-height: 44px; }
.ex-name { font-weight: 800; font-size: 1.1rem; }
.ex-summary { font-size: 0.97rem; }
.ex-empty { grid-column: 1 / -1; }
.detail { display: flex; flex-direction: column; gap: 12px; }
.lead { font-size: 1.05rem; }
.steps { display: flex; flex-direction: column; gap: 8px; }
.callout { background: var(--accent-soft); border-radius: 12px; padding: 12px 14px; }
.variants { display: grid; gap: 10px; margin: 0; }
.variants dt { font-weight: 800; }
.variants dd { margin: 0; }
.workout-list { list-style: none; display: grid; gap: 14px; grid-template-columns: 1fr; align-items: start; }
.workout { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.workout .card-title { margin: 0; }
.details { width: 100%; }
.details summary { cursor: pointer; font-weight: 700; min-height: 44px; display: flex; align-items: center; color: var(--accent); }
.workout-steps li { padding: 4px 0; }
.workout-steps .rest { color: var(--muted); font-style: italic; }

/* ---- me and admin ---- */
.avatar-row { display: flex; gap: 12px; align-items: flex-start; }
.avatar-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 6px; }
.avatar-opt { height: 44px; border-radius: 12px; border: 2px solid var(--border-strong); background: var(--surface); font-size: 1.4rem; cursor: pointer; line-height: 1; }
.avatar-opt.on { border-color: var(--primary); background: var(--primary-soft); }
.user-list { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.user-row { display: flex; flex-direction: column; gap: 12px; }
.user-row.inactive { opacity: 0.8; }
.user-head { display: flex; gap: 12px; align-items: center; }
.user-id { min-width: 0; }
.user-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.user-actions .btn { min-height: 44px; padding: 6px 14px; font-size: 0.95rem; }

/* ---- wide screens ---- */
@media (min-width: 800px) {
  body { padding-bottom: 0; }
  .tab-bar { display: none; }
  .toasts { bottom: 20px; align-items: center; padding: 0 16px; }
  .toast { min-height: 0; padding: 12px 18px; border-radius: 12px; box-shadow: var(--shadow); max-width: 480px; }
  .brand-long { display: inline; }
  .brand-short { display: none; }
  .top-nav { display: flex; gap: 4px; }
  .top-link { display: inline-flex; align-items: center; min-height: 44px; padding: 6px 14px; border-radius: 999px; text-decoration: none; color: var(--muted); font-weight: 700; }
  .top-link:hover { background: var(--surface-2); color: var(--text); }
  .top-link[aria-current="page"] { background: var(--primary-soft); color: var(--text); }
  .brand { flex: none; margin-right: 12px; }
  .me-chip { margin-left: auto; }
  .chip-name { display: inline; }
  .main { padding: 28px 24px 48px; }
  h1 { font-size: 2rem; }
  .actions-grid { grid-template-columns: repeat(3, 1fr); }
  .actions-grid.two { grid-template-columns: repeat(2, 1fr); }
  .actions-grid .btn { justify-content: center; padding-left: 18px; }
  .today-cols, .family-cols { flex-direction: row; align-items: flex-start; }
  .today-cols .col-a { flex: 3; min-width: 0; }
  .today-cols .col-b { flex: 2; min-width: 0; }
  .family-cols > * { flex: 1; min-width: 0; }
  .progress-cols { display: grid; grid-template-columns: 1fr 1fr; }
  .progress-cols > :first-child { grid-column: 1 / -1; }
  .tiles { grid-template-columns: repeat(4, 1fr); }
  .ex-grid { grid-template-columns: repeat(2, 1fr); }
  .filter-row { flex-direction: row; align-items: center; justify-content: space-between; }
  .filter-row select { max-width: 260px; }
  .workout-list { grid-template-columns: repeat(2, 1fr); }
  .screen-me, .screen-admin { max-width: 640px; margin: 0 auto; width: 100%; }
  .screen.narrow { max-width: 720px; margin: 0 auto; width: 100%; }
  dialog.sheet { margin: auto; border-radius: 22px; }
  .user-row { flex-direction: row; justify-content: space-between; align-items: center; }
  .user-actions { justify-content: flex-end; max-width: 55%; }
  .screen-admin { max-width: 900px; }
}

@media (min-width: 1100px) {
  .ex-grid { grid-template-columns: repeat(3, 1fr); }
}
