.meal-workspace {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.meal-choice {
  display: grid;
  width: 100%;
  grid-template-columns: 105px 1fr 12px;
  gap: 14px;
  align-items: center;
  text-align: left;
  padding: 8px;
  margin: 0 0 12px;
  border: 1px solid #dce3de;
  border-radius: 10px;
  background: #fff;
  color: #123c35;
}
.meal-choice.is-selected {
  border-color: #205a49;
  background: #edf2ed;
}
.meal-preview {
  width: 105px;
  height: 115px;
  object-fit: cover;
  border-radius: 6px;
}
.meal-name {
  font: 21px/var(--ui-leading) var(--ui-font);
  display: block;
  margin-top: 8px;
}
.meal-choice small strong,
.meal-body > small strong {
  color: #205a49;
  font-size: var(--ui-caption);
}
.meal-detail {
  padding: 22px;
  border: 1px solid #dce3de;
  border-radius: 12px;
  background: white;
  display: grid;
  grid-template-columns: minmax(180px, 0.8fr) minmax(240px, 1fr);
  gap: 24px;
}
.meal-photo {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  border-radius: 8px;
}
.meal-photo-empty {
  display: grid;
  place-items: center;
  background: #edf2ed;
  color: var(--ui-muted);
}
.meal-body h2,
.meal-body h3 {
  font-family: var(--ui-font);
  font-weight: 400;
}
.meal-body h2 {
  font-size: 28px;
  line-height: 1.15;
  margin: 10px 0 16px;
}
.meal-body h3 {
  font-size: 22px;
}
.meal-ingredients {
  list-style: none;
  padding: 0;
}
.meal-ingredients li {
  background: #f6f7f4;
  border-radius: 6px;
  padding: 8px 12px;
  margin-bottom: 4px;
  font-size: var(--ui-caption);
}
.meal-note,
.meal-request-status {
  background: #edf2ed;
  border-radius: 7px;
  padding: 12px;
  font-size: var(--ui-caption);
}
.meal-body .tools {
  margin-top: 16px;
}
.meal-rules {
  padding: 18px;
  background: #f8eeeb;
  margin-top: 20px;
  border-radius: 9px;
}
.meal-rules li {
  margin: 12px 0;
}
.meal-rules summary {
  font-weight: 600;
  color: #85453c;
}
.ingredient-edit {
  flex-wrap: wrap;
}
.ingredient-edit .ingredient-note {
  min-width: 150px;
}
.meal-change-hint {
  padding: 12px;
  background: #edf2ed;
  border-radius: 7px;
}
@media (max-width: 1150px) {
  .meal-workspace {
    grid-template-columns: 290px minmax(0, 1fr);
  }
  .meal-detail {
    grid-template-columns: 1fr;
  }
  .meal-photo {
    aspect-ratio: 16/10;
  }
}
@media (max-width: 720px) {
  .meal-workspace {
    grid-template-columns: 1fr;
  }
  .meal-detail {
    padding: 16px;
  }
  .meal-choice {
    grid-template-columns: 100px 1fr 12px;
  }
  .meal-photo {
    aspect-ratio: 4/3;
  }
  .meal-selector {
    display: grid;
    grid-template-columns: 1fr;
  }
  .meal-body .tools {
    flex-wrap: wrap;
  }
}

.food-top-rules {
  margin: 10px 0 14px;
}
.food-chain-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.food-chain-tools > span {
  font-size: 12px;
  color: #68766e;
}
.meal-action-panel .tools {
  gap: 8px;
  flex-wrap: wrap;
}
.meal-action-panel .tools button {
  font-size: 13px;
  padding: 9px 12px;
}
.history-report-context {
  display: block;
  color: #67766e;
  font-size: 12px;
  margin: 3px 0;
}

/* Only the three requested actions on the client's meal page. */
body.ui-readable .meal-detail-container .meal-action-panel {
  margin-top: 8px;
}
body.ui-readable .meal-detail-container .nutrition-page-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
}
body.ui-readable .meal-detail-container .nutrition-page-actions :is(button, a) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  min-height: 42px;
  padding: 8px 12px;
  font: var(--ui-caption)/var(--ui-leading) var(--ui-font);
  border-radius: 7px;
  white-space: normal;
  text-align: center;
}
body.ui-readable .meal-detail-container .nutrition-page-actions button:disabled {
  opacity: 0.55;
  cursor: default;
}
@media (max-width: 600px) {
  body.ui-readable .meal-detail-container .nutrition-page-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }
  body.ui-readable .meal-detail-container .nutrition-page-actions :is(button, a) {
    width: 100%;
  }
}

