/* FitConnect — Luminous Progress design system */
:root {
  --bg: #F5F8F6;
  --surface: #ffffff;
  --surface-soft: #E9F8EE;
  --border: #D8E4DA;
  --text: #122118;
  --text-muted: #5C6B61;
  --primary: #39C16C;
  --primary-strong: #1E8F4A;
  --primary-soft: #E9F8EE;
  --data: #3E8F8A;
  --protein: #1E8F4A;
  --carbs: #3E8F8A;
  --fat: #C48A4A;
  --success: #18b76a;
  --warning: #d98b24;
  --danger: #d84f5f;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --shadow: 0 14px 40px rgba(26, 55, 40, 0.08);
  --progress-glow: 0 0 24px rgba(24, 183, 106, 0.28);
  --font: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --space: 16px;
  --focus: 0 0 0 3px rgba(57, 193, 108, 0.35);
  --nav-h: 68px;
  --top-h: 56px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
[hidden] { display: none !important; pointer-events: none !important; }
button, a, .role-card, .nav-item, .side-link, .seg, .set-check {
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(24, 183, 106, 0.2);
}
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(24, 183, 106, 0.12), transparent 55%),
    radial-gradient(900px 400px at 100% 0%, rgba(23, 107, 135, 0.08), transparent 50%),
    var(--bg);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
img, svg { display: block; max-width: 100%; }
strong, .tabular { font-variant-numeric: tabular-nums; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 0.4em; font-weight: 700; }
p { margin: 0 0 0.75em; }
ul { margin: 0; padding: 0; list-style: none; }

.sr-only, .skip-link {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  border: 0;
}
.skip-link:focus {
  position: fixed; top: 12px; left: 12px; z-index: 1000;
  width: auto; height: auto; clip: auto;
  padding: 10px 14px; background: var(--surface);
  border-radius: var(--radius-sm); box-shadow: var(--shadow);
}

.muted { color: var(--text-muted); }
.tiny { font-size: 12px; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.06em; font-size: 12px; color: var(--primary-strong); font-weight: 700; }
.lede { color: var(--text-muted); max-width: 40ch; margin-inline: auto; }

.view { display: none; min-height: 100vh; }
.view.is-active { display: block; }
.view[hidden] { display: none !important; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 16px;
  border-radius: 999px; font-weight: 650;
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease, opacity .15s ease;
}
.btn:active { transform: scale(0.98); }
.btn:focus-visible { outline: none; box-shadow: var(--focus); }
.btn-primary {
  background: linear-gradient(180deg, #2ac87a, var(--primary));
  color: #fff;
  box-shadow: var(--progress-glow);
}
.btn-primary:hover { background: var(--primary-strong); }
.btn-secondary {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-secondary:hover { background: var(--surface-soft); }
.btn-ghost { color: var(--text-muted); min-height: 40px; }
.btn-ghost:hover { color: var(--text); background: var(--surface-soft); border-radius: 999px; }
.btn-danger { background: #fde8eb; color: var(--danger); }
.btn-block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0; }
.linkish {
  color: var(--data); font-weight: 650; text-decoration: underline;
  margin-left: 8px;
}
.linkish:hover { color: var(--primary-strong); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space);
  box-shadow: var(--shadow);
  margin-bottom: 14px;
}
.glow-card { box-shadow: var(--shadow), var(--progress-glow); border-color: #c9f0d9; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }
.card-head h3, .card h3 { margin: 0; font-size: 1rem; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }

.pill {
  display: inline-flex; align-items: center;
  padding: 4px 10px; border-radius: 999px;
  background: var(--surface-soft); color: var(--text-muted);
  font-size: 12px; font-weight: 650;
}
.pill-ok { background: var(--primary-soft); color: var(--primary-strong); }

/* Role select */
.view-role {
  display: none;
  padding: 32px 20px 48px;
}
.view-role.is-active { display: grid; place-items: center; }
.role-shell { width: min(920px, 100%); }
.role-header { text-align: center; margin-bottom: 28px; }
.role-header h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); }
.brand-mark { color: var(--primary); width: 48px; margin: 0 auto 12px; filter: drop-shadow(0 0 12px rgba(24,183,106,.35)); }
.role-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.role-card {
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  position: relative;
  min-height: 160px;
}
.role-card:hover:not(:disabled) {
  transform: translateY(-3px);
  border-color: #b7ebcc;
  box-shadow: var(--shadow), var(--progress-glow);
}
.role-card:focus-visible { outline: none; box-shadow: var(--focus); }
.role-card-muted { opacity: 0.72; grid-column: 1 / -1; min-height: 120px; }
.role-card-muted:disabled { cursor: not-allowed; }
.badge-soon {
  position: absolute; top: 14px; right: 14px;
  background: #fff4df; color: #9a6700;
  font-size: 11px; font-weight: 700; padding: 4px 8px; border-radius: 999px;
}
.role-icon {
  width: 48px; height: 48px; border-radius: 14px;
  display: grid; place-items: center;
  background: var(--primary-soft); color: var(--primary-strong);
  margin-bottom: 12px;
}
.role-title { display: block; font-size: 1.15rem; font-weight: 750; margin-bottom: 6px; }
.role-desc { color: var(--text-muted); font-size: 0.95rem; }

