.meals-intro {
  margin: -4px 0 16px;
  color: var(--muted);
  font-size: 13px;
}
.meal-cards {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 0 0 12px;
  scrollbar-width: thin;
  align-items: stretch;
}
.meal-card {
  flex: 0 0 258px;
  box-sizing: border-box;
  height: var(--meal-card-height, 340px);
  max-height: 400px;
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #151d28;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.meal-picture {
  width: 100%;
  height: 72px;
  object-fit: cover;
  flex: none;
}
.meal-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-height: 0;
  flex: 1;
}
.meal-body h3 {
  margin: 0;
  font-size: 16px;
  overflow-wrap: anywhere;
}
.meal-description {
  font-size: 12px;
  line-height: 1.5;
  color: #b4c0d0;
  margin: 0;
  overflow-wrap: anywhere;
}
.meal-details {
  min-height: 0;
  overflow-y: auto;
  flex: 1;
}
.meal-edit {
  align-self: flex-start;
  height: 26px;
  font-size: 11px !important;
  padding: 0 8px !important;
}
.meal-vote {
  height: auto !important;
  min-height: 38px;
  font-size: 11px !important;
  padding: 6px !important;
}
.meal-vote[aria-pressed="true"] {
  background: #244c3c;
  border-color: #62d69a;
  color: #c4f1d8;
}
.meal-empty {
  padding: 24px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  color: var(--muted);
  font-size: 13px;
  width: 100%;
}
.meal-dialog {
  width: min(440px, calc(100% - 40px));
  box-sizing: border-box;
  background: #171e29;
  color: var(--text, #edf2fa);
  border: 1px solid #364259;
  border-radius: 18px;
  padding: 24px;
  max-height: 90vh;
  overflow: auto;
}
.meal-dialog::backdrop {
  background: #060a12bb;
  backdrop-filter: blur(4px);
}
.meal-dialog form {
  display: grid;
  gap: 16px;
}
.meal-dialog h2 {
  margin: 0;
  font-size: 20px;
}
.meal-dialog label {
  display: grid;
  gap: 7px;
  font-size: 12px;
  color: #bfcbdb;
}
.meal-dialog input,
.meal-dialog textarea {
  box-sizing: border-box;
  width: 100%;
  font: inherit;
  color: inherit;
  background: #10161f;
  border: 1px solid #364259;
  border-radius: 9px;
  padding: 10px;
}
.meal-dialog input[type="checkbox"] {
  width: auto;
}
.meal-dialog textarea {
  resize: vertical;
}
.meal-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.meal-dialog p {
  margin: 0;
  font-size: 12px;
  color: #f2b7aa;
}
#mealPreview {
  width: 100%;
  max-height: 120px;
  object-fit: cover;
  border-radius: 8px;
}
#mealStatus {
  font-size: 12px;
  color: var(--muted);
}
@media (max-width: 600px) {
  .meal-card {
    flex-basis: 240px;
  }
}
/* Day selector, aligned avatar rows and leading proposals. */
.meal-days {
  display: flex;
  gap: 8px;
  margin: 0 0 16px;
}
.meal-days .btn {
  min-width: 100px;
  height: 36px;
}
.meal-days [aria-pressed="true"] {
  background: #244c3c;
  border-color: #62d69a;
  color: #d0f5df;
}
.meal-leading {
  border-color: #fff;
  box-shadow: none;
}
.meal-card-top {
  position: relative;
  flex: none;
  height: 76px;
}
.meal-card-top .meal-picture {
  height: 76px;
  display: block;
}
.meal-no-picture {
  display: flex !important;
  align-items: center;
  justify-content: center;
  background: linear-gradient(120deg, #273549, #172331);
  color: #a5b6cc;
  font-size: 32px;
}
.meal-author-avatar {
  position: absolute;
  right: 10px;
  bottom: -12px;
  z-index: 2;
}
.meal-person {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #253247;
  border: 1px solid #4a5d73;
  color: #dce7f5;
  outline-offset: 2px;
}
.meal-person img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.meal-person-author {
  width: 32px;
  height: 32px;
  border: 3px solid #151d28;
}
.meal-tooltip {
  display: none;
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: #080d15;
  color: #edf3fc;
  font-size: 11px;
  line-height: 1.4;
  padding: 5px 8px;
  border: 1px solid #46566d;
  border-radius: 6px;
  white-space: nowrap;
  z-index: 20;
  pointer-events: none;
}
.meal-person:hover .meal-tooltip,
.meal-person:focus .meal-tooltip {
  display: block;
}
.meal-body {
  padding-top: 18px;
  gap: 10px;
}
.meal-details {
  flex: 1;
  min-height: 0;
}
.meal-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.meal-title-row h3 {
  min-width: 0;
}
.meal-title-row .meal-edit {
  flex: none;
}
.meal-winner {
  display: block;
  font-size: 10px;
  color: #a9e9c7;
  margin-bottom: 6px;
  font-weight: 700;
}
.meal-vote {
  width: 100%;
  flex: none;
}
.meal-ingredients {
  margin-top: 10px;
  font-size: 11px;
  color: #c3d0df;
}
.meal-ingredients summary {
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
  color: #b6d7c8;
}
.meal-ingredients p {
  white-space: pre-wrap;
  line-height: 1.6;
  margin: 7px 0 0;
  overflow-wrap: anywhere;
}
.meal-ingredients-empty {
  font-size: 10px;
  color: var(--muted);
  margin: 10px 0 0;
}
.meal-crop canvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16/9;
  border-radius: 10px;
  touch-action: none;
  cursor: grab;
}
.meal-crop canvas:active {
  cursor: grabbing;
}
.meal-crop {
  display: grid;
  gap: 9px;
}
.meal-crop p {
  color: var(--muted);
  font-size: 11px;
}
.meal-crop input[type="range"] {
  padding: 0;
  height: 24px;
  accent-color: #62d69a;
}
.meal-dialog small {
  line-height: 1.5;
  color: var(--muted);
}

