/* ─── Design tokens ──────────────────────────────────────────── */
:root {
  --bg:           #f6f8f4;
  --bg-card:      #ffffff;
  --ink:          #1c2421;
  --ink-soft:     #5a6660;
  --ink-faint:    #97a09a;
  --rule:         #e5ebe3;
  --rule-soft:    #eef2ec;
  --accent:       #3e9b66;
  --accent-soft:  #e3efe8;
  --accent-warm:  #c8924c;
  --c-protein:    #4d8cac;
  --c-carbs:      #d9a02e;
  --c-fat:        #db7e5d;
  --c-over:       #c44a4a;
  --c-over-soft:  #fae0e0;
  --shadow-card:  0 1px 3px rgba(28,36,33,.06);
  --shadow-modal: 0 20px 60px rgba(0,0,0,.25);
  --bnav-h:       60px;
}

/* ─── Reset ──────────────────────────────────────────────────── */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; padding: 0;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}
body {
  display: flex; flex-direction: column;
  min-height: 100dvh;
  padding-top: env(safe-area-inset-top);
  padding-bottom: calc(var(--bnav-h) + env(safe-area-inset-bottom));
}

/* ─── App bar ────────────────────────────────────────────────── */
.appbar {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  background: var(--bg-card);
  position: sticky; top: 0; z-index: 100;
  border-bottom: 0.5px solid var(--rule);
  min-height: 48px;
}
.appbar-title {
  flex: 1;
  font-weight: 600; font-size: 16px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.appbar-btn {
  background: transparent; border: none;
  font-size: 20px; color: var(--ink);
  padding: 8px; border-radius: 999px;
  cursor: pointer;
  min-width: 40px; min-height: 40px;
  display: flex; align-items: center; justify-content: center;
}
.appbar-btn:active { background: var(--rule-soft); }

/* ─── Bottom nav ─────────────────────────────────────────────── */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: calc(var(--bnav-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--bg-card);
  border-top: 0.5px solid var(--rule);
  display: flex;
  z-index: 90;
  box-shadow: 0 -4px 20px rgba(0,0,0,.04);
}
.bnav-btn {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px;
  border: none; background: transparent;
  font-size: 22px; color: var(--ink-faint);
  cursor: pointer; font-family: inherit;
  padding: 6px 0;
  transition: color .15s;
}
.bnav-btn span {
  font-size: 10px; font-weight: 500;
  letter-spacing: .02em;
}
.bnav-btn.active { color: var(--accent); }
.bnav-btn:active { background: var(--rule-soft); }
.bnav-fab {
  font-size: 28px; color: var(--accent);
  position: relative;
}
.bnav-fab::before {
  content: '';
  position: absolute;
  width: 52px;
  height: 52px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--accent-soft);
  border-radius: 50%;
  z-index: -1;
}
.bnav-btn svg, .slot-emoji svg, .menu-item-icon svg, .appbar-btn svg, .asb-emoji svg {
  display: block;
  stroke: currentColor; fill: none;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  flex-shrink: 0;
}
.bnav-btn svg   { width: 24px; height: 24px; }
.slot-emoji svg { width: 22px; height: 22px; }
.menu-item-icon svg { width: 20px; height: 20px; }
.appbar-btn svg { width: 22px; height: 22px; }
.asb-emoji svg  { width: 26px; height: 26px; }

/* ─── Main scroll area ───────────────────────────────────────── */
main {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  padding-bottom: 20px;
}

/* ─── Week strip ─────────────────────────────────────────────── */
.week-strip-wrap {
  background: var(--bg-card);
  border-bottom: 0.5px solid var(--rule);
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  position: sticky; top: 48px; z-index: 10;
}
.week-strip-wrap::-webkit-scrollbar { display: none; }
.week-strip-wrap.hidden { display: none; }
.week-strip-month {
  display: flex; align-items: flex-end;
  font-size: 9px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--ink-faint);
  padding: 0 4px 2px; align-self: flex-end;
}
.week-strip {
  display: flex;
  min-width: max-content;
  padding: 8px 10px;
  gap: 2px;
}
.week-day {
  display: flex; flex-direction: column; align-items: center;
  min-width: 46px;
  padding: 4px;
  border-radius: 10px;
  cursor: pointer; border: none; background: transparent;
  font-family: inherit; color: var(--ink-soft);
  gap: 3px;
}
.week-day:active { background: var(--rule-soft); }
.wd-name { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.wd-date {
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  font-size: 15px; font-weight: 500;
}
.week-day.active { color: var(--accent); }
.week-day.active .wd-date {
  background: var(--accent); color: #fff; font-weight: 700;
}

/* ─── Hero kcal circle ───────────────────────────────────────── */
.hero-wrap {
  display: flex; flex-direction: column; align-items: center;
  padding: 18px 14px 10px;
  background: var(--bg-card);
  margin-bottom: 14px;
  border-radius: 0 0 16px 16px;
  box-shadow: var(--shadow-card);
}
.person-filter {
  display: flex; gap: 6px;
  margin-bottom: 16px;
}
.pf-btn {
  padding: 6px 16px;
  font-family: inherit; font-size: 13px; font-weight: 500;
  border: 1px solid var(--rule); border-radius: 999px;
  background: transparent; color: var(--ink-soft);
  cursor: pointer;
}
.pf-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }

