/* Recipe setup, cooking help and timers share the cookbook's warm palette. */
.recipe-setup-mode {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  width: 100%;
  padding: 5px;
  margin: 8px 0 19px;
  border: 1px solid #e5e0d5;
  border-radius: 13px;
  background: #efede5;
}
.recipe-setup-mode button {
  min-width: 0;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: #74776c;
  font: 600 12px/1.35 'DM Sans', sans-serif;
  cursor: pointer;
}
.recipe-setup-mode button[aria-pressed="true"] {
  border-color: #e4dfd2;
  background: #fffefa;
  color: #384a34;
  box-shadow: 0 2px 7px #302b1b0d;
}
.setup-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
  text-align: left;
  color: #5c6156;
  font: 600 12px/1.45 'DM Sans', sans-serif;
}
.setup-field label {
  margin: 0;
  color: inherit;
  font: inherit;
}
.serving-prompt .setup-field input,
.serving-prompt .setup-field select,
.setup-field input,
.setup-field select {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 46px;
  margin: 0;
  padding: 11px 12px;
  border: 1px solid #dedbcf;
  border-radius: 10px;
  background: #fffefa;
  color: #252821;
  font: 400 14px/1.35 'DM Sans', sans-serif;
  box-shadow: 0 2px 4px #302b1b03 inset;
}
.setup-field select { padding-right: 26px; }
.setup-field small { color: #77796f; font-size: 11px; font-weight: 400; }
.package-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(100px, .65fr);
  gap: 13px;
  width: 100%;
  margin-bottom: 14px;
}
.package-fields > :first-child { grid-column: 1 / -1; }
.package-fields[hidden], #globalTimerShelf[hidden], #peopleFields[hidden] { display: none !important; }
.recipe-timers-disclosure { margin: 18px 0; border: 1px solid #dedbcf; border-radius: 12px; background: #fbfaf6; }
.recipe-timers-disclosure > summary { padding: 14px 16px; cursor: pointer; color: #52664d; font: 600 13px 'DM Sans', sans-serif; }
.recipe-timers-disclosure > summary span { float: right; }
.recipe-timers-disclosure .kitchen-timers-panel { margin: 0; border: 0; }
.measurement-note { font: 400 11px/1.5 'DM Sans', sans-serif; color: #77796f; margin: 5px 0 12px; text-align: left; }
.setup-preview {
  width: 100%;
  margin: 8px 0 14px;
  padding: 12px 14px;
  border: 1px solid #dce3d5;
  border-radius: 10px;
  background: #edf2e8;
  color: #44583e;
  font: 500 12px/1.6 'DM Sans', sans-serif;
  text-align: left;
}
.setup-error,
.kitchen-timer-error {
  margin: 7px 0;
  color: #a24732;
  font: 500 12px/1.55 'DM Sans', sans-serif;
  text-align: left;
}
.setup-error:empty,
.kitchen-timer-error:empty { display: none; }
.substitution-picker {
  align-self: stretch;
  min-width: 0;
  width: 100%;
  margin: 12px 0 9px;
  padding: 16px;
  border: 1px solid #e5dfd1;
  border-radius: 13px;
  background: linear-gradient(145deg, #f7f5ee, #fffefa);
  text-align: left;
}
.substitution-picker legend {
  padding: 0 7px;
  color: #252821;
  font: 600 16px 'Playfair Display', serif;
}
.substitution-picker > p {
  margin: 0 0 12px !important;
  color: #77796f;
  font: 400 12px/1.6 'DM Sans', sans-serif !important;
}
.substitution-options { display: grid; gap: 8px; }
.substitution-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  min-height: 54px;
  padding: 12px;
  border: 1px solid #e6e1d6;
  border-radius: 10px;
  background: #fffefa;
  cursor: pointer;
}
.serving-prompt .substitution-option input,
.substitution-option input {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;
  margin: 2px 0 0;
  accent-color: #52664d;
}
.substitution-option span { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.substitution-option b { color: #343b2f; font: 600 12px/1.4 'DM Sans', sans-serif; }
.substitution-option small { color: #77796f; font: 400 11px/1.55 'DM Sans', sans-serif; }
.substitution-option:has(input:checked) { border-color: #94a48b; background: #eef3e9; }
.recipe-adjustments {
  margin: 17px 0;
  padding: 15px;
  border: 1px solid #e5dfd1;
  border-left: 3px solid #dc754d;
  border-radius: 11px;
  background: #f8f5ed;
}
.recipe-adjustments p { margin: 0 0 8px; font-size: 12px; }
.recipe-choice-chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  margin: 3px 4px 3px 0;
  padding: 6px 10px;
  border: 1px solid #e0e4d7;
  border-radius: 20px;
  background: #edf1e7;
  color: #4e6348;
  font: 500 10px/1.5 'DM Sans', sans-serif;
  overflow-wrap: anywhere;
}
.recipe-scale-note { color: #656d5f; font-size: 11px !important; line-height: 1.6; }
.recipe-substitution-notes { margin: 9px 0; padding-left: 18px; color: #6a7063; font: 400 11px/1.65 'DM Sans', sans-serif; }
.recipe-substitution-notes li + li { margin-top: 5px; }
.recipe-adjustments button,
.recipe-tools-row > button {
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid #d9dece;
  border-radius: 9px;
  background: #fffefa;
  color: #52664d;
  font: 600 11px/1.4 'DM Sans', sans-serif;
  cursor: pointer;
}
.recipe-tools-row { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin: 12px 0; }
.wake-status,
.kitchen-wake-status { margin: 5px 0; color: #6c7665; font: 400 10px/1.6 'DM Sans', sans-serif; }
.cooking-help,
#recipeTimerShelf {
  margin: 16px 0;
  border: 1px solid #e5e0d5;
  border-radius: 12px;
  background: #fbf9f3;
  overflow: hidden;
}
.cooking-help > summary,
#recipeTimerShelf > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  padding: 15px 16px;
  color: #394331;
  font: 600 13px/1.5 'DM Sans', sans-serif;
  list-style: none;
  cursor: pointer;
}
.cooking-help > summary::-webkit-details-marker,
#recipeTimerShelf > summary::-webkit-details-marker { display: none; }
.cooking-help > summary::after,
#recipeTimerShelf > summary::after { content: '+'; flex: 0 0 22px; color: #75836d; text-align: center; font-size: 20px; font-weight: 400; }
.cooking-help[open] > summary::after,
#recipeTimerShelf[open] > summary::after { content: '−'; }
.cooking-help[open] > summary,
#recipeTimerShelf[open] > summary { border-bottom: 1px solid #e9e5d9; }
.help-choices { display: flex; flex-wrap: wrap; gap: 7px; padding: 14px 14px 7px; }
.help-choices button {
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid #e1ddcf;
  border-radius: 9px;
  background: #fffefa;
  color: #687160;
  font: 500 11px/1.4 'DM Sans', sans-serif;
  cursor: pointer;
}
.help-choices button[aria-pressed="true"] { border-color: #9ba78d; background: #eaf0e3; color: #405238; }
.help-answer { margin: 7px 14px 15px; padding: 14px; border: 1px solid #e9e2d3; border-radius: 10px; background: #fffefa; }
.help-answer:empty { display: none; }
.help-answer h4 { margin: 0 0 8px; color: #36422e; font: 600 14px/1.5 'DM Sans', sans-serif; }
.help-answer ol { margin: 0; padding-left: 19px; color: #6a7063; font: 400 12px/1.75 'DM Sans', sans-serif; }
.help-answer li + li { margin-top: 7px; }
.step-number { display: inline-grid; place-items: center; min-width: 22px; height: 22px; margin-right: 5px; border-radius: 50%; background: #edeadd; color: #52664d; font: 600 10px 'DM Sans', sans-serif; }
.step-timers { display: flex; flex-wrap: wrap; gap: 6px; margin: 5px 0 12px 27px; }
.step-timer-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  max-width: 100%;
  padding: 9px 11px;
  border: 1px solid #dbe2d1;
  border-radius: 9px;
  background: #f1f5eb;
  color: #52664d;
  font: 600 10px/1.5 'DM Sans', sans-serif;
  text-align: left;
  cursor: pointer;
}
#globalTimerShelf { width: calc(100% - 44px); max-width: 1026px; margin: 24px auto 30px; }
.kitchen-timers-panel { min-width: 0; padding: 19px; border: 1px solid #e2ddcf; border-radius: 13px; background: linear-gradient(145deg, #f4f2e9, #fffefa); }
#recipeTimerShelf .kitchen-timers-panel { border: 0; border-radius: 0; padding: 15px; }
.kitchen-timers-heading { display: flex; align-items: center; gap: 11px; margin-bottom: 13px; }
.kitchen-timers-heading .eyebrow { margin: 0 0 4px; font-size: 9px; }
.kitchen-timers-heading h3 { margin: 0; color: #343c2f; font: 600 20px/1.3 'Playfair Display', serif; }
.kitchen-timers-icon { display: grid; place-items: center; flex: 0 0 38px; width: 38px; height: 38px; border-radius: 12px; background: #e9eddf; color: #52664d; font-size: 21px; }
.kitchen-timer-list { display: grid; gap: 9px; }
.kitchen-timer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px 12px;
  min-width: 0;
  padding: 13px;
  border: 1px solid #e4e2d6;
  border-radius: 11px;
  background: #fffefa;
}
.kitchen-timer.is-running { border-color: #d0dac4; }
.kitchen-timer.is-paused { background: #f8f6f0; }
.kitchen-timer.is-done { border-color: #dda67c; background: #fff4e8; box-shadow: 0 3px 12px #b36b2910; }
.kitchen-timer-copy { min-width: 0; overflow-wrap: anywhere; }
.kitchen-timer-recipe { margin: 0 0 5px !important; color: #8c826d !important; font: 500 10px/1.4 'DM Sans', sans-serif !important; }
.kitchen-timer-copy h4 { margin: 0 0 4px; color: #38432f; font: 600 12px/1.5 'DM Sans', sans-serif; }
.kitchen-timer-status { margin: 0 !important; color: #78806e !important; font: 400 10px/1.5 'DM Sans', sans-serif !important; }
.is-done .kitchen-timer-status { color: #a76437 !important; }
.kitchen-timer-time { color: #52664d; font: 600 24px/1.1 'DM Sans', sans-serif; font-variant-numeric: tabular-nums; letter-spacing: -.6px; white-space: nowrap; }
.is-paused .kitchen-timer-time { color: #8d8b7d; }
.is-done .kitchen-timer-time { color: #b87542; }
.kitchen-timer-actions { display: flex; flex-wrap: wrap; gap: 7px; grid-column: 1 / -1; }
.kitchen-timer-actions button,
.kitchen-timer-custom button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid #dbe1d0;
  border-radius: 8px;
  background: #edf2e6;
  color: #4a5f40;
  font: 600 11px/1.45 'DM Sans', sans-serif;
  cursor: pointer;
}
.kitchen-timer-actions button.timer-remove { margin-left: auto; border-color: #e8dfd3; background: #fbf8f1; color: #95816a; }
.kitchen-timer-empty { padding: 7px 0 13px; margin: 0 !important; color: #88877a !important; font: 400 12px/1.6 'DM Sans', sans-serif !important; }
.kitchen-timer-custom { display: grid; grid-template-columns: minmax(0, 1fr) minmax(70px, .45fr) auto; align-items: end; gap: 9px; margin-top: 16px; padding-top: 15px; border-top: 1px solid #e7e3d7; }
.kitchen-timer-custom label { display: flex; flex-direction: column; gap: 6px; min-width: 0; color: #69715f; font: 500 10px/1.5 'DM Sans', sans-serif; }
.kitchen-timer-custom input { display: block; width: 100%; min-width: 0; min-height: 44px; padding: 10px; border: 1px solid #dedccf; border-radius: 8px; background: #fffefa; color: #333c2d; font: 400 13px/1.4 'DM Sans', sans-serif; }
.kitchen-timer-custom button { border-color: #52664d; background: #52664d; color: #fffefa; }
.kitchen-timer-note { margin: 12px 0 0 !important; color: #8a897c !important; font: 400 10px/1.6 'DM Sans', sans-serif !important; }
.recipe-setup-mode button,
.substitution-option,
.recipe-adjustments button,
.recipe-tools-row > button,
.help-choices button,
.step-timer-button,
.kitchen-timer-actions button,
.kitchen-timer-custom button { transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.setup-field input:focus-visible,
.setup-field select:focus-visible,
.substitution-option:has(input:focus-visible),
.kitchen-timer-custom input:focus-visible { outline: 3px solid #82917655; outline-offset: 2px; }
@media (hover:hover) {
  .recipe-setup-mode button:hover { color: #52664d; }
  .substitution-option:hover { border-color: #b6c0a9; }
  .recipe-adjustments button:hover,
  .recipe-tools-row > button:hover,
  .help-choices button:hover,
  .step-timer-button:hover,
  .kitchen-timer-actions button:hover { border-color: #a8b598; background: #e6eddc; }
  .kitchen-timer-custom button:hover { background: #42563d; }
}
@media (max-width:560px) {
  .recipe-setup-mode button { padding: 10px 8px; font-size: 11px; }
  .serving-prompt .setup-field input,
  .serving-prompt .setup-field select,
  .setup-field input,
  .setup-field select,
  .kitchen-timer-custom input { font-size: 16px; }
  .package-fields { grid-template-columns: minmax(0, 1fr) minmax(90px, .7fr); gap: 11px; }
  .substitution-picker { padding: 13px; }
  .substitution-option { padding: 11px; }
  .recipe-adjustments { padding: 13px; }
  .recipe-tools-row { align-items: stretch; }
  .help-choices { padding: 12px 11px 6px; }
  .help-answer { margin: 7px 11px 12px; padding: 12px; }
  .step-timers { margin-left: 23px; }
  .kitchen-timers-panel { padding: 15px; }
  #recipeTimerShelf .kitchen-timers-panel { padding: 12px; }
  .kitchen-timer { gap: 9px; padding: 11px; }
  .kitchen-timer-time { font-size: 22px; }
  .kitchen-timer-custom { grid-template-columns: minmax(0, 1fr) minmax(85px, .6fr); }
  .kitchen-timer-custom button { grid-column: 1 / -1; width: 100%; }
}
@media (max-width:350px) {
  .recipe-setup-mode { grid-template-columns: 1fr; }
  .kitchen-timer { grid-template-columns: minmax(0, 1fr); }
  .kitchen-timer-time { grid-row: 2; }
  .kitchen-timer-actions button { flex: 1 1 auto; }
  .kitchen-timer-actions button.timer-remove { margin-left: 0; }
}
@media (prefers-reduced-motion:reduce) {
  .recipe-setup-mode button,
  .substitution-option,
  .recipe-adjustments button,
  .recipe-tools-row > button,
  .help-choices button,
  .step-timer-button,
  .kitchen-timer-actions button,
  .kitchen-timer-custom button { transition: none; }
}