.meal-card-top {
  height: auto;
  aspect-ratio: 16/9;
}
.meal-card-top .meal-picture {
  height: 100%;
  object-fit: cover;
}
/* Shared scrollbar styling, including dialogs, cards, and horizontal lists. */
* {
  scrollbar-width: thin;
  scrollbar-color: #43536b #111823;
}
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #111823;
  border-radius: 8px;
}
::-webkit-scrollbar-thumb {
  background: #43536b;
  border: 2px solid #111823;
  border-radius: 8px;
}
::-webkit-scrollbar-thumb:hover {
  background: #657b9c;
}
::-webkit-scrollbar-corner {
  background: #111823;
}
.meal-remove-image {
  justify-self: end;
  border: 0;
  background: none;
  color: #d8a7a7;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.meal-remove-image:hover {
  color: #ffc4c4;
}
.meal-shopping {
  border: 1px solid #354157;
  border-radius: 12px;
  padding: 12px;
  margin: 0;
  min-width: 0;
}
.meal-shopping legend {
  font-size: 12px;
  color: #b8dfcc;
  font-weight: 700;
}
.meal-shopping > p {
  color: var(--muted);
  font-size: 11px;
  margin: 0 0 12px;
}
.meal-shopping > .btn {
  margin-top: 10px;
  height: 30px;
  font-size: 11px;
}
.meal-ingredient-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) 70px 75px 90px 28px;
  gap: 8px;
  align-items: end;
  margin-bottom: 10px;
}
.meal-ingredient-row label {
  min-width: 0;
  font-size: 10px;
}
.meal-ingredient-row input,
.meal-ingredient-row select {
  width: 100%;
  height: 36px;
  min-width: 0;
  font-size: 12px;
  padding: 6px;
  box-sizing: border-box;
  background: #10161f;
  color: inherit;
  border: 1px solid #364259;
  border-radius: 8px;
}
.meal-ingredient-row .btn {
  height: 36px;
  width: 28px;
  padding: 0;
}
.meal-dialog {
  width: min(620px, calc(100% - 32px));
}
.meal-ingredients ul {
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
}
.meal-ingredients li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid #2c3849;
}
.meal-ingredients li span:last-child {
  color: #a8b8ce;
  text-align: right;
  flex-shrink: 0;
}
.meal-card {
  flex-basis: 280px;
}
.meal-card-top {
  height: 100px;
  aspect-ratio: auto;
  isolation: isolate;
}
.meal-card-top:after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent, #080d15db);
  z-index: 0;
  pointer-events: none;
}
.meal-overlay-title {
  position: absolute;
  left: 14px;
  right: 50px;
  bottom: 10px;
  margin: 0;
  color: #fff;
  font-size: 17px;
  line-height: 1.25;
  overflow-wrap: anywhere;
  text-shadow: 0 1px 8px #000;
  z-index: 1;
  max-height: 64px;
  overflow-y: auto;
}
.meal-card-top .meal-picture {
  height: 100%;
}
.meal-author-avatar {
  z-index: 3;
}
.meal-body {
  padding-top: 17px;
  gap: 8px;
}
.meal-description {
  font-size: 13px;
  line-height: 1.65;
  color: #c5d0df;
}
.meal-card-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex: none;
}
.meal-card-actions .meal-vote {
  width: auto;
  min-height: 28px !important;
  height: 28px !important;
  font-size: 11px !important;
  padding: 0 10px !important;
}
.meal-card-actions .meal-edit {
  margin-right: auto;
  height: 28px;
}
.meal-vote-flag:hover .meal-vote-tooltip,
.meal-vote-flag:focus .meal-vote-tooltip,
.meal-vote-flag:focus-within .meal-vote-tooltip {
  display: grid;
}
.meal-winner {
  margin-bottom: 8px;
}
@media (max-width: 540px) {
  .meal-ingredient-row {
    grid-template-columns: minmax(90px, 1fr) 65px 70px 28px;
  }
  .meal-ingredient-row label:first-child {
    grid-column: 1 / -1;
  }
  .meal-ingredient-row label:nth-child(4) {
    grid-column: 3;
  }
  .meal-ingredient-row .btn {
    grid-column: 4;
  }
  .meal-card {
    flex-basis: 260px;
  }
}

