/*
  The meal list, a meal's page and the two sheets, after the approved mock (docs/mockup/hauswerk-prototyp.html,
  "Essen", "Gericht" and the "Auf die Einkaufsliste" sheet). Rows and the entry field reuse the shopping list's
  classes; everything here builds on the tokens of hauswerk.css, so light and dark follow the theme.
*/

/* --- labels, tabs and toolbar ------------------------------------------------------ */

.hw-meal-label {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--bsft-color-muted);
  margin-bottom: 6px;
}

/* the plan chips on a meal's page */
.hw-meal-tray-chip {
  flex: none;
  font: inherit;
  font-size: 13px;
  padding: 6px 12px;
  min-height: 36px;
  background: var(--bsft-color-surface);
  color: var(--bsft-color-text);
  cursor: pointer;
}

.hw-meal-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.hw-meal-count {
  font-size: 13px;
  color: var(--bsft-color-muted);
}

.hw-meal-views .hw-icon {
  width: 18px;
  height: 18px;
}

.hw-meal-select,
.hw-meal-input {
  min-height: 42px;
  background: var(--bsft-color-surface);
  color: var(--bsft-color-text);
  border: 1px solid var(--bsft-color-border);
  border-radius: 10px;
  padding: 6px 8px;
  font: inherit;
  font-size: 14px;
}

.hw-meal-input {
  width: 100%;
  box-sizing: border-box;
}

/* --- list rows --------------------------------------------------------------------- */

.hw-meal-thumb {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex: none;
  display: grid;
  place-items: center;
  background: var(--hw-meal-soft);
  color: var(--hw-meal);
  font-family: var(--hw-font-display);
  font-size: 16px;
  font-weight: 700;
}

.hw-meal-link {
  text-decoration: none;
}

.hw-meal-meta {
  font-size: 13px;
  color: var(--bsft-color-muted);
  margin: 0;
}

/* --- meal page ----------------------------------------------------------------------- */

.hw-meal-back {
  margin: 0;
}

.hw-meal-back a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 700;
  color: var(--bsft-color-primary);
  text-decoration: none;
}

.hw-meal-name {
  font-family: var(--hw-font-display);
  font-size: 24px;
  margin: 0;
}

