/* Сайт Dalat: те же бренд-цвета и формы, что в мобильном приложении (packages/ui). Без сборки: обычный CSS.
   Бренд: 005531 основной, FDB92D действие, 83259D вторичный, F0629C только индикаторы (не текст). */
:root {
  --bg: #eef2f0;
  --surface: #fff;
  --surface2: #f5f8f6;
  --ink: #16211d;
  --muted: #50605a;
  --line: #d7dfd8;
  --accent: #005531;
  --accent-soft: #d8ebdf;
  --cta: #fdb92d;
  --cta-ink: #00331d;
  --hi: #83259d;
  --hi-soft: #f1dcf6;
  --pink: #f0629c;
  --ok: #005531;
  --ok-soft: #d8ebdf;
  --warn: #83259d;
  --warn-soft: #f1dcf6;
  --bad: #b3362a;
  --bad-soft: #f6dedb;
  --radius: 20px;
  --on-green-soft: #d3e8db;
}
* { 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, Arial, sans-serif;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1 { font-size: 22px; margin: 4px 0 0; letter-spacing: -.3px; }
h2 { font-size: 17px; margin: 8px 0 0; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.wrap { max-width: 720px; margin: 0 auto; padding: 0 16px; }
body.wide .wrap { max-width: 1080px; }
main.wrap { padding-top: 16px; padding-bottom: 96px; display: flex; flex-direction: column; gap: 12px; }
.ico { flex: none; vertical-align: middle; }

/* шапка */
.top { background: var(--accent); color: #fff; position: sticky; top: 0; z-index: 10; }
.top a:focus-visible, .hero a:focus-visible, .hero button:focus-visible, .hero input:focus-visible { outline-color: #fff; }
.bar { display: flex; align-items: center; gap: 10px; min-height: 60px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 22px; letter-spacing: -.3px; color: #fff; margin-right: 6px; }
.brand .mark { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; }
.nav { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; align-items: center; }
.nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 999px; color: var(--on-green-soft); font-weight: 600; font-size: 15px; }
.nav a:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.nav a.on { background: #fff; color: var(--accent); font-weight: 700; }
.langs { display: flex; gap: 2px; }
.langs a { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; border-radius: 12px; font-size: 13px; font-weight: 700; color: var(--on-green-soft); }
.langs a:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.langs a.on { background: rgba(255, 255, 255, .2); color: #fff; }
.langs a.me { border-radius: 50%; margin-right: 4px; }
.badge { display: inline-block; min-width: 20px; padding: 0 6px; margin-left: 6px; border-radius: 999px; background: var(--pink); color: var(--ink); font-size: 12px; font-weight: 700; text-align: center; }
.foot { color: var(--muted); font-size: 13px; padding-bottom: 28px; display: flex; flex-wrap: wrap; gap: 6px 24px; justify-content: space-between; }
.foot a { text-decoration: underline; text-underline-offset: 3px; }
.foot a:hover { color: var(--accent); }

/* главная: шапка-приветствие */
.hero { background: var(--accent); border-radius: 0 0 28px 28px; padding: 6px 0 28px; }
.hero-title { font-size: clamp(26px, 5vw, 40px); line-height: 1.12; letter-spacing: -.6px; margin: 14px 0 20px; color: #fff; max-width: 640px; }
.herosearch { display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 20px; padding: 8px 8px 8px 20px; width: 100%; }
.herosearch:focus-within { box-shadow: 0 0 0 3px rgba(255, 255, 255, .55); }
.herosearch .si { color: var(--accent); width: 26px; height: 26px; }
.herosearch-in { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; font-size: 18px; min-height: 52px; color: var(--ink); }
.herosearch .btn { min-height: 52px; padding: 0 28px; font-size: 17px; }
.herosearch-in:focus-visible { outline: none; }
.herosearch-in::placeholder { color: var(--muted); }

/* главная: плитки, заказы, заведения */
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 4px; }
.tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; min-height: 132px; padding: 16px; border-radius: var(--radius); font-weight: 700; transition: transform .12s ease; }
.tile:hover { transform: translateY(-2px); }
.tile .ico { width: 52px; height: 52px; }
.tile-l { font-size: 19px; }
.t-cta { background: var(--cta); color: var(--cta-ink); }
.t-acc { background: var(--accent); color: #fff; }
.t-hi { background: var(--hi); color: #fff; }
.t-soft { background: var(--accent-soft); color: var(--accent); }
.homerow { display: grid; grid-template-columns: 1fr; gap: 12px; margin-top: 14px; }
.card.order { gap: 6px; }
.segs { display: flex; gap: 4px; margin-top: 6px; }
.segs span { flex: 1; height: 6px; border-radius: 3px; background: var(--line); }
.segs span.done { background: var(--accent); }
.segs span.cur { background: var(--pink); }
.sec { font-size: 20px; margin: 10px 0 0; letter-spacing: -.2px; }
.orgs { display: grid; grid-template-columns: 1fr; gap: 12px; }
.card.org { padding: 10px 10px 14px; gap: 6px; }
.card.org > .row, .card.org > .muted { padding: 0 4px; }
.org-cover { position: relative; }
.org-cover .photo { border-radius: 14px; }
.org-cover .photo .ico { width: 72px; height: 72px; }
.org-badge { position: absolute; left: 10px; top: 10px; }
@media (min-width: 640px) {
  .tiles { grid-template-columns: repeat(4, 1fr); }
  .homerow { grid-template-columns: repeat(2, 1fr); }
  .orgs { grid-template-columns: repeat(2, 1fr); }
  .tile { min-height: 168px; padding: 22px; }
  .tile .ico { width: 68px; height: 68px; }
  .tile-l { font-size: 21px; }
}
@media (min-width: 960px) {
  .orgs { grid-template-columns: repeat(3, 1fr); }
  .tiles { gap: 14px; }
}

/* корзина: пятая плитка (до 960 px строка во всю ширину, дальше пятая колонка) */
.t-cart { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: center; gap: 14px; min-height: 84px; padding: 14px 18px; background: var(--surface); border: 2px solid var(--accent); color: var(--accent); position: relative; }
.t-cart .ico { width: 44px; height: 44px; }
.tile-in { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.tile-sum { font-size: 14px; font-weight: 600; color: var(--muted); }
.tile-n { position: absolute; right: 18px; top: 50%; transform: translateY(-50%); min-width: 30px; height: 30px; padding: 0 9px; border-radius: 15px; background: var(--pink); color: #fff; font-size: 15px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
@media (min-width: 640px) {
  .t-cart { min-height: 96px; padding: 16px 22px; }
}
@media (min-width: 960px) {
  .tiles { grid-template-columns: repeat(5, 1fr); }
  .t-cart { grid-column: auto; flex-direction: column; align-items: center; justify-content: center; gap: 12px; min-height: 168px; padding: 20px; }
  .t-cart .ico { width: 68px; height: 68px; }
  .tile-n { right: 16px; top: 16px; transform: none; }
}

/* блоки */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 8px; }
a.card:hover, .card.link:hover { border-color: var(--accent); }
.card.hi { border-color: var(--hi); }
.row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.row.start { justify-content: flex-start; flex-wrap: wrap; }
.row.top { align-items: flex-start; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--muted); font-size: 14px; }
.bold { font-weight: 700; }
.big { font-size: 18px; font-weight: 700; }
.code { font-size: 28px; letter-spacing: 6px; font-weight: 800; color: var(--accent); }
.stack { display: flex; flex-direction: column; gap: 8px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }

/* фото */
.photo { background: var(--accent-soft); border-radius: 14px; display: flex; align-items: center; justify-content: center; overflow: hidden; color: var(--accent); }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo.sm { width: 64px; height: 64px; flex: none; }
.photo.md { width: 100%; height: 150px; }
.photo.lg { width: 100%; height: 240px; border-radius: var(--radius); }
.photo.cover { width: 100%; height: 150px; }
.gallery { display: flex; gap: 8px; overflow-x: auto; }
.gallery .photo { flex: none; width: 70%; max-width: 420px; height: 220px; }

/* метки */
.pill { display: inline-block; padding: 5px 11px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--surface2); color: var(--ink); white-space: nowrap; }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.hi { background: var(--hi-soft); color: var(--hi); }
.pill.acc { background: var(--accent-soft); color: var(--accent); }
.pill.solid.hi { background: var(--hi); color: #fff; }
.pill.solid.acc, .pill.solid.ok { background: var(--accent); color: #fff; }
.note { padding: 10px 12px; border-radius: 14px; background: var(--surface2); color: var(--muted); font-size: 14px; white-space: pre-line; }
.note.ok { background: var(--ok-soft); color: var(--ok); }
.note.warn { background: var(--warn-soft); color: var(--warn); }
.note.bad { background: var(--bad-soft); color: var(--bad); }

/* кнопки, поля */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 999px; border: 2px solid var(--accent); background: var(--surface); color: var(--accent); font: inherit; font-weight: 700; cursor: pointer; text-align: center; }
.btn:hover { background: var(--accent-soft); }
.btn.pri { background: var(--cta); border-color: var(--cta); color: var(--cta-ink); }
.btn.pri:hover { background: #f0ac14; border-color: #f0ac14; }
.btn.bad { color: var(--bad); border-color: var(--bad); background: var(--surface); }
.btn.bad:hover { background: var(--bad-soft); }
.btn.small { min-height: 44px; padding: 0 16px; font-size: 14px; }
.btn[disabled], .btn.off { opacity: .5; cursor: not-allowed; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; font-size: 14px; cursor: pointer; font-family: inherit; color: var(--ink); }
.chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
label.field { display: flex; flex-direction: column; gap: 4px; font-size: 14px; color: var(--muted); }
.input { width: 100%; min-height: 48px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 14px; font: inherit; color: var(--ink); background: var(--surface2); }
.input:focus { outline: 3px solid var(--accent-soft); border-color: var(--accent); }
.stepper { display: inline-flex; align-items: center; gap: 2px; background: var(--bg); border-radius: 24px; }
.stepper button { width: 44px; height: 44px; border-radius: 22px; border: 0; background: transparent; color: var(--accent); font-size: 22px; font-weight: 700; cursor: pointer; }
.stepper button:hover { background: var(--accent-soft); }
.stepper span { min-width: 22px; text-align: center; font-weight: 700; }

/* нижняя панель корзины */
.cartbar { position: fixed; left: 0; right: 0; bottom: 0; background: var(--surface); border-top: 1px solid var(--line); padding: 10px 16px; z-index: 9; }
.cartbar .btn { width: 100%; max-width: 688px; margin: 0 auto; display: flex; min-height: 52px; }

/* шаги заказа: вертикальная линия, пройденные с галочкой, текущий с розовым кольцом */
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.steps li { position: relative; display: flex; align-items: center; gap: 14px; min-height: 44px; color: var(--muted); }
.steps li:last-child { min-height: 28px; }
.steps li:not(:last-child)::before { content: ""; position: absolute; left: 10px; top: 26px; bottom: -2px; width: 3px; border-radius: 2px; background: var(--line); }
.steps li.done:not(:last-child)::before { background: var(--accent); }
.steps .dot { position: relative; width: 24px; height: 24px; border-radius: 50%; border: 3px solid var(--line); background: var(--surface); flex: none; }
.steps li.done { color: var(--ink); }
.steps li.done .dot { background: var(--accent); border-color: var(--accent); }
.steps li.done .dot::after { content: ""; position: absolute; left: 6px; top: 1px; width: 5px; height: 10px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
.steps li.cur { color: var(--ink); font-weight: 700; font-size: 17px; }
.steps li.cur .dot { border-color: var(--pink); box-shadow: 0 0 0 5px rgba(240, 98, 156, .22); }
.steps .time { margin-left: auto; font-size: 13px; font-weight: 400; color: var(--muted); }

/* код доставки для курьера */
.code { font-size: 28px; letter-spacing: 6px; font-weight: 800; }

/* выбор адреса доставки: поиск, карта, подсказки */
[x-cloak] { display: none !important; }
.addrpanel { display: flex; flex-direction: column; gap: 10px; }
.addrmap { height: 320px; border-radius: 14px; border: 1px solid var(--line); isolation: isolate; background: var(--surface2); }
.addrres { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.addrres-i { text-align: left; min-height: 44px; padding: 9px 12px; border: 0; border-bottom: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; cursor: pointer; }
.addrres-i:last-child { border-bottom: 0; }
.addrres-i:hover { background: var(--surface2); }

/* отзывы и оценки */
.rate { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; font-size: 14px; white-space: nowrap; }
.rate .star { color: var(--cta); }
.rate.none { color: var(--muted); font-weight: 600; }
.stars { color: #e5a10c; letter-spacing: 1px; white-space: nowrap; }
.stars .off { color: var(--line); }
.rv { gap: 6px; }
.rvtext { white-space: pre-line; overflow-wrap: anywhere; }
.rvreply { border-left: 3px solid var(--accent); background: var(--surface2); border-radius: 0 14px 14px 0; padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; }
.chip.small { min-height: 0; padding: 3px 10px; font-size: 13px; cursor: default; }
.starpick { display: inline-flex; gap: 2px; }
.starpick button { border: 0; background: none; padding: 2px 4px; font-size: 30px; line-height: 1; color: var(--line); cursor: pointer; }
.starpick button.on { color: #e5a10c; }
.starpick.sm button { font-size: 22px; padding: 0 2px; }
textarea.input { resize: vertical; min-height: 84px; }

/* внутренние страницы: та же шапка-hero, сетки карточек и две колонки */
.hero.page { padding-bottom: 22px; }
.hero.page .hero-title { font-size: clamp(24px, 4.2vw, 34px); margin: 12px 0 14px; }
.hero-in > :last-child { margin-bottom: 0; }
.hero-back { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 18px 0 12px; margin-top: 8px; border-radius: 999px; background: rgba(255, 255, 255, .14); color: #fff; font-weight: 700; font-size: 15px; }
.hero-back:hover { background: rgba(255, 255, 255, .24); }
.hero-back + .hero-title { margin-top: 10px; }
.hero-sub { margin: -6px 0 14px; max-width: 640px; color: var(--on-green-soft); font-size: 16px; }
.hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: -4px 0 14px; color: #fff; }
.hero-meta .rate { color: #fff; }
.hero-meta .rate .muted, .hero-meta .rate.none { color: var(--on-green-soft); }
.hero-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 8px; }
.hero-lbl { color: var(--on-green-soft); font-size: 14px; margin-right: 4px; }
@media (min-width: 640px) { .hero-lbl { display: inline-block; min-width: 8.5em; } }
.hero .chip { background: rgba(255, 255, 255, .14); border-color: transparent; color: #fff; }
.hero .chip:hover { background: rgba(255, 255, 255, .24); }
.hero .chip.on { background: #fff; color: var(--accent); }

.cat { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; align-items: start; }
.col { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.narrow { max-width: 720px; }
.dishes, .rvgrid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; align-items: start; }
.card.pic { padding: 10px 10px 14px; gap: 6px; }
.card.pic > :not(.org-cover) { padding: 0 4px; }
.card.pic .photo.cover { height: 170px; }
.card.empty { align-items: center; text-align: center; padding: 32px 16px; gap: 12px; max-width: 520px; width: 100%; margin: 8px auto; }
.card.empty .ico { width: 48px; height: 48px; color: var(--accent); }
.dish .photo.sm { width: 72px; height: 72px; }
.gallery { scroll-snap-type: x mandatory; }
.gallery .photo { width: 88%; max-width: none; height: 260px; border-radius: var(--radius); scroll-snap-align: start; }
.gallery .photo:only-child { width: 100%; }
.photo.lg { height: 260px; }
.cartbar .btn { max-width: 1048px; }
@media (min-width: 640px) {
  .card { padding: 16px; }
  .card.pic { padding: 10px 10px 14px; }
  .cat { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card.pic .photo.cover { height: 190px; }
  .gallery .photo, .photo.lg { height: 320px; }
}
@media (min-width: 720px) {
  .dishes, .rvgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 960px) {
  .cat { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
}

/* мобильная шапка: название и язык в первой строке, меню второй строкой */
@media (max-width: 719px) {
  .nav { order: 3; flex-basis: 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { flex: 1 0 auto; justify-content: center; padding: 0 8px; font-size: 14px; }
  .bar { gap: 6px; }
  .brand { flex: 1; font-size: 20px; white-space: nowrap; }
  .langs a { min-width: 36px; }
  .langs a.me { margin-right: 0; min-width: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  .tile { transition: none; }
  .tile:hover { transform: none; }
}

/* юридические страницы (политика конфиденциальности) */
.doc { gap: 10px; padding: 18px 20px; }
.doc h2 { margin: 12px 0 0; }
.doc h2:first-child { margin-top: 0; }
.doc p, .doc li { font-size: 15px; line-height: 1.55; margin: 0; }
.doc ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.doc a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