.meal-card {
  max-height: none;
}

.meal-crop canvas {
  aspect-ratio: 960/344;
}

#mealStatus:empty {
  display: none;
}
/* Ingredient labels are shown once, and each row has a drag handle. */
.meal-shopping {
  overflow-x: auto;
}
.meal-ingredient-head,
.meal-ingredient-row {
  display: grid;
  grid-template-columns: 22px minmax(130px, 1fr) 65px 72px 90px 28px;
  gap: 8px;
  align-items: center;
  min-width: 470px;
}
.meal-ingredient-head {
  font-size: 10px;
  color: #a6b6cd;
  margin-bottom: 8px;
}
.meal-ingredient-row {
  margin-bottom: 8px;
}
.meal-row-handle {
  width: 22px;
  border: 0;
  background: none;
  color: #8da1bc;
  font-size: 22px;
  cursor: grab;
  touch-action: none;
  padding: 0;
}
.meal-row-handle:active {
  cursor: grabbing;
}
.meal-row-dragging {
  outline: 1px solid #79a98f;
  background: #20362d;
  border-radius: 8px;
  opacity: 0.85;
}
.meal-overlay-title button {
  font: inherit;
  color: inherit;
  text-shadow: inherit;
  text-align: left;
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
}
.meal-card[data-meal-detail],
.meal-card[data-side-detail] {
  cursor: pointer;
}
.meal-shopping-link {
  margin-top: 12px;
  display: block;
  border: 0;
  background: none;
  padding: 0;
  color: #b6d7c8;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.meal-detail-dialog {
  width: min(720px, calc(100% - 32px));
  padding: 26px;
}
.meal-detail-close {
  position: sticky;
  top: 0;
  float: right;
  z-index: 10;
  width: 32px;
  height: 32px;
  padding: 0;
  background: #172230e8;
}
.meal-detail-image {
  width: 100%;
  max-height: 260px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 18px;
}
.meal-detail-dialog h2 {
  font-size: 24px;
  margin: 0 40px 12px 0;
}
.meal-detail-dialog h3 {
  font-size: 14px;
  margin: 24px 0 12px;
  color: #c5dccf;
}
.meal-detail-author {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #a3b5ca;
  font-size: 12px;
}
.meal-detail-description {
  white-space: pre-wrap;
  line-height: 1.7;
  font-size: 14px;
  color: #c9d3e1;
  overflow-wrap: anywhere;
  margin: 18px 0 !important;
}
.meal-detail-table-wrap {
  overflow-x: auto;
}
.meal-detail-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.meal-detail-table th,
.meal-detail-table td {
  padding: 10px 8px;
  text-align: left;
  border-bottom: 1px solid #304055;
}
.meal-detail-table th {
  color: #95a9c2;
  font-size: 10px;
}
.meal-detail-table td:first-child {
  overflow-wrap: anywhere;
}
.meal-detail-votes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.meal-detail-voter {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0 12px 10px 0;
  font-size: 12px;
}
.meal-detail-votes p {
  color: #a1b1c5;
}
.meal-detail-author .meal-person-author {
  border-color: #364357;
}
@media (max-width: 540px) {
  .meal-ingredient-row {
    grid-template-columns: 22px minmax(130px, 1fr) 65px 72px 90px 28px;
  }
  .meal-detail-votes {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

.meal-detail-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  clear: both;
}
.meal-detail-heading h2 {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}
.meal-detail-heading .meal-detail-author {
  justify-content: flex-end;
  text-align: right;
  margin-left: auto;
  flex-shrink: 0;
}
.meal-detail-dialog .meal-detail-description {
  color: #c9d3e1;
}
.meal-detail-dialog .meal-detail-close {
  font-size: 28px;
  line-height: 1;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
@media (max-width: 480px) {
  .meal-detail-heading {
    flex-wrap: wrap;
  }
  .meal-detail-heading .meal-detail-author {
    font-size: 11px;
  }
}

.meal-detail-dialog .meal-detail-close {
  position: absolute;
  float: none;
  top: 34px;
  right: 34px;
  z-index: 10;
  background: #101a28df;
  box-shadow: 0 2px 10px #0004;
}
.meal-detail-image {
  display: block;
}
.meal-detail-dialog:not(:has(.meal-detail-image)) .meal-detail-close {
  top: 14px;
  right: 14px;
}
.meal-detail-dialog:not(:has(.meal-detail-image)) .meal-detail-heading {
  padding-right: 38px;
}

.meal-detail-dialog .meal-detail-close {
  font-size: 0;
  line-height: 0;
  box-sizing: border-box;
}
.meal-detail-dialog .meal-detail-close::before,
.meal-detail-dialog .meal-detail-close::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 18px;
  height: 2px;
  border-radius: 1px;
  background: currentColor;
  transform: translate(-50%, -50%) rotate(45deg);
}
.meal-detail-dialog .meal-detail-close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.meal-add-card {
  background: #0e151e;
  border: 1px dashed #354459;
  color: #92a5bf;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  transition:
    background 0.15s,
    border-color 0.15s,
    color 0.15s;
}
.meal-add-card:hover:not(:disabled) {
  background: #172131;
  border-color: #7e96b7;
  color: #e0e9f7;
}
.meal-add-card:focus-visible {
  outline: 2px solid #9bb2dc;
  outline-offset: 3px;
}
.meal-add-plus {
  font-size: 54px;
  font-weight: 300;
  line-height: 1;
}
.meal-add-card:disabled {
  opacity: 0.5;
  cursor: default;
}
.meal-author-avatar .meal-edit {
  height: 28px;
  padding: 0 9px !important;
  background: #1b2a3c;
  border-color: #536b87;
}
.meal-voter-stack {
  display: flex;
  align-items: center;
  min-width: 0;
  flex: 1;
  height: 32px;
  padding-left: 2px;
  margin-right: 8px;
}
.meal-stack-person {
  position: relative;
  flex: 0 0 28px;
  margin-left: -8px;
}
.meal-stack-person:first-child {
  margin-left: 0;
}
.meal-stack-person .meal-person {
  width: 28px;
  height: 28px;
  border: 2px solid #172130;
  box-sizing: border-box;
}
.meal-stack-author .meal-person {
  border-color: #62d69a;
  box-shadow: 0 0 0 1px #62d69a;
}
.meal-stack-person:hover,
.meal-stack-person:focus-within {
  z-index: 8;
}
.meal-stack-overflow {
  position: relative;
  flex: 0 0 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #172130;
  border-radius: 50%;
  background: #3b4c63;
  color: #e8f0fb;
  font-size: 10px;
  margin-left: -8px;
  box-sizing: border-box;
}
.meal-stack-overflow:hover .meal-tooltip,
.meal-stack-overflow:focus .meal-tooltip {
  display: block;
}
.meal-stack-empty {
  font-size: 10px;
  color: var(--muted);
}
.meal-card-actions .meal-vote {
  flex: none;
}
.meal-voter-stack .meal-tooltip {
  left: 0;
  transform: none;
  white-space: normal;
  min-width: 80px;
  max-width: 180px;
}

.meal-card .meal-author-avatar {
  top: 9px;
  bottom: auto;
  right: 88px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s ease;
  z-index: 8;
}
.meal-card:hover .meal-author-avatar,
.meal-card:focus-within .meal-author-avatar {
  opacity: 1;
  pointer-events: auto;
}
.meal-card .meal-author-avatar .meal-edit {
  height: 26px;
  line-height: 24px;
  font-size: 10px !important;
  white-space: nowrap;
}
.meal-card .meal-vote-flag {
  min-width: 65px;
  box-sizing: border-box;
  text-align: center;
}
@media (hover: none) {
  .meal-card .meal-author-avatar {
    opacity: 1;
    pointer-events: auto;
  }
}
.meal-card .meal-author-avatar {
  right: 10px;
}
.meal-card-actions {
  justify-content: space-between;
}
.meal-voter-stack {
  position: relative;
  justify-content: flex-end;
  margin-right: 0;
  margin-left: 10px;
  min-width: 28px;
}
.meal-stack-tooltip {
  display: none;
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  padding: 9px 12px;
  min-width: 110px;
  max-width: 210px;
  max-height: 200px;
  overflow-y: auto;
  background: #101a28;
  color: #eef4ff;
  border: 1px solid #52657e;
  border-radius: 8px;
  box-shadow: 0 6px 20px #0008;
  font-size: 11px;
  line-height: 1.6;
  z-index: 30;
  pointer-events: none;
}
.meal-stack-tooltip > span {
  display: block;
  white-space: nowrap;
}
.meal-voter-stack:hover .meal-stack-tooltip,
.meal-voter-stack:focus .meal-stack-tooltip,
.meal-voter-stack:focus-within .meal-stack-tooltip {
  display: block;
}
.meal-voter-stack .meal-person {
  pointer-events: none;
}

.meal-card-actions .meal-voter-stack {
  justify-content: flex-start;
  margin-left: 0;
  margin-right: 8px;
}
.meal-voter-stack .meal-stack-tooltip {
  left: 0;
  right: auto;
}
.meal-card-actions > .meal-vote {
  margin-left: auto;
}
.meal-overlay-title {
  overflow: visible;
  max-height: none;
  right: 14px;
  display: flex;
  align-items: center;
  gap: 7px;
}
.meal-overlay-title > button {
  min-width: 0;
}
.meal-overlay-title .warning-icon.meal-incomplete {
  position: relative;
  left: auto;
  top: auto;
  flex: none;
  vertical-align: middle;
  text-shadow: none;
}
.meal-overlay-title .warning-tooltip {
  top: auto;
  bottom: calc(100% + 7px);
  left: auto;
  right: 0;
}
.meal-detail-edit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 5px;
  margin-left: 5px;
}
.meal-detail-edit svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.meal-example-card {
  border-style: dashed;
}
.meal-example-label {
  display: block;
  font-size: 10px;
  color: #c8b98b;
  margin-bottom: 8px;
}