/* Approved compact assigned-recipe view; editing forms are unchanged. */
body.ui-readable .recipe-compact {
  padding: 16px;
  border-radius: 12px;
  color: #34463e;
  font: var(--ui-body)/var(--ui-leading) var(--ui-font);
}
body.ui-readable .recipe-compact .readonly-recipe-heading {
  font-size: var(--ui-section);
  line-height: var(--ui-leading);
  margin: 0 0 10px;
  color: #34463e;
}
body.ui-readable .recipe-compact :is(.recipe-middle h2, .recipe-steps h2) {
  font-size: var(--ui-card);
  line-height: var(--ui-leading);
  margin: 0 0 7px;
  color: #34463e;
}
body.ui-readable .recipe-compact .recipe-top {
  grid-template-columns: 240px minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  margin: 0;
  padding: 12px;
  border-color: #e1e7e2;
  border-radius: 8px;
}
body.ui-readable .recipe-compact .recipe-top > div {
  min-width: 0;
}
body.ui-readable .recipe-compact .recipe-top > .rc-meta {
  display: block;
  grid-column: auto;
}
body.ui-readable .recipe-compact .editor-photo img {
  width: 240px;
  height: 180px;
  aspect-ratio: auto;
  object-fit: cover;
  border-radius: 6px;
  margin: 0;
  display: block;
}
body.ui-readable .recipe-compact .rc-field {
  margin: 0 0 8px;
}
body.ui-readable .recipe-compact .rc-field:last-child {
  margin-bottom: 0;
}
body.ui-readable .recipe-compact .rc-label {
  display: block;
  font-size: var(--ui-caption);
  font-weight: 500;
  color: #536271;
  line-height: var(--ui-leading);
  margin-bottom: 4px;
}
body.ui-readable .recipe-compact .rc-value {
  background: #fafcfb;
  border: 1px solid #dce3e7;
  border-radius: 6px;
  padding: 7px 9px;
  font-size: var(--ui-control);
  font-weight: 500;
  line-height: var(--ui-leading);
  color: #203a44;
  overflow-wrap: anywhere;
}
body.ui-readable .recipe-compact small {
  display: block;
  font-size: var(--ui-caption);
  line-height: var(--ui-leading);
  color: #73807b;
  margin: 4px 0 0;
}
body.ui-readable .recipe-compact [data-family-caption] {
  margin: -4px 0 8px;
}
body.ui-readable .recipe-compact .serving-stepper {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 0 0 4px;
}
body.ui-readable .recipe-compact .serving-stepper :is(button, input) {
  height: 36px;
  min-height: 36px;
  padding: 0;
  border: 1px solid #dce3e7;
  border-radius: 6px;
  background: white;
  color: #345f4a;
  font: var(--ui-control) var(--ui-font);
  text-align: center;
}
body.ui-readable .recipe-compact .serving-stepper button {
  width: 38px;
  min-width: 38px;
}
body.ui-readable .recipe-compact .serving-stepper input {
  width: 70px;
  max-width: 70px;
  flex: none;
  appearance: textfield;
  color: #34463e;
}
body.ui-readable .recipe-compact .serving-stepper input::-webkit-inner-spin-button {
  appearance: none;
}
body.ui-readable .recipe-compact .recipe-chips {
  gap: 6px;
  align-items: center;
}
body.ui-readable .recipe-compact .recipe-chip {
  padding: 5px 9px;
  border-radius: 15px;
  background: #f0f4f5;
  font-size: var(--ui-caption);
  line-height: var(--ui-leading);
  color: #617181;
}
body.ui-readable .recipe-compact .recipe-chip.selected {
  background: #3f7044;
  color: white;
}
body.ui-readable .recipe-compact .rc-deadline {
  font-size: var(--ui-caption);
  color: #536b60;
  margin-left: 4px;
  white-space: nowrap;
}
body.ui-readable .recipe-compact .recipe-middle {
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 10px 0;
  align-items: start;
}
body.ui-readable .recipe-compact :is(.recipe-middle > section, .recipe-steps) {
  padding: 12px;
  border-color: #e1e7e2;
  border-radius: 8px;
  margin-top: 0;
}
body.ui-readable .recipe-compact .readonly-ingredient {
  grid-template-columns: minmax(0, 1fr) auto 30px;
  gap: 8px;
  border-bottom: 1px solid #edf0ed;
  margin: 0;
  padding: 4px 0;
  line-height: var(--ui-leading);
  font-size: var(--ui-body);
}
body.ui-readable .recipe-compact .readonly-ingredient.caption {
  font-size: var(--ui-caption);
  color: #647381;
}
body.ui-readable .recipe-compact .ingredient-total-caption {
  grid-column: 2/4;
  text-align: right;
}
body.ui-readable .recipe-compact .readonly-ingredient output {
  background: none;
  border: 0;
  border-radius: 0;
  padding: 0;
  min-height: 0;
  text-align: right;
  font: inherit;
  color: inherit;
  white-space: nowrap;
}
body.ui-readable .recipe-compact .rc-comments textarea {
  display: block;
  width: 100%;
  height: 126px;
  min-height: 80px;
  max-width: 100%;
  padding: 8px 10px;
  border: 1px solid #dce3e7;
  background: #fafcfb;
  border-radius: 6px;
  resize: vertical;
  overflow: auto;
  font: var(--ui-control)/var(--ui-leading) var(--ui-font);
  color: #203a44;
  margin: 0;
}
body.ui-readable .recipe-compact .rc-resize-hint {
  font-size: var(--ui-caption);
  color: #73807b;
  margin: 4px 0 0;
  line-height: var(--ui-leading);
}
body.ui-readable .recipe-compact .readonly-step {
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 9px;
  margin: 4px 0 0;
  align-items: start;
}
body.ui-readable .recipe-compact .readonly-step > span {
  width: 26px;
  height: 26px;
  font-size: var(--ui-caption);
}
body.ui-readable .recipe-compact .readonly-step p {
  font-size: var(--ui-body);
  line-height: var(--ui-leading);
  border: 0;
  padding: 2px 0;
  margin: 0;
}
@media (max-width: 1000px) {
  body.ui-readable .recipe-compact .recipe-top {
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 12px;
  }
  body.ui-readable .recipe-compact .editor-photo img {
    width: 180px;
    height: 160px;
  }
  body.ui-readable .recipe-compact .recipe-top > .rc-meta {
    grid-column: 2;
  }
}
@media (max-width: 600px) {
  body.ui-readable .recipe-compact {
    padding: 10px;
  }
  body.ui-readable .recipe-compact .recipe-top {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    padding: 10px;
  }
  body.ui-readable .recipe-compact .editor-photo img {
    width: 100%;
    height: 190px;
  }
  body.ui-readable .recipe-compact .recipe-top > .rc-meta {
    grid-column: auto;
  }
  body.ui-readable .recipe-compact .recipe-middle {
    grid-template-columns: minmax(0, 1fr);
  }
  body.ui-readable .recipe-compact :is(.recipe-middle > section, .recipe-steps) {
    padding: 10px;
  }
  body.ui-readable .recipe-compact .rc-deadline {
    margin-left: 0;
  }
  body.ui-readable .recipe-compact .rc-resize-hint {
    display: none;
  }
}

/* Avoid Chrome Touch to Search when touching meal-report controls. */
.nutrition-page-actions [data-action='report'],
.nutrition-page-actions [data-action='report'] *,
#my-day .md-meal-row [data-action='report'],
#my-day .md-meal-row [data-action='report'] * {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  touch-action: manipulation;
}
