.borsch {
  max-width: 960px;
}
.borsch .intro {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  align-items: center;
  gap: 32px;
  padding-block: 32px 24px;
}
.borsch h1 { font-size: clamp(34px, 6vw, 64px); font-weight: 670; text-wrap: balance; }
.borsch h2 { font-size: clamp(27px, 4vw, 40px); font-weight: 650; text-wrap: balance; }
.borsch .lead { max-width: 56ch; margin-block: 12px 0; }
.dish-photo {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 20px;
}
.borsch .card { padding: 0; overflow: hidden; border-radius: 20px; }
.bowl { display: grid; grid-template-columns: 1fr 1fr; }
.borsch .calc-output {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
  padding: 32px;
  border: 0;
  border-right: 1px solid var(--line);
}
.bowl .total { width: 100%; align-items: baseline; }
.bowl .total strong { color: var(--accent); font-size: clamp(52px, 8vw, 76px); }
.bowl .total span { margin-left: 8px; padding-left: 12px; border-left: 1px solid var(--line); }
.borsch .note:empty { display: none; }
.bowl-controls, .recipe-body { min-width: 0; padding: 24px 32px; }
.borsch select, .borsch input:not([type="checkbox"]) {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
  color: var(--ink);
  min-height: 44px;
  padding: 8px 10px;
  font-size: 16px;
}
.borsch select {
  appearance: none;
  background-image: var(--select-chevron);
  background-position: right 12px center;
  background-repeat: no-repeat;
  background-size: 16px;
  padding-right: 40px;
  cursor: pointer;
}
#cream-fat { width: 88px; }
.borsch input[inputmode="decimal"] { width: 80px; font-variant-numeric: tabular-nums; }
.borsch :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.borsch .portions { margin-block: 8px 0; }
.borsch .portions button { padding-inline: 12px; }
.cream-toggle { width: fit-content; }
.cream-toggle input { margin: 0 4px 0 0; }
.own-recipe { margin-block: 48px 0; }
.recipe { margin-top: 20px; }
.borsch .recipe { overflow: visible; }
.recipe-total {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 1;
  padding: 12px 32px;
  background: var(--tint);
  color: var(--accent-dark);
  font-size: clamp(16px, 4vw, 20px);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.borsch summary { list-style: none; min-height: 48px; display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.borsch summary::-webkit-details-marker { display: none; }
.borsch summary::after {
  content: "";
  width: 16px; height: 16px; flex: none;
  background: var(--select-chevron) center / contain no-repeat;
}
.borsch details[open] > summary::after { transform: rotate(180deg); }
.borsch .recipe summary { padding: 16px 32px; }
.borsch .recipe-body { border-top: 1px solid var(--line); }
.borsch .recipe-body > .inline { margin-top: 0; }
.borsch .recipe-head, .borsch #recipe-rows li {
  grid-template-columns: minmax(0, 1fr) 80px 56px 44px;
}
.borsch #recipe-rows li { gap: 8px; padding-block: 4px; min-height: 52px; }
.borsch .recipe-head span:nth-child(3), .ingredient-kcal { text-align: right; font-variant-numeric: tabular-nums; }
.borsch #recipe-rows { margin-block: 4px 12px; }
.ingredient-name { overflow-wrap: anywhere; }
.remove-ingredient {
  display: grid; place-items: center; width: 44px; height: 44px;
  border: 0; border-radius: 10px; background: transparent; color: var(--muted);
  font-size: 24px; line-height: 1;
}
.remove-ingredient:hover { background: var(--paper); color: var(--ink); }
.text-button { border: 0; background: transparent; color: var(--accent-dark); padding: 4px 0; min-height: 44px; text-decoration: underline; text-underline-offset: 3px; }
.undo-row { display: flex; gap: 8px 20px; align-items: center; flex-wrap: wrap; }
#add-ingredient { margin-top: 12px; }
.ingredient-picker { margin-block: 12px; }
.ingredient-picker input { width: 100%; }
.ingredient-results { list-style: none; padding: 0; }
.ingredient-result {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  width: 100%; min-height: 48px; padding: 8px 4px; text-align: left;
  border: 0; border-bottom: 1px solid var(--line); background: var(--white); color: var(--ink);
}
.ingredient-result span:last-child { flex: none; color: var(--muted); font-size: 13px; }
.ingredient-result:hover:not(:disabled) { background: var(--paper); }
.recipe-body input, .recipe-body button { scroll-margin-top: 72px; }
.borsch .extra { padding-block: 48px; }
.borsch .faq { max-width: none; }
.diary-invitation {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 32px; margin-bottom: 40px; border-radius: 20px;
  background: var(--white); border: 1px solid var(--line);
}
.diary-invitation h2 { font-size: clamp(26px, 4vw, 36px); }
.diary-invitation p { margin-top: 8px; color: var(--muted); max-width: 48ch; }
.diary-invitation .button { flex: none; display: grid; place-items: center; text-decoration: none; }
.recipe-footer { display: flex; justify-content: space-between; gap: 24px; padding-block: 24px 32px; border-top: 1px solid var(--line); }
.recipe-footer small { display: block; margin-top: 8px; color: var(--muted); }
.recipe-footer nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 20px; align-content: start; }
.recipe-footer nav a { display: flex; align-items: center; min-height: 44px; font-size: 14px; }
@media (max-width: 720px) {
  .borsch .intro { grid-template-columns: minmax(0, 1fr); gap: 16px; padding-block: 20px 16px; }
  .dish-photo { aspect-ratio: 2 / 1; border-radius: 14px; }
  .bowl { grid-template-columns: 1fr; }
  .borsch .calc-output { border-right: 0; border-bottom: 1px solid var(--line); padding: 20px; }
  .bowl-controls, .recipe-body, .borsch .recipe summary { padding: 16px 20px; }
  .recipe-total { padding-inline: 20px; }
  .own-recipe { margin-top: 32px; }
  .borsch .extra { padding-block: 32px; }
  .diary-invitation { align-items: stretch; flex-direction: column; padding: 20px; }
  .recipe-footer { flex-direction: column; gap: 8px; }
}
@media (forced-colors: active) {
  .borsch select { appearance: auto; background-image: none; }
  .borsch summary::after { content: "⌄"; background: none; }
}
@media (max-width: 390px) {
  .recipe-footer nav { column-gap: 12px; }
  .bowl-controls, .recipe-body, .borsch .recipe summary { padding-inline: 12px; }
  .borsch .recipe-head, .borsch #recipe-rows li { grid-template-columns: minmax(0, 1fr) 60px 40px 44px; }
  .borsch #recipe-rows input { width: 60px; }
}
