@media (min-width: 641px) {
  .field-allergens_other > label,
  .field-excluded_foods_text > label {
    min-height: 3em;
    display: flex;
    align-items: flex-end;
  }
}

.menu-guide-link { margin: 0 0 10px; white-space: nowrap; }
.menu-approve-form { width: 100%; margin: 0 0 22px; }
.menu-approve-form .button { width: 100%; white-space: nowrap; border-radius: 12px; font-size: clamp(.72rem, 2.7vw, .98rem); }
.meal-image.placeholder { height: 72px; display: grid; place-items: center; }
.recipe-hero-image.placeholder { height: min(24vw, 190px); min-height: 110px; display: grid; place-items: center; }

.question-widget { position: fixed; right: 22px; bottom: 22px; z-index: 40; }
.question-widget > summary { list-style: none; cursor: pointer; width: 58px; height: 58px; border-radius: 50%; background: var(--forest); box-shadow: 0 5px 18px rgba(38,61,53,.25); display: grid; place-items: center; position: relative; }
.question-widget > summary::-webkit-details-marker { display: none; }
.question-widget > summary img { width: 46px; height: 46px; border-radius: 50%; }
.question-widget > summary i { position: absolute; right: 1px; top: 1px; width: 13px; height: 13px; border-radius: 50%; background: #65c779; border: 2px solid var(--paper); }
.question-panel { position: absolute; right: 0; bottom: 70px; width: min(360px, calc(100vw - 28px)); max-height: min(600px, 75vh); overflow: auto; background: var(--paper); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); padding: 16px; }
.question-head { display:flex; justify-content:space-between; align-items:center; border-bottom:1px solid var(--line); padding-bottom:10px; }
.question-thread { display:grid; gap:12px; padding:12px 0; }
.question-item { background: var(--sage); border-radius: 12px; padding: 10px 12px; }
.question-item p { margin: 0 0 4px; }
.question-item small { color: var(--muted); }
.question-answer { margin-top:9px; padding:9px; background:var(--paper); border-radius:10px; }
.question-form { display:grid; gap:8px; }
.question-form textarea { width:100%; resize:vertical; border:1px solid #bfcac4; border-radius:10px; padding:10px; font:inherit; }
@media (max-width:640px) { .question-widget { right: 12px; bottom: 12px; } .question-widget > summary { width:52px; height:52px; } .question-widget > summary img { width:42px; height:42px; } .question-panel { bottom:64px; } }
@media print { .question-widget { display:none !important; } }

@media print {
  .print-menu-table th:first-child { width: 16mm; white-space: nowrap; }
  .print-menu-table th:nth-child(5), .print-menu-table td:nth-child(5) { width: 23%; }
}

/* Расчёт КБЖУ: значения по центру, «г» рядом с числом */
.result-card div { flex-direction: row; flex-wrap: wrap; justify-content: center; align-items: baseline; column-gap: 6px; text-align: center; }
.result-card span { flex-basis: 100%; }
.result-card small { font-size: 1rem; }

/* Анкета на iPhone: кружки выбора не растягиваются на всю ширину, текст остаётся рядом */
.field input[type=radio], .field input[type=checkbox] {
  width: 18px !important; min-width: 18px; max-width: 18px; height: 18px;
  padding: 0 !important; border: 0; border-radius: 0; background: none;
  flex: 0 0 18px; margin: 3px 0 0; -webkit-appearance: auto; appearance: auto;
}
.choice-field > div > div label, .choice-field li label { display: flex; align-items: flex-start; gap: 10px; min-width: 0; }
/* Галочка + текст: перенос строки идёт под первую букву текста */
.field.checkbox-field { display: grid; grid-template-columns: 18px minmax(0, 1fr); column-gap: 10px; align-items: start; }
.field.checkbox-field > input { grid-column: 1; margin-top: 3px; }
.field.checkbox-field > label { grid-column: 2; }
.field.checkbox-field > .errorlist, .field.checkbox-field > small { grid-column: 1 / -1; }
/* Ожидание при сборке меню */
.menu-building { position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center; background: rgba(247,244,238,.94); padding: 24px; text-align: center; }
.menu-building.is-active { display: flex; }
.menu-building .spinner { width: 46px; height: 46px; margin: 0 auto 18px; border-radius: 50%; border: 4px solid var(--sage); border-top-color: var(--forest); animation: mslim-spin 1s linear infinite; }
.menu-building p { font-size: 1.2rem; font-weight: 700; color: var(--forest); margin: 0 0 6px; }
.menu-building small { color: var(--muted); }
@keyframes mslim-spin { to { transform: rotate(360deg); } }

/* next week */
.next-week-card { border: 2px solid var(--forest); background: var(--sage); }
.next-week-card p { margin: .35rem 0 0; }
.next-week-notice a { font-weight: 800; color: var(--forest); }

/* approved menu toolbar: text, full-width shopping button, PDF cards with aligned buttons */
.menu-toolbar.is-approved { flex-direction: column; align-items: stretch; gap: 16px; }
.menu-toolbar.is-approved > p { margin: 0; }
.menu-toolbar.is-approved > .button { width: 100%; min-height: 52px; border-radius: 14px; font-size: 1.05rem; }
.menu-toolbar.is-approved .pdf-card h3 { flex: 1 1 auto; }
.menu-toolbar.is-approved .pdf-card .button { margin-top: auto; white-space: normal; }
.menu-toolbar.is-approved .pdf-hint { margin: -4px 0 0; }

/* robot button: larger on desktop */
@media (min-width: 769px) {
  .question-widget { right: 28px; bottom: 28px; }
  .question-widget > summary { width: 80px; height: 80px; }
  .question-widget > summary img { width: 68px; height: 68px; }
  .question-widget > summary i { width: 16px; height: 16px; right: 3px; top: 3px; }
  .question-panel { bottom: 92px; }
}

/* feedback block same width as questionnaire card */
.page-shell:has(.form-card.large) .feedback-block { max-width: 760px; }
.page-shell:has(.form-card:not(.large)) .feedback-block { max-width: 540px; }
.family-hint { font-size: .92rem; margin: -2px 0 6px; }

.portion-note { margin: 8px 0 6px; padding: 8px 12px; border-radius: 10px; background: var(--sage); font-size: .95rem; }

.meal { scroll-margin-top: 84px; }

/* medical acknowledgement */
.medical-ack h2 { margin-top: 0; }
.medical-ack-item { display: grid; grid-template-columns: 24px 1fr; gap: 12px; align-items: start; padding: 12px 0; border-top: 1px solid var(--line); cursor: pointer; }
.medical-ack-item input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--forest); }
.medical-note-line { background: #fff4df; border-radius: 12px; padding: 10px 14px; font-size: .95rem; }
.block-screen p { margin: 0 0 12px; }

.ban-form{margin:0}.ban-form .link-button{font-size:.85rem;color:var(--muted);text-decoration:underline;background:none;border:0;padding:4px 0;cursor:pointer}
.replacement-subtitle{font-family:Georgia,serif;margin:30px 0 14px}
.food-grid .field-cooking_mode{grid-column:1/-1}@media(min-width:641px){.food-col-right{padding-top:125px}}
.replacement-tabs{display:flex;flex-wrap:wrap;gap:8px;margin:18px 0}.replacement-tab{border:1px solid #bfcac4;background:white;border-radius:999px;padding:8px 14px;font:inherit;font-weight:700;cursor:pointer;color:var(--ink)}.replacement-tab span{color:var(--muted);font-weight:600;margin-left:4px}.replacement-tab.is-active{background:var(--ink,#263d35);border-color:var(--ink,#263d35);color:white}.replacement-tab.is-active span{color:#dfe7e2}.replacement-card.is-extra{display:none}.replacement-image{width:100%;height:140px;object-fit:cover;border-radius:12px;margin-bottom:10px}.show-extra{margin-top:14px}
.combo-badge{text-transform:uppercase;letter-spacing:.08em;color:var(--ink,#263d35)}.combo-box{background:var(--sage,#e3ece7);border-radius:14px;padding:12px 14px;margin:10px 0}.combo-box .addition{margin:4px 0}.combo-title{font-weight:700;margin:0 0 6px}.combo-note{margin:6px 0 0;font-size:.9rem}section.combo-box h2{margin-top:0}

/* Individual recovery for recipes excluded with “Больше не предлагать”. */
.disliked-list { display: grid; gap: 8px; margin: 14px 0; }
.disliked-list > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.disliked-list form { margin: 0; flex: 0 0 auto; }
.disliked-list .button { min-height: 40px; padding: 8px 14px; }
.replacement-dislike small { color: var(--muted); font-weight: 400; }
@media (max-width: 480px) { .disliked-list > div { align-items: flex-start; } }

/* 0.18: кнопка «Заменить блюдо» справа от названия */
.meal-head{display:flex;justify-content:space-between;align-items:center;gap:14px;margin:.2rem 0}.meal-head h3{flex:1;min-width:0}.meal-head .button.meal-replace{flex-shrink:0;white-space:nowrap;margin:0;padding:13px 30px;font-size:1rem;min-width:210px;background:var(--sage);border:2px solid var(--forest);color:var(--forest)}.meal-head .button.meal-replace:hover{background:var(--forest);color:#fff}
@media (max-width:640px){.meal-head{flex-direction:column;align-items:stretch;gap:6px}.meal-head .button.meal-replace{width:100%;min-width:0;margin:2px 0 6px}}

/* 0.26: экран окончания доступа */
.renew-box{margin-bottom:16px}.renew-box h2{font-family:Georgia,serif;margin:0 0 6px;color:var(--forest)}.renew-option{background:var(--sage);border-radius:14px;padding:14px 16px;margin:10px 0}.renew-option h3{margin:0 0 4px;font-size:1.05rem}.renew-option p{margin:0 0 10px;color:var(--muted)}.renew-option .button{width:100%}.renew-login summary{cursor:pointer;font-weight:800;color:var(--forest)}.renew-login details[open] summary{margin-bottom:10px}
.protein-gap{background:#fff4d6;border-radius:10px;padding:8px 10px;font-size:.92rem;line-height:1.35;color:#5b4a1a;margin:6px 0 10px}
.batch-recipe{margin:10px 0 4px;border:1px dashed #bfcac4;border-radius:12px;padding:8px 12px;background:#fbfcfa}.batch-recipe summary{cursor:pointer;font-weight:700;color:var(--forest)}.batch-recipe p{margin:8px 0 4px}.batch-recipe ul{margin:4px 0 6px}
.replacement-card{display:flex;flex-direction:column}.replacement-card h2{margin-bottom:auto;padding-bottom:10px}.replacement-card .replacement-form{margin-top:4px}.replacement-card.is-extra{display:none}
.copy-fallback{width:100%;margin:-10px 0 18px;padding:12px;border:1px solid #bfcac4;border-radius:12px;font:inherit;font-size:.95rem}

.past-weeks ul{list-style:none;margin:12px 0 0;padding:0;display:grid;gap:8px}
.past-weeks li{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 0;border-top:1px solid #e3e8e5}
.past-weeks li:first-child{border-top:0}
.past-week-notice{background:#f3f5f4;border:1px solid #d5ddd9}
.replacement-search{display:grid;gap:8px;margin:18px 0 0}.replacement-search label{font-weight:700}.replacement-search input{width:100%;padding:12px 14px;border:1px solid #bfcac4;border-radius:12px;font:inherit;font-size:1rem;background:#fff}.replacement-search-count{margin:16px 0 10px}
.shopping-changed-hint{background:#fff4df;border:1px solid #f0dcb4}.changed-swatch{display:inline-block;width:12px;height:12px;border-radius:3px;background:#f5d9a6;margin-right:4px;vertical-align:-1px}
.site-header .brand span{letter-spacing:0}
@media (max-width:640px){.site-header .brand{font-size:.85rem;line-height:1.3}}
.past-weeks{margin-top:24px}
.mail-domain-hint{margin:0 0 14px}.mail-domain-hint[hidden]{display:none}.mail-domain-hint a,.apple-mail-hint a,.resend-form a,.errorlist a{color:inherit;font-weight:700}
