:root {
  --ink: #40312a;
  --red: #b93c2d;
  --paper: #fff9ed;
  --line: #e5d8c4;
  --muted: #8a7463;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  color: var(--ink);
  background: #f1e3ce;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background-image:
    linear-gradient(90deg, transparent 97%, #bb443011 97%),
    linear-gradient(transparent 97%, #bb443011 97%);
  background-size: 42px 42px;
}
button,
input,
select {
  font: inherit;
}
button,
summary {
  cursor: pointer;
}
button {
  transition:
    background 0.16s,
    transform 0.16s;
}
button:hover {
  filter: brightness(0.96);
}
button:active {
  transform: translateY(1px);
}
button:focus-visible,
a:focus-visible,
summary:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #d7872a;
  outline-offset: 4px;
}
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
a {
  color: inherit;
}
.masthead {
  max-width: 1260px;
  margin: auto;
  padding: 22px 34px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}
.back {
  text-decoration: none;
  color: #786455;
}
.demo {
  border: 1px solid #a67055;
  padding: 5px 10px;
  color: #8d4938;
  transform: rotate(1deg);
}
main {
  max-width: 1260px;
  margin: auto;
  padding: 15px 34px 24px;
}
.title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 12px 24px;
}
h1,
h2,
.hand-note,
.pencil-note {
  font-family: "STKaiti", "KaiTi", "Kaiti SC", serif;
}
h1 {
  font-size: 46px;
  letter-spacing: 2px;
  color: var(--red);
  margin: 0;
  font-weight: 800;
}
h1 span {
  display: inline-block;
  transform: rotate(12deg);
}
.title-row p {
  font-size: 14px;
  margin: 10px 0 0;
  letter-spacing: 2px;
  color: #806351;
}
.hand-note {
  font-size: 20px;
  line-height: 1.6;
  transform: rotate(-6deg);
  margin-right: 22px;
  color: #8d5e43;
}
.notebook {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  background: var(--paper);
  border-radius: 9px 22px 20px 9px;
  border: 1px solid #d1bfa7;
  border-bottom: 6px solid #d5bca0;
  box-shadow:
    8px 10px 0 #b3422c,
    12px 17px 25px #59311519;
  position: relative;
}
.menu-page {
  padding: 28px 38px 18px;
  min-width: 0;
  border-right: 1px solid #cbb49a;
  background: linear-gradient(90deg, transparent 94%, #6542290b);
  position: relative;
}
.page-head {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted);
}
.small-label {
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--muted);
}
.menu-page h2 {
  text-align: center;
  font-size: 30px;
  letter-spacing: 5px;
  margin: 26px 0 4px;
}
.menu-caption {
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  margin: 8px 0 23px;
}
.menu {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.dish {
  text-align: center;
  min-width: 0;
}
.dish + .dish {
  border-left: 1px dashed #d6bea3;
  padding-left: 19px;
}
.plate {
  width: min(100%, 190px);
  aspect-ratio: 1;
  margin: 0 auto 15px;
  display: block;
  filter: drop-shadow(0 8px 5px #593a2515);
}
.dish h3 {
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 23px;
  margin: 0 0 9px;
  overflow-wrap: anywhere;
}
.dish-tags {
  font-size: 11px;
  min-height: 22px;
  color: #91755d;
}
.signature {
  border: 1px solid #b9523c;
  padding: 2px 5px;
  color: var(--red);
  display: inline-block;
  transform: rotate(-4deg);
}
.swap {
  border: none;
  background: transparent;
  color: #9b6251;
  font-size: 11px;
  text-decoration: underline;
  text-underline-offset: 4px;
  padding: 12px 2px;
}
.menu-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 17px;
}
.primary,
.outline {
  border: 1px solid var(--red);
  padding: 12px 17px;
  border-radius: 3px;
  font-size: 13px;
  font-weight: 600;
}
.primary {
  background: var(--red);
  color: #fff9ed;
}
.primary span {
  margin-left: 14px;
  font-size: 18px;
}
.outline {
  background: transparent;
  color: var(--red);
}
.feedback {
  min-height: 21px;
  font-size: 12px;
  color: var(--red);
  text-align: center;
  line-height: 1.6;
  margin: 12px 0;
}
.pencil-note {
  position: relative;
  width: max-content;
  max-width: 100%;
  font-size: 17px;
  line-height: 1.7;
  transform: rotate(-3deg);
  color: #8d7966;
  margin: 19px 20px 8px auto;
}
.pencil-note span {
  font-size: 40px;
  position: absolute;
  left: -57px;
  top: 2px;
  color: #b88565;
}
.page-number {
  text-align: center;
  color: #aa947f;
  font-size: 10px;
  margin: 16px 0 0;
}
.recipe-page {
  padding: 34px 30px 20px;
  background: repeating-linear-gradient(
    transparent,
    transparent 36px,
    #d9c9b31c 37px,
    #d9c9b31c 38px
  );
  position: relative;
}
.recipe-page h2 {
  font-size: 22px;
  margin: 12px 0 8px;
}
.hint {
  font-size: 12px;
  color: var(--muted);
  margin: 9px 0 21px;
}
.index-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.clip {
  border: 3px solid #b2a38d;
  border-radius: 10px;
  width: 14px;
  height: 40px;
  transform: rotate(9deg);
  position: absolute;
  top: -13px;
  right: 35px;
}
.recipe-list {
  display: flex;
  flex-direction: column;
}
.recipe-row {
  display: flex;
  gap: 10px;
  align-items: center;
  min-height: 42px;
  border-bottom: 1px solid #e6dac9;
}
.recipe-row label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  flex: 1;
  cursor: pointer;
  min-width: 0;
}
.recipe-row input {
  accent-color: var(--red);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.recipe-row label.excluded .recipe-name {
  text-decoration: line-through;
  color: #a79583;
}
.recipe-name {
  overflow-wrap: anywhere;
}
.recipe-kind {
  font-size: 10px;
  color: #ad8a71;
}
.recipe-star {
  font-size: 11px;
  color: var(--red);
}
.remove-recipe {
  background: none;
  border: 0;
  font-size: 18px;
  color: #9d8c7c;
  padding: 7px;
}
.add-recipe {
  margin-top: 18px;
}
.add-recipe summary {
  font-size: 13px;
  color: var(--red);
  list-style: none;
  padding: 10px 0;
}
.add-recipe[open] summary {
  margin-bottom: 8px;
}
form {
  display: grid;
  gap: 12px;
}
form label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: #7d6553;
}
input:not([type="checkbox"]),
select {
  width: 100%;
  border: 1px solid #d4c0a8;
  background: #fffcf6;
  color: var(--ink);
  padding: 10px;
  border-radius: 2px;
  min-width: 0;
}
form .check-label {
  display: flex;
  align-items: center;
  gap: 8px;
}
.index-foot {
  font-size: 10px;
  color: #a58d76;
  margin-top: 25px;
}
.favorites-section {
  margin: 32px 0 0;
}
.favorites-title {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 12px;
}
.favorites-title h2 {
  font-size: 21px;
  margin: 0;
}
.favorites-title > span {
  font-size: 11px;
  color: #8f7763;
}
.empty-favorites {
  font-size: 12px;
  color: #8e7a66;
  margin: 18px 0;
}
.favorite-row {
  background: #fff9ed99;
  border-top: 1px solid #cebaa2;
  border-bottom: 1px solid #cebaa2;
  margin-top: 10px;
  padding: 0 16px;
}
.favorite-row summary {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  padding: 14px 0;
  font-size: 13px;
  list-style: none;
}
.favorite-row summary:after {
  content: "＋";
  color: var(--red);
}
.favorite-row[open] summary:after {
  content: "−";
}
.favorite-content {
  padding-bottom: 15px;
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
}
.favorite-content p {
  font-size: 12px;
  line-height: 1.8;
  margin: 0;
  color: #7a6352;
}
.text-button {
  border: 0;
  background: none;
  color: #94624c;
  padding: 8px 0;
  text-decoration: underline;
  text-underline-offset: 4px;
  font-size: 11px;
  flex-shrink: 0;
}
footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  color: #8d7763;
  font-size: 10px;
  margin-top: 22px;
}
.no-dish {
  min-height: 236px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px;
  font-size: 14px;
  line-height: 1.7;
  color: #9c7860;
}
.no-dish strong {
  font-size: 34px;
  color: #c0a486;
  margin-bottom: 12px;
}
@media (min-width: 1450px) {
  main {
    padding-top: 23px;
  }
  .notebook {
    min-height: 610px;
  }
  .menu-page {
    padding-top: 36px;
  }
  .menu-page h2 {
    margin-top: 32px;
  }
  .plate {
    width: 208px;
  }
  .recipe-row {
    min-height: 46px;
  }
}
@media (max-width: 760px) {
  .masthead {
    padding: 17px 20px 0;
  }
  main {
    padding: 12px 20px 22px;
  }
  .title-row {
    padding: 12px 0 24px;
  }
  h1 {
    font-size: 35px;
  }
  .title-row p {
    font-size: 11px;
    letter-spacing: 0;
  }
  .hand-note {
    font-size: 14px;
    margin-right: 0;
    max-width: 112px;
  }
  .notebook {
    grid-template-columns: 1fr;
    box-shadow: 5px 7px 0 #b3422c;
  }
  .menu-page {
    padding: 25px 20px 18px;
    border-right: 0;
    border-bottom: 1px dashed #cbb49a;
  }
  .recipe-page {
    padding: 28px 22px;
  }
  .menu {
    gap: 12px;
  }
  .dish + .dish {
    padding-left: 12px;
  }
  .menu-page h2 {
    font-size: 26px;
  }
  .dish h3 {
    font-size: 21px;
  }
  .plate {
    max-width: 170px;
  }
  .pencil-note {
    margin-top: 7px;
    font-size: 15px;
  }
  .favorites-title {
    display: block;
  }
  .favorites-title > span {
    display: block;
    margin-top: 8px;
  }
  .menu-actions {
    gap: 8px;
  }
  .primary,
  .outline {
    padding: 12px;
    font-size: 12px;
  }
  .favorite-content {
    align-items: flex-start;
  }
  .page-head {
    font-size: 10px;
  }
  .small-label {
    letter-spacing: 1px;
  }
  footer {
    align-items: flex-start;
  }
}
@media (prefers-reduced-motion: reduce) {
  button {
    transition: none;
  }
}