.hw-meal-head {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hw-meal-head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hw-meal-ingredients {
  display: flex;
  flex-direction: column;
}

.hw-meal-ingredient + .hw-meal-ingredient,
.hw-meal-ingredient-editor + .hw-meal-ingredient {
  border-top: 1px solid var(--bsft-color-border);
}

.hw-meal-ingredient-main {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  min-height: 44px;
  padding: 8px 0;
  border: 0;
  background: transparent;
  color: var(--bsft-color-text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.hw-meal-ingredient-main:disabled {
  cursor: default;
}

.hw-meal-ingredient-name small {
  display: block;
  font-size: 12.5px;
  color: var(--bsft-color-muted);
}

.hw-meal-ingredient.is-always .hw-meal-ingredient-main,
.hw-meal-ingredient-flag {
  color: var(--bsft-color-muted);
}

.hw-meal-ingredient-flag {
  margin-left: 0.3em;
}

.hw-meal-ingredient .hw-qty {
  font-size: 13px;
  color: var(--bsft-color-muted);
  white-space: nowrap;
}

.hw-meal-ingredient-editor {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 4px 0 12px;
}

.hw-meal-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
}

.hw-meal-history {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  color: var(--bsft-color-muted);
}

/* --- sheets -------------------------------------------------------------------------- */

.hw-sheet-scrim {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(10, 15, 12, 0.45);
}

.hw-sheet {
  width: 100%;
  max-width: 560px;
  max-height: 88vh;
  overflow-y: auto;
  box-sizing: border-box;
  background: var(--bsft-color-surface);
  color: var(--bsft-color-text);
  border-radius: 26px 26px 0 0;
  padding: 10px 18px calc(22px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 14px;
}

@media (min-width: 900px) {
  .hw-sheet-scrim {
    align-items: center;
  }

  .hw-sheet {
    border-radius: 22px;
  }
}

.hw-sheet-grab {
  width: 40px;
  height: 5px;
  border-radius: 9px;
  background: var(--bsft-color-border);
  margin: 0 auto 2px;
}

.hw-sheet-title {
  font-family: var(--hw-font-display);
  font-size: 20px;
  margin: 0;
}

.hw-sheet-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  position: sticky;
  bottom: -22px;
  padding: 10px 0 4px;
  background: var(--bsft-color-surface);
}

.hw-sheet-actions .bsft-button-primary {
  flex: 1;
}

.hw-sheet-row-end {
  display: flex;
  justify-content: flex-end;
  margin-top: -6px;
}

.hw-meal-portions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.hw-meal-portions .hw-meal-label {
  margin: 0;
}

.hw-meal-stepper {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.hw-meal-stepper span {
  min-width: 64px;
  text-align: center;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.hw-meal-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

/* "Anderer Tag" looks like a day pill; the native date field lies invisibly over it and its calendar button covers the
   whole pill, so one tap opens the browser's calendar. */
.hw-meal-date {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hw-meal-date .hw-icon {
  width: 16px;
  height: 16px;
}

.hw-meal-date label {
  cursor: pointer;
}

.hw-meal-date.is-chosen {
  background: var(--hw-accent-soft);
  border-color: var(--bsft-color-primary);
  color: var(--bsft-color-primary);
  font-weight: 700;
}

.hw-meal-date:focus-within {
  outline: 2px solid var(--bsft-color-primary);
  outline-offset: 2px;
}

.hw-meal-date-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  opacity: 0;
  cursor: pointer;
}

.hw-meal-date-input::-webkit-calendar-picker-indicator {
  position: absolute;
  inset: 0;
  width: auto;
  height: auto;
  cursor: pointer;
}

.hw-meal-checkrow {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-top: 1px solid var(--bsft-color-border);
}

.hw-meal-check-square {
  margin: -9px;
}

.hw-meal-check-square::before {
  border-radius: 8px;
}

.hw-meal-checkrow-text {
  flex: 1;
  min-width: 0;
}

.hw-meal-checkrow-text small {
  display: block;
  font-size: 12.5px;
  color: var(--bsft-color-muted);
}

.hw-meal-amount {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
}

.hw-meal-amount .hw-shop-amount {
  width: 5em;
}

.hw-meal-amount .hw-shop-amount:disabled {
  opacity: 0.5;
}

.hw-meal-unit {
  font-family: var(--hw-font-mono);
  font-size: 13px;
  color: var(--bsft-color-muted);
  min-width: 3.6em;
}

.hw-meal-swap {
  display: flex;
  gap: 8px;
}

.hw-meal-swap .hw-meal-select {
  flex: 1;
  min-width: 0;
}

/* --- gallery: toolbar, filters, strip and cards --------------------------------------- */

.hw-meal-filter .hw-icon {
  width: 14px;
  height: 14px;
  color: var(--bsft-color-danger);
}

/* A meal's picture: the initial on the meal colour, the cover photo laid over it once loaded. */
.hw-meal-tile {
  position: relative;
  display: grid;
  place-items: center;
  box-sizing: border-box;
  overflow: hidden;
  background: var(--hw-meal-soft);
  color: var(--hw-meal);
  font-family: var(--hw-font-display);
  font-weight: 700;
}

.hw-meal-tile-photo {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}

.hw-meal-filter-empty {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 16px;
  border: 1px dashed var(--bsft-color-border);
  border-radius: 16px;
  color: var(--bsft-color-muted);
}

.hw-meal-filter-empty p {
  margin: 0;
}

.hw-meal-row-fav {
  flex: none;
  display: grid;
  place-items: center;
  width: 20px;
  color: var(--bsft-color-danger);
}

.hw-meal-row-fav .hw-icon {
  width: 16px;
  height: 16px;
}

.hw-meal-strip-section {
  min-width: 0;
}

.hw-meal-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.hw-meal-mini {
  flex: none;
  width: 120px;
  color: var(--bsft-color-text);
  text-decoration: none;
}

.hw-meal-mini .hw-meal-tile {
  width: 100%;
  height: 80px;
  border-radius: 12px;
  font-size: 28px;
}

.hw-meal-mini b {
  display: block;
  margin-top: 4px;
  font-size: 13.5px;
  line-height: 1.2;
}

.hw-meal-mini small {
  font-size: 12px;
  color: var(--bsft-color-muted);
}

.hw-meal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

@media (min-width: 700px) {
  .hw-meal-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.hw-meal-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bsft-color-surface);
  border: 1px solid var(--bsft-color-border);
  border-radius: 16px;
  color: var(--bsft-color-text);
  text-decoration: none;
}

.hw-meal-card-link {
  display: flex;
  flex: 1;
  flex-direction: column;
  color: inherit;
  text-decoration: none;
}

.hw-meal-card-link:focus-visible,
.hw-meal-mini:focus-visible {
  outline: 2px solid var(--bsft-color-primary);
  outline-offset: 2px;
}

.hw-meal-card-picture {
  position: relative;
  display: block;
  height: 112px;
}

.hw-meal-card-picture .hw-meal-tile {
  width: 100%;
  height: 100%;
  font-size: 34px;
}

.hw-meal-card-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 10px 10px;
}

.hw-meal-card-name {
  font-size: 14.5px;
  line-height: 1.2;
}

.hw-meal-card-meta {
  font-size: 12px;
  color: var(--bsft-color-muted);
  font-variant-numeric: tabular-nums;
}

.hw-meal-fav {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.9);
  color: #B3413A;
}

.hw-meal-fav .hw-icon {
  width: 14px;
  height: 14px;
}

/* --- meal page: hero, chips, timeline, photos, tags --------------------------------------- */

/* The hero spans the phone's width edge to edge in a fixed 16:10 frame, whatever size the photo has; the photo is
   cropped to fill it. On a wide screen it sits in the content column with a height that stops growing. */
.hw-meal-hero {
  position: relative;
  display: grid;
  place-items: center;
  flex: none;
  min-width: 0;
  aspect-ratio: 16 / 10;
  max-height: 55vh;
  margin: -4px -16px 0;
  overflow: hidden;
  border-radius: 0 0 26px 26px;
  background: var(--hw-meal-soft);
  color: var(--hw-meal);
  touch-action: pan-y;
}

@media (min-width: 900px) {
  .hw-meal-hero {
    aspect-ratio: auto;
    height: clamp(240px, 28vw, 340px);
    max-height: none;
    margin: 12px 0 0;
    border-radius: 22px;
  }
}

.hw-meal-hero-photo {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
}

.hw-meal-hero-photo img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}

