:root {
  --bg: #faf6f1;
  --card: #ffffff;
  --ink: #1f1a17;
  --muted: #6f655d;
  --line: #ece4da;
  --accent: #b4441f;
  --accent-soft: #f6e3da;
  --radius: 14px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #171412;
    --card: #221e1b;
    --ink: #f3ede7;
    --muted: #a99d93;
    --line: #342e29;
    --accent: #ec7a52;
    --accent-soft: #3a261d;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
button { font: inherit; color: inherit; }

.top {
  position: sticky;
  top: 0;
  z-index: 2;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  padding: max(12px, env(safe-area-inset-top)) 16px 0;
}
.top-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; max-width: 720px; margin: 0 auto; }
h1 { margin: 0; font-size: 1.4rem; letter-spacing: -0.01em; }
.date { margin: 2px 0 0; color: var(--muted); font-size: 0.9rem; text-transform: capitalize; }

.lang { display: flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; flex-shrink: 0; }
.lang button { border: 0; background: transparent; padding: 6px 12px; font-size: 0.85rem; font-weight: 600; cursor: pointer; }
.lang button[aria-pressed="true"] { background: var(--accent); color: #fff; }

.filters {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 0;
  max-width: 720px;
  margin: 0 auto;
  scrollbar-width: none;
}
.filters::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 0.9rem;
  cursor: pointer;
  white-space: nowrap;
}
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }

.list { max-width: 720px; margin: 0 auto; padding: 16px 16px max(32px, env(safe-area-inset-bottom)); display: grid; gap: 14px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.card-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.card h2 { margin: 0; font-size: 1.15rem; }
.addr { display: inline-block; margin-top: 2px; color: var(--muted); font-size: 0.88rem; text-decoration: none; }
.addr:hover { text-decoration: underline; }
.thumb { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; border: 1px solid var(--line); cursor: zoom-in; flex-shrink: 0; padding: 0; background: none; }
.thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 9px; display: block; }

.dishes { list-style: none; margin: 14px 0 0; padding: 0; }
.dish { padding: 10px 0; border-top: 1px dashed var(--line); }
.dish:first-child { border-top: 0; padding-top: 0; }
.dish-row { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.dish-name { font-weight: 600; }
.price { font-weight: 700; color: var(--accent); white-space: nowrap; font-variant-numeric: tabular-nums; }
.desc { margin: 2px 0 0; color: var(--muted); font-size: 0.92rem; }
.notes { margin: 12px 0 0; padding: 10px 12px; background: var(--accent-soft); border-radius: 10px; font-size: 0.92rem; }
.updated { margin: 12px 0 0; color: var(--muted); font-size: 0.8rem; }

.pending h3 { margin: 8px 0 8px; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.pending ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.pending li { background: var(--card); border: 1px dashed var(--line); border-radius: var(--radius); padding: 12px 16px; color: var(--muted); }
.pending li strong { color: var(--ink); font-weight: 600; }

.empty { text-align: center; color: var(--muted); padding: 40px 16px; }

.photo { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; }
.photo::backdrop { background: rgba(0, 0, 0, 0.85); }
.photo img { display: block; max-width: 96vw; max-height: 90vh; border-radius: 8px; }
.photo .close { position: fixed; top: 12px; right: 12px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,0.15); color: #fff; font-size: 1.6rem; cursor: pointer; }
