/* Match the paper, tape and sticker treatments in the neighbor journal. */
.recipe-page {
  --ink: #332922;
  --muted: #605447;
  --green: #285a44;
  --paper: #fffdf8;
  --edge: #dfd3be;
  --paper-shadow: 0 3px 0 #dfd4c0, 0 8px 20px #44342414;
  --sticker-shadow: 0 2px 0 #d8c8ac66, 0 3px 8px #46352312;
  --sticker-cutout: drop-shadow(1.3px 0 #fffef7) drop-shadow(-1.3px 0 #fffef7)
    drop-shadow(0 1.3px #fffef7) drop-shadow(0 -1.3px #fffef7) drop-shadow(0 2px 2px #49392542);
  font: 15.5px/1.62 "PingFang SC", "Hiragino Sans GB", "HarmonyOS Sans SC", "Microsoft YaHei UI", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  background-color: #f3ece0;
  background-image:
    linear-gradient(to right, #a993721c 1px, transparent 1px),
    linear-gradient(to bottom, #a993721c 1px, transparent 1px),
    radial-gradient(circle at 12% 6%, #fff4d6c7, transparent 36%),
    radial-gradient(circle at 88% 18%, #dfeddda6, transparent 38%);
  background-size: 24px 24px, 24px 24px, 100% 100%, 100% 100%;
  min-height: 100dvh;
}

.recipe-page .recipe-hero {
  position: relative;
  padding-block: 18px;
  box-shadow: var(--paper-shadow);

}
.recipe-hero h1,
.recipe-page .panel > h2 {
  width: fit-content;
  max-width: 100%;
  padding-inline: 3px;
  color: #2b211a;
  letter-spacing: .035em;
  background: linear-gradient(transparent 66%, #f3d58d9e 66% 94%, transparent 94%);
}
.recipe-hero::before,
.recipe-hero::after,
.recipe-page .workspace > .panel::before,
.recipe-page :is(.reverse, .catalog)::before {
  position: absolute;
  content: "";
  width: 84px;
  height: 23px;
  top: -11px;
  background: url("./assets/washi-sage.webp") center / 100% 100% no-repeat;
  filter: drop-shadow(0 2px 2px #48342021);
  pointer-events: none;
  transform: rotate(-5deg);
}
.recipe-hero::before { left: 20px; width: 108px; height: 28px; top: -13px; }
.recipe-hero::after {
  right: 24px;
  top: -13px;
  width: 108px;
  height: 28px;
  background-image: url("./assets/washi-gold.webp");
  transform: rotate(4deg);
}
.recipe-hero .recipe-hero-sticker {
  position: absolute;
  inset-inline-end: 8%;
  top: 50%;
  width: 108px;
  height: 86px;
  background:
    url("./assets/sticker-yunguo.png") left center / 80px auto no-repeat,
    url("./assets/sticker-star.png") right top / 23px auto no-repeat;
  filter: var(--sticker-cutout);
  pointer-events: none;
  transform: translateY(-50%) rotate(7deg);
}
.recipe-page .workspace > .panel::before,
.recipe-page :is(.reverse, .catalog)::before { right: 20px; }
.recipe-page .workspace > .panel:nth-child(2)::before,
.recipe-page .reverse::before {
  background-image: url("./assets/washi-gold.webp");
  transform: rotate(4deg);
}
.recipe-page .workspace > .panel:nth-child(2)::before,
.recipe-page .catalog::before {
  top: 8px;
  right: 20px;
  width: 45px;
  height: 45px;
  background-position: center;
  background-size: contain;
  filter: var(--sticker-cutout);
}
.recipe-page .workspace > .panel:nth-child(2)::before {
  background-image: url("./assets/sticker-soup.png");
  transform: rotate(12deg);
}
.recipe-page .catalog::before {
  background-image: url("./assets/sticker-carrot.png");
  transform: rotate(14deg);
}

.recipe-page .mode-bar {
  gap: 6px;
  margin-top: 17px;
  padding: 4px;
  border: 1px solid #d7c7ac;
  border-radius: 12px;
  background: #efe5d1;
  box-shadow: 0 2px 0 #dfd0b8;
}
.recipe-page .mode-bar button {
  min-width: 0;
  padding-block: 7px;
  color: #55473c;
  background: transparent;
  border-color: transparent;
  border-radius: 8px;
  overflow-wrap: anywhere;
}
.recipe-page .mode-bar button:hover { background: #f7eedc; }
.recipe-page .mode-bar button[aria-pressed="true"] {
  color: #1f4b37;
  background: #fffcf5;
  border-color: #c9b593;
  box-shadow: 0 1px 2px #6c503523;
}

.recipe-page main .panel {
  position: relative;
  border: 1.5px solid #dfd3be;
  border-radius: 14px;
  background: var(--paper);
  box-shadow: var(--paper-shadow);
}
.recipe-page .panel > h2 { font-size: clamp(1.15rem, 2.1vw, 1.38rem); }
.recipe-page .workspace { row-gap: 20px; }
.recipe-page :is(.reverse, .catalog) { margin-top: 21px; }

.recipe-page .catalog-grid li,
.recipe-page :is(.effect-tile, .sort-button):not([aria-pressed="true"]),
.recipe-page .ingredient-choice button {
  background: linear-gradient(180deg, #fffdf8, #f9edd8);
  border: 1px solid #e3d2b7;
  border-radius: 12px;
  box-shadow: var(--sticker-shadow);
}
.recipe-page .ingredient:not(.is-needed):focus-within { border-color: #b3905c; }
.recipe-page #pantry { row-gap: 13px; }
.recipe-page .ingredient {
  position: relative;
  margin-block-start: 5px;
}
.recipe-page .ingredient:not(.is-needed) {
  --word-card-band: #efd0c2;
  border: 1px solid #d6c2a3;
  border-radius: 7px 10px 9px 7px;
  background:
    linear-gradient(var(--word-card-band),var(--word-card-band)) top / 100% 18px no-repeat,
    repeating-linear-gradient(transparent 0 23px,#decfb648 23px 24px),
    #fffbef;
  box-shadow: 0 2px 0 #fff9e9, 0 3px 0 #dbc7a7, 0 5px 0 #e5d4b6, 0 6px 0 #d3bb93;
}
.recipe-page .ingredient:nth-child(3n + 2):not(.is-needed) { --word-card-band: #dbe6cf; }
.recipe-page .ingredient:nth-child(3n):not(.is-needed) { --word-card-band: #eeddb2; }
.recipe-page .ingredient::before,
.recipe-page .ingredient::after {
  content: "";
  position: absolute;
  z-index: 1;
  pointer-events: none;
}
.recipe-page .ingredient::before {
  inset-block-start: 6px;
  inset-inline-start: 10px;
  inline-size: 7px;
  block-size: 7px;
  border-radius: 50%;
  background: #886f56;
  box-shadow: 0 0 0 1.5px #fff8ea;
}
.recipe-page .ingredient::after {
  inset-block-start: -8px;
  inset-inline-start: 7px;
  inline-size: 10px;
  block-size: 21px;
  border: 2px solid #8b7659;
  border-block-start-color: #cdb791;
  border-inline-start-color: #beaa89;
  border-radius: 50%;
  box-shadow: 1px 1px 1px #57402c33;
  transform: rotate(-15deg);
}
.compact-cooking .recipe-page #pantry { row-gap: 8px; }
.recipe-page :is(.recipe-hero,#pantry,.ingredient-options),
.recipe-page :is(.recipe-hero,#pantry,.ingredient-options) * {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}
.recipe-page .recipe-hero img { -webkit-user-drag: none; }
.recipe-page .ingredient-page-turn {
  position: absolute;
  z-index: 1;
  inset: 1px 1px auto auto;
  display: grid;
  place-items: center;
  inline-size: 34px;
  block-size: 34px;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0 11px 0 8px;
  background: transparent;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.recipe-page .ingredient-page-turn::before {
  content: "";
  inline-size: 19px;
  block-size: 19px;
  border: 1px solid #c49f84;
  border-radius: 50%;
  background:
    linear-gradient(#68423c,#68423c) center / 8px 2px no-repeat,
    linear-gradient(#68423c,#68423c) center / 2px 8px no-repeat,
    #fff8eb;
}
.recipe-page .ingredient-page-turn:hover:enabled { background: transparent; }
.recipe-page .ingredient-page-turn:is(:hover, :focus-visible)::before { background-color: #fbe1d5; }
.recipe-page .ingredient:has(.ingredient-page-turn:not([hidden])) .ingredient-source { padding-block-start: 12px; }
.compact-cooking .recipe-page .ingredient-page-turn { inline-size: 28px; block-size: 28px; }
.recipe-page .ingredient-source { border-radius: 9px; }
.recipe-page .ingredient-source:hover:enabled { background: #fff5d699; }
.recipe-page .ingredient-source .game-icon {
  filter: drop-shadow(0 3px 2px #513c3328);
}
.recipe-page :is(.step, .prep-item, #open-ingredient-options, #reset, #end-trial) {
  border-color: #d6c5a8;
  background-color: #fffaf0;
  box-shadow: 0 1px 0 #dac9ac;
}
.recipe-page .prep {
  --prep-color: #e5efdb;
  border-radius: 13px;
  border: 1.5px dashed #9aab8e;
  background:
    radial-gradient(#8d9f7940 1px, transparent 1px) 0 0 / 12px 12px,
    radial-gradient(ellipse at center, var(--prep-color), #faf8ea 88%);
}
.recipe-page .prep.is-target { border-color: #51775b; }
.recipe-page .prep.is-over { --prep-color: #b9dfb5; border-color: #3a6c4b; border-style: solid; }
.recipe-page .prep strong { color: #2b513d; }
.recipe-page .appliance-slider { border: 1px solid #d9c8ab; border-radius: 12px; }
.recipe-page .appliance-choice { background: #fbf3e2; }
.recipe-page .appliance-choice[aria-pressed="true"] { color: #24533d; background: #e6efe0; }
.recipe-page .appliance-dot[aria-pressed="true"]::after { background: #4c795f; }

.recipe-page .cook-outcome {
  background: #edf4e7;
  border-color: #b2c8a9;
  box-shadow: var(--sticker-shadow);
}
.recipe-page .cook-outcome li { border: 1px solid #c8d8c0; box-shadow: var(--sticker-shadow); }
.recipe-page .result {
  background: linear-gradient(180deg, #fffdf8, #fbf4e7);
  border: 1px solid #e4d2b7;
  border-left: 4px solid #c88f4e;
  border-radius: 12px;
  box-shadow: var(--sticker-shadow);
}
.recipe-page .result.ready {
  background: linear-gradient(180deg, #fffef7, #edf5e8);
  border-color: #c7d7bf;
  border-left-color: #6d9a75;
}
.recipe-page .status {
  padding: 2px 8px;
  color: #764a1e;
  background: #fcebd1;
  border-radius: 999px;
}
.recipe-page .recipe-sheet {
  grid-template-columns: minmax(0, 1fr);
  gap: 9px;
  padding: 11px clamp(10px, 2.4vw, 16px);
  background-image: repeating-linear-gradient(transparent 0 25px, #c9b38c27 25px 26px),
    linear-gradient(120deg, #fffdf6, #fcf1dc);
}
.recipe-page .recipe-sheet.ready {
  background-image: repeating-linear-gradient(transparent 0 25px, #aabd9c2b 25px 26px),
    linear-gradient(120deg, #fffef7, #edf5e8);
}
.recipe-sheet-header {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  align-items: start;
  gap: 8px 11px;
}
.recipe-sheet-header > .game-icon {
  width: 56px;
  height: 56px;
  padding: 4px;
  border: 1px solid #e1d0b5;
  border-radius: 7px;
  background: #fffdf8;
  box-shadow: 0 2px 0 #b9a18235;
}
.recipe-sheet .recipe-sheet-title h3 { margin-bottom: 4px; color: #332b22; }
.recipe-sheet .recipe-pick {
  color: inherit;
  line-height: 1.3;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.recipe-sheet .recipe-pick:hover:enabled { text-decoration: underline; }
.recipe-sheet .recipe-pick:focus-visible::after { outline: 2px solid #9a5124; }
.recipe-sheet-ingredients {
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 7px 0 0;
  border-top: 1px dashed #cdb896;
}
.recipe-sheet-ingredients > div {
  display: grid;
  grid-template-columns: 3em minmax(0, 1fr);
  align-items: start;
  gap: 8px;
}
.recipe-sheet-ingredients dt { color: #76562f; font-size: .82rem; font-weight: 700; }
.recipe-sheet-ingredients dd { margin: 0; color: #493c2c; overflow-wrap: anywhere; }
.recipe-sheet .missing-options { margin-top: 0; gap: 4px 7px; }
.recipe-sheet .missing-item { padding: 2px 6px; border-radius: 6px; font-size: .8rem; overflow-wrap: anywhere; }
.recipe-sheet .missing-item .game-icon { width: 24px; height: 24px; flex: none; }
.recipe-sheet .recipe-effects { padding-top: 7px; border-top: 1px dashed #cdb896; }
@media (width < 380px) {
  .recipe-sheet-header { grid-template-columns: 44px minmax(0, 1fr); }
  .recipe-sheet-header > .game-icon { width: 44px; height: 44px; }
  .recipe-sheet-header > .status { grid-column: 2; justify-self: start; }
}
.recipe-page .ready .status { color: #24583e; background: #e0eddb; }
.recipe-page .appliance-tag { color: #6b4b27; background: #f9edd6; border-color: #e4cfab; }
.recipe-page .recipe-effect { color: #285a44; background: #e5efdd; border: 1px solid #cedfc6; }
.recipe-page .missing-item { color: #67533e; background: #e6ddcc; }
.recipe-page .missing-item .game-icon { opacity: .95; }

.recipe-page :is(.effect-tile, .sort-button)[aria-pressed="true"] {
  color: #214c37;
  background: #e5efdf;
  border: 1.5px solid #709779;
  box-shadow: 0 3px 0 #9db899, 0 5px 10px #2b523326;
}
.recipe-page .catalog-filters :is(input, select) { border-color: #cdb99b; background: #fffcf6; }
.recipe-page .ingredient-options {
  border-color: #cab694;
  border-radius: 14px;
  box-shadow: var(--paper-shadow);
}
.recipe-page footer { background: #fbf5e8; border: 1px solid #dfd3be; }

@media (max-width: 700px) {
  .recipe-hero::before, .recipe-hero::after { width: 76px; height: 19px; top: -9px; }
  .recipe-hero .recipe-hero-sticker { display: none; }
  .recipe-page .workspace > .panel::before,
  .recipe-page .reverse::before { width: 61px; height: 18px; top: -8px; }
  .recipe-page .workspace > .panel:nth-child(2)::before,
  .recipe-page .catalog::before { top: 7px; right: 14px; width: 36px; height: 36px; }
}
.compact-cooking .recipe-page main { width: calc(100% - 12px); margin: 6px auto; }
.compact-cooking .recipe-hero { min-height: 0; padding: 6px 10px; }
.compact-cooking .recipe-hero .recipe-logo { width: 30px; }
.compact-cooking .recipe-hero::before,
.compact-cooking .recipe-hero::after,
.compact-cooking .recipe-page .workspace > .panel::before { display: none; }
.compact-cooking .recipe-page .site-switcher { gap: 3px; margin-bottom: 6px; padding: 2px; }
.compact-cooking .recipe-page .site-switcher a { min-height: 25px; padding: 2px; font-size: .75rem; }
.compact-cooking .recipe-page .ingredient { padding: 2px; }
.compact-cooking .recipe-page .prep { padding: 3px; }
