.wheel-recipes {
  width: min(460px, 100%);
  margin-top: 14px;
}

.wheel-section {
  padding: 16px 0 14px;
}

.wheel-wrap {
  width: min(270px, 78vw);
}

.wheel-recipes h2 {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 600;
}

.wheel-recipes ul {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.wheel-recipes li {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
  padding: 7px 0;
  border-top: 1px solid var(--line);
  font-size: 14px;
}

.wheel-recipe-marker {
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  border-radius: 50%;
}

.wheel-recipe-title {
  overflow: hidden;
  color: #4a4e46;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wheel-recipe-time {
  margin-left: auto;
  color: #898c82;
  font-size: 12px;
  white-space: nowrap;
}

/* Keep the first version comfortable to use on a phone or by touch. */
.intro > p,
.filter-control > span,
.filter-control select,
.wheel-hint,
.wheel-recipes h2,
.dialog-meta,
.dialog-description,
.recipe-dialog li {
  font-size: 15px;
}

.filters {
  gap: 14px;
  padding: 16px;
  border-radius: 12px;
}

.filter-control {
  gap: 8px;
}

.filter-control select {
  min-height: 48px;
  padding: 10px 12px;
  border-radius: 8px;
}

.wheel-section {
  padding: 24px 0;
}

.wheel-wrap {
  width: min(340px, 82vw);
}

.wheel-hint {
  min-height: 24px;
  margin: 16px 0 12px;
}

.spin-button {
  min-height: 54px;
  min-width: 240px;
  border-radius: 10px;
  font-size: 17px;
}

.wheel-recipes h2 {
  margin-bottom: 10px;
}

.wheel-recipes li {
  gap: 10px;
  padding: 10px 0;
}

.wheel-recipe-marker {
  width: 12px;
  height: 12px;
  flex-basis: 12px;
}

.recipe-dialog {
  padding: 32px;
}

.recipe-dialog h2 {
  padding-right: 20px;
}

.recipe-dialog h3 {
  font-size: 17px;
}

.recipe-dialog li {
  line-height: 1.65;
}

button:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 3px solid #8baa7b;
  outline-offset: 3px;
}

.recipe-manager {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfcfa;
}

.recipe-manager summary {
  min-height: 48px;
  padding: 13px 16px;
  color: #343830;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.recipe-manager summary span {
  color: var(--muted);
  font-weight: 400;
}

.recipe-manager-content {
  padding: 0 16px 16px;
}

.recipe-manager-content > p,
.form-help {
  color: var(--muted);
  font-size: 14px;
}

.add-recipe-button,
.save-recipe-button,
.cancel-button {
  min-height: 46px;
  padding: 10px 14px;
  border-radius: 8px;
  font: 600 15px "DM Sans", sans-serif;
  cursor: pointer;
}

.add-recipe-button,
.save-recipe-button {
  border: 0;
  background: var(--green);
  color: white;
}

.manage-recipe-list {
  display: grid;
  gap: 8px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.manage-recipe-list > li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  font-size: 14px;
}

.manage-recipe-actions {
  display: flex;
  gap: 6px;
  flex: 0 0 auto;
}

.include-recipe-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-left: auto;
  color: #555a50;
  font-size: 13px;
  font-weight: 400;
  white-space: nowrap;
  cursor: pointer;
}

.include-recipe-toggle input {
  width: 20px;
  height: 20px;
  accent-color: var(--green);
}

.manage-recipe-actions button {
  min-height: 40px;
  padding: 7px 9px;
  border: 1px solid #dfe3db;
  border-radius: 7px;
  background: white;
  color: var(--green);
  font: 500 13px "DM Sans", sans-serif;
  cursor: pointer;
}

.manage-recipe-actions button:last-child {
  color: #8d3932;
}

.edit-dialog {
  position: fixed;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  width: min(520px, calc(100% - 30px));
  max-height: 90vh;
  overflow: auto;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: #30352d;
  box-shadow: 0 14px 55px #1c201733;
}

.edit-dialog::backdrop {
  background: #20271e66;
}

.edit-dialog h2 {
  margin: 0 32px 18px 0;
  font: 700 24px "Playfair Display", serif;
}

.edit-dialog form > label,
.form-row > label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 13px;
  color: #4a4e46;
  font-size: 14px;
  font-weight: 600;
}

.edit-dialog input,
.edit-dialog select,
.edit-dialog textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid #dfe3db;
  border-radius: 7px;
  background: white;
  color: #30352d;
  font: 400 15px "DM Sans", sans-serif;
}

.edit-dialog textarea {
  resize: vertical;
}

.form-help {
  font-weight: 400;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.cancel-button {
  border: 1px solid #dfe3db;
  background: #fff;
  color: #4a4e46;
}

@media (prefers-reduced-motion: reduce) {
  .wheel-wrap canvas {
    transition-duration: 0.01ms;
  }
}

@media (max-width: 540px) {
  .wheel-wrap {
    width: min(280px, 78vw);
  }

  .wheel-recipes {
    margin-top: 17px;
  }

  .wheel-recipes ul {
    grid-template-columns: 1fr;
  }

  .wheel-recipes li {
    padding: 8px 0;
  }

  .recipe-dialog {
    padding: 28px 22px;
  }

  .manage-recipe-list > li {
    align-items: flex-start;
    flex-direction: column;
  }

  .include-recipe-toggle {
    margin-left: 0;
  }

  .edit-dialog {
    padding: 24px 20px;
  }
}