/* Client */
.view-client.is-active {
  display: grid;
  place-items: start center;
  padding: 20px 12px 28px;
}
.phone-frame {
  width: min(430px, 100%);
  min-height: min(860px, calc(100vh - 40px));
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 28px;
  box-shadow: var(--shadow);
  display: flex; flex-direction: column;
  overflow: hidden;
  position: relative;
}
.client-topbar {
  height: var(--top-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 14px;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(8px);
  position: sticky; top: 0; z-index: 5;
}
.app-name { letter-spacing: -0.02em; }
.status-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--primary); box-shadow: 0 0 0 4px rgba(24,183,106,.18);
}
.client-screens {
  flex: 1;
  overflow: auto;
  padding: 16px 16px calc(var(--nav-h) + 18px);
}
.client-screen { display: none; animation: fadeIn .22s ease; }
.client-screen.is-active { display: block; }
.client-screen[hidden] { display: none !important; }
.screen-title { font-size: 1.45rem; margin-bottom: 4px; }

.calorie-ring-wrap {
  position: relative; width: 168px; height: 168px; margin: 0 auto;
}
.calorie-ring { width: 168px; height: 168px; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: var(--surface-soft); stroke-width: 10; }
.ring-fg {
  fill: none; stroke: var(--primary); stroke-width: 10;
  stroke-linecap: round;
}
.ring-fg.is-over { stroke: var(--warning); }
.ring-label {
  position: absolute; inset: 0; display: grid; place-content: center; text-align: center;
  line-height: 1.15;
}
.ring-label strong { font-size: 1.65rem; letter-spacing: -0.03em; }
.ring-label span { font-size: 12px; color: var(--text-muted); }
.macro-row {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  font-size: 12px; color: var(--text-muted);
}
.macro-row strong { display: block; color: var(--text); font-size: 13px; margin-top: 2px; }
.macro-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px;
}
.macro-dot.protein { background: var(--protein); }
.macro-dot.carbs { background: var(--carbs); }
.macro-dot.fat { background: var(--fat); }

