/*
 * The look: Butter and Plum. Change it here: colour values and font names live only in the
 * variable block below (AC-114), and every rule uses them through var(). The @font-face rules
 * name the same two families, for the app's own font files (M23, R-6).
 *
 * The rules for every screen (REQ-58):
 * - No progress bars, rings, charts or red and green status.
 * - Numbers stay quiet and food names carry the weight.
 * - A-4's sizes outrank a drawn size: a check circle drawn 28 to 32 across, or a quiet link,
 *   still has a tap target of at least 44 x 44, and 48 x 48 in cooking mode (A-31).
 * - Light only for now (A-31): no dark version, and nothing follows the phone's setting.
 */

/* The app's own files, with their licences beside them. A slow or failed file shows the system
   fallback, never blank text. */
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/fraunces/fraunces-latin-full-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Fraunces";
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/fraunces/fraunces-latin-full-italic.woff2") format("woff2");
}

@font-face {
  font-family: "Figtree";
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url("fonts/figtree/figtree-latin-wght-normal.woff2") format("woff2");
}

:root {
  color-scheme: light;

  --color-ground: #F9F2DF;
  --color-ink: #2F1F2B;
  --color-muted: #6A5562;
  --color-plum: #6E2F56;
  --color-panel: #F1E6C8;
  --color-raised: #FFFBEF;
  --color-rule: #D8CAA4;
  --color-on-plum: #FFF8E6;
  --color-secondary: #4B3644;
  --color-amount: #5C4753;
  --color-heading-rule: #C9B98F;
  --color-list-rule: #E4D8B8;
  --color-leader: #B3A382;

  /* Each ends in a system fallback, so the app still looks finished if a font file fails. */
  --font-display: Fraunces, ui-serif, serif;
  --font-body: Figtree, system-ui, -apple-system, sans-serif;

  /* Fraunces always takes SOFT 100; large type adds opsz. The fallbacks ignore both. */
  --fraunces-axes: "SOFT" 100;
  --fraunces-axes-large: "SOFT" 100, "opsz" 144;

  --tab-bar-height: 52px;

  --shadow-card: 0 6px 22px rgb(47 31 43 / 0.14);
}

body {
  margin: 0;
  background-color: var(--color-ground);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

main {
  padding: max(1rem, env(safe-area-inset-top)) 1rem max(1.5rem, env(safe-area-inset-bottom));
}

main.has-tab-bar {
  padding-bottom: calc(var(--tab-bar-height) + env(safe-area-inset-bottom) + 1.5rem);
}

h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 41px;
  font-weight: 400;
  line-height: 1.1;
  font-variation-settings: var(--fraunces-axes-large);
}

h2 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: 23px;
  font-style: italic;
  font-weight: 400;
  text-align: center;
  font-variation-settings: var(--fraunces-axes);
}

/* The double rule under a heading: a 3-tall box with a line top and bottom. */
.with-rule::after {
  content: "";
  display: block;
  box-sizing: border-box;
  height: 3px;
  margin-top: 0.5rem;
  border-top: 1px solid var(--color-heading-rule);
  border-bottom: 1px solid var(--color-heading-rule);
}

/* Stays in view however far down a list the save was refused. */
.notice {
  position: sticky;
  top: 0;
  z-index: 1;
  margin: 0;
  padding: max(0.75rem, env(safe-area-inset-top)) 1rem 0.75rem;
  background-color: var(--color-panel);
  color: var(--color-ink);
}

/* "New version ready" sits above every screen, in the flow, so it never covers a running timer. Reload
   keeps the kitchen's size, as it shows in cooking mode too (A-4). */
.update-prompt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: max(0.5rem, env(safe-area-inset-top)) 1rem 0.5rem;
  background-color: var(--color-panel);
}

.update-message {
  min-width: 0;
  margin: 0;
  font-weight: 500;
}

.update-prompt .update-reload {
  flex: none;
  min-height: 48px;
}

/* Buttons and fields */

button {
  font-family: inherit;
  cursor: pointer;
}

