/* ==========================================================================
   Režim člena – the member shell (views/member/*.js, docs/SPEC_V3.md §C3, docs/SPEC_V4.md §3 R9; prefix .mb-)
   A simple phone-first app: big ✓ (56 px), few words, a bottom tab bar below 768 px, no money anywhere. Tokens of app.css /
   theme.css / v2.css (Nova tokens with fallbacks for the classic look). Tap targets ≥ 44 px, inputs ≥ 16 px, nothing wider than
   the screen at 320 px (every flex / grid child has min-width: 0, long words wrap).
   ========================================================================== */

/* ---------- frame ---------- */
.member-main { display: block; min-height: 100vh; min-height: 100dvh; outline: none; overflow-x: clip; background: var(--bg); }
.member-host, .member-host > .view-member { min-width: 0; }
.mb-shell {
  --mb-tabbar: 0px;
  --mb-ok: var(--green, var(--good, #0ca30c));
  --mb-ok-soft: var(--green-soft, var(--good-soft, #e4f1e8));
  --mb-ok-text: var(--green-text, var(--good-text, #006300));
  box-sizing: border-box;
  max-width: 760px;
  min-width: 0;
  margin: 0 auto;
  padding: 0 16px 40px;
  color: var(--text);
  font-size: 16px;
  line-height: 1.45;
}
.mb-shell *, .mb-shell *::before, .mb-shell *::after { box-sizing: border-box; }

/* ---------- header ---------- */
.mb-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px 12px; min-width: 0; padding: 14px 0 10px; }
.mb-head-main { flex: 1 1 auto; min-width: 0; }
.mb-farm { margin: 0; font-size: 22px; line-height: 1.2; font-weight: 750; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.mb-who-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0 12px; min-width: 0; }
.mb-who { margin: 2px 0 0; min-width: 0; color: var(--text-2); font-size: 15px; overflow-wrap: anywhere; }
.mb-farms-link { display: inline-flex; align-items: center; min-height: 44px; color: var(--link); font-size: 15px; font-weight: 600; }
.mb-head-actions { display: flex; flex: 0 1 auto; flex-wrap: wrap; justify-content: flex-end; gap: 4px; min-width: 0; }
.mb-head-actions .btn { min-height: 44px; padding-inline: 10px; font-size: 15px; }

/* ---------- the owner's preview ---------- */
.mb-preview {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; min-width: 0;
  margin: 0 0 12px; padding: 12px 14px;
  border: 1px solid var(--accent); border-radius: var(--radius-lg, 12px); background: var(--accent-soft);
}
.mb-preview-text { display: flex; flex: 1 1 220px; flex-direction: column; gap: 2px; min-width: 0; font-size: 15px; }
.mb-preview-text strong { font-size: 16px; }
.mb-preview-who { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; min-width: 0; }
.mb-preview-who:empty { display: none; }
.mb-preview-label { font-size: 14px; color: var(--text-2); }
.mb-preview-select { min-height: 44px; max-width: 100%; font-size: 16px; }
.mb-preview-back { min-height: 44px; max-width: 100%; height: auto; white-space: normal; }
.mb-preview-note { margin: 0 0 12px; padding: 8px 12px; border-radius: var(--radius); background: var(--accent-soft); font-size: 14px; }

/* ---------- tabs (top on a desktop, a bottom bar on a phone) ---------- */
.mb-tabs { display: flex; gap: 4px; min-width: 0; margin: 0 0 16px; padding: 4px; border-radius: 14px; background: var(--surface-2); }
.mb-tab {
  display: flex; flex: 1 1 0; align-items: center; justify-content: center; gap: 8px; min-width: 0; min-height: 48px;
  padding: 4px 8px; border-radius: 10px; color: var(--text-2); font-size: 15px; font-weight: 600; text-align: center;
  text-decoration: none; -webkit-tap-highlight-color: transparent;
}
.mb-tab:hover { color: var(--text); background: var(--surface-3); }
.mb-tab.is-active { background: var(--surface); color: var(--mb-ok-text); box-shadow: var(--shadow-sm, none); }
.mb-tab:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: -2px; }
.mb-tab-icon { display: inline-flex; flex: none; }
.mb-tab-label { min-width: 0; line-height: 1.15; overflow-wrap: anywhere; }

@media (max-width: 767.98px) {
  .mb-shell { --mb-tabbar: calc(62px + env(safe-area-inset-bottom, 0px)); padding-bottom: calc(var(--mb-tabbar) + 32px); }
  .mb-tabs {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; gap: 0; margin: 0;
    padding: 3px 2px calc(3px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--border); border-radius: 0; background: var(--surface);
  }
  .mb-tab { flex-direction: column; gap: 2px; min-height: 56px; padding: 4px 2px; font-size: 11.5px; font-weight: 600; }
  .mb-tab.is-active { background: var(--mb-ok-soft); box-shadow: none; }
  html[data-member-mode] .toast-region { bottom: calc(62px + env(safe-area-inset-bottom, 0px) + 8px); }
  html[data-member-mode] .ts-done { bottom: calc(62px + env(safe-area-inset-bottom, 0px) + 8px); max-height: calc(100vh - 62px - 32px); }
  html[data-member-mode] body.modal-open .toast-region { bottom: auto; }
}
@media (max-width: 340px) {
  .mb-tab { font-size: 10.5px; }
  .mb-farm { font-size: 20px; }
}

/* ---------- common pieces ---------- */
.mb-body { display: block; min-width: 0; outline: none; }
.mb-panel { min-width: 0; }
.mb-lead { margin: 0 0 14px; color: var(--text-2); font-size: 15px; }
.mb-hint { margin: 6px 0 0; color: var(--text-2); font-size: 14px; }
.mb-summary { margin: 0 0 10px; color: var(--text-2); font-size: 15px; overflow-wrap: anywhere; }
.mb-note {
  display: flex; align-items: flex-start; gap: 8px; min-width: 0; margin: 0 0 16px; padding: 12px;
  border-radius: var(--radius); background: var(--warning-soft); color: var(--warning-text); font-size: 15px;
}
.mb-note > span { min-width: 0; overflow-wrap: anywhere; }
.mb-note > .icon { flex: none; margin-top: 2px; }
.mb-empty { margin: 0 0 16px; padding: 20px 16px; border: 1px dashed var(--border-strong); border-radius: var(--radius-lg, 12px); text-align: center; }
.mb-empty-title { margin: 0 0 4px; font-size: 17px; font-weight: 700; overflow-wrap: anywhere; }
.mb-empty-text { margin: 0; color: var(--text-2); font-size: 15px; overflow-wrap: anywhere; }
.mb-quiet { display: flex; align-items: center; gap: 8px; min-width: 0; margin: 0; color: var(--text-2); font-size: 15px; }
.mb-quiet > span { min-width: 0; overflow-wrap: anywhere; }
.mb-quiet > .icon { flex: none; }
.mb-group { min-width: 0; margin: 0 0 22px; }
.mb-group-title { display: flex; align-items: center; gap: 8px; min-width: 0; margin: 0 0 10px; font-size: 17px; font-weight: 700; line-height: 1.3; }
.mb-group-text { min-width: 0; overflow-wrap: anywhere; }
.mb-count {
  display: inline-grid; place-items: center; flex: none; min-width: 26px; height: 26px; padding: 0 8px;
  border-radius: 999px; background: var(--surface-2); color: var(--text-2); font-size: 13px; font-weight: 700;
}
.mb-group-empty { padding: 2px 0; }
.mb-group.fold.is-folded { margin-bottom: 10px; }
.mb-day.is-today > .mb-group-title { color: var(--mb-ok-text); }

/* ---------- task rows: the big ✓ ---------- */
.mb-tasks { display: flex; flex-direction: column; gap: 8px; min-width: 0; margin: 0; padding: 0; list-style: none; }
.mb-task {
  display: flex; align-items: center; gap: 12px; min-width: 0; padding: 8px 12px 8px 8px;
  border: 1px solid var(--border); border-radius: var(--radius-lg, 12px); background: var(--surface);
}
.mb-task.is-overdue { border-color: var(--critical, #d03b3b); }
.mb-task.is-skipped { opacity: 0.72; }
.mb-tick {
  display: grid; place-items: center; flex: none; width: 56px; height: 56px; padding: 0;
  border: 2px solid var(--border-strong); border-radius: 50%; background: var(--surface); color: var(--border-strong);
  cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.mb-tick:hover:not(:disabled) { border-color: var(--mb-ok); color: var(--mb-ok); }
.mb-tick:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
.mb-task.is-done .mb-tick { border-color: var(--mb-ok); background: var(--mb-ok); color: #fff; }
.mb-task.is-skipped .mb-tick { border-style: dashed; }
.mb-tick.is-static { width: 44px; height: 44px; margin: 6px; border-width: 1.5px; border-style: dashed; cursor: default; opacity: 0.8; }
.mb-tick.is-static .icon { width: 20px; height: 20px; }
.mb-task.is-done .mb-tick.is-static { border-style: solid; border-color: var(--mb-ok); background: var(--mb-ok-soft); color: var(--mb-ok-text); }
.mb-task-body { display: flex; flex: 1 1 auto; flex-direction: column; gap: 4px; min-width: 0; }
.mb-task-open {
  display: flex; flex-direction: column; gap: 2px; width: 100%; min-width: 0; min-height: 44px; margin: 0; padding: 4px 0;
  border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.mb-task-open:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; border-radius: 6px; }
.mb-task-title { min-width: 0; font-size: 17px; font-weight: 650; line-height: 1.3; overflow-wrap: anywhere; }
.mb-task-meta { min-width: 0; color: var(--text-2); font-size: 14px; overflow-wrap: anywhere; }
.mb-task.is-done .mb-task-title { color: var(--text-2); text-decoration: line-through; text-decoration-thickness: 1px; }
.mb-task-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
.mb-flag {
  display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 999px;
  background: var(--critical-soft); color: var(--critical-text); font-size: 13px; font-weight: 700;
}
.mb-origin {
  display: inline-flex; align-items: center; max-width: 100%; min-height: 44px; padding: 0 12px; border-radius: 999px;
  background: var(--accent-soft); color: var(--link); font-size: 14px; font-weight: 600; text-decoration: none; overflow-wrap: anywhere;
}
.mb-origin:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 1px; }
.mb-origin-text { background: none; color: var(--text-2); }

/* the „Aj úlohy ostatných“ chip */
.mb-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; min-width: 0; margin: 0 0 16px; }
.mb-shell .chip.mb-others-chip { height: auto; min-height: 44px; padding: 6px 16px; font-size: 15px; white-space: normal; }
.mb-shell .chip.mb-others-chip.is-active { border-color: var(--mb-ok); background: var(--mb-ok-soft); color: var(--mb-ok-text); }
.mb-others-hint { min-width: 0; color: var(--text-2); font-size: 14px; }

/* ---------- v5 R26: the action plan card „Plán na október: 12 z 18 hotových“ (Moje úlohy, tasks only – never money) ---------- */
.mb-plan {
  min-width: 0; padding: 10px 12px 2px;
  border: 1px solid var(--border); border-radius: var(--radius-lg, 12px); background: var(--surface-2);
}
.mb-plan.fold.is-folded { padding-bottom: 10px; }
.mb-plan > .mb-group-title { margin-bottom: 4px; }
.mb-plan-lead { margin: 0 0 12px; color: var(--text-2); font-size: 15px; overflow-wrap: anywhere; }
.mb-plan-weeks { min-width: 0; }
.mb-plan-week { min-width: 0; margin: 0 0 14px; }
.mb-plan-sub { margin: 0 0 8px; color: var(--text-2); font-size: 15px; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.mb-plan-leftover .mb-plan-sub { color: var(--warning-text); }
.mb-plan-more { margin: 0 0 12px; color: var(--text-2); font-size: 14px; overflow-wrap: anywhere; }
.mb-plan .mb-group-empty { margin: 0 0 12px; }

/* ---------- Rozvrh ---------- */
.mb-toolbar { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; margin: 0 0 16px; }
.mb-shell .segmented { max-width: 100%; flex-wrap: wrap; }
.mb-shell .segmented-item { min-height: 44px; height: auto; white-space: normal; font-size: 15px; }
.mb-svcs { display: flex; flex-direction: column; gap: 8px; min-width: 0; margin: 0 0 8px; padding: 0; list-style: none; }
.mb-svc {
  display: flex; align-items: center; gap: 10px; min-width: 0; padding: 10px 12px;
  border: 1px solid var(--border); border-left-width: 4px; border-radius: var(--radius); background: var(--surface);
}
.mb-svc.is-mine { border-left-color: var(--mb-ok); background: var(--mb-ok-soft); }
.mb-svc-main { display: flex; flex: 1 1 auto; flex-direction: column; gap: 2px; min-width: 0; }
.mb-svc-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; min-width: 0; }
.mb-svc-label { font-weight: 700; overflow-wrap: anywhere; }
.mb-svc-time { color: var(--text-2); font-size: 14px; font-variant-numeric: tabular-nums; }
.mb-svc-who { font-size: 15px; overflow-wrap: anywhere; }
.mb-svc-tasks { color: var(--text-2); font-size: 14px; overflow-wrap: anywhere; }
.mb-svc-swap { flex: none; min-height: 44px; }

/* ---------- Prevádzka ---------- */
.mb-rec-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; min-width: 0; margin: 0 0 16px; }
.mb-rec-grid--more { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mb-rec-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-width: 0; min-height: 76px; padding: 10px 6px;
  border: 1px solid var(--border); border-radius: var(--radius-lg, 12px); background: var(--surface); color: var(--text);
  font: inherit; font-size: 14.5px; font-weight: 650; line-height: 1.2; text-align: center; cursor: pointer;
}
.mb-rec-btn:hover { border-color: var(--mb-ok); }
.mb-rec-btn:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.mb-rec-icon { display: inline-flex; color: var(--mb-ok); }
.mb-rec-label { min-width: 0; max-width: 100%; overflow-wrap: break-word; hyphens: auto; }
@media (max-width: 360px) {
  .mb-rec-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.mb-lines { display: flex; flex-direction: column; gap: 4px; min-width: 0; margin: 0; padding: 0; list-style: none; }
.mb-line { min-width: 0; padding: 6px 0; border-bottom: 1px solid var(--grid); font-size: 15px; overflow-wrap: anywhere; }
.mb-line:last-child { border-bottom: 0; }
.mb-line.is-quiet { color: var(--text-2); }
.mb-line.is-mine { font-weight: 650; }
.mb-line-who { color: var(--text-2); }
.mb-recs { display: flex; flex-direction: column; gap: 6px; min-width: 0; margin: 0; padding: 0; list-style: none; }
.mb-rec { min-width: 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.mb-rec-open {
  display: flex; align-items: center; gap: 8px; width: 100%; min-width: 0; min-height: 48px; margin: 0; padding: 6px 10px 6px 12px;
  border: 0; border-radius: inherit; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.mb-rec-open:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 1px; }
.mb-rec-open > .icon { flex: none; color: var(--text-2); }
.mb-rec-main { display: flex; flex: 1 1 auto; flex-direction: column; gap: 2px; min-width: 0; }
.mb-rec-title { min-width: 0; overflow-wrap: anywhere; }
.mb-rec-when { color: var(--text-2); font-size: 14px; }

/* the pickers of Prevádzka (an animal for its events, a section or an animal for a note) */
.mb-picks { display: flex; flex-direction: column; gap: 6px; min-width: 0; margin: 0 0 12px; padding: 0; list-style: none; }
.mb-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; min-width: 0; padding: 8px 0; border-bottom: 1px solid var(--grid); }
.mb-pick:last-child { border-bottom: 0; }
.mb-pick-main { display: flex; flex: 1 1 160px; flex-direction: column; gap: 2px; min-width: 0; }
.mb-pick-name { min-width: 0; overflow-wrap: anywhere; }
.mb-pick-sub { color: var(--text-2); font-size: 14px; overflow-wrap: anywhere; }
.mb-pick-actions { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.mb-pick-btn { min-height: 44px; padding-inline: 12px; white-space: normal; }
.mb-pick-row {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-width: 0; min-height: 48px; margin: 0; padding: 4px 4px 4px 0;
  border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.mb-pick-row:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 1px; }
.mb-pick-row > .icon { flex: none; color: var(--text-2); }
.mb-pick-group { margin: 4px 0 6px; font-size: 15px; font-weight: 700; color: var(--text-2); }

/* ---------- sheets of the member shell ---------- */
.mb-form { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.mb-form-extra { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.mb-form-extra:empty { display: none; }
.mb-sheet .input, .mb-sheet select, .mb-sheet textarea, .mb-in { font-size: 16px; min-height: 44px; max-width: 100%; }
.mb-sheet .modal-footer .btn, .mb-sheet .segmented-item { min-height: 44px; }
.mb-sheet .modal-footer { flex-wrap: wrap; }
.mb-sheet-what { margin: 0 0 6px; overflow-wrap: anywhere; }
.mb-sheet .field { min-width: 0; }

/* ---------- Komunita ---------- */
.mb-board-form { display: flex; flex-direction: column; align-items: stretch; gap: 8px; min-width: 0; margin: 0 0 14px; }
.mb-board-in { width: 100%; }
.mb-board-post { align-self: flex-start; min-height: 44px; max-width: 100%; white-space: normal; }
.mb-board { display: flex; flex-direction: column; gap: 8px; min-width: 0; margin: 0; padding: 0; list-style: none; }
.mb-board-note { min-width: 0; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.mb-board-note.is-mine { border-left: 4px solid var(--mb-ok); }
.mb-board-head { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; min-width: 0; }
.mb-board-who { font-weight: 700; overflow-wrap: anywhere; }
.mb-board-when { color: var(--text-2); font-size: 14px; }
.mb-board-del { margin-left: auto; min-height: 44px; }
.mb-board-text { margin: 6px 0 0; min-width: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.mb-people { display: flex; flex-direction: column; gap: 6px; min-width: 0; margin: 0; padding: 0; list-style: none; }
.mb-person { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 6px 0; }
.mb-avatar {
  display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 50%;
  background: var(--brown-soft, var(--surface-2)); color: var(--brown-text, var(--text)); font-size: 15px; font-weight: 700;
}
.mb-person[data-role="szco"] .mb-avatar { background: var(--mb-ok-soft); color: var(--mb-ok-text); }
.mb-person-main { display: flex; flex: 1 1 auto; flex-direction: column; min-width: 0; }
.mb-person-name { font-weight: 650; overflow-wrap: anywhere; }
.mb-person-role, .mb-person-duty { color: var(--text-2); font-size: 14px; overflow-wrap: anywhere; }
.mb-person.is-me .mb-person-name { color: var(--mb-ok-text); }
.mb-reqs { display: flex; flex-direction: column; gap: 6px; min-width: 0; margin: 0; padding: 0; list-style: none; }
.mb-req { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.mb-req-main { display: flex; flex: 1 1 auto; flex-direction: column; gap: 2px; min-width: 0; }
.mb-req-head { display: flex; flex-wrap: wrap; gap: 2px 10px; min-width: 0; }
.mb-req-kind { font-weight: 650; overflow-wrap: anywhere; }
.mb-req-status { color: var(--text-2); font-size: 14px; }
.mb-req[data-status="accepted"] .mb-req-status { color: var(--mb-ok-text); font-weight: 650; }
.mb-req[data-status="declined"] .mb-req-status { color: var(--critical-text); }
.mb-req-what { color: var(--text-2); font-size: 14px; overflow-wrap: anywhere; }
.mb-req-cancel { flex: none; min-height: 44px; }
.mb-days-off { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; margin-top: 8px; }
.mb-shell .chip.mb-day-chip { height: 44px; min-height: 44px; min-width: 44px; padding: 0 12px; font-size: 15px; }
.mb-shell .chip.mb-day-chip.is-active { border-color: var(--mb-ok); background: var(--mb-ok-soft); color: var(--mb-ok-text); }
.mb-leave-row { margin: 8px 0 0; }
.mb-leave { min-height: 44px; max-width: 100%; white-space: normal; }

/* ---------- Celá farma ---------- */
.mb-subnav { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; margin: 0 0 12px; }
.mb-shell .chip.mb-subnav-chip { height: auto; min-height: 44px; padding: 6px 14px; font-size: 15px; text-decoration: none; white-space: normal; }
.mb-shell .chip.mb-subnav-chip.is-active { border-color: var(--mb-ok); background: var(--mb-ok-soft); color: var(--mb-ok-text); }
.mb-farm-page { min-width: 0; }
.mb-card { min-width: 0; margin: 0 0 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-lg, 12px); background: var(--surface); }
.mb-card.is-target { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.mb-card-title { display: flex; align-items: center; gap: 8px; min-width: 0; margin: 0; font-size: 17px; font-weight: 700; overflow-wrap: anywhere; }
.mb-card-meta { margin: 4px 0 8px; color: var(--text-2); font-size: 14px; overflow-wrap: anywhere; }
.mb-kv { margin: 0; }
.mb-secs, .mb-animals, .mb-events, .mb-sec-notes, .mb-list { min-width: 0; margin: 0; padding: 0; list-style: none; }
.mb-secs .mb-secs { margin: 6px 0 0 14px; padding-left: 10px; border-left: 2px solid var(--grid); }
.mb-sec { min-width: 0; padding: 8px 0; border-top: 1px solid var(--grid); }
.mb-sec.is-target { background: var(--accent-soft); border-radius: var(--radius-sm, 6px); padding-inline: 8px; }
.mb-sec-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; min-width: 0; }
.mb-sec-head strong { overflow-wrap: anywhere; }
.mb-sec-area { color: var(--text-2); font-size: 14px; font-variant-numeric: tabular-nums; }
.mb-sec-meta { margin: 2px 0 0; color: var(--text-2); font-size: 14px; overflow-wrap: anywhere; }
.mb-sec-meta:empty { display: none; }
.mb-sec-notes li { margin: 4px 0 0; font-size: 14px; overflow-wrap: anywhere; white-space: pre-wrap; }
.mb-sec-note-who { color: var(--text-2); }
.mb-animal { min-width: 0; padding: 8px 0; border-top: 1px solid var(--grid); }
.mb-animal.is-gone { opacity: 0.7; }
.mb-animal-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; min-width: 0; }
.mb-animal-head strong { overflow-wrap: anywhere; }
.mb-animal-meta { color: var(--text-2); font-size: 14px; overflow-wrap: anywhere; }
.mb-events li { margin: 2px 0 0; color: var(--text-2); font-size: 14px; overflow-wrap: anywhere; }
.mb-item { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 8px 0; border-top: 1px solid var(--grid); }
.mb-item:first-child { border-top: 0; }
.mb-item.is-target { background: var(--accent-soft); border-radius: var(--radius-sm, 6px); padding-inline: 8px; }
.mb-item strong { overflow-wrap: anywhere; }
.mb-item-meta { color: var(--text-2); font-size: 14px; overflow-wrap: anywhere; }

/* ---------- the farms list ---------- */
.mb-farm-list { display: flex; flex-direction: column; gap: 10px; min-width: 0; margin: 0; padding: 0; list-style: none; }
.mb-farm-card {
  position: relative; display: flex; flex-direction: column; gap: 2px; min-width: 0; min-height: 64px; padding: 14px 48px 14px 16px;
  border: 1px solid var(--border); border-radius: var(--radius-lg, 12px); background: var(--surface); color: var(--text); text-decoration: none;
}
.mb-farm-card:hover { border-color: var(--mb-ok); }
.mb-farm-card-name { font-size: 18px; overflow-wrap: anywhere; }
.mb-farm-card-meta { color: var(--text-2); font-size: 14px; overflow-wrap: anywhere; }
.mb-farm-card-warn { color: var(--warning-text); font-size: 14px; overflow-wrap: anywhere; }
.mb-farm-card-go { position: absolute; top: 50%; right: 14px; transform: translateY(-50%); color: var(--text-2); }

/* ---------- the shared task sheet in member mode ---------- */
/* „Bez času“ would only clear the time on this device: the server keeps a member's logged time (member_patch has no clear) */
.mb-ts .ts-time-clear { display: none; }
.mb-ts .ts-reassign-request { min-height: 44px; margin-top: 8px; white-space: normal; max-width: 100%; height: auto; }
.mb-origin-text.ts-origin { cursor: default; }

/* ---------- v5 R24: every Prevádzka record of a member ---------- */
/* the second tile row: Zvieratá · Energia · Poznámka */
.mb-rec-grid--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
/* „Zvieratá“: a group with „+ Zviera“ / „+ Viac zvierat“, then its animals */
.mb-pick-groupbox { min-width: 0; margin: 0 0 10px; }
.mb-pick-add { margin: 0 0 6px; }
/* „Moje záznamy“: a receipt that did not go up */
.mb-rec.has-failed-upload { border-color: var(--warning, #c98a00); }
.mb-rec-fail { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; min-width: 0; padding: 0 12px 10px; color: var(--warning-text, #7a5200); font-size: 14px; }
.mb-rec-fail[hidden] { display: none; }
.mb-rec-fail > .icon { flex: none; }
.mb-rec-failtext { flex: 1 1 160px; min-width: 0; overflow-wrap: anywhere; }
.mb-rec-retry { flex: none; min-height: 44px; max-width: 100%; height: auto; white-space: normal; }
/* the energy sheet */
.mb-energy-day { margin: 0 0 10px; overflow-wrap: anywhere; }

/* ---------- v5 R24: a member's receipt / animal photo (views/member/docs.js, prefix .mbd-) ---------- */
.mbd-docs { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding-top: 10px; }
.mbd-head { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.mbd-title { min-width: 0; font-size: 15px; font-weight: 700; overflow-wrap: anywhere; }
.mbd-hint { margin: 0; color: var(--text-2); font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; }
.mbd-actions { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; }
/* a label over a visually hidden file input: a tap opens the camera / the gallery natively (iOS too) */
.mbd-btn { position: relative; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; max-width: 100%; height: auto; padding-inline: 14px; white-space: normal; cursor: pointer; }
.mbd-btn:focus-within { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.mbd-btn[data-disabled="1"] { opacity: 0.5; pointer-events: none; }
/* the input covers its label: the whole ≥ 44 px button is the native file control (a tap, a keyboard focus) */
.mbd-file { position: absolute; inset: -1px; width: calc(100% + 2px); height: calc(100% + 2px); margin: 0; padding: 0; border: 0; opacity: 0; cursor: pointer; font-size: 16px; }
.mbd-ico { flex: none; }
.mbd-files { display: flex; flex-direction: column; gap: 6px; min-width: 0; margin: 0; padding: 0; list-style: none; }
.mbd-files[hidden] { display: none; }
.mbd-file-row { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 4px 4px 4px 6px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); }
.mbd-thumb { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 6px; background: var(--surface-3); color: var(--text-2); object-fit: cover; }
.mbd-file-main { display: flex; flex: 1 1 auto; flex-direction: column; gap: 1px; min-width: 0; }
.mbd-file-name { min-width: 0; font-size: 15px; overflow-wrap: anywhere; }
.mbd-file-size { color: var(--text-2); font-size: 13px; }
.mbd-x { flex: none; min-width: 44px; min-height: 44px; margin: 0; padding: 0; border: 0; border-radius: 8px; background: none; color: var(--text-2); font: inherit; font-size: 18px; cursor: pointer; }
.mbd-x:hover { background: var(--surface-3); color: var(--text); }
.mbd-x:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 1px; }
.mbd-status { margin: 0; color: var(--warning-text, #7a5200); font-size: 14px; overflow-wrap: anywhere; }
.mbd-status[hidden] { display: none; }
@media print {
  .mb-tabs, .mb-tick, .mb-head-actions, .mb-preview { display: none !important; }
}