.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mini-stat strong { display: block; font-size: 1.25rem; margin: 4px 0; }
.ai-card { background: linear-gradient(180deg, #f3fcf7, #fff); }
.activity-list li, .pr-list li, .link-list li, .settings-list li, .alert-list li {
  display: flex; justify-content: space-between; gap: 10px; align-items: baseline;
  padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 0.95rem;
}
.activity-list li:last-child, .pr-list li:last-child, .alert-list li:last-child { border-bottom: 0; }
.activity-list time { color: var(--text-muted); font-size: 12px; white-space: nowrap; }

.macro-bars { margin: 12px 0 4px; }
.bar-item { margin-bottom: 10px; font-size: 13px; color: var(--text-muted); }
.bar {
  height: 8px; border-radius: 999px; background: var(--surface-soft); overflow: hidden; margin-top: 4px;
}
.bar i {
  display: block; height: 100%; width: 50%;
  background: var(--primary);
  border-radius: inherit;
}
.bar i.w-70 { width: 70%; }
.bar i.w-73 { width: 73%; }
.bar i.w-74 { width: 74%; }
.bar i.protein { background: var(--protein); box-shadow: none; }
.bar i.carbs { background: var(--carbs); box-shadow: none; }
.bar i.fat { background: var(--fat); box-shadow: none; }
.meal-block { margin-bottom: 14px; }
.meal-block h3 { font-size: 0.95rem; margin-bottom: 8px; }
.meal-item {
  display: flex; justify-content: space-between; gap: 10px;
  padding: 10px 12px; background: var(--surface-soft);
  border-radius: var(--radius-sm); margin-bottom: 8px;
}
.meal-item button { color: var(--data); font-size: 13px; font-weight: 650; }

.exercise-preview li, .set-row {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr auto;
  gap: 8px; align-items: center;
  padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 14px;
}
.exercise-card { margin-bottom: 12px; }
.set-check {
  width: 40px; height: 40px; border-radius: 50%;
  border: 2px solid var(--border); background: var(--surface);
  display: grid; place-items: center; font-weight: 700;
}
.set-check.is-done {
  background: var(--primary); border-color: var(--primary); color: #fff;
  box-shadow: var(--progress-glow);
}
.timer-card { text-align: center; }
.timer-display {
  font-size: 3rem; font-weight: 750; letter-spacing: 0.04em;
  color: var(--primary-strong); margin: 8px 0 12px;
  font-variant-numeric: tabular-nums;
}

.segmented {
  display: flex; gap: 6px; background: var(--surface-soft);
  padding: 4px; border-radius: 999px; margin-bottom: 14px;
}
.seg {
  flex: 1; min-height: 40px; border-radius: 999px; font-weight: 650; color: var(--text-muted);
}
.seg.is-active {
  background: var(--surface); color: var(--primary-strong);
  box-shadow: var(--shadow);
}
.chart { width: 100%; height: auto; margin-top: 8px; }
.chart.wide { min-height: 140px; }
.measure-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; text-align: center; }
.photo-placeholders { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.photo-ph {
  aspect-ratio: 3/4; border-radius: var(--radius-md);
  background: repeating-linear-gradient(-45deg, #eef4f0, #eef4f0 8px, #e4ece7 8px, #e4ece7 16px);
  display: grid; place-content: center; text-align: center; color: var(--text-muted); font-weight: 650;
}
.profile-hero { display: flex; gap: 14px; align-items: center; }
.profile-hero-compact { margin: 0; }
.avatar, .trainer-avatar {
  width: 52px; height: 52px; border-radius: 16px;
  background: var(--primary-soft); color: var(--primary-strong);
  display: grid; place-items: center; font-weight: 750;
}

.bottom-nav {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: var(--nav-h);
  display: grid; grid-template-columns: repeat(5, 1fr);
  border-top: 1px solid var(--border);
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(10px);
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.nav-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; font-size: 11px; font-weight: 650; color: var(--text-muted); min-height: 44px;
}
.nav-item span { font-size: 16px; line-height: 1; }
.nav-item.is-active { color: var(--primary-strong); }
.nav-item:focus-visible { outline: none; box-shadow: inset var(--focus); }

/* Trainer */
.view-trainer.is-active {
  display: grid;
  grid-template-columns: 250px 1fr;
  min-height: 100vh;
  background: var(--bg);
}
.trainer-sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 20px 14px;
  display: flex; flex-direction: column; gap: 16px;
  position: sticky; top: 0; height: 100vh;
}
.sidebar-brand strong { display: block; font-size: 1.1rem; }
.side-nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.side-link {
  text-align: left; padding: 12px 14px; border-radius: 12px;
  font-weight: 650; color: var(--text-muted); min-height: 44px;
}
.side-link:hover { background: var(--surface-soft); color: var(--text); }
.side-link.is-active {
  background: var(--primary-soft); color: var(--primary-strong);
  box-shadow: inset 3px 0 0 var(--primary);
}
.trainer-main { padding: 18px 22px 40px; min-width: 0; }
.trainer-top {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 18px;
}
.trainer-top h1 { margin: 0; font-size: 1.5rem; }
.trainer-menu-btn { display: none; }
.trainer-screen { display: none; animation: fadeIn .22s ease; }
.trainer-screen.is-active { display: block; }
.trainer-screen[hidden] { display: none !important; }

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 14px;
}
.kpi strong { display: block; font-size: 1.6rem; margin-top: 6px; }
.split-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.stack > .card { margin-bottom: 12px; }

.table-wrap { overflow-x: auto; }
.clients-table {
  width: 100%; border-collapse: collapse; font-size: 14px;
}
.clients-table th, .clients-table td {
  text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--border); white-space: nowrap;
}
.clients-table th { color: var(--text-muted); font-weight: 650; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.clients-table tbody tr {
  cursor: pointer; transition: background .15s ease;
}
.clients-table tbody tr:hover { background: var(--primary-soft); }
.clients-cards { display: none; gap: 12px; }
.client-card-mobile {
  border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 14px; background: var(--surface-soft); cursor: pointer;
}
.client-card-mobile:hover { border-color: #b7ebcc; }
.client-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; font-size: 13px; }
.status-chip {
  display: inline-flex; padding: 4px 8px; border-radius: 999px; font-size: 12px; font-weight: 700;
}
.status-ok { background: var(--primary-soft); color: var(--primary-strong); }
.status-warn { background: #fff4df; color: #9a6700; }
.status-risk { background: #fde8eb; color: var(--danger); }

.detail-grid {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 14px; margin-top: 12px;
}
.plans-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px;
}
.plan-card .btn { margin-top: 10px; }
.warn-banner {
  background: #fff4df; border-color: #f0d39a; color: #7a5408; font-weight: 650;
}

.chat-layout {
  display: grid; grid-template-columns: 220px 1fr; gap: 14px; min-height: 520px;
}
.chat-people { display: flex; flex-direction: column; gap: 6px; }
.chat-person {
  text-align: left; padding: 12px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border); font-weight: 650;
}
.chat-person.is-active { border-color: #b7ebcc; background: var(--primary-soft); color: var(--primary-strong); }
.chat-panel { display: flex; flex-direction: column; min-height: 520px; margin: 0; }
.chat-head { padding-bottom: 10px; border-bottom: 1px solid var(--border); margin-bottom: 10px; }
.chat-messages { flex: 1; overflow: auto; display: flex; flex-direction: column; gap: 10px; padding: 4px 0 14px; }
.bubble {
  max-width: 80%; padding: 10px 12px; border-radius: 14px; font-size: 14px;
}
.bubble-in { align-self: flex-start; background: var(--surface-soft); }
.bubble-out { align-self: flex-end; background: var(--primary-soft); color: var(--primary-strong); }
.chat-form { display: flex; gap: 8px; }
.chat-form input, label input, label select, .modal-card input, .modal-card select {
  width: 100%; min-height: 44px; border-radius: 12px;
  border: 1px solid var(--border); padding: 10px 12px; background: #fff;
}
.chat-form input:focus, label input:focus, label select:focus,
.modal-card input:focus, .modal-card select:focus {
  outline: none; box-shadow: var(--focus); border-color: var(--primary);
}
label { display: block; margin-bottom: 12px; font-size: 14px; font-weight: 650; }
label input, label select { margin-top: 6px; font-weight: 500; }
.promo-code {
  font-size: 2rem; font-weight: 800; letter-spacing: 0.08em;
  color: var(--primary-strong); margin: 8px 0;
}

.sidebar-backdrop {
  display: none; position: fixed; inset: 0; background: rgba(20,32,27,.35); z-index: 20;
}

/* Modal & toast */
.modal {
  position: fixed; inset: 0; z-index: 50;
  display: grid; place-items: center; padding: 20px;
  background: rgba(20, 32, 27, 0.45);
}
.modal[hidden] { display: none !important; }
.modal-card {
  width: min(420px, 100%);
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow);
  animation: pop .2s ease;
}
.ai-preview {
  height: 120px; border-radius: var(--radius-md); margin-bottom: 12px;
  display: grid; place-items: center; color: var(--text-muted); font-weight: 650;
  background: linear-gradient(135deg, #eaf0ec, #dff8e9);
}
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--text); color: #fff; padding: 12px 18px;
  border-radius: 999px; z-index: 60; font-weight: 650; font-size: 14px;
  box-shadow: var(--shadow);
}
.toast[hidden] { display: none !important; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
@keyframes pop {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: none; }
}