.button-primary,
.button-secondary {
  display: block;
  width: 100%;
  min-height: 58px;
  border: 0;
  border-radius: 14px;
  font-family: var(--font-display);
  font-size: 21px;
  font-variation-settings: var(--fraunces-axes);
}

.button-primary {
  background-color: var(--color-plum);
  color: var(--color-on-plum);
}

.button-secondary {
  background-color: var(--color-panel);
  color: var(--color-plum);
}

.button-small {
  width: auto;
  min-height: 44px;
  min-width: 64px;
  padding: 0 1rem;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 500;
}

.field-label {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--color-secondary);
  font-weight: 500;
}

/* 16 keeps iPhone Safari from zooming in on the field. */
.text-field {
  box-sizing: border-box;
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 0 0.75rem;
  border: 1px solid var(--color-heading-rule);
  border-radius: 10px;
  background-color: var(--color-raised);
  color: var(--color-ink);
  font-family: inherit;
  font-size: 16px;
}

.text-field:focus-visible {
  outline: 2px solid var(--color-plum);
  outline-offset: 1px;
}

.text-field[aria-invalid="true"] {
  border: 2px solid var(--color-plum);
}

.field-message {
  margin: 0.5rem 0 0;
  color: var(--color-ink);
}

/* The tab bar: words only, with a line on top. */

.tab-bar {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  grid-auto-columns: 1fr;
  grid-auto-flow: column;
  padding-bottom: env(safe-area-inset-bottom);
  border-top: 1px solid var(--color-rule);
  background-color: var(--color-ground);
}

.tab {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tab-bar-height);
  color: var(--color-secondary);
  text-decoration: none;
}

.tab[aria-current="page"] {
  color: var(--color-plum);
  font-weight: 600;
}

/* The recipe box */

/* Quiet, top right, and with the full tap target (A-31). */
.settings-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-width: 44px;
  min-height: 44px;
  margin-left: auto;
  color: var(--color-secondary);
  font-size: 15px;
  text-decoration: none;
}

.box-title {
  font-size: 42px;
  text-align: center;
}

.tab-note {
  margin: 0.75rem 0 0;
  color: var(--color-secondary);
  font-size: 15px;
  text-align: center;
}

.meal-filter,
.list-filter,
.batch-choice {
  display: flex;
  gap: 2px;
  margin-top: 1rem;
  padding: 3px;
  border-radius: 14px;
  background-color: var(--color-panel);
}

.list-filter {
  margin-top: 0.5rem;
}

.filter-option,
.batch-option {
  flex: 1 1 0;
  min-width: 44px;
  min-height: 44px;
  padding: 0 0.25rem;
  border: 0;
  border-radius: 11px;
  background-color: transparent;
  color: var(--color-secondary);
  font-size: 15px;
}

/* The same choice is in cooking mode, so it's always the kitchen's size. */
.batch-option {
  min-width: 48px;
  min-height: 48px;
}

.filter-option[aria-pressed="true"],
.batch-option[aria-pressed="true"] {
  background-color: var(--color-raised);
  color: var(--color-plum);
  font-weight: 600;
}

.recipe-list,
.plain-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.recipe-list {
  margin-top: 0.5rem;
}

.recipe-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 52px;
  border-bottom: 1px solid var(--color-list-rule);
  color: var(--color-ink);
  text-decoration: none;
}

.recipe-row-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-variation-settings: var(--fraunces-axes);
}

.recipe-row-ours {
  flex: none;
  color: var(--color-plum);
  font-size: 14px;
}

/* The recipe page */

.back-link {
  display: inline-flex;
  align-items: center;
  min-width: 44px;
  min-height: 44px;
  color: var(--color-plum);
  font-weight: 500;
  text-decoration: none;
}

.recipe-header {
  margin-top: 0.5rem;
  text-align: center;
}

.recipe-context {
  margin: 0 0 0.5rem;
  color: var(--color-secondary);
  font-size: 14px;
  font-variant-caps: small-caps;
  letter-spacing: 0.04em;
}