.hw-meal-hero-initial {
  font-family: var(--hw-font-display);
  font-size: 80px;
  font-weight: 700;
}

.hw-meal-hero-dots {
  position: absolute;
  bottom: 4px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
}

.hw-meal-hero-dots button {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.hw-meal-hero-dots button::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  box-shadow: 0 0 2px rgba(0, 0, 0, 0.35);
}

.hw-meal-hero-dots button.is-on::before {
  background: #fff;
}

.hw-meal-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.hw-meal-title-row .hw-meal-name {
  font-size: 26px;
}

.hw-meal-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.hw-meal-fav-toggle {
  width: 44px;
  height: 44px;
  color: var(--bsft-color-muted);
}

/* The favourite heart keeps its danger colour on a surface, never on the accent of a pressed button. */
.hw-icon-button.hw-meal-fav-toggle[aria-pressed="true"],
.hw-icon-button.hw-meal-fav-toggle[aria-pressed="true"]:hover:not(:disabled) {
  background: var(--bsft-color-surface);
  border-color: var(--bsft-color-border);
  color: var(--bsft-color-danger);
}

.hw-meal-fav-toggle[aria-pressed="false"] path {
  fill: none;
}

.hw-meal-scale-hint {
  margin: 6px 0 0;
  font-size: 12.5px;
  color: var(--bsft-color-muted);
}