/* Responsive */
@media (max-width: 900px) {
  .role-grid { grid-template-columns: 1fr; }
  .role-card-muted { grid-column: auto; }
  .view-trainer.is-active { grid-template-columns: 1fr; }
  .trainer-sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; width: min(280px, 86vw);
    z-index: 30; transform: translateX(-105%);
    transition: transform .22s ease; height: 100%;
  }
  .trainer-sidebar.is-open { transform: none; }
  .sidebar-backdrop.is-open { display: block; }
  .trainer-menu-btn { display: inline-flex; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .split-2, .detail-grid, .chat-layout { grid-template-columns: 1fr; }
  .clients-table { display: none; }
  .clients-cards { display: grid; }
  .chat-people { flex-direction: row; overflow-x: auto; }
  .chat-person { white-space: nowrap; }
}

@media (max-width: 560px) {
  .view-client.is-active { padding: 0; }
  .phone-frame {
    width: 100%; min-height: 100vh; border-radius: 0; border: 0;
  }
  .exercise-preview li, .set-row {
    grid-template-columns: 1fr 1fr;
  }
  .set-row .set-check { grid-column: 2; justify-self: end; }
  .measure-grid { grid-template-columns: 1fr; text-align: left; }
}

@media (min-width: 1100px) {
  .view-client.is-active { padding-top: 40px; }
}

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