.hero-circles {
  display: flex; gap: 24px; align-items: center;
  margin-bottom: 6px;
}
.hero-circle-item {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.hero-person-name {
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em;
  color: var(--ink-soft);
}
.hero-circle {
  position: relative; width: 110px; height: 110px;
}
.hero-circle.small { width: 80px; height: 80px; }
.hero-circle svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.hero-center {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.hero-kcal { font-size: 20px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.hero-circle.small .hero-kcal { font-size: 15px; }
.hero-target { font-size: 10px; color: var(--ink-faint); margin-top: 1px; }
.hero-pct { font-size: 11px; font-weight: 600; color: var(--ink-soft); margin-top: 1px; }
.hero-circle.small .hero-target { font-size: 9px; }
.hero-circle.small .hero-pct   { font-size: 9px; }
.hero-eaten-row {
  display: flex; gap: 20px; justify-content: center;
  font-size: 12px; color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}
.hero-eaten-row span strong { color: var(--ink); }

/* ─── Plan list view ─────────────────────────────────────────── */
.plan-list { display: grid; gap: 12px; }
.plan-card {
  background: var(--bg-card);
  border: 1px solid var(--rule);
  border-radius: 12px; padding: 16px;
  box-shadow: var(--shadow-card);
  cursor: pointer;
  transition: transform .1s;
}
.plan-card:active { transform: scale(.98); }
.plan-card h3 { margin: 0 0 4px; font-size: 17px; font-weight: 600; }
.plan-card .plan-meta { font-size: 13px; color: var(--ink-soft); margin-top: 2px; }
.plan-card .plan-id   { font-size: 11px; color: var(--ink-faint); margin-top: 6px; font-family: ui-monospace, monospace; }
.plan-card .plan-progress { font-size: 11px; color: var(--accent); margin-top: 6px; font-weight: 500; }
.add-plan-btn {
  background: var(--bg-card);
  border: 1.5px dashed var(--rule);
  border-radius: 12px; padding: 20px; width: 100%;
  font-size: 14px; font-weight: 500;
  color: var(--ink-soft); cursor: pointer; font-family: inherit;
}
.add-plan-btn:active { background: var(--rule-soft); }
.empty-state { text-align: center; padding: 60px 20px; color: var(--ink-soft); }
.empty-state h2 { font-size: 18px; font-weight: 600; color: var(--ink); margin: 0 0 8px; }
.empty-state p { margin: 0 0 20px; font-size: 14px; }

/* ─── Day view note ──────────────────────────────────────────── */
.day-note {
  background: #fff4e0; color: var(--accent-warm);
  padding: 10px 14px; border-radius: 8px;
  font-size: 13px; font-weight: 500;
  margin-bottom: 14px;
}

/* ─── Accordion slot rows ────────────────────────────────────── */
.slot-row {
  display: flex; align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 6px;
  cursor: pointer; gap: 10px;
  box-shadow: var(--shadow-card);
  transition: border-radius .15s;
}
.slot-row.expanded {
  border-radius: 12px 12px 0 0;
  margin-bottom: 0;
  border-bottom-color: var(--rule-soft);
}
.slot-emoji { font-size: 22px; flex-shrink: 0; }
.slot-row-name { font-size: 14px; font-weight: 600; flex: 1; }
.slot-row-kcal { font-size: 12px; color: var(--ink-soft); font-variant-numeric: tabular-nums; white-space: nowrap; }
.slot-row-add {
  background: transparent; border: none;
  font-size: 22px; color: var(--accent);
  cursor: pointer; padding: 2px 4px; flex-shrink: 0;
  line-height: 1;
}
.slot-chevron {
  font-size: 11px; color: var(--ink-faint);
  transition: transform .2s; flex-shrink: 0;
  display: inline-block;
}
.slot-row.expanded .slot-chevron { transform: rotate(180deg); }
.slot-body {
  background: var(--bg-card);
  border: 1px solid var(--rule); border-top: none;
  border-radius: 0 0 12px 12px;
  overflow: hidden;
  padding: 8px 12px 12px;
  margin-bottom: 6px;
}
.slot-body.hidden { display: none; }

/* ─── Meal cards ─────────────────────────────────────────────── */
.meal-card {
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 10px; padding: 12px;
  margin-bottom: 8px;
  transition: background .15s;
}
.meal-card:last-child { margin-bottom: 0; }
.meal-card.eaten { background: #f0f6f1; border-color: #cfe0d4; }
.meal-card.eaten .meal-name { color: var(--ink-soft); }
.meal-card.placeholder { background: #fff8ec; border-style: dashed; border-color: #f0d8a8; }
.meal-person {
  display: inline-block;
  font-size: 10px; font-weight: 700; letter-spacing: .08em;
  color: var(--accent); padding: 2px 7px;
  border: 1px solid var(--accent); border-radius: 999px;
  margin-bottom: 6px; text-transform: uppercase;
}
.meal-name { font-size: 14px; font-weight: 500; line-height: 1.4; margin-bottom: 4px; }
.meal-note { font-size: 11px; color: var(--ink-faint); margin-bottom: 6px; }
.meal-macros { font-size: 12px; color: var(--ink-soft); font-variant-numeric: tabular-nums; margin-bottom: 10px; }
.meal-macros strong { color: var(--ink); font-weight: 700; }
.meal-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.meal-actions button {
  background: transparent; border: 1px solid var(--rule);
  color: var(--ink-soft); font-family: inherit;
  font-size: 12px; font-weight: 500;
  padding: 6px 10px; border-radius: 999px;
  cursor: pointer; min-height: 32px;
}
.meal-actions button:active { background: var(--rule-soft); }
.meal-actions button.eaten-btn.is-eaten {
  background: var(--accent); color: white; border-color: var(--accent);
}

/* ─── Day action row (Poznámka + Den + Chat buttons) ─────────── */
.day-action-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-bottom: 10px;
}
.day-action-link {
  background: transparent; border: 1px solid var(--rule);
  color: var(--ink-soft); font-family: inherit;
  font-size: 12px; font-weight: 600;
  padding: 7px 14px; border-radius: 999px; cursor: pointer;
}
.day-action-link:active { background: var(--rule-soft); }

/* ─── Slot-level extra items ──────────────────────────────────── */
.meal-extra-list { margin-bottom: 10px; }
.meal-extra-item {
  display: flex; align-items: flex-start; gap: 6px;
  padding: 6px 0;
  border-top: 0.5px solid var(--rule-soft);
}
.meal-extra-item:first-child { border-top: none; }
.meal-extra-main { flex: 1; }
.meal-extra-name { display: block; font-size: 13px; font-weight: 500; line-height: 1.35; }
.meal-extra-macros { display: block; font-size: 11px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.meal-extra-macros strong { color: var(--ink); font-weight: 700; }
.meal-extra-remove {
  background: transparent; border: none; color: var(--ink-faint);
  font-size: 18px; line-height: 1; cursor: pointer; padding: 2px 4px;
  flex-shrink: 0; margin-top: 1px;
}
.meal-extra-remove:active { color: var(--c-over); }
.meal-extras-total {
  font-size: 12px; font-weight: 600; color: var(--ink-soft);
  padding-top: 6px; border-top: 0.5px solid var(--rule);
  font-variant-numeric: tabular-nums;
}
.meal-extras-total strong { color: var(--ink); font-weight: 700; }

/* ─── Day chat button ────────────────────────────────────────── */
.day-chat-btn {
  display: flex; align-items: center; gap: 8px;
  flex: 1; padding: 9px 14px;
  background: var(--bg-card); border: 1px solid var(--rule);
  border-radius: 999px; font-family: inherit;
  font-size: 12px; font-weight: 600; color: var(--ink-soft);
  cursor: pointer; text-align: left;
  white-space: nowrap;
}
.day-chat-btn:active { background: var(--rule-soft); }
.day-chat-btn svg { width: 15px; height: 15px; flex-shrink: 0; }
.day-plan-summary {
  font-size: 12px;
  color: var(--ink-faint);
  margin-bottom: 8px;
}

/* ─── Day totals ─────────────────────────────────────────────── */
.day-totals {
  background: var(--bg-card);
  border: 1px solid var(--rule); border-radius: 12px;
  padding: 14px; margin-top: 16px;
  box-shadow: var(--shadow-card);
}
.day-totals-person { margin-bottom: 12px; }
.day-totals-person:last-child { margin-bottom: 0; }
.day-totals-name {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: var(--ink-soft); margin-bottom: 6px;
}
.metric-row {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 4px; font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.metric-label { width: 70px; color: var(--ink-soft); }
.metric-bar {
  flex: 1; height: 6px;
  background: var(--rule-soft);
  border-radius: 999px; position: relative;
}
.metric-fill {
  position: absolute; top: 0; left: 0; height: 100%;
  background: var(--accent); border-radius: 999px;
  transition: width .3s ease;
}
.metric-fill.over  { background: var(--c-over); }
.metric-target-line {
  position: absolute; top: -2px; bottom: -2px; width: 2px;
  background: var(--ink-soft); border-radius: 1px; left: 80%;
}
.metric-fill.kcal  { background: var(--ink); }
.metric-fill.p     { background: var(--c-protein); }
.metric-fill.c     { background: var(--c-carbs); }
.metric-fill.f     { background: var(--c-fat); }
.metric-fill-plan {
  position: absolute; top: 0; left: 0; height: 100%;
  border-radius: 999px; opacity: 0.22;
}
.metric-fill-plan.kcal { background: var(--ink); }
.metric-fill-plan.p    { background: var(--c-protein); }
.metric-fill-plan.c    { background: var(--c-carbs); }
.metric-fill-plan.f    { background: var(--c-fat); }
.metric-value { width: 75px; text-align: right; color: var(--ink); font-weight: 500; }
.metric-value.over { color: var(--c-over); font-weight: 700; }

/* ─── Week summary view ──────────────────────────────────────── */
.week-summary { display: grid; gap: 12px; }
.week-plan-label {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; color: var(--ink-faint);
  padding: 4px 2px; margin-top: 4px;
}
.week-day-card.future { opacity: .55; }
.week-day-card {
  background: var(--bg-card); border: 1px solid var(--rule);
  border-radius: 12px; padding: 14px; box-shadow: var(--shadow-card);
}
.wdc-header {
  display: flex; align-items: baseline; gap: 8px;
  margin-bottom: 10px;
}
.wdc-name { font-size: 15px; font-weight: 600; }
.wdc-date { font-size: 12px; color: var(--ink-faint); }
.wdc-note { font-size: 11px; color: var(--accent-warm); margin-left: auto; }

/* ─── Recipes view ───────────────────────────────────────────── */
.recipes-search {
  width: 100%; padding: 11px 14px;
  border: 1px solid var(--rule); border-radius: 999px;
  font-family: inherit; font-size: 15px;
  background: var(--bg-card); color: var(--ink);
  margin-bottom: 16px;
}
.recipes-search:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
.recipes-list { display: flex; flex-direction: column; gap: 10px; }
.recipe-card {
  background: var(--bg-card); border: 1px solid var(--rule);
  border-radius: 12px; padding: 14px 16px;
  cursor: pointer; box-shadow: var(--shadow-card);
  transition: background .1s;
}
.recipe-card:active { background: var(--rule-soft); }
.recipe-card-name { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.recipe-card-batch { font-size: 12px; color: var(--accent); font-weight: 500; margin-bottom: 4px; }
.recipe-card-footer { display: flex; gap: 10px; align-items: center; }
.recipe-card-meta  { font-size: 12px; color: var(--ink-soft); }
.recipe-card-count { font-size: 11px; color: var(--ink-faint); margin-left: auto; }
.recipe-card-header { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.recipe-pt  { font-size: 12px; color: var(--ink-soft); }
.recipe-badge { font-size: 11px; font-weight: 700; padding: 1px 5px; border-radius: 4px; margin-left: auto; }
.recipe-badge.v-yes { background: var(--accent-soft); color: var(--accent); }
.recipe-badge.v-no  { background: var(--c-over-soft); color: var(--c-over); }
.recipe-macros { display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; margin-top: 6px; }
.rm-kcal { font-size: 13px; font-weight: 700; color: var(--ink); }
.rm-p    { font-size: 12px; color: var(--c-protein); }
.rm-c    { font-size: 12px; color: var(--c-carbs); }
.rm-f    { font-size: 12px; color: var(--c-fat); }
.rm-unit { font-size: 11px; color: var(--ink-faint); }

/* Recipe card body layout */
.recipe-card-body { display: flex; align-items: center; gap: 12px; }
.recipe-card-text { flex: 1; min-width: 0; }
/* Macro donut */
.macro-donut-wrap { display: flex; flex-direction: column; align-items: center; gap: 4px; flex-shrink: 0; }
.macro-donut { width: 56px; height: 56px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.macro-donut-inner { width: 38px; height: 38px; border-radius: 50%; background: var(--bg-card); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.mdi-kcal  { font-size: 11px; font-weight: 700; line-height: 1.1; color: var(--ink); }
.mdi-label { font-size: 8px; color: var(--ink-faint); line-height: 1; }
.macro-donut-legend { display: flex; flex-direction: column; gap: 1px; }
.mdl-p    { font-size: 10px; color: var(--c-protein); }
.mdl-c    { font-size: 10px; color: var(--c-carbs); }
.mdl-f    { font-size: 10px; color: var(--c-fat); }
.mdl-unit { font-size: 9px; color: var(--ink-faint); }
/* Recipe category / person badges */
.recipe-cat-badge    { font-size: 11px; color: var(--ink-soft); font-weight: 500; }
.recipe-person-badge { font-size: 11px; font-weight: 600; padding: 1px 5px; border-radius: 4px; background: var(--rule-soft); color: var(--ink-soft); margin-left: auto; }

/* Recipe detail modal */
.recipe-modal-meta { font-size: 13px; color: var(--ink-soft); margin-bottom: 16px; }
.recipe-modal-section { margin-bottom: 18px; }
.recipe-modal-label {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; color: var(--ink-faint);
  margin-bottom: 8px;
}
.recipe-ingredients {
  margin: 0; padding: 0; list-style: none;
  display: flex; flex-direction: column;
}
.recipe-ingredients li {
  font-size: 14px; padding: 7px 0;
  border-bottom: 0.5px solid var(--rule-soft);
  line-height: 1.4;
}
.recipe-ingredients li:last-child { border-bottom: none; }
.recipe-ingredients li strong { color: var(--ink); font-weight: 600; }
.recipe-steps {
  margin: 0; padding-left: 20px;
  display: flex; flex-direction: column; gap: 10px;
}
.recipe-steps li { font-size: 14px; line-height: 1.6; color: var(--ink); }
.recipe-modal-notes {
  font-size: 13px; color: var(--ink-soft);
  background: #fff8ec; padding: 10px 12px;
  border-radius: 8px; line-height: 1.5;
  border-left: 3px solid var(--accent-warm);
}

/* ─── Menu view ──────────────────────────────────────────────── */
.menu-section { margin-bottom: 20px; }
.menu-section-title {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: var(--ink-faint);
  margin-bottom: 8px; padding-left: 2px;
}
.menu-item {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg-card); border: 1px solid var(--rule);
  border-radius: 12px; padding: 14px 16px;
  margin-bottom: 8px; cursor: pointer;
  box-shadow: var(--shadow-card);
}
.menu-item:active { background: var(--rule-soft); }
.menu-item-icon { font-size: 20px; flex-shrink: 0; }
.menu-item-label { flex: 1; font-size: 15px; font-weight: 500; }
.menu-item-meta  { font-size: 12px; color: var(--ink-faint); }
.menu-item-active { color: var(--accent); font-weight: 600; }
.menu-item-chevron { font-size: 12px; color: var(--ink-faint); }
.menu-item-reset {
  background: none; border: none; padding: 4px 6px; cursor: pointer;
  color: var(--ink-faint); display: flex; align-items: center;
}
.menu-item-reset:hover { color: var(--accent-warm); }
.menu-item-reset svg { width: 16px; height: 16px; }

/* ─── GitHub sync ────────────────────────────────────────────── */
.sync-plan-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0; border-bottom: 0.5px solid var(--rule); font-size: 13px;
}
.sync-plan-item:last-child { border-bottom: none; }
.sync-info { flex: 1; min-width: 0; }
.sync-info strong { display: block; }
.sync-info small { color: var(--ink-soft); }
.sync-import-btn {
  font-family: inherit; font-size: 12px; font-weight: 500;
  padding: 6px 12px; border-radius: 999px;
  border: none; background: var(--accent); color: #fff;
  cursor: pointer; white-space: nowrap;
}
.sync-import-btn:disabled { opacity: .4; }
.sync-list-hidden { display: none; margin-bottom: 14px; }
.sync-list-visible { display: block; margin-bottom: 14px; }
.modal-sync-btn {
  display: block; width: 100%; margin-bottom: 14px;
  font-family: inherit; font-size: 13px; font-weight: 500;
  padding: 10px; border-radius: 8px;
  border: 1px solid var(--accent); background: transparent;
  color: var(--accent); cursor: pointer;
}
.modal-sync-btn:disabled { opacity: .4; }

/* ─── Action sheet (FAB modal) ───────────────────────────────── */
.action-sheet-btn {
  display: flex; align-items: center; gap: 14px;
  width: 100%; padding: 16px;
  background: var(--bg); border: 1px solid var(--rule);
  border-radius: 14px; margin-bottom: 10px;
  font-family: inherit; font-size: 15px; font-weight: 600;
  color: var(--ink); cursor: pointer; text-align: left;
}
.action-sheet-btn:active { background: var(--rule-soft); }
.action-sheet-btn:last-child { margin-bottom: 0; }
.asb-emoji { font-size: 24px; flex-shrink: 0; }
.asb-text  { display: flex; flex-direction: column; }
.asb-sub   { font-size: 12px; color: var(--ink-soft); font-weight: 400; margin-top: 2px; }

/* ─── Modals ─────────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(28,36,33,.5);
  z-index: 1000;
  display: flex; align-items: flex-end;
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}
.modal-backdrop.hidden { display: none; }
.modal {
  background: var(--bg-card); width: 100%;
  border-radius: 18px 18px 0 0;
  padding: 22px 18px;
  padding-bottom: calc(22px + env(safe-area-inset-bottom));
  max-height: 90dvh; overflow-y: auto;
  animation: slideUp .25s ease-out;
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.modal h3 { margin: 0 0 4px; font-size: 18px; font-weight: 600; }
.modal-sub { font-size: 13px; color: var(--ink-soft); margin: 0 0 18px; line-height: 1.5; }
.modal label {
  display: block; font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .06em;
  color: var(--ink-soft); margin-bottom: 5px; margin-top: 14px;
}
.modal input, .modal select, .modal textarea {
  width: 100%; padding: 11px 13px;
  border: 1px solid var(--rule); border-radius: 10px;
  font-family: inherit; font-size: 15px;
  color: var(--ink); background: var(--bg); resize: vertical;
}
.modal input:focus, .modal select:focus, .modal textarea:focus {
  outline: 2px solid var(--accent); outline-offset: -1px; border-color: var(--accent);
}
.modal textarea { min-height: 110px; }
.modal-hint { font-size: 11px; color: var(--ink-faint); margin-top: 6px; line-height: 1.4; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 20px; flex-wrap: wrap; }
.modal-actions button {
  font-family: inherit; font-size: 13px; font-weight: 500;
  padding: 11px 18px; border-radius: 999px;
  border: 1px solid var(--rule);
  background: transparent; color: var(--ink-soft);
  cursor: pointer; min-height: 40px;
}
.modal-actions button.primary {
  background: var(--accent); border-color: var(--accent); color: white;
}
.modal-actions button:disabled { opacity: .4; }

/* Photo modal */
.photo-preview {
  width: 100%; max-height: 240px; object-fit: contain;
  border-radius: 10px; background: var(--bg); margin-bottom: 12px;
}
.photo-status {
  display: flex; align-items: center; gap: 10px;
  padding: 12px; background: var(--bg); border-radius: 10px;
  font-size: 13px; color: var(--ink-soft); margin-bottom: 12px;
}
.photo-status.error { color: var(--c-over); background: var(--c-over-soft); }
.spinner {
  width: 18px; height: 18px;
  border: 2px solid var(--rule); border-top-color: var(--accent);
  border-radius: 50%; animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.photo-result {
  border: 1px solid var(--rule); border-radius: 10px;
  padding: 14px; background: var(--bg); margin-bottom: 14px;
}
.photo-result-conf {
  display: inline-block; font-size: 10px;
  text-transform: uppercase; letter-spacing: .08em; font-weight: 700;
  padding: 3px 8px; border-radius: 999px; margin-bottom: 8px;
}
.photo-result-conf.low    { background: var(--c-over-soft); color: var(--c-over); }
.photo-result-conf.medium { background: #fff4e0; color: var(--accent-warm); }
.photo-result-conf.high   { background: #e0f0e7; color: var(--accent); }

/* Chat modal */
.chat-context {
  background: var(--bg); border-radius: 10px;
  padding: 10px 12px; font-size: 12px;
  color: var(--ink-soft); margin-bottom: 12px;
  border-left: 3px solid var(--accent);
}
.chat-context strong { color: var(--ink); }
.chat-history { max-height: 50vh; overflow-y: auto; margin-bottom: 12px; }
.chat-msg {
  margin-bottom: 10px; padding: 10px 12px;
  border-radius: 12px; font-size: 14px; line-height: 1.4; white-space: pre-wrap;
}
.chat-msg.user      { background: var(--accent); color: white; margin-left: 20%; }
.chat-msg.assistant { background: var(--rule-soft); color: var(--ink); margin-right: 20%; }
.chat-msg.error     { background: var(--c-over-soft); color: var(--c-over); }
.chat-input-row { display: flex; gap: 8px; }
.chat-input-row textarea { flex: 1; min-height: 44px; max-height: 120px; font-size: 15px; padding: 11px 13px; }
.chat-send-btn {
  background: var(--accent); color: white; border: none;
  border-radius: 999px; width: 44px; height: 44px;
  font-size: 18px; cursor: pointer; flex-shrink: 0;
}
.chat-send-btn:disabled { opacity: .4; }

/* ─── Meal action button SVG icons ──────────────────────────── */
.meal-actions button svg {
  width: 13px; height: 13px;
  stroke: currentColor; fill: none;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  vertical-align: -2px;
  margin-right: 3px;
  flex-shrink: 0;
}

/* ─── Move meal modal ────────────────────────────────────────── */
.move-slot-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 4px; }
.move-step-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-faint); margin: 0 0 4px; }
.move-back-btn {
  display: flex; align-items: center; gap: 6px;
  width: 100%; padding: 10px 0; margin-bottom: 4px;
  background: transparent; border: none;
  font-family: inherit; font-size: 13px; font-weight: 600;
  color: var(--accent); cursor: pointer; text-align: left;
}
.move-slot-btn {
  display: flex; align-items: center; gap: 12px;
  width: 100%; padding: 12px 14px;
  background: var(--bg); border: 1px solid var(--rule);
  border-radius: 12px; font-family: inherit;
  cursor: pointer; text-align: left;
}
.move-slot-btn:active { background: var(--rule-soft); }
.move-slot-icon { display: flex; align-items: center; }
.move-slot-icon svg {
  width: 22px; height: 22px;
  stroke: var(--ink-soft); fill: none;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.move-slot-info { display: flex; flex-direction: column; gap: 2px; }
.move-slot-name { font-size: 14px; font-weight: 500; color: var(--ink); }
.move-slot-note { font-size: 12px; color: var(--ink-faint); }
.move-day-btn {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; padding: 12px 14px;
  background: var(--bg); border: 1px solid var(--rule);
  border-radius: 12px; font-family: inherit; cursor: pointer; text-align: left;
}
.move-day-btn:active { background: var(--rule-soft); }
.move-day-btn.current { opacity: .45; cursor: default; }
.move-day-name { font-size: 14px; font-weight: 500; color: var(--ink); }
.move-day-date { font-size: 12px; color: var(--ink-faint); }
.move-scale-row { margin-top: 14px; padding-top: 14px; border-top: 0.5px solid var(--rule-soft); }
.move-scale-label { display: block; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); margin-bottom: 6px; }
.move-scale-controls { display: flex; align-items: center; gap: 10px; }
.move-scale-input { width: 80px; padding: 8px 10px; border: 1px solid var(--rule); border-radius: 8px; font-family: inherit; font-size: 15px; color: var(--ink); background: var(--bg); }
.move-scale-input:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
.move-scale-hint { font-size: 11px; color: var(--ink-faint); line-height: 1.4; }

/* ─── Adherence (week view) ──────────────────────────────────── */
.week-adherence-summary {
  background: var(--bg-card); border: 1px solid var(--rule);
  border-radius: 12px; padding: 14px 16px;
  margin-bottom: 14px; box-shadow: var(--shadow-card);
}
.was-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-faint); margin-bottom: 8px; }
.was-persons { display: flex; gap: 20px; }
.was-person { display: flex; align-items: center; gap: 6px; font-size: 14px; font-variant-numeric: tabular-nums; }
.was-name { color: var(--ink-soft); font-size: 12px; }
.was-person strong { color: var(--ink); font-weight: 600; }
.was-pct { color: var(--accent); font-weight: 600; font-size: 13px; }

.adh-wrap { margin-top: 10px; padding-top: 10px; border-top: 0.5px solid var(--rule-soft); display: flex; flex-direction: column; gap: 5px; }
.adh-row { display: flex; align-items: center; gap: 8px; }
.adh-person { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-faint); width: 16px; flex-shrink: 0; }
.adh-dots { display: flex; gap: 5px; }
.adh-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--rule); }
.adh-dot.eaten { background: var(--accent); }
.adh-count { font-size: 11px; color: var(--ink-faint); margin-left: 2px; font-variant-numeric: tabular-nums; }

/* ─── Utilities ──────────────────────────────────────────────── */
.hidden { display: none !important; }

/* ─── Hero circle overflow (>100%) ──────────────────────────── */
.hero-circle.over { filter: drop-shadow(0 0 4px rgba(196,74,74,.4)); }
.hero-pct.over { color: var(--c-over); font-weight: 700; }

/* ─── Recipe category filter pills ──────────────────────────── */
.cat-pills {
  display: flex; gap: 6px; flex-wrap: nowrap;
  overflow-x: auto; scrollbar-width: none;
  padding-bottom: 12px; margin-bottom: 4px;
}
.cat-pills::-webkit-scrollbar { display: none; }
.cat-pill {
  font-family: inherit; font-size: 12px; font-weight: 500;
  padding: 5px 12px; border-radius: 999px;
  border: 1px solid var(--rule);
  background: var(--bg-card); color: var(--ink-soft);
  cursor: pointer; white-space: nowrap; flex-shrink: 0;
}
.cat-pill.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.cat-pill:active { background: var(--rule-soft); }
.cat-pill.active:active { background: var(--accent); }
.recipes-empty { text-align: center; color: var(--ink-faint); padding: 32px 0; font-size: 14px; }

/* Compact recipe cards */
.recipe-card { padding: 10px 12px; }
.recipe-card-name { font-size: 14px; }
.macro-donut { width: 46px; height: 46px; }
.macro-donut-inner { width: 30px; height: 30px; }
.mdi-kcal { font-size: 10px; }

/* ─── Settings target overrides ─────────────────────────────── */
.settings-targets-section {
  margin-top: 20px; padding-top: 14px;
  border-top: 0.5px solid var(--rule);
}
.settings-targets-label {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--ink-soft); margin-bottom: 8px;
}
.settings-targets-label-second { margin-top: 14px; }
.settings-targets-row {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
}
.settings-target-field label {
  display: block; font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .04em;
  color: var(--ink-faint); margin-bottom: 4px; margin-top: 0;
}
.settings-target-field input {
  width: 100%; padding: 8px 10px;
  border: 1px solid var(--rule); border-radius: 8px;
  font-family: inherit; font-size: 14px;
  color: var(--ink); background: var(--bg);
}
.settings-target-field input:focus { outline: 2px solid var(--accent); border-color: var(--accent); }

/* ─── Settings sync section ─────────────────────────────────── */
.settings-sync-section {
  margin-top: 20px; padding-top: 14px;
  border-top: 0.5px solid var(--rule);
}
.sync-id-row {
  display: flex; align-items: center; gap: 8px; margin-bottom: 10px;
}
.sync-id-text {
  flex: 1; font-family: monospace; font-size: 12px;
  color: var(--ink-soft); word-break: break-all;
  background: var(--bg-card); padding: 6px 10px; border-radius: 6px;
  border: 1px solid var(--rule);
}
.sync-connect-row {
  display: flex; gap: 8px;
}
.sync-token-input {
  width: 100%; padding: 8px 10px; margin-bottom: 8px;
  border: 1px solid var(--rule); border-radius: 8px;
  font-family: monospace; font-size: 12px;
  color: var(--ink); background: var(--bg); box-sizing: border-box;
}
.sync-token-input:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
.sync-connect-row input {
  flex: 1; padding: 8px 10px;
  border: 1px solid var(--rule); border-radius: 8px;
  font-family: monospace; font-size: 12px;
  color: var(--ink); background: var(--bg);
}
.sync-connect-row input:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
.sync-now-row {
  display: flex; align-items: center; gap: 8px; margin-top: 10px;
}
.sync-status-text {
  font-size: 11px; color: var(--ink-soft); flex: 1;
}
.sync-small-btn {
  padding: 7px 12px; border-radius: 8px; font-size: 12px; font-weight: 600;
  border: 1px solid var(--rule); background: var(--bg-card);
  color: var(--ink-soft); cursor: pointer; white-space: nowrap;
}
.sync-small-btn:active { background: var(--rule); }

/* ─── Replace recipe modal ───────────────────────────────────── */
.replace-list {
  max-height: 40vh; overflow-y: auto;
  margin: 10px 0; display: flex; flex-direction: column; gap: 4px;
}
.replace-recipe-btn {
  display: flex; flex-direction: column; align-items: flex-start;
  width: 100%; padding: 10px 12px;
  background: var(--bg); border: 1px solid var(--rule);
  border-radius: 10px; font-family: inherit;
  cursor: pointer; text-align: left; gap: 2px;
}
.replace-recipe-btn:active { background: var(--rule-soft); }
.replace-recipe-btn.selected { border-color: var(--accent); background: var(--accent-soft); }
.rrb-name { font-size: 14px; font-weight: 500; color: var(--ink); }
.rrb-sub  { font-size: 11px; color: var(--ink-faint); }
.replace-weight-wrap { margin-top: 12px; }

/* ─── Extra meal ─────────────────────────────────────────────── */
.extra-add-btn {
  display: block; width: 100%; margin: 12px 0 6px;
  padding: 10px; border-radius: 10px;
  border: 1.5px dashed var(--rule);
  background: transparent; color: var(--ink-soft);
  font-family: inherit; font-size: 13px; font-weight: 500;
  cursor: pointer;
}
.extra-add-btn:active { background: var(--rule-soft); }
.extra-meals-section {
  background: var(--bg-card); border: 1px solid var(--rule);
  border-radius: 12px; padding: 12px; margin-bottom: 6px;
}
.extra-meals-label {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: var(--ink-faint); margin-bottom: 8px;
}
.extra-meal-card {
  background: #fff8ec; border: 1px solid #f0d8a8;
  border-radius: 8px; padding: 10px 12px; margin-bottom: 8px;
}
.extra-meal-card:last-child { margin-bottom: 0; }
.extra-meal-card.eaten { background: #f0f6f1; border-color: #cfe0d4; }
.extra-meal-card.eaten .meal-name { color: var(--ink-soft); }
.extra-person-row {
  display: flex; gap: 8px; margin-top: 14px;
}
.extra-person-btn {
  font-family: inherit; font-size: 13px; font-weight: 500;
  padding: 7px 16px; border-radius: 999px;
  border: 1px solid var(--rule);
  background: transparent; color: var(--ink-soft);
  cursor: pointer;
}
.extra-person-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ─── Extra meal search results ─────────────────────────────── */
.extra-search-results {
  max-height: 40vh; overflow-y: auto;
  border: 1px solid var(--rule); border-radius: 10px;
  margin: 4px 0 10px;
}
.extra-res-section {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: var(--ink-faint);
  padding: 8px 12px 4px; background: var(--bg);
  position: sticky; top: 0;
}
.extra-res-badge {
  font-size: 9px; font-weight: 600; padding: 1px 5px;
  border-radius: 4px; background: var(--accent-soft); color: var(--accent);
  vertical-align: middle; margin-left: 4px; text-transform: none; letter-spacing: 0;
}
.extra-result-btn {
  display: flex; flex-direction: column; align-items: flex-start;
  width: 100%; padding: 9px 12px;
  background: var(--bg-card); border: none;
  border-bottom: 0.5px solid var(--rule-soft);
  font-family: inherit; cursor: pointer; text-align: left; gap: 2px;
}
.extra-result-btn:last-child { border-bottom: none; }
.extra-result-btn:active { background: var(--rule-soft); }
.extra-res-name { font-size: 14px; font-weight: 500; color: var(--ink); }
.extra-res-sub  { font-size: 11px; color: var(--ink-faint); }
.extra-res-loading, .extra-res-empty {
  padding: 12px; font-size: 13px; color: var(--ink-faint); text-align: center;
}

/* ─── Update toast ──────────────────────────────────────────── */
.update-toast {
  position: fixed; bottom: calc(var(--bnav-h) + env(safe-area-inset-bottom) + 12px);
  left: 50%; transform: translateX(-50%);
  background: var(--ink); color: #fff;
  padding: 10px 14px; border-radius: 10px;
  font-size: 13px; display: flex; align-items: center; gap: 10px;
  box-shadow: 0 4px 20px rgba(0,0,0,.3); z-index: 9999;
  white-space: nowrap;
}
.update-toast button {
  font-family: inherit; font-size: 13px; font-weight: 600;
  padding: 5px 12px; border-radius: 6px; border: none;
  background: var(--accent); color: #fff; cursor: pointer;
}

/* ─── Extra meal side dish section ──────────────────────────── */
#extra-side-wrap {
  background: #fdf7ee; border: 1px solid #e8c97a;
  border-radius: 10px; padding: 12px; margin-bottom: 12px;
}
.extra-side-header {
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--ink); margin-bottom: 10px;
}
.required-badge {
  font-size: 10px; font-weight: 600; padding: 2px 6px;
  border-radius: 4px; background: #fee2e2; color: #dc2626;
  text-transform: none; letter-spacing: 0; vertical-align: middle; margin-left: 4px;
}
.extra-side-quick-row {
  display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px;
}
.extra-side-quick-btn {
  font-family: inherit; font-size: 12px; font-weight: 500;
  padding: 5px 12px; border-radius: 999px;
  border: 1px solid var(--rule); background: var(--bg-card);
  color: var(--ink); cursor: pointer;
}
.extra-side-quick-btn.active {
  background: var(--accent-warm); border-color: var(--accent-warm); color: #fff;
}
#extra-side-search { margin-bottom: 4px; }

/* ─── Chat auto-expand + Zaznamenat ─────────────────────────── */
.chat-input-row textarea { resize: none; overflow-y: hidden; max-height: 200px; }
.chat-record-btn {
  display: block; margin-top: 8px;
  background: var(--accent-soft); border: 1px solid var(--accent);
  color: var(--accent); font-family: inherit; font-size: 12px; font-weight: 600;
  padding: 6px 12px; border-radius: 999px; cursor: pointer; width: 100%;
}
.chat-record-btn:disabled { opacity: .5; cursor: default; }

/* ─── Edit-macro gram preview ────────────────────────────────── */
.em-preview {
  margin-top: 8px; padding: 8px 12px;
  background: var(--accent-soft); border-left: 3px solid var(--accent);
  border-radius: 4px; font-size: 0.85rem; color: var(--accent);
}
.modal-hint { font-size: 12px; color: var(--ink-soft); margin: 8px 0 4px; }

/* ─── Multi-component gram editing ───────────────────────────── */
#em-components { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.em-component {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; padding: 6px 10px;
  background: var(--surface); border: 1px solid var(--rule); border-radius: 8px;
}
.em-comp-name { flex: 1; font-size: 13px; color: var(--ink); }
.em-comp-input-wrap { display: flex; align-items: center; gap: 4px; }
.em-comp-grams {
  width: 70px; padding: 5px 8px; border: 1px solid var(--rule); border-radius: 6px;
  font-size: 14px; font-family: inherit; color: var(--ink); background: var(--bg);
  text-align: right;
}
.em-comp-grams:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
.em-comp-unit { font-size: 12px; color: var(--ink-soft); }
.em-comp-nograms { font-size: 12px; color: var(--ink-faint); }

