:root {
  --brand: #e8590c;
  --brand-dark: #c2410c;
  --bg: #fff8f1;
  --card: #ffffff;
  --text: #1f2328;
  --muted: #6b7280;
  --line: #ece3da;
  --ok: #15803d;
  --warn: #b45309;
  --bad: #b91c1c;
  --radius: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.45;
  padding-bottom: 72px;
}
a { color: var(--brand-dark); }
button, input, select, textarea { font: inherit; }
.wrap { max-width: 640px; margin: 0 auto; padding: 0 14px; }

header.top {
  background: var(--brand);
  color: #fff;
  padding: 14px 0 12px;
}
header.top h1 { margin: 0; font-size: 22px; letter-spacing: .2px; }
header.top h1 a { color: #fff; text-decoration: none; }
header.top p { margin: 2px 0 0; opacity: .92; font-size: 14px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  margin: 12px 0;
}
label.big { display: block; font-weight: 700; font-size: 18px; margin-bottom: 8px; }
.row { display: flex; gap: 8px; align-items: center; }
.row > .grow { flex: 1; min-width: 0; }
input[type=text], input[type=number], input[type=search], input[type=password], input[type=date], select, textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1.5px solid #d6cdc4;
  border-radius: 10px;
  background: #fff;
  color: var(--text);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); }
.money { font-size: 22px; font-weight: 700; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 0; border-radius: 10px; padding: 11px 16px;
  background: var(--brand); color: #fff; font-weight: 700; cursor: pointer;
  text-decoration: none; white-space: nowrap;
}
.btn:hover { background: var(--brand-dark); }
.btn:disabled { opacity: .55; cursor: default; }
.btn.ghost { background: #fff; color: var(--brand-dark); border: 1.5px solid var(--brand); }
.btn.small { padding: 7px 11px; font-size: 14px; }
.btn.ok { background: var(--ok); }
.btn.bad { background: var(--bad); }
.btn.gray { background: #f1ece7; color: var(--text); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip {
  border: 1.5px solid var(--line); background: #fff; border-radius: 999px;
  padding: 5px 12px; font-size: 14px; cursor: pointer; color: var(--text);
}
.chip.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.muted { color: var(--muted); font-size: 14px; }
.small { font-size: 13px; }
.or { text-align: center; color: var(--muted); font-size: 13px; margin: 10px 0; }

.toolbar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: space-between; margin: 8px 0; }
.result {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px; margin: 10px 0;
}
.result .top-line { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.result .dish { font-weight: 700; font-size: 17px; }
.result .price { font-weight: 800; color: var(--brand-dark); font-size: 18px; white-space: nowrap; }
.result .meta { color: var(--muted); font-size: 14px; margin-top: 2px; }
.result .meta a { color: inherit; }
.result .actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; align-items: center; }
.vote { display: inline-flex; gap: 4px; align-items: center; font-size: 14px; color: var(--muted); }
.warnline { color: var(--warn); font-size: 13px; margin-top: 4px; }
.badge {
  display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px;
  background: #fef3c7; color: #92400e; vertical-align: middle;
}
.badge.closed { background: #fee2e2; color: #991b1b; }
.sponsored-box { border: 1.5px dashed #f59e0b; background: #fffbeb; }
.thumb { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }

#map, .map { width: 100%; height: calc(100vh - 210px); min-height: 320px; border-radius: var(--radius); border: 1px solid var(--line); }
.map.pick { height: 300px; }

nav.bottom {
  position: fixed; left: 0; right: 0; bottom: 0;
  background: #fff; border-top: 1px solid var(--line);
  display: flex; justify-content: space-around; z-index: 1000;
  padding-bottom: env(safe-area-inset-bottom);
}
nav.bottom a {
  flex: 1; text-align: center; padding: 9px 0 8px; text-decoration: none; color: var(--muted);
  font-size: 12px; font-weight: 600;
}
nav.bottom a .ic { display: block; font-size: 20px; line-height: 1.1; }
nav.bottom a.on { color: var(--brand-dark); }

table.items { width: 100%; border-collapse: collapse; }
table.items td, table.items th { padding: 5px 4px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
table.items input { padding: 7px 8px; }
table.items .p { width: 110px; }
.preview { max-width: 100%; max-height: 320px; border-radius: 10px; border: 1px solid var(--line); display: block; margin: 8px 0; }
.notice { background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; border-radius: 10px; padding: 10px 12px; }
.error { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; border-radius: 10px; padding: 10px 12px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.empty { text-align: center; color: var(--muted); padding: 24px 8px; }
h2 { font-size: 20px; margin: 16px 0 8px; }
h3 { font-size: 17px; margin: 14px 0 6px; }
.toast {
  position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%);
  background: #111827; color: #fff; padding: 9px 14px; border-radius: 10px; font-size: 14px;
  z-index: 2000; max-width: 90vw;
}
.spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid #fff; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.lb li { margin: 3px 0; }