.meal-card.meal-leading {
  border-color: #fff;
  box-shadow: none;
}
.recipe-image-editor {
  display: grid;
  gap: 9px;
}
.recipe-image-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  aspect-ratio: 960/344;
  background: #0c131e;
  border: 1px dashed #42516a;
  border-radius: 10px;
  color: #9cb0cc;
  font: inherit;
  cursor: pointer;
}
.recipe-image-empty > span:first-child {
  font-size: 42px;
  font-weight: 300;
  line-height: 1;
}
.recipe-image-empty > span:last-child {
  font-size: 12px;
}
.recipe-image-toolbar {
  display: flex;
  gap: 14px;
  align-items: center;
  min-height: 30px;
}
.recipe-text-button {
  border: 0;
  padding: 0;
  background: none;
  font: inherit;
  font-size: 12px;
  color: #c1d2eb;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.recipe-image-toolbar .meal-remove-image {
  margin: 0;
  font-size: 12px;
  white-space: nowrap;
}
.recipe-zoom {
  display: flex !important;
  flex-direction: row;
  align-items: center;
  gap: 7px;
  margin-left: auto;
  max-width: 210px;
  flex: 1;
}
.recipe-zoom svg {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
}
.recipe-zoom input {
  padding: 0 !important;
  min-width: 40px;
  height: 22px !important;
  accent-color: #62d69a;
}
.recipe-mode {
  border: 1px solid #354157;
  border-radius: 10px;
  padding: 12px;
  margin: 0;
  min-width: 0;
}
.recipe-mode legend {
  font-size: 12px;
  color: #bdcde2;
}
.recipe-mode-options {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.recipe-mode-options > label {
  display: flex !important;
  align-items: center;
  gap: 7px !important;
  font-size: 12px;
}
.recipe-mode-options input {
  width: auto !important;
  accent-color: #62d69a;
}
.recipe-mode #recipeYieldLabel {
  margin-top: 14px;
  max-width: 280px;
}
.recipe-help {
  position: relative;
  border: 1px solid #526580;
  border-radius: 50%;
  width: 17px;
  height: 17px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  font-size: 11px;
  cursor: help;
}
.recipe-help > span {
  display: none;
  position: absolute;
  left: 0;
  bottom: calc(100% + 7px);
  width: 250px;
  padding: 10px;
  border: 1px solid #526580;
  border-radius: 8px;
  background: #0d1624;
  color: #e4edfa;
  font-size: 11px;
  line-height: 1.6;
  z-index: 40;
  box-shadow: 0 7px 20px #0007;
}
.recipe-help:hover > span,
.recipe-help:focus > span {
  display: block;
}
.recipe-batch-mode .meal-ingredient-head,
.recipe-batch-mode .meal-ingredient-row {
  grid-template-columns: 22px minmax(110px, 1fr) 60px 68px 76px 130px 28px;
  min-width: 640px;
}
.recipe-use-field {
  display: flex;
  gap: 4px;
  min-width: 0;
}
.recipe-use-field input {
  min-width: 0;
  width: 56% !important;
}
.recipe-use-field select {
  min-width: 0;
  width: 44% !important;
}
.recipe-multiplier {
  position: absolute;
  top: 9px;
  right: 10px;
  z-index: 8;
  border: 1px solid #7dd2a1;
  border-radius: 7px;
  background: #183c2c;
  color: #ccf5df;
  font-size: 14px;
  line-height: 25px;
  font-weight: 800;
  padding: 0 9px;
}
.meal-card-top:has(.recipe-multiplier) .meal-author-avatar {
  right: 62px;
}
.sidequest-counter {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: none;
}
.sidequest-counter .btn {
  width: 27px;
  height: 29px;
  padding: 0;
  font-size: 19px;
}
.sidequest-counter > span {
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  min-width: 20px;
  text-align: center;
}
.recipe-enrolled {
  font-size: 11px !important;
  color: #94bba5 !important;
  margin-top: 12px !important;
}
.recipe-detail-basis {
  font-size: 12px !important;
  color: #aec5da !important;
  margin: 12px 0 !important;
}
.recipe-image-toolbar .recipe-zoom[hidden] {
  display: none !important;
}
#sidequestStatus:empty {
  display: none;
}
@media (max-width: 480px) {
  .recipe-image-toolbar {
    gap: 10px;
    flex-wrap: wrap;
  }
  .recipe-help > span {
    width: 210px;
    left: auto;
    right: 0;
  }
  .recipe-image-toolbar .recipe-zoom {
    max-width: 180px;
  }
}
.recipe-mode {
  border: 0;
  padding: 0 0 14px;
  margin: 0;
  text-align: center;
}
.recipe-mode-options {
  display: inline-flex;
  gap: 0;
  flex-wrap: nowrap;
  background: #0d1521;
  border: 1px solid #40516c;
  border-radius: 10px;
  overflow: visible;
  margin: 8px auto 12px;
}
.recipe-mode-options > label {
  position: relative;
  padding: 10px 13px;
  cursor: pointer;
  justify-content: center;
  border-radius: 9px;
  gap: 8px !important;
  color: #97abc5;
  transition: background 0.12s;
}
.recipe-mode-options > label:has(input:checked) {
  background: #2a433b;
  color: #d5f0e1;
  box-shadow: inset 0 0 0 1px #77ae91;
}
.recipe-mode-options input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 1px !important;
  height: 1px;
  pointer-events: none;
}
.recipe-mode-options > label:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.recipe-mode #recipeYieldLabel {
  margin: 0 auto;
  max-width: 220px;
}
.recipe-mode #recipeYieldLabel > span {
  display: block;
  font-size: 11px;
  color: #a7b9d0;
  margin-bottom: 6px;
}
.recipe-yield-counter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.recipe-yield-counter button {
  height: 30px;
  width: 30px;
  background: #1a2738;
  border: 1px solid #41536b;
  border-radius: 7px;
  color: #dce7f5;
  font-size: 20px;
  cursor: pointer;
}
.recipe-yield-counter input {
  width: 65px !important;
  height: 30px !important;
  padding: 0 5px !important;
  text-align: center;
  appearance: textfield;
  -moz-appearance: textfield;
}
.recipe-yield-counter input::-webkit-inner-spin-button,
.recipe-yield-counter input::-webkit-outer-spin-button {
  -webkit-appearance: none;
}
.recipe-image-toolbar .recipe-zoom {
  max-width: none;
  flex: 1;
  margin-left: 6px;
}
.recipe-image-toolbar .recipe-zoom input {
  width: 100%;
}
.meal-dialog {
  position: fixed;
  inset: 0;
  margin: auto;
}
.modal-global-close {
  position: absolute;
  right: 14px;
  top: 14px;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid #3e5069;
  background: #142031df;
  border-radius: 8px;
  color: #dce7f4;
  cursor: pointer;
  z-index: 25;
}
.modal-global-close:before,
.modal-global-close:after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 17px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transform: translate(-50%, -50%) rotate(45deg);
}
.modal-global-close:after {
  transform: translate(-50%, -50%) rotate(-45deg);
}
.meal-dialog > form > h2 {
  padding-right: 35px;
}
.meal-dialog {
  padding: 0;
  overflow: hidden;
  max-height: min(90vh, 950px);
}
.meal-dialog[open] {
  display: flex;
  flex-direction: column;
}
.modal-fixed-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex: none;
  padding: 17px 22px;
  border-bottom: 1px solid #34445b;
  background: #1b293a;
  z-index: 50;
}
.modal-header-copy {
  min-width: 0;
}
.meal-dialog .modal-operation-title {
  font-size: 18px;
  line-height: 1.4;
  margin: 0 !important;
  padding: 0 !important;
  overflow-wrap: anywhere;
}
.modal-header-controls,
.modal-header-confirm {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}
.modal-header-normal {
  display: flex;
}
.modal-fixed-header .modal-global-close,
.modal-fixed-header .meal-detail-close {
  position: relative !important;
  top: auto !important;
  right: auto !important;
  float: none !important;
  margin: 0;
  width: 32px;
  height: 32px;
  font-size: 0 !important;
}
.modal-fixed-header .modal-close-question {
  font-size: 12px;
  line-height: 1.5;
  color: #ffd4da;
  margin: 6px 0 0;
}
.modal-scroll-body {
  padding: 24px;
  overflow-y: auto;
  min-height: 0;
  flex: 1;
}
.meal-detail-dialog .modal-scroll-body {
  padding: 26px;
}
.modal-scroll-body > form {
  display: grid;
  gap: 16px;
}
.modal-confirming .modal-fixed-header {
  background: #48252e;
  border-bottom-color: #944355;
}
.modal-header-confirm .btn {
  height: 32px;
  font-size: 11px;
  padding: 0 9px;
  white-space: nowrap;
}
.modal-confirming .modal-operation-title {
  color: #ffe8eb;
}
.modal-scroll-body .meal-detail-heading {
  padding-right: 0 !important;
}
.modal-scroll-body .meal-detail-image {
  margin-top: 0;
}
.modal-fixed-header .modal-global-close:before,
.modal-fixed-header .modal-global-close:after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 17px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transform: translate(-50%, -50%) rotate(45deg);
}
.modal-fixed-header .modal-global-close:after {
  transform: translate(-50%, -50%) rotate(-45deg);
}
@media (max-width: 540px) {
  .modal-fixed-header {
    gap: 10px;
    padding: 14px 16px;
    flex-wrap: wrap;
  }
  .modal-confirming .modal-header-controls {
    margin-left: auto;
  }
  .modal-scroll-body {
    padding: 18px;
  }
}
.modal-backdrop .modal {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
  height: min(78vh, 740px);
  max-height: 90vh;
}
.modal-backdrop .modal-head {
  flex: none;
  margin: 0;
  padding: 16px 22px;
  background: #1b293a;
  border-bottom: 1px solid #34445b;
  align-items: center;
}
.modal-backdrop .modal-head h3 {
  margin: 0;
  font-size: 18px;
}
.modal-backdrop .modal > textarea {
  flex: 1;
  min-height: 80px;
  width: calc(100% - 44px);
  margin: 20px 22px 0;
  box-sizing: border-box;
}
.modal-backdrop .modal-actions {
  flex: none;
  padding: 16px 22px;
}