/* ─── Secondary button ───────────────────────────────────────── */
.secondary-btn {
  display: block; width: 100%; margin-top: 8px;
  background: transparent; border: 1px solid var(--accent);
  color: var(--accent); font-family: inherit; font-size: 13px; font-weight: 600;
  padding: 8px 12px; border-radius: 8px; cursor: pointer;
}
.secondary-btn:disabled { opacity: .5; cursor: default; }
.secondary-btn:hover:not(:disabled) { background: var(--accent-soft); }

/* ─── Photo feedback panel ───────────────────────────────────── */
.photo-follow-up {
  font-size: 13px; color: var(--ink-soft); margin: 10px 0 6px;
  padding: 8px 10px; background: var(--surface);
  border-left: 3px solid var(--accent); border-radius: 4px;
}
.photo-feedback-row {
  display: flex; gap: 6px; margin-bottom: 4px;
}
.photo-feedback-row input {
  flex: 1; padding: 8px 10px;
  border: 1px solid var(--rule); border-radius: 8px;
  font-size: 13px; font-family: inherit; color: var(--ink); background: var(--bg);
}
.photo-feedback-row input:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
.photo-feedback-row button {
  padding: 8px 14px; border: none; border-radius: 8px;
  background: var(--accent); color: #fff;
  font-family: inherit; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.photo-feedback-row button:disabled { opacity: .5; cursor: default; }
.photo-feedback-loading {
  font-size: 12px; color: var(--ink-soft); padding: 4px 0;
}
.photo-feedback-error {
  font-size: 12px; color: var(--danger, #c0392b); padding: 4px 0;
}

/* ─── Misc label helpers ─────────────────────────────────────── */
.label-hint { font-weight: 400; font-size: 11px; color: var(--ink-faint); }

/* ─── Photo orphan person/slot pickers ───────────────────────── */
.photo-hint-label { font-size: 12px; color: var(--ink-soft); margin-right: 6px; }
.photo-pk-row, .photo-slot-row {
  display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 8px;
}
.photo-pk-btn {
  padding: 4px 12px; border-radius: 999px; border: 1px solid var(--rule);
  background: var(--bg); color: var(--ink-soft);
  font-family: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
}
.photo-pk-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.photo-slot-btn {
  padding: 4px 12px; border-radius: 999px; border: 1px solid var(--rule);
  background: var(--bg); color: var(--ink-soft);
  font-family: inherit; font-size: 12px; font-weight: 500; cursor: pointer;
}
.photo-slot-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ─── Discarded meals section ────────────────────────────────── */
.discarded-section {
  background: var(--bg-card); border: 1px solid var(--rule);
  border-radius: 12px; margin-bottom: 6px; overflow: hidden;
}
.discarded-toggle {
  display: flex; align-items: center; gap: 8px;
  width: 100%; padding: 10px 12px;
  background: transparent; border: none;
  font-family: inherit; cursor: pointer; text-align: left;
}
.discarded-toggle span:first-child {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: var(--ink-faint); flex: 1;
}
.discarded-badge {
  font-size: 10px; font-weight: 700; color: var(--bg-card);
  background: var(--ink-faint); border-radius: 999px;
  padding: 1px 6px; min-width: 18px; text-align: center;
}
.discarded-chevron { color: var(--ink-faint); display: flex; }
.discarded-chevron svg { width: 14px; height: 14px; }
.discarded-body { padding: 0 12px 12px; }
.discarded-card {
  background: var(--bg); border: 1px solid var(--rule);
  border-radius: 8px; padding: 10px 12px; margin-bottom: 6px; opacity: .75;
}
.discarded-card:last-child { margin-bottom: 0; }
.discard-restore-btn {
  margin-top: 6px; background: transparent; border: 1px solid var(--accent);
  color: var(--accent); font-family: inherit; font-size: 11px; font-weight: 600;
  cursor: pointer; padding: 3px 10px; border-radius: 999px;
}
.discard-restore-btn:hover { background: var(--accent-soft); }


/* ─── Rohlík search results ─────────────────────────────────── */
.rohlik-result {
  padding: 12px;
  border: 1px solid var(--rule);
  border-radius: 10px;
  margin-bottom: 6px;
  cursor: pointer;
  background: var(--bg-card);
  transition: background 0.1s;
}
.rohlik-result:active { background: var(--rule-soft, #eee); }
.rohlik-result.no-nutrition { opacity: 0.42; cursor: default; pointer-events: none; }

/* ─── Undo FAB ───────────────────────────────────────────────── */
.undo-fab {
  position: fixed;
  bottom: calc(64px + env(safe-area-inset-bottom) + 12px);
  right: 16px;
  background: var(--ink);
  color: var(--bg);
  border: none;
  border-radius: 999px;
  padding: 8px 16px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,0,0,.25);
  z-index: 90;
  transition: opacity .15s, transform .15s;
}
.undo-fab.hidden { opacity: 0; pointer-events: none; transform: translateY(6px); }