/* --- úpravy po uživatelském testu --- */
html, body { overflow-x: hidden; }
.view-client.is-active,
.phone-frame,
.client-screens,
.client-screen,
.card,
.hit,
.set-top,
.set-fields,
.summary-grid,
.quick-actions { min-width: 0; max-width: 100%; }
.card-head { flex-wrap: wrap; }
.card-head > * { min-width: 0; }
input, select, textarea, button { min-width: 0; }
button:disabled, .btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}
.btn.is-loading { opacity: 0.7; pointer-events: none; }
input, select, textarea { font-size: 16px; max-width: 100%; }
textarea {
  width: 100%;
  min-height: 88px;
  border-radius: 12px;
  border: 1px solid var(--border);
  padding: 10px 12px;
  background: #fff;
  resize: vertical;
}
textarea:focus { outline: none; box-shadow: var(--focus); border-color: var(--primary); }
input.is-invalid, select.is-invalid, textarea.is-invalid {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(216, 79, 95, 0.25);
}
.form-error { color: var(--danger); font-size: 13px; font-weight: 650; margin: 0 0 10px; }
.toast.is-error { background: var(--danger); }
.screen-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.text-btn {
  min-height: 44px;
  padding: 8px 4px;
  color: var(--data);
  font-weight: 650;
  font-size: 14px;
  background: none;
}
.text-btn:hover { text-decoration: underline; }
.text-btn:focus-visible, .icon-btn:focus-visible, .hit-main:focus-visible, .menu-pop button:focus-visible, .choice:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}
.icon-btn {
  min-width: 44px;
  min-height: 44px;
  border-radius: 12px;
  font-size: 20px;
  line-height: 1;
  color: var(--text-muted);
}
.icon-btn:hover { background: var(--surface-soft); color: var(--text); }
.icon-btn:active, .hit-main:active, .nav-item:active { transform: scale(0.98); }
.bottom-nav { z-index: 8; }
.nav-item svg { width: 20px; height: 20px; }
.quick-actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; margin: 0 0 14px; }
.quick-actions .btn { width: 100%; padding-left: 10px; padding-right: 10px; white-space: normal; text-align: center; line-height: 1.2; }
.summary-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; margin-bottom: 8px; }
.summary-grid .card { margin: 0; padding: 12px; }
.summary-grid .card-span { grid-column: 1 / -1; }
.customize-btn { margin: 2px 0 14px; }
.toggle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.toggle-row strong { display: block; font-weight: 650; }
.toggle-row p { margin: 2px 0 0; font-size: 12px; color: var(--text-muted); font-weight: 500; }
.switch {
  position: relative;
  width: 48px;
  height: 28px;
  flex-shrink: 0;
  border-radius: 14px;
  background: #c5d0c8;
  border: 0;
  cursor: pointer;
}
.switch.is-on { background: var(--primary); }
.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(20, 32, 27, 0.16);
  transition: transform .2s ease;
}
.switch.is-on::after { transform: translateX(20px); }
.switch:focus-visible { outline: none; box-shadow: var(--focus); }
#modal-customize .btn-block { margin-top: 16px; }
.summary-grid strong { display: block; font-size: 1.05rem; margin-top: 4px; }
.hero-kicker { margin-bottom: 4px; }
.section-label { margin: 16px 0 6px; font-size: 0.95rem; }
.food-source { margin: 10px 0 4px; }
.food-source a { color: var(--text-muted); text-decoration: underline; }
.hit { display: flex; align-items: center; gap: 4px; min-height: 52px; border-bottom: 1px solid var(--border); }
.hit-main {
  flex: 1;
  min-width: 0;
  text-align: left;
  min-height: 44px;
  padding: 8px;
  border-radius: 10px;
}
.hit-main:hover { background: var(--surface-soft); }
#ex-list .hit-main, #template-exercises { width: 100%; }
.hit-main strong, .meal-item strong { display: block; word-break: break-word; }
.star-btn { color: #9a6700; font-size: 18px; }
.star-btn[aria-pressed="true"] { color: #9a6700; }
.empty-state { text-align: center; padding: 8px 4px 12px; }
.meal-item { align-items: center; }
.meal-item .text-btn { flex: 0 0 auto; }
.privacy-note {
  background: var(--surface-soft);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 13px;
}
.beta-pill { background: #fff4df; color: #9a6700; }
.choice, .seg-btn {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 48px;
  text-align: left;
  padding: 10px 12px;
  margin-bottom: 8px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-weight: 650;
}
.choice:hover, .seg-btn:hover { background: var(--surface-soft); }
.choice.is-selected, .btn.is-selected, .seg.is-on {
  border-color: #9eddb8;
  background: var(--primary-soft);
  color: var(--primary-strong);
}
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 650; }
.check input { width: 22px; height: 22px; accent-color: var(--primary-strong); }
.inline-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.overlay {
  position: absolute;
  inset: 0;
  z-index: 30;
  background: var(--bg);
  overflow: auto;
  padding: 18px 16px 28px;
}
.tour {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: calc(var(--nav-h) + 10px);
  z-index: 12;
}
.tour .card { margin: 0; }
.workout-dock {
  position: absolute;
  left: 0;
  right: 0;
  bottom: var(--nav-h);
  z-index: 7;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.98);
  border-top: 1px solid var(--border);
}
.workout-dock strong { display: block; font-variant-numeric: tabular-nums; }
.has-dock .client-screens { padding-bottom: calc(var(--nav-h) + 92px); }
.has-dock .tour { bottom: calc(var(--nav-h) + 96px); }
.set-block { padding: 8px 0 12px; border-bottom: 1px solid var(--border); }
.set-top, .row-actions { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.set-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 44px; gap: 8px; align-items: end; }
.set-fields label { margin: 0; }
.rpe-line { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.stepper { display: flex; align-items: center; gap: 6px; }
.stepper button, .set-check {
  min-width: 44px;
  min-height: 44px;
  width: 44px;
  height: 44px;
}
.stepper output { min-width: 1.5ch; text-align: center; font-weight: 750; }
.set-check { border-radius: 12px; }
.menu-pop {
  position: fixed;
  z-index: 40;
  min-width: 200px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  padding: 4px;
}
.menu-pop button {
  min-height: 44px;
  text-align: left;
  padding: 8px 12px;
  border-radius: 8px;
  font-weight: 650;
}
.menu-pop button:hover { background: var(--surface-soft); }
.menu-pop button.danger { color: var(--danger); }
.modal-card { max-height: min(86vh, 720px); overflow: auto; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 12px; }
.chip-row .btn { min-height: 44px; }
.photo-ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.photo-ph { position: relative; overflow: hidden; }
.weight-row {
  width: 100%;
  text-align: left;
  min-height: 48px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}
.weight-row:hover { background: var(--surface-soft); }
.ai-list { margin: 8px 0 12px; padding-left: 18px; list-style: disc; color: var(--text-muted); }
.ai-list li { margin: 4px 0; }
.timer-display { font-size: 2.4rem; }
.rest-prefs .btn { min-width: 64px; }
.client-screen, .client-screens { min-width: 0; }
@media (max-width: 390px) {
  .nav-item { font-size: 10px; }
  .timer-display { font-size: 2rem; }
  .inline-2 { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .toast { bottom: 88px; max-width: calc(100% - 24px); text-align: center; }
}

/* Mapa svalů */
.heat-card {
  container-type: inline-size;
  container-name: heatmap;
  min-width: 0;
  max-width: 100%;
  overflow-x: clip;
}
.heat-note { margin: 0 0 10px; }
.heat-seg {
  flex: 1;
  min-height: 40px;
  border-radius: 999px;
  font-weight: 650;
  color: var(--text-muted);
}
.heat-seg.is-active {
  background: var(--surface);
  color: var(--primary-strong);
  box-shadow: var(--shadow);
}
.heat-seg:focus-visible { outline: none; box-shadow: var(--focus); }
.heat-figure {
  position: relative;
  margin-top: 8px;
  border-radius: 16px;
  overflow: hidden;
  background: #f7f8f6;
}
.heat-photo {
  display: block;
  width: 100%;
  height: auto;
}
.heat-photo[hidden] { display: none !important; }
.heat-hits { position: absolute; inset: 0; }
.heat-hit {
  position: absolute;
  padding: 0;
  border-radius: 40%;
  background: transparent;
}
.muscle { cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.muscle:focus { outline: none; }
.heat-hit.is-selected {
  background: rgba(255, 255, 255, 0.22);
  box-shadow: inset 0 0 0 2px rgba(18, 33, 24, 0.45);
}
@media (hover: hover) and (pointer: fine) {
  .heat-hit:hover,
  .heat-hit:focus-visible {
    background: rgba(255, 255, 255, 0.16);
  }
}
.heat-swatch {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 8px;
  border-radius: 999px;
  vertical-align: -1px;
}
.heat-legend { display: none; }
.heat-legend-labels {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.heat-legend-bar {
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, #2563EB 0%, #22B8CF 25%, #39C16C 50%, #D7EF3F 62%, #F6C445 74%, #F58A32 86%, #E84A4A 100%);
}
.heat-selected {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.heat-selected p { margin: 0; }
.heat-selected-name {
  margin-top: 2px;
  font-size: 1.15rem;
  font-weight: 750;
  letter-spacing: -0.02em;
}
.heat-selected-name.is-empty {
  color: var(--text-muted);
  font-size: 1rem;
  font-weight: 650;
}
.heat-tip {
  position: fixed;
  z-index: 40;
  transform: translate(-50%, -100%);
  background: var(--text);
  color: #fff;
  font-size: 12px;
  font-weight: 650;
  padding: 4px 8px;
  border-radius: 8px;
  pointer-events: none;
  white-space: nowrap;
}
#client-food.is-active { display: flex; flex-direction: column; gap: 6px; }
.food-side { display: contents; }
#food-balance { order: 1; }
#food-macros { order: 2; }
.food-main { order: 3; min-width: 0; }
#water-card { order: 4; }
.day-balance {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 6px;
}
.day-side { text-align: center; min-width: 0; }
.day-side span { display: block; color: var(--text-muted); font-size: 12px; }
.day-side strong { display: block; font-size: 1.05rem; }
.day-side.is-over strong { color: var(--warning); }
#food-balance .text-btn { display: block; margin: 2px auto 8px; }
.macro-pills { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 8px; }
.macro-pill span { color: var(--text-muted); font-size: 12px; }
.macro-pill strong { display: block; font-size: 13px; margin: 2px 0 6px; }
.macro-pill.is-over strong { color: var(--warning); }
.food-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 14px; }
.food-actions .btn-primary { flex: 1 1 100%; }
.food-tabs .seg { min-height: 44px; }
.modal-card label.btn { width: 100%; margin-bottom: 8px; }
.chip-action {
  flex: 1 1 30%;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font-weight: 650;
  font-size: 13px;
}
.chip-action:hover { background: var(--surface-soft); }
.meal-block { margin: 0 0 8px; }
.meal-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  padding: 10px 0 4px;
}
.meal-head h3 {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.meal-head span { color: var(--text-muted); font-size: 13px; }
.meal-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  padding: 8px 0;
  text-align: left;
  border-top: 1px solid var(--border);
}
.meal-row > span:first-child { min-width: 0; flex: 1; }
.meal-row strong, .meal-row .tiny { display: block; }
.meal-kcal { margin-left: auto; color: var(--text); white-space: nowrap; font-variant-numeric: tabular-nums; }
.meal-add {
  display: block;
  min-height: 44px;
  padding: 8px 0 4px;
  color: var(--primary-strong);
  font-weight: 700;
  text-align: left;
}
.water-box { padding-top: 8px; border-top: 1px solid var(--border); }
.water-box h3 { font-size: 1rem; margin-bottom: 4px; }
.water-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.water-actions .btn { min-height: 44px; }
.ai-lines { margin: 8px 0 12px; }
.ai-lines li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
label.btn input { display: none; }

@media (max-width: 380px) {
  .calorie-ring-wrap, .calorie-ring { width: 128px; height: 128px; }
  .ring-label strong { font-size: 1.3rem; }
  .chip-action { flex-basis: 100%; }
}

@media (min-width: 960px) {
  .phone-frame.is-wide { width: min(1080px, calc(100vw - 48px)); }
  .phone-frame.is-wide #client-food.is-active {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(240px, 320px);
    column-gap: 28px;
    align-items: start;
  }
  .phone-frame.is-wide #food-balance { grid-column: 1; grid-row: 1; }
  .phone-frame.is-wide .food-main { grid-column: 1; grid-row: 2; }
  .phone-frame.is-wide .food-side {
    display: flex;
    flex-direction: column;
    gap: 18px;
    grid-column: 2;
    grid-row: 1 / span 2;
    position: sticky;
    top: 8px;
  }
  .phone-frame.is-wide #water-card { order: 0; }
}
