.badge {
  white-space: nowrap;
}

.onboarding-optin {
  display: grid;
  grid-template-columns: 17px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  margin-top: -3px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #f8f6ef;
  cursor: pointer;
}

.onboarding-optin input {
  width: 16px;
  min-height: 16px;
  height: 16px;
  margin: 2px 0 0;
  padding: 0;
  border: 0;
  border-radius: 4px;
  accent-color: var(--green);
  box-shadow: none;
}

.onboarding-optin span,
.onboarding-optin strong,
.onboarding-optin small {
  display: block;
}

.onboarding-optin strong {
  margin-bottom: 2px;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.25;
}

.onboarding-optin small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
  line-height: 1.35;
}

aside nav button {
  padding: 7px 8px;
}

aside nav button i.nav-icon {
  display: grid;
  place-items: center;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: #dcebdd;
  color: #315d3b;
  transition: transform .18s ease, background .18s ease;
}

aside nav button:nth-child(2) i.nav-icon { background: #f9dfd2; color: #b6532c; }
aside nav button:nth-child(3) i.nav-icon { background: #dff0e8; color: #32705a; }
aside nav button:nth-child(4) i.nav-icon { background: #f5e8b8; color: #78611c; }
aside nav button:nth-child(5) i.nav-icon { background: #e7ddf2; color: #6b4d8a; }
aside nav button:nth-child(6) i.nav-icon { background: #dce9f3; color: #416b87; }

aside nav button:hover i.nav-icon,
aside nav button.active i.nav-icon {
  transform: scale(1.06) rotate(-2deg);
}

aside nav button i.nav-icon svg {
  width: 20px;
  height: 20px;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (min-width: 901px) {
  .grid-2 {
    grid-template-columns: minmax(0, 2.25fr) minmax(260px, 0.75fr);
  }
}

.dish-guide {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: -8px 0 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--line);
}

.dish-guide > div {
  display: grid;
  gap: 3px;
  padding: 13px 15px;
  background: var(--paper);
}

.dish-guide strong {
  color: var(--green);
  font-size: 12px;
}

.dish-guide span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

@media (max-width: 700px) {
  .dish-guide {
    grid-template-columns: 1fr;
  }

  .dish-guide > div {
    grid-template-columns: 105px 1fr;
    align-items: center;
  }

}

.ingredient-picker {
  position: relative;
  min-width: 0;
}

#addLine {
  display: grid;
  place-items: center;
  width: 100%;
  min-width: 0;
  height: 42px;
  padding: 0;
}

.ingredient-picker-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 42px;
  padding: 8px 11px;
  overflow: hidden;
  border: 1px solid #ced5cd;
  border-radius: 9px;
  background: #fff;
  color: var(--muted);
  text-align: left;
}

.ingredient-picker-button:focus,
.ingredient-picker-button[aria-expanded="true"] {
  border-color: var(--green);
  box-shadow: 0 0 0 3px #315d3b15;
}

.ingredient-picker-button #ingredientPickerLabel {
  display: grid;
  min-width: 0;
}

.ingredient-picker-button strong,
.ingredient-picker-button small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ingredient-picker-button strong {
  color: var(--ink);
  font-size: 12px;
}

.ingredient-picker-button small {
  color: var(--muted);
  font-size: 10px;
}

.ingredient-picker-button b {
  flex: 0 0 auto;
  color: var(--green);
}

.ingredient-picker-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  left: 0;
  display: flex;
  flex-direction: column;
  width: min(430px, calc(100vw - 70px));
  max-height: min(360px, var(--picker-space, 360px));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 18px 45px #15251b30;
}

.ingredient-picker-menu.opens-up {
  top: auto;
  bottom: calc(100% + 6px);
}

.ingredient-picker-search {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px;
  border-bottom: 1px solid var(--line);
}

.ingredient-picker-search > span {
  color: var(--green);
  font-size: 20px;
}

.ingredient-picker-search input {
  padding: 9px 10px;
}

.ingredient-picker-results {
  flex: 1 1 auto;
  min-height: 0;
  max-height: 320px;
  overflow-y: auto;
  padding: 5px;
}

.ingredient-picker-results button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.ingredient-picker-results button:hover,
.ingredient-picker-results button:focus {
  outline: none;
  background: #eff5ed;
}

.ingredient-picker-results button span {
  display: grid;
  min-width: 0;
}

.ingredient-picker-results strong,
.ingredient-picker-results small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ingredient-picker-results strong {
  font-size: 12px;
}

.ingredient-picker-results small {
  color: var(--muted);
  font-size: 10px;
}

.ingredient-picker-results em {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
}

.ingredient-picker-results .price-needed {
  color: #a64b21;
}

.ingredient-picker-footer {
  position: sticky;
  z-index: 5;
  bottom: 0;
  flex: 0 0 auto;
  padding: 7px 9px;
  border-top: 1px solid var(--line);
  background: #fbfcfa;
  box-shadow: 0 -8px 16px #ffffffed;
}

.ingredient-picker-footer button {
  width: 100%;
  padding: 7px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--green);
  font-size: 11px;
  font-weight: 800;
  text-align: left;
}