.recipe-description {
  margin: 0.5rem 0 0;
  font-family: var(--font-display);
  font-size: 19px;
  font-style: italic;
  font-variation-settings: var(--fraunces-axes);
}

.recipe-yield {
  margin: 0.5rem 0 0;
  color: var(--color-muted);
  font-size: 15px;
}

.recipe-start {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}

.recipe-start .batch-choice {
  margin-top: 0;
}

.recipe-section {
  margin-top: 1.75rem;
}

.ingredient-row {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.5rem 0;
}

.ingredient-name {
  flex: 0 1 auto;
  min-width: 0;
  font-family: var(--font-display);
  font-size: 19px;
  font-variation-settings: var(--fraunces-axes);
}

.ingredient-note {
  color: var(--color-muted);
  font-family: var(--font-body);
  font-size: 15px;
}

.ingredient-leader {
  flex: 1 1 12px;
  min-width: 12px;
  border-bottom: 1px dotted var(--color-leader);
}

.ingredient-amount {
  flex: none;
  color: var(--color-amount);
  font-family: var(--font-display);
  font-size: 17px;
  font-style: italic;
  font-variation-settings: var(--fraunces-axes);
}

.tool-row {
  padding: 0.25rem 0;
  text-align: center;
}

.recipe-tip {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--color-list-rule);
}

.recipe-tip:last-child {
  border-bottom: 0;
}

.recipe-actions {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.idea-card {
  margin-top: 1.75rem;
  padding: 1rem 1rem 0.25rem;
  border-radius: 18px;
  background-color: var(--color-panel);
  text-align: center;
}

.idea-sentence {
  margin: 0;
  font-family: var(--font-display);
  font-size: 19px;
  font-variation-settings: var(--fraunces-axes);
}

/* Quiet to look at, with the full tap target (A-31). */
.idea-not-today {
  min-width: 44px;
  min-height: 44px;
  margin-top: 0.25rem;
  padding: 0 0.75rem;
  border: 0;
  background-color: transparent;
  color: var(--color-secondary);
  font-size: 15px;
}

/* The pantry */

.pantry-title {
  font-size: 38px;
  text-align: center;
}

.pantry-add {
  margin-top: 1rem;
}

.pantry-add-line {
  display: flex;
  gap: 0.5rem;
}

.tick-list {
  margin-top: 1rem;
}

.tick-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 50px;
  border-bottom: 1px solid var(--color-list-rule);
  cursor: pointer;
}

/* The real checkbox sits unseen over the circle drawn beside it; its label is the tap target. */
.tick-input {
  position: absolute;
  top: 50%;
  left: 0;
  width: 30px;
  height: 30px;
  margin: -15px 0 0;
  opacity: 0;
}

.tick-mark {
  flex: none;
  position: relative;
  box-sizing: border-box;
  width: 30px;
  height: 30px;
  border: 2px solid var(--color-plum);
  border-radius: 50%;
}

.tick-input:checked + .tick-mark,
.tick-mark-done {
  background-color: var(--color-plum);
}

.tick-input:checked + .tick-mark::after,
.tick-mark-done::after {
  content: "";
  position: absolute;
  top: 5px;
  left: 9px;
  width: 6px;
  height: 12px;
  border: solid var(--color-on-plum);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.tick-input:focus-visible + .tick-mark {
  outline: 2px solid var(--color-plum);
  outline-offset: 2px;
}

.tick-name {
  font-family: var(--font-display);
  font-size: 19px;
  font-variation-settings: var(--fraunces-axes);
}

/* From what's on hand, and more like ours */

.on-hand-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin-top: 0.5rem;
  color: var(--color-plum);
  font-weight: 500;
  text-decoration: none;
}

.on-hand-title {
  margin-top: 0.5rem;
  font-size: 38px;
  text-align: center;
}

.on-hand-row {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.25rem;
  min-height: 52px;
  padding: 0.5rem 0;
  box-sizing: border-box;
  border-bottom: 1px solid var(--color-list-rule);
  color: var(--color-ink);
  text-decoration: none;
}

.on-hand-need {
  color: var(--color-secondary);
  font-size: 15px;
}

