:root {
  color-scheme: light;
  font-family: "PingFang SC", "Noto Sans CJK SC", "Microsoft YaHei", system-ui, sans-serif;
  color: #302820;
  background: #faf6ed;
  --muted: #6b6056;
  --line: #e5d9cd;
  --paper: #fffdf8;
  --red: #9d312c;
  --red-dark: #78241f;
  --pink: #f9e3da;
  --green: #e8eddb;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  min-height: 100vh;
  margin: 0;
  background: radial-gradient(ellipse at top right, #f7e4d9, transparent 50%), #faf6ed;
}
button, input { font: inherit; }
button:not(:disabled) { cursor: pointer; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }
.shell { width: min(1100px, calc(100% - 64px)); margin: auto; }
.masthead { display: flex; justify-content: space-between; align-items: center; min-height: 76px; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: .7rem; font-size: 1.15rem; font-weight: 800; }
.brand-tile { display: inline-grid; place-items: center; width: 34px; height: 34px; background: var(--red); color: #fff2db; border-radius: 9px; }
.heart { display: inline-block; width: 1.12em; height: 1em; background: currentColor; clip-path: polygon(0 17%,11% 17%,11% 5%,34% 5%,34% 17%,45% 17%,45% 28%,55% 28%,55% 17%,66% 17%,66% 5%,89% 5%,89% 17%,100% 17%,100% 50%,89% 50%,89% 62%,78% 62%,78% 73%,67% 73%,67% 84%,56% 84%,56% 95%,44% 95%,44% 84%,33% 84%,33% 73%,22% 73%,22% 62%,11% 62%,11% 50%,0 50%); }
.mode { display: inline-flex; align-items: center; gap: .55rem; font-size: .875rem; color: var(--muted); }
.mode i { width: 7px; height: 7px; background: #728450; border-radius: 50%; }
.hero { display: grid; grid-template-columns: .86fr 1fr; align-items: center; gap: clamp(24px, 5vw, 72px); padding: 38px 0; }
.hero h1, .dining h1 { margin: 0; font-family: "Songti SC", "Noto Serif CJK SC", "SimSun", serif; font-weight: 900; line-height: 1.14; letter-spacing: -.065em; }
.hero h1 { font-size: clamp(3rem, 6.2vw, 5.4rem); }
.hero h1 span { color: var(--red); }
.hero p, .dining p { margin: 17px 0 0; line-height: 1.75; color: var(--muted); }
.hero-art { position: relative; overflow: hidden; background: #b64e41; border-radius: 19px; border: 1px solid #75352e; box-shadow: 0 8px 0 #ead3c2; }
canvas { display: block; width: 100%; image-rendering: pixelated; }
.hero-art canvas { aspect-ratio: 2.15; object-fit: cover; object-position: center 57%; }
.workspace { display: grid; grid-template-columns: .86fr 1fr; gap: 20px; align-items: start; }
.panel { border: 1px solid var(--line); border-radius: 18px; background: var(--paper); padding: 22px; min-width: 0; box-shadow: 0 3px 12px #33221b05; }
.panel-title { display: flex; align-items: center; gap: 10px; }
.panel-title h2 { margin: 0; font-size: 1.2rem; }
.panel-title > .count { margin-left: auto; white-space: nowrap; }
.step { display: grid; place-items: center; background: var(--green); width: 34px; height: 34px; border-radius: 8px; }
.step.pink { background: var(--pink); }
.search { margin-top: 16px; display: flex; align-items: center; gap: 13px; padding: 0 13px; border: 1px solid var(--line); background: #fbf8f3; border-radius: 9px; }
.search:focus-within { outline: 2px solid var(--red); outline-offset: 2px; }
.search input, .custom input { width: 100%; min-width: 0; color: inherit; }
.search input { border: 0; background: transparent; padding: 11px 0; outline: 0; }
.magnifier { position: relative; flex: none; width: 13px; height: 13px; border: 1.5px solid var(--muted); border-radius: 50%; }
.magnifier::after { content: ''; width: 6px; height: 1.5px; background: var(--muted); position: absolute; transform: rotate(45deg); right: -5px; bottom: -2px; }
.ingredients, .selected { display: flex; flex-wrap: wrap; gap: 7px; }
.ingredients { margin-top: 13px; max-height: 168px; overflow: auto; padding: 3px; margin-inline: -3px; }
.chip { border: 1px solid var(--line); border-radius: 999px; padding: .4rem .64rem; background: var(--paper); color: #494037; font-size: .875rem; }
.chip:hover { border-color: #a3a87f; background: #f1f2e7; }
.chip[aria-pressed="true"], .chip.removable { border-color: #b9c3a0; background: var(--green); color: #354020; }
.selected-area { margin-top: 16px; padding-top: 13px; border-top: 1px dashed var(--line); }
.selected-header { display: flex; justify-content: space-between; align-items: center; font-weight: 700; font-size: .875rem; }
.selected { min-height: 24px; margin-top: 7px; align-items: center; }
.count { font-size: .875rem; color: #665349; background: #f3eae0; padding: .12rem .48rem; border-radius: 6px; font-weight: 600; }
.text-button { border: 0; padding: .25rem 0; color: var(--red); background: transparent; text-decoration: underline; text-underline-offset: .2em; font-size: .9rem; }
.panel-note, .hint { color: var(--muted); font-size: .875rem; line-height: 1.6; margin: 0; }
.panel-note { margin-top: 10px; }
.dish-list { border: 0; padding: 0; margin: 10px 0 0; min-width: 0; display: grid; gap: 7px; }
.dish-list:empty { display: none; }
.dish-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; cursor: pointer; }
.dish-row:has(input:checked) { border-color: #b34d41; background: #fff2eb; }
.dish-row .dish-icon { grid-column: 1; grid-row: 1; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 7px; background: #f6eee1; }
.dish-row .dish-label { grid-column: 2; grid-row: 1; font-weight: 700; font-size: .925rem; overflow-wrap: anywhere; }
.dish-row input { grid-column: 3; grid-row: 1; accent-color: var(--red); width: 17px; height: 17px; margin: 0; }
.custom { margin-top: 16px; padding-top: 13px; border-top: 1px dashed var(--line); }
.custom label { display: block; margin-bottom: 7px; font-size: .875rem; font-weight: 700; }
.custom-row { display: flex; gap: 8px; }
.custom input { padding: .53rem .7rem; border-radius: 8px; border: 1px solid var(--line); background: #fbf8f3; }
.custom .secondary { white-space: nowrap; }
.feedback { margin: 6px 0 0; font-size: .875rem; color: var(--muted); }
.feedback:empty { display: none; }
.primary, .secondary { display: inline-flex; align-items: center; justify-content: center; gap: .6rem; border-radius: 9px; border: 1px solid transparent; padding: .58rem .95rem; font-weight: 750; }
.primary { background: var(--red); color: #fff8ed; padding: .78rem 1.25rem; box-shadow: 0 3px 0 var(--red-dark); }
.primary:hover:not(:disabled) { background: var(--red-dark); }
.primary:disabled { background: #e7d6cb; color: #6c5346; box-shadow: none; }
.secondary { color: var(--red-dark); background: #fbebe2; border-color: #edd5c9; }
.secondary:hover { background: #f8ded2; }
.launch { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 18px 0 26px; padding: 13px 17px; background: #f8e8df; border: 1px solid #ebd4c8; border-radius: 13px; }
.launch p { color: #64483d; margin: 0; font-size: .925rem; line-height: 1.5; }
.launch button { flex: none; }
.dining { padding: clamp(36px, 6vw, 76px) 0; }
.dining h1 { font-size: clamp(2rem, 5.3vw, 4rem); }
.story { max-width: 740px; margin: auto; text-align: center; overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: var(--paper); box-shadow: 0 8px 0 #ead3c2; }
.story-copy { padding: 23px 14px; }
.story-copy h1 { font-size: clamp(1.4rem, 3.75vw, 2.6rem); margin: 0 0 16px; }
.menu-heading { text-align: center; margin-bottom: 28px; }
.big { width: 52px; height: 52px; font-size: 1.65rem; margin-bottom: 16px; border-radius: 13px; }
.menu-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(235px, 100%),1fr)); gap: 14px; }
.menu-card { display: flex; text-align: left; flex-direction: column; align-items: flex-start; min-height: 200px; border: 1px solid var(--line); border-radius: 16px; padding: 16px; color: inherit; background: var(--paper); }
.menu-card:hover { border-color: var(--red); }
.menu-card.featured { background: #fce8df; border-color: #be6254; box-shadow: 0 4px 0 #e9c0b4; }
.menu-card .picture { display: grid; place-items: center; align-self: stretch; min-height: 80px; font-size: 2.6rem; border-radius: 9px; background: #f3ede1; }
.menu-card.featured .picture { background: #f2cfc0; }
.menu-card .name { display: block; font-size: 1.2rem; font-weight: 800; margin-top: 13px; overflow-wrap: anywhere; }
.menu-card .tag { color: var(--red-dark); font-size: .875rem; font-weight: 750; margin-bottom: 6px; }
.menu-card .description { color: var(--muted); font-size: .925rem; margin-top: 4px; line-height: 1.5; }
.menu-footer { margin-top: 25px; text-align: center; }
.result-card { max-width: 600px; margin: auto; padding: clamp(24px, 6vw, 60px); text-align: center; border: 1px solid var(--line); background: var(--paper); border-radius: 20px; }
.result-icon { display: grid; place-items: center; width: 84px; height: 84px; margin: 0 auto 17px; border-radius: 20px; background: var(--pink); color: var(--red); font-size: 2.8rem; }
.result-card .result-dish { font-weight: 800; font-size: 1.2rem; color: var(--red-dark); overflow-wrap: anywhere; }
.result-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 23px; justify-content: center; }
@media (max-width: 700px) {
  .shell { width: calc(100% - 32px); }
  .masthead { min-height: 60px; }
  .hero, .workspace { grid-template-columns: 1fr; }
  .hero { gap: 18px; padding: 24px 0; }
  .hero p { margin-top: 10px; }
  .hero-art canvas { aspect-ratio: 2.35; }
  .workspace { gap: 12px; }
  .panel { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; } }

@font-face {
  font-family: "Ark Pixel";
  src: url("./fonts/ark-pixel-zh-hans.woff2") format("woff2");
  font-display: swap;
}
:root {
  font-family: "Ark Pixel", "PingFang SC", "Microsoft YaHei", sans-serif;
  --line: #dfcdbb;
  --frame: #69453a;
}
body {
  background-color: #faf6ed;
  background-image: linear-gradient(#7d59480a 1px, transparent 1px), linear-gradient(90deg, #7d59480a 1px, transparent 1px);
  background-size: 16px 16px;
}
.brand, .hero h1, .panel-title h2, .dining h1 { font-family: inherit; font-weight: 400; letter-spacing: 0; }
.brand { font-size: 1.5rem; }
.masthead { border-bottom: 2px solid var(--frame); }
.mode { background: var(--green); color: #384322; padding: 5px 9px; border: 1px solid #889366; }
.mode i { border-radius: 0; }
.hero h1 { font-size: clamp(2.8rem, 5.4vw, 4.05rem); }
.hero p, .dining p { font-size: 1.125rem; }
.hero-art { border: 2px solid var(--frame); border-radius: 0; box-shadow: 5px 5px 0 #c7846f; }
.hero-art canvas { aspect-ratio: 2; }
.panel, .story, .result-card { border: 2px solid var(--frame); border-radius: 0; box-shadow: 4px 4px 0 #e2c5ae; }
.panel-title h2 { font-size: 1.5rem; }
.brand-tile, .step, .search, .chip, .count, .dish-row, .dish-icon, .custom input, .primary, .secondary, .launch, .menu-card, .menu-card .picture, .result-icon { border-radius: 0; }
.brand-tile { box-shadow: 2px 2px 0 #603129; }
.step { flex: 0 0 34px; }
.sprite { width: 24px; height: 24px; display: inline-block; flex: none; }
.chip { display: inline-flex; align-items: center; gap: .37rem; font-size: 1rem; line-height: 1; }
.chip .sprite { width: 16px; height: 16px; }
.ingredients.suggestions { display: grid; grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); max-height: none; }
.ingredients.suggestions .chip { justify-content: center; padding-inline: .35rem; }
.count, .mode, .panel-note, .hint, .selected-header, .custom label, .feedback, .text-button { font-size: 1rem; }
.search input, .custom input { font-size: 1rem; }
.magnifier { border-radius: 2px; }
.dish-row { grid-template-columns: 1fr auto; cursor: default; }
.dish-option { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; min-width: 0; cursor: pointer; }
.dish-row .dish-label { font-size: 1.05rem; }
.dish-row .dish-icon { width: 28px; height: 28px; }
.dish-option input:disabled { opacity: .45; }
.dish-row.excluded .dish-label { color: var(--muted); }
.dish-toggle { font-size: .875rem; border: 0; border-left: 1px solid var(--line); background: transparent; color: var(--red-dark); padding: 4px 0 4px 8px; }
.dish-toggle:hover { text-decoration: underline; }
.primary, .secondary { border: 2px solid; box-shadow: 3px 3px 0 currentColor; }
.primary { font-size: 1.125rem; color: #fff4e4; border-color: #682924; box-shadow: 3px 3px 0 #682924; }
.primary:disabled { border-color: #b89c88; }
.secondary { border-color: #b8887c; box-shadow: 2px 2px 0 #b8887c; }
.launch { margin-top: 23px; border: 2px solid #c88676; }
.launch p { font-size: 1rem; }
.menu-card { border: 2px solid var(--frame); box-shadow: 4px 4px 0 #e2c5ae; }
.menu-card.featured { box-shadow: 4px 4px 0 #c7846f; }
.menu-card .picture { background-image: repeating-conic-gradient(#efe2d0 0% 25%, #f6eddf 0% 50%); background-size: 16px 16px; }
.menu-card.featured .picture { background-image: repeating-conic-gradient(#f0cbba 0% 25%, #f5d6c6 0% 50%); }
.menu-card .picture canvas, .result-icon .sprite { width: 64px; height: 64px; }
.menu-card .tag { background: var(--red); color: #fff4e4; padding: 4px 6px; font-size: 1rem; }
.menu-card .name { font-size: 1.5rem; }
.menu-card .description { font-size: 1rem; }
.menu-card .picture + .tag { margin-top: 12px; }
.menu-card .tag + .name { margin-top: 3px; }
@media (max-width: 380px) {
  .launch { align-items: stretch; flex-direction: column; }
  .custom-row { gap: 5px; }
  .custom-row .secondary { padding-inline: .55rem; }
}