.ingredient-picker-footer button:hover,
.ingredient-picker-footer button:focus {
  outline: none;
  background: #eff5ed;
}

.quick-ingredient-panel {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  padding: 13px;
}

.quick-ingredient-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.quick-ingredient-head > div {
  display: grid;
  gap: 2px;
}

.quick-ingredient-head strong {
  font-size: 13px;
}

.quick-ingredient-head small {
  color: var(--muted);
  font-size: 10px;
}

.quick-ingredient-head button {
  padding: 0 3px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
}

.quick-ingredient-grid,
.quick-loss-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 9px;
}

.quick-ingredient-panel label {
  gap: 4px;
  margin-bottom: 9px;
  font-size: 10px;
}

.quick-ingredient-panel input,
.quick-ingredient-panel select {
  padding: 8px 9px;
  font-size: 11px;
}

.quick-ingredient-details {
  margin: 3px 0 12px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
}

.quick-ingredient-details summary {
  color: var(--green);
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
}

.quick-ingredient-details[open] summary {
  margin-bottom: 10px;
}

.quick-allergens {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.quick-allergens label {
  display: block;
  margin: 0;
}

.quick-allergens input {
  display: none;
}

.quick-allergens span {
  display: block;
  padding: 4px 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 9px;
  font-weight: 650;
}

.quick-allergens input:checked + span {
  border-color: var(--forest);
  background: var(--forest);
  color: #fff;
}

.quick-ingredient-actions {
  position: sticky;
  z-index: 4;
  bottom: -13px;
  display: flex;
  justify-content: flex-end;
  gap: 7px;
  margin: 4px -13px -13px;
  padding: 10px 13px 13px;
  border-top: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 -8px 16px #ffffffea;
}

.quick-ingredient-actions button {
  padding: 8px 10px;
  font-size: 10px;
}

#modalBody .modal-actions {
  position: sticky;
  z-index: 12;
  bottom: -22px;
  margin: 12px -22px -22px;
  padding: 14px 22px calc(14px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 -10px 22px #ffffffed;
}

.autosave-status {
  align-self: center;
  margin-left: auto;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.autosave-status[data-state="saving"] {
  opacity: .65;
}

.autosave-status[data-state="saved"],
.autosave-status[data-state="restored"] {
  color: var(--green);
}

.autosave-status[data-state="saved"]::before,
.autosave-status[data-state="restored"]::before {
  content: "✓ ";
}

.quick-ingredient-actions .autosave-status {
  margin-right: auto;
  margin-left: 0;
  font-size: 9px;
}

@media (max-width: 520px) {
  .autosave-status {
    max-width: 82px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

.picker-section-label {
  margin: 8px 10px 3px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.component-kind {
  display: inline-flex;
  width: max-content;
  margin-top: 2px;
  padding: 2px 5px;
  border-radius: 999px;
  background: #e8f2e9;
  color: var(--green) !important;
  font-size: 8px !important;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.recipe-line-name {
  display: grid;
  min-width: 0;
}

.recipe-line-name small {
  color: var(--muted);
  font-size: 9px;
  text-transform: uppercase;
}

.recipe-explainer {
  margin: -7px 0 16px;
  padding: 10px 12px;
  border-radius: 9px;
  background: #f2f6f1;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.recipe-explainer strong {
  color: var(--green);
}

.ingredient-picker-empty {
  display: grid;
  gap: 3px;
  padding: 22px 12px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.ingredient-picker-more {
  margin: 4px 7px 7px;
  color: var(--muted);
  font-size: 10px;
  text-align: center;
}

@media (max-width: 600px) {
  .ingredient-picker-menu {
    width: calc(100vw - 76px);
  }
}

.team-card table {
  min-width: 700px;
}

.team-card td:first-child strong {
  display: inline-block;
}

.current-member {
  display: inline-flex;
  margin-left: 7px;
  padding: 2px 6px;
  border-radius: 999px;
  background: #eef3ed;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.team-actions-heading,
.team-actions {
  width: 90px;
  text-align: right;
}

.member-remove {
  padding: 6px 9px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.member-remove:hover,
.member-remove:focus-visible {
  border-color: #e9c2bc;
  background: #fff5f2;
  color: var(--red);
  outline: none;
}

.protected-member {
  color: #c7cdc7;
}

.remove-member-confirm {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 13px;
  align-items: start;
}

.remove-member-confirm strong {
  display: block;
  margin: 2px 0 5px;
  font-size: 15px;
}

.remove-member-confirm p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.remove-member-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #fff1ed;
  color: var(--red);
}

.remove-member-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.danger-primary {
  border: 0;
  border-radius: 9px;
  background: var(--red);
  color: #fff;
  padding: 10px 14px;
  font-weight: 750;
}

.danger-primary:hover {
  background: #95362e;
}

.danger-primary:disabled {
  cursor: wait;
  opacity: .65;
}

#modalBody .remove-member-actions {
  margin-top: 22px;
}

.badge.fancy {
  background: #eee4f5;
  color: #684b82;
}

.dish-name-line {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.dish-name-line strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dish-menu-tag {
  flex: 0 0 auto;
  padding: 2px 6px;
  border: 1px solid #d9ded7;
  border-radius: 999px;
  background: #f7f6f1;
  color: #68736c;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .04em;
  line-height: 1.3;
  text-transform: uppercase;
}

.dish-basics {
  grid-template-columns: minmax(190px, 1.35fr) minmax(85px, .55fr) minmax(125px, .8fr);
}

@media (max-width: 620px) {
  .dish-basics {
    grid-template-columns: 1fr 1fr;
  }

  .dish-basics label:first-child {
    grid-column: 1 / -1;
  }
}

.export-pdf-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 13px;
  font-weight: 750;
}

.export-pdf-button svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.export-pdf-button:disabled {
  cursor: not-allowed;
  opacity: .48;
}

.dish-export-form {
  display: grid;
  gap: 18px;
}

.export-section {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
}

.export-section-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
  margin-bottom: 11px;
}

.export-section-head strong,
.export-section-head small {
  display: block;
}

.export-section-head strong {
  font-size: 13px;
}

.export-section-head small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.export-section-head > div:last-child {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #b6bdb7;
  font-size: 11px;
  white-space: nowrap;
}

.export-section-head .link {
  font-size: 11px;
}

.export-dish-list {
  display: grid;
  max-height: 190px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.export-dish-list label {
  display: grid;
  grid-template-columns: 17px 1fr;
  gap: 9px;
  align-items: center;
  margin: 0;
  padding: 9px 11px;
  border-bottom: 1px solid #edf0eb;
  cursor: pointer;
}

.export-dish-list label:last-child {
  border-bottom: 0;
}

.export-dish-list label:hover {
  background: #f8f8f3;
}

.export-dish-list input,
.export-field-choice input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--green);
}

.export-dish-list b,
.export-dish-list small {
  display: block;
}

.export-dish-list b {
  font-size: 12px;
}

.export-dish-list small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 500;
}

.export-field-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.export-field-choice {
  display: flex;
  gap: 7px;
  align-items: center;
  min-height: 38px;
  margin: 0;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
  font-size: 10px;
  line-height: 1.25;
}

.export-field-choice:has(input:checked) {
  border-color: #a9c0aa;
  background: #f1f6f0;
}

.export-hint {
  margin: 11px 1px 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.export-hint strong {
  color: var(--green);
}

.export-error {
  margin: -7px 0 0;
  padding: 9px 11px;
  border: 1px solid #efc1ba;
  border-radius: 8px;
  background: #fff2ef;
  color: var(--red);
  font-size: 11px;
  font-weight: 700;
}

.export-privacy {
  align-self: center;
  color: var(--muted);
  font-size: 9px;
}

@media (max-width: 620px) {
  .export-field-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .export-privacy {
    display: none;
  }
}