.on-hand-empty {
  margin: 1.75rem 0 0;
  text-align: center;
}

.more-like-link {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0.25rem 0;
  box-sizing: border-box;
  border-bottom: 1px solid var(--color-list-rule);
  color: var(--color-plum);
  text-decoration: none;
}

.unreadable-message {
  margin: 1rem 0 0;
  text-align: center;
}

/* Discover: the card fills the space above its three buttons. The screen runs edge to edge, so a card
   dragged off the side is clipped by the phone's edge and adds no sideways scrolling. */

.discover-screen {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-inline: -1rem;
  padding-inline: 1rem;
  min-height: calc(100vh - var(--tab-bar-height) - env(safe-area-inset-bottom) - max(1rem, env(safe-area-inset-top)) - 1.5rem);
  min-height: calc(100svh - var(--tab-bar-height) - env(safe-area-inset-bottom) - max(1rem, env(safe-area-inset-top)) - 1.5rem);
  overflow-x: clip;
}

.discover-title {
  font-size: 26px;
  font-style: italic;
  text-align: center;
  font-variation-settings: var(--fraunces-axes);
}

/* A drag belongs to the card, so the phone neither scrolls nor selects from it. */
.discover-card {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  box-sizing: border-box;
  padding: 1.5rem 1rem;
  border-radius: 28px;
  background-color: var(--color-raised);
  box-shadow: var(--shadow-card);
  text-align: center;
  cursor: grab;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  transition: transform 160ms ease-out;
}

.discover-card-dragging {
  cursor: grabbing;
  transition: none;
}

@media (prefers-reduced-motion: reduce) {
  .discover-card {
    transition: none;
  }
}

.discover-drawing {
  flex: 0 1 auto;
  width: min(100%, 320px);
  max-height: 40vh;
  object-fit: contain;
  -webkit-touch-callout: none;
}

.discover-name {
  margin: 0;
  font-size: 36px;
  font-style: normal;
  line-height: 1.1;
  font-variation-settings: var(--fraunces-axes-large);
}

.discover-view {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0 0.75rem;
  color: var(--color-plum);
  font-weight: 500;
  text-decoration: none;
}

/* The three look alike in weight and colour (REQ-65). */
.discover-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}

.discover-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.125rem;
  min-height: 72px;
  padding: 0.25rem;
  border: 0;
  border-radius: 16px;
  background-color: var(--color-panel);
  color: var(--color-plum);
  font-size: 15px;
  font-weight: 500;
}

.discover-arrow {
  display: block;
  font-size: 20px;
  line-height: 1.1;
}

.discover-action-label {
  display: block;
}

.discover-ending {
  margin: auto 0 0;
  font-family: var(--font-display);
  font-size: 34px;
  font-variation-settings: var(--fraunces-axes);
  line-height: 1.15;
  text-align: center;
}

.discover-ending:last-child {
  margin-bottom: auto;
}

.discover-see-set-aside {
  min-height: 48px;
  margin-bottom: auto;
  font-size: 19px;
}

/* Settings */

.settings-title {
  margin-top: 0.5rem;
  font-size: 38px;
  text-align: center;
}

.switch-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 58px;
  margin-top: 1rem;
  border-bottom: 1px solid var(--color-list-rule);
  cursor: pointer;
}

.switch-name {
  min-width: 0;
  font-family: var(--font-display);
  font-size: 19px;
  font-variation-settings: var(--fraunces-axes);
}

/* The real checkbox sits unseen over the switch drawn beside it; its label is the tap target. */
.switch-input {
  position: absolute;
  top: 50%;
  right: 0;
  width: 52px;
  height: 32px;
  margin: -16px 0 0;
  opacity: 0;
}

.switch-mark {
  flex: none;
  position: relative;
  box-sizing: border-box;
  width: 52px;
  height: 32px;
  border: 2px solid var(--color-plum);
  border-radius: 16px;
  background-color: var(--color-raised);
}

.switch-mark::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background-color: var(--color-plum);
}

