:root {
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --bg: #f6f7f9;
  --card: #fff;
  --ok: #059669;
  --warn: #b45309;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-size: 15px;
  line-height: 1.45;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, textarea { font: inherit; }
.wrap { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }
main { padding-top: 20px; }
.top {
  position: sticky; top: 0; z-index: 20;
  background: #fff; border-bottom: 1px solid var(--line);
}
.top-bar {
  width: min(1240px, calc(100% - 40px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 22px;
  height: 76px;
}
.brand { flex: 0 0 auto; display: flex; align-items: center; }
.brand img { height: 34px; width: auto; display: block; }
.search-wrap { position: relative; flex: 1; min-width: 0; }
.search {
  width: 100%;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 46px;
  padding: 0 6px 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
}
.search-ara {
  display: none;
  height: 34px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
}
.search-wrap.open .search-ara { display: inline-flex; align-items: center; }
.search-panel {
  position: absolute;
  z-index: 40;
  top: calc(100% + 8px);
  left: 0;
  width: min(720px, calc(100vw - 32px));
  max-height: min(70vh, 640px);
  overflow: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(17, 24, 39, 0.16);
  padding: 16px 16px 8px;
}
.search-panel[hidden] { display: none; }
.search-block { margin-bottom: 16px; }
.search-block h3 {
  display: flex; align-items: center; gap: 8px;
  margin: 0 0 10px; font-size: 16px; letter-spacing: -0.02em;
}
.search-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.search-chips a {
  padding: 8px 14px;
  background: #f3f4f6;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
}
.search-chips a:hover { background: #e5e7eb; }
.search-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}
.search-grid a {
  display: flex; flex-direction: column; align-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 8px 6px 10px;
  text-align: center;
}
.search-grid img { width: 100%; height: 72px; object-fit: cover; border-radius: 8px; }
.search-grid span { margin-top: 6px; font-size: 12px; font-weight: 600; line-height: 1.25; }
.search-empty { margin: 4px 0 12px; color: var(--muted); font-size: 13px; }
.search-empty[hidden] { display: none; }
.search:focus-within { border-color: #9ca3af; }
.search-go {
  display: grid; place-items: center;
  width: 20px; height: 20px; padding: 0;
  border: 0; background: transparent; color: #6b7280; cursor: pointer;
}
.search input {
  width: 100%; min-width: 0; height: 42px; border: 0; padding: 0;
  background: transparent; color: var(--ink); outline: none;
}
.search input::placeholder { color: #9ca3af; }
.field input, .field textarea {
  width: 100%; height: 40px; border: 1px solid var(--line); border-radius: 8px;
  padding: 0 12px; background: #fff; color: var(--ink);
}
.btn {
  height: 40px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--ink);
  background: var(--ink); color: #fff; cursor: pointer; font-weight: 600;
}
.btn.ghost { background: #fff; color: var(--ink); }
.top-side { display: flex; align-items: center; gap: 10px; margin-left: 8px; flex-shrink: 0; }
.top-side form { margin: 0; }
.loc-btn {
  display: flex; align-items: center; gap: 6px;
  max-width: 210px; padding: 0; border: 0; background: transparent;
  font-size: 14px; font-weight: 600; color: var(--ink); cursor: pointer;
}
.loc-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.place-open { overflow: hidden; }
.place-modal {
  position: fixed; inset: 0; z-index: 80;
  display: grid; place-items: center;
  padding: 24px 16px;
  background: rgba(17, 24, 39, 0.45);
}
.place-modal[hidden] { display: none; }
.place-card {
  width: min(680px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  background: #fff;
  border-radius: 16px;
  padding: 22px 22px 18px;
  box-shadow: 0 24px 60px rgba(17, 24, 39, 0.18);
}
.place-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.place-head h2 { margin: 0; font-size: 22px; letter-spacing: -0.03em; }
.place-x {
  width: 36px; height: 36px; border: 0; background: transparent;
  font-size: 26px; line-height: 1; color: #6b7280; cursor: pointer;
}
.place-note { margin: 10px 0 14px; color: #6b7280; font-size: 14px; }
.place-search {
  display: flex; align-items: center; gap: 8px; flex-wrap: nowrap;
  height: 48px; padding: 0 8px 0 14px;
  background: #f3f4f6; border-radius: 999px; color: #6b7280;
}
.place-suggest {
  margin-top: 8px; background: #fff; border: 1px solid var(--line);
  border-radius: 12px; overflow: hidden; box-shadow: 0 8px 24px rgba(17, 24, 39, 0.08);
}
.place-suggest[hidden] { display: none; }
.place-suggest button {
  display: block; width: 100%; text-align: left;
  padding: 10px 12px; border: 0; border-bottom: 1px solid var(--line);
  background: #fff; color: var(--ink); font-size: 13px; cursor: pointer;
}
.place-suggest button:last-child { border-bottom: 0; }
.place-suggest button:hover { background: #f3f4f6; }
.place-pin {
  width: 28px; height: 28px;
  background: #059669; border: 3px solid #fff; border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg); box-shadow: 0 2px 6px rgba(17, 24, 39, 0.28);
}
.place-search input {
  flex: 1; min-width: 0; height: 44px; border: 0; background: transparent;
  color: var(--ink); outline: none;
}
.place-search button {
  display: inline-flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 10px; border: 0; background: transparent;
  color: var(--ink); font-weight: 700; font-size: 13px; white-space: nowrap; cursor: pointer;
}
.place-status { margin: 8px 0 0; color: #b45309; font-size: 13px; }
.place-map-wrap { position: relative; margin-top: 14px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
#place-map { height: 340px; background: #e5e7eb; }
.place-zoom { position: absolute; right: 12px; bottom: 12px; z-index: 500; display: grid; gap: 8px; }
.place-zoom button {
  width: 40px; height: 40px; border: 0; border-radius: 999px;
  background: #111827; color: #fff; font-size: 22px; line-height: 1; cursor: pointer;
}
.place-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.place-actions .pill { width: 100%; height: 48px; }
.pill.solid:disabled { background: #e5e7eb; border-color: #e5e7eb; color: #9ca3af; cursor: default; }
.pac-container { z-index: 90; font-family: Inter, system-ui, sans-serif; border-radius: 12px; }
.cart-link {
  position: relative; display: grid; place-items: center;
  width: 40px; height: 40px; color: var(--ink);
}
.cart-link .count {
  position: absolute; top: 2px; right: 0;
  min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 99px; background: var(--ink); color: #fff;
  font-size: 10px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
.pill {
  height: 44px; padding: 0 18px; border-radius: 999px;
  border: 1.5px solid var(--ink);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; white-space: nowrap; cursor: pointer;
  flex-shrink: 0;
}
.channels {
  display: flex; gap: 4px;
  width: min(1240px, calc(100% - 40px));
  margin: 0 auto;
}
.channels a {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 16px 11px;
  color: #6b7280; font-size: 14px; font-weight: 600;
  border-bottom: 2px solid transparent;
}
.channels a.on { color: var(--ink); border-bottom-color: var(--ink); }
.pill.solid { background: var(--ink); color: #fff; }
.pill.outline { background: #fff; color: var(--ink); }
.hero { padding: 28px 0 8px; }
.hero h1 { margin: 0 0 6px; font-size: 28px; letter-spacing: -0.03em; }
.hero p { margin: 0; color: var(--muted); }
.block { padding-top: 8px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin: 8px 0 10px; }
.section-head h2 { margin: 0; font-size: 18px; letter-spacing: -0.02em; }
.section-head span { color: var(--muted); font-size: 13px; font-weight: 600; }
.rail { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.banner-viewport { overflow: hidden; border-radius: 16px; touch-action: pan-y; cursor: grab; }
.banner-viewport:active { cursor: grabbing; }
.banner-rail { display: flex; transition: transform .45s ease; }
.hero-banner { flex: 0 0 100%; background: #fff; }
.hero-banner img { width: 100%; height: auto; display: block; pointer-events: none; user-select: none; -webkit-user-drag: none; }
.promo {
  flex: 0 0 240px; display: block;
  background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
}
.promo img { width: 100%; height: auto; object-fit: contain; background: #fff; display: block; }
.cuisines { gap: 14px; }
.cuisine { flex: 0 0 76px; text-align: center; color: #374151; font-size: 12px; font-weight: 600; }
.cuisine img, .cuisine i {
  width: 72px; height: 72px; border-radius: 999px; object-fit: cover;
  border: 1px solid var(--line); background: #fff; display: block; margin: 0 auto 6px;
}
.cuisine.on img, .cuisine.on i { border: 2px solid var(--ink); }
.sortbar { display: flex; justify-content: flex-end; padding: 4px 0 8px; }
.sortbar form { display: flex; align-items: center; gap: 8px; }
.sortbar label { font-size: 13px; font-weight: 600; color: #374151; }
.sortbar select {
  height: 36px; border: 1px solid var(--line); border-radius: 8px;
  background: #fff; padding: 0 10px; color: var(--ink);
}
.chips { display: flex; gap: 8px; overflow: auto; padding: 16px 0 8px; }
.chip {
  flex: 0 0 auto; border: 1px solid var(--line); background: #fff; border-radius: 999px;
  padding: 7px 12px; font-size: 13px; font-weight: 600; color: #374151;
}
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.home-banner { margin-bottom: 22px; }
.browse { display: grid; grid-template-columns: 248px minmax(0, 1fr); gap: 28px; align-items: start; padding-bottom: 40px; }
.browse-main, .filters, .home-banner, .rail { min-width: 0; max-width: 100%; }
.browse-main > .block:first-child { padding-top: 16px; }
.browse-main > .block:first-child .section-head { margin-top: 0; }
.filter-toggle { display: none; }
.filters { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px 16px 12px; position: sticky; top: 96px; }
.filters h2 { margin: 0 0 4px; font-size: 16px; }
.filters h3 { margin: 16px 0 8px; font-size: 14px; }
.filter-opt { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 14px; color: #374151; }
.filter-opt input { accent-color: #111827; width: 16px; height: 16px; margin: 0; pointer-events: none; }
.cuisine-search { width: 100%; height: 36px; margin: 4px 0 6px; border: 1px solid var(--line); border-radius: 8px; padding: 0 10px; }
.see-more { margin-top: 6px; padding: 0; border: 0; background: none; color: #374151; font-weight: 600; cursor: pointer; }
.see-all { color: #6b7280; font-size: 14px; font-weight: 600; }
.browse-main .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); padding-bottom: 0; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding: 8px 0 40px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.card .cover { height: 148px; background: #eef0f3 center/cover no-repeat; }
.card .body, .panel { padding: 14px 16px 16px; }
.card h2 { margin: 0 0 4px; font-size: 16px; }
.meta { color: var(--muted); font-size: 13px; }
.row { display: flex; justify-content: space-between; gap: 8px; margin-top: 10px; font-size: 13px; font-weight: 600; }
.badge { color: var(--ok); }
.badge.off { color: var(--warn); }
.page { padding: 20px 0 48px; }
.login-note { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; border-radius: 10px; padding: 10px 14px; font-size: 14px; font-weight: 600; margin-bottom: 16px; }
.login-note a { color: inherit; }
.resto { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 20px; align-items: start; margin: 12px 0 8px; }
.resto-photo { width: 220px; height: 164px; object-fit: cover; border-radius: 12px; background: #eef0f3; border: 1px solid var(--line); }
.resto h1 { margin: 0 0 6px; font-size: 28px; letter-spacing: -0.03em; }
.about-btn { border: 0; background: none; padding: 0; color: #374151; font: inherit; font-weight: 600; cursor: pointer; text-decoration: underline; }
.resto-tags { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.about-panel { margin: 8px 0 0; }
.facts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.fact { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; min-width: 112px; }
.fact small { display: block; color: var(--muted); font-size: 12px; font-weight: 500; }
.fact b { font-size: 14px; }
.payline { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; font-size: 13px; color: #374151; }
.pay-chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 10px; font-size: 13px; font-weight: 600; }
.offer-rail { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 8px; }
.offer { flex: 0 0 220px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.offer strong { display: block; }
.menu-find { margin: 18px 0; }
.menu-find input { width: 100%; height: 44px; border: 1px solid var(--line); border-radius: 10px; padding: 0 14px; background: #fff; }
.menu-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 24px; align-items: start; }
.cat-nav { position: sticky; top: 96px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.cat-nav h3 { margin: 4px 8px 8px; font-size: 14px; }
.cat-nav a { display: block; padding: 8px 10px; border-radius: 8px; color: #374151; font-weight: 600; font-size: 14px; }
.cat-nav a:hover { background: #f3f4f6; }
.menu-block h2 { margin: 4px 0 12px; font-size: 18px; letter-spacing: -0.02em; }
.dish-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.dish { background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
.dish img { width: 100%; height: 148px; object-fit: cover; background: #f3f4f6; display: block; }
.dish .txt { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.dish p { margin: 0; color: var(--muted); font-size: 13px; }
.dish-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 8px; font-weight: 700; }
.store-head { display: grid; grid-template-columns: 120px 1fr; gap: 16px; align-items: center; margin-bottom: 18px; }
.store-head img, .ph {
  width: 120px; height: 90px; object-fit: cover; border-radius: 10px; background: #eef0f3; border: 1px solid var(--line);
}
.menu-block { margin-top: 18px; }
.menu-block h3 { margin: 0 0 8px; font-size: 15px; }
.item {
  display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center;
  background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin-bottom: 8px;
}
.item strong { display: block; }
.item .price { font-weight: 700; }
.flash {
  background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; border-radius: 8px; padding: 10px 12px; margin: 12px 0;
}
.err { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; border-radius: 8px; padding: 10px 12px; margin: 12px 0; }
.layout { display: grid; grid-template-columns: 1.4fr .8fr; gap: 16px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.line { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.field textarea { height: 88px; padding: 10px 12px; resize: vertical; }
.sum { display: flex; justify-content: space-between; margin: 8px 0; color: #374151; }
.sum.total { font-weight: 700; color: var(--ink); font-size: 16px; }
.auth { width: min(420px, 100%); margin: 28px auto; }
.empty { padding: 40px 0; color: var(--muted); }
@media (max-width: 860px) {
  .grid, .browse-main .grid, .dish-grid { grid-template-columns: 1fr; }
  .browse, .menu-layout, .resto { grid-template-columns: 1fr; gap: 16px; }
  .filter-toggle {
    display: flex; align-items: center; justify-content: space-between;
    width: 100%; height: 44px; padding: 0 14px;
    border: 1px solid var(--line); border-radius: 12px; background: #fff;
    font-weight: 700; color: var(--ink); cursor: pointer;
  }
  .filter-dot { width: 8px; height: 8px; border-radius: 99px; background: var(--ink); }
  .filters { display: none; position: static; }
  .browse.is-open .filters { display: block; }
  .browse-main > .block:first-child { padding-top: 0; }
  .resto-photo { width: 100%; height: 180px; }
  .cat-nav { position: static; }
  .cat-nav { display: flex; gap: 8px; overflow-x: auto; }
  .cat-nav h3 { display: none; }
  .cat-nav a { flex: 0 0 auto; white-space: nowrap; }
  .layout { grid-template-columns: 1fr; }
  .hero h1 { font-size: 24px; }
}
@media (max-width: 720px) {
  .top-bar { height: auto; flex-wrap: wrap; gap: 10px; padding: 12px 0; }
  .search-wrap { order: 3; flex: 1 1 100%; }
  .search-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .search-grid img { height: 64px; }
  .promo { flex-basis: 82%; }
  .top-side { margin-left: auto; }
  .loc-btn { max-width: 140px; }
  #place-map { height: 260px; }
  .place-search button span, .place-search { font-size: 13px; }
  .pill { height: 36px; padding: 0 12px; font-size: 13px; }
}
