:root {
  --ink: #1c1410;
  --muted: #6d6258;
  --paper: #f3eee6;
  --card: #fffdf8;
  --line: #e4d9cc;
  --chili: #9f1d1d;
  --chili-ink: #fff8f2;
  --shadow: 0 1px 0 rgba(28, 20, 16, 0.04);
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.5;
}
a { color: var(--chili); }
button, input { font: inherit; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); border: 0;
}
.top, .foot, #app { max-width: 980px; margin: 0 auto; padding: 1rem 1.1rem; }
.top { display: flex; justify-content: space-between; gap: 0.4rem 1rem; align-items: baseline; flex-wrap: wrap; padding-top: 1.1rem; }
.brand { color: var(--ink); text-decoration: none; font-weight: 750; letter-spacing: -0.03em; font-size: 1.25rem; }
.tag { margin: 0; color: var(--muted); font-size: 0.86rem; flex: 1 1 14rem; min-width: 0; }
h1 { font-family: Georgia, "Iowan Old Style", serif; font-weight: 600; font-size: 2.4rem; letter-spacing: -0.03em; margin: 0.2rem 0; }
h2 { font-family: Georgia, "Iowan Old Style", serif; font-weight: 600; margin: 0; }
.lede { max-width: 40rem; color: var(--muted); }
.row { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; }
.primary, .back, .more-wrap button, .suggest button, .card, .radius button, .cuisines button, .presets button {
  border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 999px; cursor: pointer;
}
.primary { background: var(--chili); color: var(--chili-ink); border-color: var(--chili); padding: 0.7rem 1.1rem; }
.search { flex: 1; min-width: 220px; }
.search input {
  width: 100%; padding: 0.7rem 1rem; border-radius: 999px; border: 1px solid var(--line); background: var(--card);
}
.presets { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.8rem; }
.presets button { padding: 0.3rem 0.75rem; background: transparent; }
.suggest { margin-top: 0.5rem; display: grid; gap: 0.25rem; }
.suggest button { text-align: left; border-radius: 12px; padding: 0.55rem 0.8rem; }
.status { min-height: 1.2rem; color: var(--muted); }
.results-head { display: flex; justify-content: space-between; gap: 1rem; align-items: end; flex-wrap: wrap; }
.muted { color: var(--muted); margin: 0.2rem 0 0; }
.radius, .cuisines { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.radius { margin: 0.6rem 0; }
.radius button, .cuisines button { padding: 0.28rem 0.7rem; background: transparent; }
.radius button.on, .cuisines button.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.list { display: grid; gap: 0.55rem; margin-top: 0.8rem; }
.card {
  display: grid; grid-template-columns: auto 1fr auto; gap: 0.8rem; align-items: center;
  text-align: left; border-radius: 16px; padding: 0.85rem 1rem; box-shadow: var(--shadow);
}
.mono {
  width: 2.6rem; height: 2.6rem; border-radius: 12px; display: grid; place-items: center;
  font-weight: 700; background: #f6e7d8; color: #6a3412;
}
.card h3 { margin: 0; font-size: 1.05rem; }
.card .meta { color: var(--muted); font-size: 0.88rem; }
.km { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 0.9rem; }
.more-wrap { text-align: center; }
.more-wrap button, .back { padding: 0.5rem 1rem; }
.place { margin-top: 0.5rem; }
.back { margin-bottom: 0.8rem; }
.sheet {
  background: var(--sheet, var(--card));
  color: var(--sheet-ink, var(--ink));
  border-radius: 22px;
  padding: 1.3rem 1.2rem 1.5rem;
  border: 1px solid var(--sheet-line, var(--line));
}
.sheet .mark {
  width: 4.2rem; height: 4.2rem; border-radius: 18px; display: grid; place-items: center;
  font-family: Georgia, serif; font-size: 1.4rem; background: var(--mark, #f6e7d8); color: var(--mark-ink, #6a3412);
}
.sheet h2 { font-size: 2.1rem; margin: 0.6rem 0 0.2rem; }
.pills { display: flex; flex-wrap: wrap; gap: 0.3rem; margin: 0.4rem 0 0.8rem; }
.pills span, .na {
  border-radius: 999px; padding: 0.12rem 0.55rem; font-size: 0.78rem;
  background: var(--pill, rgba(0,0,0,0.05));
}
.facts { width: 100%; border-collapse: collapse; margin: 0.4rem 0 1rem; }
.facts th, .facts td { text-align: left; padding: 0.45rem 0.2rem; border-bottom: 1px solid var(--sheet-line, var(--line)); vertical-align: top; }
.facts th { width: 7rem; color: var(--muted); font-weight: 600; }
.menu-sec { margin: 1rem 0; }
.menu-sec h3 { margin: 0 0 0.3rem; font-size: 1.05rem; }
.dish-row { display: flex; justify-content: space-between; gap: 1rem; padding: 0.28rem 0; border-bottom: 1px dotted var(--sheet-line, var(--line)); }
.price { font-variant-numeric: tabular-nums; white-space: nowrap; }
.sheet a { color: var(--sheet-ink, var(--ink)); }
.fine { font-size: 0.8rem; color: var(--muted); }
.foot { color: var(--muted); font-size: 0.8rem; padding-bottom: 3rem; }
.foot p { margin: 0.3rem 0; }

.sheet[data-theme="chinese"] { --sheet: #2a0c10; --sheet-ink: #fff4e8; --sheet-line: #5a3030; --mark: #c8102e; --mark-ink: #fff6d8; --pill: #4a1820; --muted: #e7c7b0; }
.sheet[data-theme="japanese"] { --sheet: #f7f4ef; --sheet-ink: #1a1a1a; --sheet-line: #ded6cc; --mark: #111; --mark-ink: #fff; --pill: #eeeae4; }
.sheet[data-theme="korean"] { --sheet: #1b2430; --sheet-ink: #f7f1e8; --sheet-line: #334155; --mark: #2f6fed; --mark-ink: #fff; --pill: #243044; --muted: #c9d4e3; }
.sheet[data-theme="pakistani"] { --sheet: #10281f; --sheet-ink: #f6f1e4; --sheet-line: #2d4a3c; --mark: #c6a15b; --mark-ink: #1d1608; --pill: #1c3b2e; --muted: #d9cbb0; }
.sheet[data-theme="indian"] { --sheet: #3b160c; --sheet-ink: #fff5ea; --sheet-line: #6a3a28; --mark: #e07a2f; --mark-ink: #2a0d05; --pill: #53210f; --muted: #f0d2bc; }
.sheet[data-theme="turkish"] { --sheet: #3a2418; --sheet-ink: #fff6ec; --sheet-line: #6b4b38; --mark: #d84a3a; --mark-ink: #fff; --pill: #4e3122; --muted: #f0d7c6; }
.sheet[data-theme="arabic"] { --sheet: #1a140c; --sheet-ink: #f8f1df; --sheet-line: #4a3b24; --mark: #0f6e56; --mark-ink: #f8f1df; --pill: #2a2216; --muted: #e6d7b8; }
.sheet[data-theme="italian"] { --sheet: #fffaf6; --sheet-ink: #241810; --sheet-line: #edd9cc; --mark: #2e7d32; --mark-ink: #fff; --pill: #f6ebe3; }
.sheet[data-theme="pizza"] { --sheet: #fff8f4; --sheet-ink: #2a160f; --sheet-line: #f0d2c4; --mark: #c2410c; --mark-ink: #fff; --pill: #fde7da; }
.sheet[data-theme="cafe"] { --sheet: #f6efe6; --sheet-ink: #2a211b; --sheet-line: #e4d5c4; --mark: #6f4e37; --mark-ink: #fff8ef; --pill: #efe4d6; }
.sheet[data-theme="bbq"] { --sheet: #2b1a12; --sheet-ink: #fff1e4; --sheet-line: #5c4032; --mark: #e85d04; --mark-ink: #2b1a12; --pill: #3d291d; --muted: #f0d2bc; }
.sheet[data-theme="seafood"] { --sheet: #f3f7f8; --sheet-ink: #10262c; --sheet-line: #d5e3e6; --mark: #0f6e8c; --mark-ink: #fff; --pill: #e5f0f3; }
.sheet[data-theme="bakery"] { --sheet: #fff6ee; --sheet-ink: #3a2418; --sheet-line: #f0dfd0; --mark: #e7b38a; --mark-ink: #3a2418; --pill: #fdecd9; }
.sheet[data-theme="fast"] { --sheet: #fffdf6; --sheet-ink: #241c10; --sheet-line: #eee3c8; --mark: #f0b429; --mark-ink: #241c10; --pill: #fff4d6; }

@media (max-width: 640px) {
  h1 { font-size: 1.9rem; }
  .top { flex-direction: column; gap: 0.2rem; }
  .card { grid-template-columns: auto 1fr; }
  .km { grid-column: 2; }
}