.switch-input:checked + .switch-mark {
  background-color: var(--color-plum);
}

.switch-input:checked + .switch-mark::after {
  left: 23px;
  background-color: var(--color-on-plum);
}

.switch-input:focus-visible + .switch-mark {
  outline: 2px solid var(--color-plum);
  outline-offset: 2px;
}

.settings-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 44px;
  margin: 1rem 0 0;
  border-bottom: 1px solid var(--color-list-rule);
  color: var(--color-secondary);
}

.settings-note {
  margin: 0.5rem 0 0;
  color: var(--color-secondary);
  font-size: 15px;
}

/* Adding, deleting and the recipe form */

.box-add {
  margin-top: 1rem;
}

.delete-confirm,
.leave-confirm {
  display: grid;
  gap: 0.75rem;
  padding: 1rem;
  border: 1px solid var(--color-rule);
  border-radius: 14px;
  background-color: var(--color-raised);
}

.delete-question,
.leave-question {
  margin: 0;
  font-family: var(--font-display);
  font-size: 19px;
  font-variation-settings: var(--fraunces-axes);
  text-align: center;
}

.form-title {
  margin-top: 0.5rem;
  font-size: 38px;
  text-align: center;
}

.form-field {
  margin-top: 0.75rem;
}

.form-field:first-child {
  margin-top: 0;
}

.form-section {
  margin-top: 1.75rem;
}

/* The minmax keeps a long word in a field from widening the row. */
.form-rows {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.75rem;
}

.form-card {
  padding: 0.75rem;
  border: 1px solid var(--color-rule);
  border-radius: 14px;
  background-color: var(--color-raised);
}

.form-card .form-card {
  background-color: var(--color-ground);
}

.form-card .form-rows {
  margin-top: 0.75rem;
}

.form-card .form-rows:empty {
  margin-top: 0;
}

.form-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.form-pair > .form-field {
  margin-top: 0;
}

.form-pair + .form-field {
  margin-top: 0.75rem;
}

.form-ticks {
  margin-top: 0.5rem;
}

.form-tick {
  border-bottom: 0;
}

.form-tick-name {
  min-width: 0;
}

.form-uses {
  margin-top: 0.75rem;
}

.form-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.form-add {
  margin-top: 0.75rem;
}

.form-save {
  margin-top: 1.75rem;
}

.form-save .field-message {
  margin-bottom: 0.75rem;
}

.text-area {
  display: block;
  min-height: 72px;
  padding: 0.625rem 0.75rem;
  line-height: inherit;
  resize: vertical;
}

.button-small:disabled {
  color: var(--color-muted);
  cursor: default;
}

/* Cooking mode: tap targets at least 48 x 48 and step text at least 20 (A-4). */

.kitchen .back-link {
  flex: none;
  min-width: 48px;
  min-height: 48px;
}

.kitchen-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.kitchen-dish {
  min-width: 0;
  margin: 0;
  color: var(--color-secondary);
  font-family: var(--font-display);
  font-size: 15px;
  font-style: italic;
  font-variation-settings: var(--fraunces-axes);
  text-align: right;
}

.kitchen-title {
  margin-top: 0.5rem;
  font-size: 38px;
  text-align: center;
}

.kitchen > .recipe-yield {
  text-align: center;
}

.kitchen-start {
  margin-top: 1.75rem;
}

.prep-task {
  padding: 0.5rem 0;
}

.prep-text {
  min-width: 0;
  font-size: 18px;
}

.position-line {
  margin: 0.5rem 0 1rem;
  color: var(--color-secondary);
  font-size: 15px;
  text-align: center;
}

.stage {
  border-bottom: 1px solid var(--color-list-rule);
}

.stage-title {
  margin: 0;
  font-style: normal;
  text-align: left;
}

.stage-heading {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  min-height: 56px;
  padding: 0.5rem 0;
  border: 0;
  background-color: transparent;
  color: var(--color-ink);
  font-family: var(--font-display);
  font-size: 21px;
  font-variation-settings: var(--fraunces-axes);
  text-align: left;
}