.recipe-extra {
  cursor: help;
}
.recipe-extra > span {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  width: 200px;
  white-space: normal;
  background: #0b1420;
  color: #dce8f5;
  border: 1px solid #50627b;
  border-radius: 8px;
  padding: 9px;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.5;
  z-index: 30;
}
.recipe-extra:hover > span,
.recipe-extra:focus > span {
  display: block;
}

.meal-cards {
  flex-wrap: nowrap;
  overflow-x: auto;
}
.meal-card {
  max-width: 100%;
}

/* Dialogs stay in the viewport; only their content can scroll. */
html {
  scrollbar-gutter: stable;
}
html:has(dialog[open]) {
  overflow: hidden;
  overscroll-behavior: none;
}
.meal-dialog {
  position: fixed;
  inset: 0;
  margin: auto;
  max-height: min(90dvh, 950px);
  max-width: calc(100vw - 32px);
}
.modal-scroll-body {
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
.meal-detail-table-wrap {
  overflow-x: auto;
  border: 1px solid #3b4b60;
  border-radius: 12px;
  margin-top: 14px;
  background: #111b28;
}
.meal-detail-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  line-height: 1.5;
}
.meal-detail-table th,
.meal-detail-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #2e4055;
  vertical-align: middle;
}
.meal-detail-table th {
  background: #223247;
  color: #c5d5e8;
  font-size: 11px;
  font-weight: 700;
  text-align: right;
  white-space: normal;
  min-width: 80px;
}
.meal-detail-table td {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  color: #b9c9dc;
}
.meal-detail-table th:first-child,
.meal-detail-table td:first-child {
  text-align: left;
  white-space: normal;
  min-width: 110px;
}
.meal-detail-table td:first-child {
  color: #edf2fa;
  font-weight: 600;
}
.meal-detail-table tbody tr:nth-child(even) {
  background: #172333;
}
.meal-detail-table .recipe-purchase-cell {
  background: #24423444;
  color: #bce8ce;
  font-weight: 700;
}
.meal-detail-table th.recipe-purchase-cell {
  background: #284b3b;
  color: #d3f3df;
}
.meal-detail-table .recipe-cost-cell {
  color: #f1f5fb;
  font-weight: 600;
}
.meal-detail-table tfoot td {
  background: #213348;
  border-bottom: 0;
  font-weight: 700;
  color: #edf4fc;
}
.meal-detail-table small {
  display: block;
  color: #93a9bf;
  font-size: 10px;
  font-weight: 400;
}
.meal-dialog .recipe-detail-basis {
  margin: 14px 0 0 !important;
  line-height: 1.7;
  color: #bdcde0 !important;
}
@media (max-width: 540px) {
  .meal-detail-table th,
  .meal-detail-table td {
    padding: 10px;
  }
  .meal-detail-dialog .modal-scroll-body {
    padding: 16px;
  }
}

/* The recipe editor needs room for package consumption and ingredient fields. */
#mealDialog {
  width: min(1000px, calc(100vw - 32px));
}
#mealDialog .meal-shopping {
  min-width: 0;
}
@media (min-width: 800px) {
  #mealDialog .meal-ingredient-head,
  #mealDialog .meal-ingredient-row {
    grid-template-columns: 22px minmax(140px, 1fr) 76px 88px 100px 28px;
    min-width: 0;
  }
  #mealDialog .recipe-batch-mode .meal-ingredient-head,
  #mealDialog .recipe-batch-mode .meal-ingredient-row {
    grid-template-columns: 22px minmax(140px, 1fr) 76px 88px 100px 150px 28px;
    min-width: 0;
  }
}

.sidequest-people-summary {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}
.sidequest-people-summary .meal-voter-stack {
  width: 100%;
  flex: none;
  margin: 0;
}
.meal-card .sidequest-supply {
  font-size: 10px;
  color: #a8c5b5;
  line-height: 1.5;
  margin: 0;
  font-variant-numeric: tabular-nums;
}
#sidequestCards .meal-card-actions {
  align-items: flex-end;
}