.hw-meal-plan-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.hw-meal-timeline {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin-top: 8px;
  scrollbar-width: none;
}

.hw-meal-timeline-item {
  flex: none;
  width: 76px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 12px;
  color: var(--bsft-color-muted);
  text-align: center;
}

.hw-meal-timeline-empty .hw-icon {
  width: 22px;
  height: 22px;
  opacity: 0.55;
}

.hw-meal-timeline-photo,
.hw-meal-timeline-empty {
  display: grid;
  place-items: center;
  height: 60px;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 10px;
  background: var(--hw-meal-soft);
  color: var(--hw-meal);
  font-size: 14px;
}

.hw-meal-timeline-photo {
  cursor: zoom-in;
}

.hw-meal-timeline-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hw-meal-file-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.hw-meal-file-button .hw-icon {
  width: 18px;
  height: 18px;
}

.hw-meal-file-button.is-disabled {
  opacity: 0.5;
  pointer-events: none;
}

.hw-meal-file-button:focus-within {
  outline: 2px solid var(--bsft-color-primary);
  outline-offset: 2px;
}

.hw-meal-photo-large {
  display: block;
  width: 100%;
  max-height: 60vh;
  object-fit: contain;
  border-radius: 14px;
  background: var(--hw-surface-2);
}

.hw-meal-cover-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hw-meal-cover-button .hw-icon {
  width: 18px;
  height: 18px;
}

.hw-meal-cover-button[aria-pressed="true"] .hw-icon {
  fill: currentColor;
  color: var(--hw-meal);
}

.hw-meal-tags {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
}

.hw-meal-tag {
  padding-right: 4px;
  font-size: 13px;
  color: var(--bsft-color-text);
}

.hw-meal-sticky {
  position: sticky;
  bottom: calc(68px + env(safe-area-inset-bottom));
  z-index: 5;
  display: flex;
  gap: 8px;
  margin: 0 -16px -24px;
  padding: 12px 16px 16px;
  background: linear-gradient(to top, var(--hw-ground) 70%, transparent);
}

.hw-meal-sticky .bsft-button-primary {
  flex: 1;
}

@media (min-width: 900px) {
  .hw-meal-sticky {
    bottom: 0;
    margin: 0;
    padding: 12px 0 16px;
  }
}

/* --- preparation (slice 16) --------------------------------------------------- */

.hw-meal-steps {
  margin: 0;
  padding-left: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hw-meal-steps li::marker {
  font-family: var(--hw-font-body);
  font-weight: 700;
  color: var(--hw-meal);
}

.hw-meal-cook-link {
  margin-left: auto;
  font-size: 14px;
}

.hw-meal-preparation-add,
.hw-meal-ingredients-add {
  align-self: flex-start;
  margin-top: 10px;
}

/* --- meal edit page ---------------------------------------------------------------------- */

.hw-meal-edit-photos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.hw-meal-edit-photo {
  position: relative;
  height: auto;
  aspect-ratio: 1;
}

.hw-meal-edit-photo.is-cover {
  outline: 2px solid var(--hw-meal);
  outline-offset: 1px;
}

.hw-meal-edit-cover {
  position: absolute;
  top: 4px;
  right: 4px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--hw-meal);
}