.stage-current .stage-heading {
  font-size: 34px;
  line-height: 1.1;
}

.stage-name {
  flex: 1 1 auto;
  min-width: 0;
}

/* The chevron: down when folded, up when open. */
.stage-heading::after {
  content: "";
  flex: none;
  box-sizing: border-box;
  width: 10px;
  height: 10px;
  margin-right: 4px;
  border: solid var(--color-plum);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.stage-heading[aria-expanded="true"]::after {
  transform: rotate(225deg);
}

.stage-steps {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.75rem;
  padding-bottom: 1rem;
}

.step {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  column-gap: 0.25rem;
  align-items: start;
}

.step-current {
  padding: 0.75rem 0.75rem 0.75rem 0.25rem;
  border-radius: 22px;
  background-color: var(--color-raised);
}

/* The label is the tap target, and the circle is drawn smaller inside it (A-31). */
.step-tick {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  cursor: pointer;
}

.step-tick .tick-input {
  left: 9px;
}

.step-body {
  min-width: 0;
}

.step-text {
  margin: 0.5rem 0 0;
  font-family: var(--font-display);
  font-size: 20px;
  font-variation-settings: var(--fraunces-axes);
}

.step-current .step-text {
  font-size: 25px;
  line-height: 1.2;
}

.step-ticked .step-text {
  color: var(--color-muted);
}

.step-lines {
  margin-top: 0.5rem;
}

.step-lines .ingredient-row {
  padding: 0.25rem 0;
}

.step-timer,
.step-done-temp,
.step-note {
  margin: 0.5rem 0 0;
}

.step-timer {
  color: var(--color-amount);
  font-size: 17px;
  font-weight: 500;
}

/* A step's own timer, on the panel color, in its card. */
.timer-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: 14px;
  background-color: var(--color-panel);
}

.timer-reading {
  flex: 1 1 auto;
  margin: 0;
  font-family: var(--font-display);
  font-size: 34px;
  font-variant-numeric: tabular-nums;
  font-variation-settings: var(--fraunces-axes);
  line-height: 1.1;
}

.timer-button {
  min-width: 48px;
  min-height: 48px;
}

.timer-panel .button-secondary {
  background-color: var(--color-raised);
}

.timer-done {
  flex: 1 1 100%;
  padding: 0.25rem 0.75rem;
  font-size: 19px;
}

/* Every running and done timer: it stays in sight as the cook scrolls, and never takes the screen. */
.timer-strip {
  position: sticky;
  top: env(safe-area-inset-top, 0);
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.5rem;
  max-height: 40vh;
  margin-top: 0.5rem;
  padding: 0.5rem 0.75rem;
  overflow-y: auto;
  border-radius: 14px;
  background-color: var(--color-panel);
}

.strip-timer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.75rem;
}

/* Two lines of a step's text say which it is. All of it stays in the step's card. */
.strip-timer-name {
  display: -webkit-box;
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 20px;
  line-height: 1.2;
}

.strip-timer-reading {
  flex: none;
  font-family: var(--font-display);
  font-size: 24px;
  font-variant-numeric: tabular-nums;
  font-variation-settings: var(--fraunces-axes);
}

.wake-fallback {
  margin: 0 0 1rem;
  color: var(--color-secondary);
  font-size: 15px;
  text-align: center;
}

.step-done-temp {
  font-size: 19px;
}

.step-note {
  color: var(--color-secondary);
}

.next-step {
  color: var(--color-ink);
  font-family: var(--font-display);
  font-size: 20px;
  font-variation-settings: var(--fraunces-axes);
}

.next-step-label {
  color: var(--color-plum);
  font-style: italic;
}

/* The end of a recipe: the dish, "Enjoy." and Done at the bottom, nothing else. */

.finish {
  display: flex;
  flex-direction: column;
  min-height: 85vh;
  text-align: center;
}

.finish-dish {
  text-align: center;
}

.finish-words {
  margin: auto 0;
  color: var(--color-plum);
  font-size: 76px;
  font-weight: 300;
}

.finish-done {
  flex: none;
}