.hw-meal-edit-cover .hw-icon {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.hw-meal-photo-error {
  margin: 8px 0 0;
}

.hw-meal-preparation-editor {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hw-meal-preparation-text {
  min-height: 180px;
  resize: vertical;
  line-height: 1.45;
}

/* --- cooking mode -------------------------------------------------------------- */

.hw-cook {
  position: fixed;
  inset: 0;
  z-index: 1500;
  display: flex;
  flex-direction: column;
  background: var(--hw-ground);
  color: var(--bsft-color-text);
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  outline: none;
}

.hw-cook-top,
.hw-cook-progress,
.hw-cook-body,
.hw-cook-nav {
  width: 100%;
  max-width: 760px;
  margin-inline: auto;
  box-sizing: border-box;
}

.hw-cook-top {
  flex: none;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px 8px;
}

.hw-cook-close {
  width: 44px;
  height: 44px;
  color: var(--bsft-color-text);
}

.hw-cook-heading {
  flex: 1;
  min-width: 0;
}

.hw-cook-title {
  font-family: var(--hw-font-display);
  font-size: 18px;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hw-cook-counter {
  margin: 0;
  font-size: 13px;
  color: var(--bsft-color-muted);
}

.hw-cook-screen-on {
  background: var(--hw-accent-soft);
  color: var(--bsft-color-primary);
  border-color: transparent;
}

.hw-cook-progress {
  flex: none;
  height: 6px;
  padding: 0;
  margin-top: 0;
  border-radius: 99px;
  background: var(--hw-surface-2);
  overflow: hidden;
  width: calc(100% - 32px);
  max-width: 728px;
}

.hw-cook-progress i {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: var(--bsft-color-primary);
  transition: width 0.2s ease;
}

.hw-cook-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hw-cook-number {
  margin: 0;
  font-family: var(--hw-font-display);
  font-weight: 700;
  font-size: 22px;
  color: var(--hw-meal);
}

.hw-cook-text {
  margin: 0;
  font-family: var(--hw-font-body);
  font-size: clamp(26px, 6.4vw, 36px);
  line-height: 1.3;
  font-weight: 700;
  text-wrap: pretty;
}

.hw-cook-empty {
  font-size: 20px;
}

.hw-cook-ready-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hw-cook-ready {
  font-family: var(--hw-font-display);
  font-size: 28px;
  margin: 0;
}

.hw-cook-needs .hw-card-title {
  margin-bottom: 4px;
}

.hw-cook-ingredients {
  list-style: none;
  margin: 0;
  padding: 0;
}

.hw-cook-ingredients li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 10px 8px;
  font-size: 19px;
  border-top: 1px solid var(--bsft-color-border);
  border-radius: 10px;
}

.hw-cook-ingredients li:first-child {
  border-top: 0;
}

.hw-cook-ingredients li.is-current {
  background: var(--hw-meal-soft);
  color: var(--bsft-color-text);
  font-weight: 700;
  border-top-color: transparent;
}

.hw-cook-ingredients li.is-current + li {
  border-top-color: transparent;
}

.hw-cook-ingredient-name small {
  display: block;
  font-size: 13px;
  font-weight: 400;
  color: var(--bsft-color-muted);
}

.hw-cook-ingredients .hw-qty {
  font-size: 17px;
  white-space: nowrap;
}

.hw-cook-all summary {
  cursor: pointer;
  min-height: 32px;
  margin-bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-weight: 700;
  list-style: none;
}

.hw-cook-all summary::-webkit-details-marker {
  display: none;
}

.hw-cook-all summary::after {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  margin-right: 4px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 0.15s ease;
}

.hw-cook-all[open] summary::after {
  transform: translateY(2px) rotate(-135deg);
}

.hw-cook-all-portions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 8px 0;
}

.hw-cook-nav {
  flex: none;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 10px;
  padding: 12px 16px 16px;
  background: linear-gradient(to top, var(--hw-ground) 75%, transparent);
}

.hw-cook-nav .bsft-button {
  min-height: 56px;
  font-size: 18px;
  border-radius: 16px;
}

/* --- "Demnächst" -------------------------------------------------------------------------- */

.hw-meal-upcoming-empty {
  margin: 0;
  padding: 8px 2px;
  color: var(--bsft-color-muted);
}

.hw-meal-group {
  min-width: 0;
}

.hw-meal-group .hw-meal-label {
  font-family: var(--hw-font-body);
  font-weight: 400;
  margin: 4px 2px 6px;
}

.hw-meal-upcoming-main {
  flex-direction: row;
  align-items: center;
  gap: 12px;
}

.hw-meal-upcoming-main:disabled {
  cursor: default;
}

.hw-meal-upcoming-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.hw-meal-eaten-button {
  flex: none;
  gap: 4px;
}

.hw-meal-eaten-button .hw-icon {
  width: 15px;
  height: 15px;
}

.hw-meal-ask {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.hw-meal-ask-text {
  font-size: 12px;
  color: var(--bsft-color-muted);
}

.hw-meal-ask-buttons {
  display: flex;
  gap: 6px;
}

.hw-meal-upcoming-row.is-past .hw-meal-meta {
  color: var(--hw-meal);
}

/* --- "Alle Gerichte": the "+" ----------------------------------------------------------- */

.hw-meal-add .hw-icon {
  width: 20px;
  height: 20px;
}

.hw-meal-card-add {
  position: absolute;
  top: 70px;
  right: 8px;
  box-shadow: 0 4px 12px -4px rgba(0, 0, 0, 0.35);
}

/* --- planned meal sheet: recipe and cooking mode ------------------------------------------ */

.hw-sheet-links {
  display: flex;
  gap: 8px;
}

.hw-sheet-links .bsft-button {
  flex: 1;
}

/* How a meals entry line with a day or a meal of the day is read: "Morgen · Abend · Linsensuppe". */
.hw-meal-entry-preview {
  margin: 0;
  padding: 2px 4px;
  font-family: var(--hw-font-mono);
  font-size: 12.5px;
  color: var(--bsft-color-muted);
}

/* --- "Was essen wir?": reels, lock and die ------------------------------------------------ */

.hw-combine-reel {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 8px;
}

.hw-combine-role {
  grid-column: 1 / -1;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--bsft-color-muted);
}

.hw-combine-face {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 74px;
  min-width: 0;
  padding: 12px;
  text-align: center;
  background: var(--bsft-color-surface);
  border: 1px solid var(--bsft-color-border);
  border-radius: 16px;
}

.hw-combine-face b {
  font-family: var(--hw-font-display);
  font-size: 20px;
  overflow-wrap: anywhere;
}

.hw-combine-face small {
  font-size: 12.5px;
  color: var(--bsft-color-muted);
}

.hw-combine-reel.is-locked .hw-combine-face {
  border-color: var(--bsft-color-primary);
  box-shadow: inset 0 0 0 1px var(--bsft-color-primary);
}

.hw-combine-lock-space {
  width: 40px;
}

.hw-combine-result {
  padding: 12px 14px;
  background: var(--hw-meal-soft);
  border-radius: 16px;
}

.hw-combine-result b {
  display: block;
  font-family: var(--hw-font-display);
  font-size: 18px;
}

.hw-combine-result small {
  color: var(--bsft-color-muted);
}

.hw-combine-actions {
  display: flex;
  gap: 8px;
}

.hw-combine-actions > * {
  flex: 1;
}

/* The combinations eaten before: plain rows divided by a hairline, none above the first. */
.hw-combine-history-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid var(--bsft-color-border);
}

.hw-card-title + .hw-combine-history-row {
  border-top: 0;
  padding-top: 2px;
}

.hw-combine-history-text {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 0;
}

.hw-combine-empty {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.hw-combine-empty p {
  margin: 0;
}

/* --- edit page: the facts and the one save ------------------------------------------------ */

.hw-meal-details-numbers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.hw-meal-sticky .hw-meal-save {
  flex: 1;
  min-height: 48px;
}

.hw-combine-save-form {
  display: flex;
  flex-direction: column;
}
