/* Демо QR-меню (site_layout = demo). Разметку строит demo.js. */
:root {
    --bg: #F3EEE5; --paper: #FBF8F2; --sand: #ECE3D4; --ink: #1C1A16; --ink2: #5B544A; --mute: #958C7F;
    --line: rgba(28, 26, 22, .1); --acc: #D4471F; --ok: #4F7B39;
    --serif: 'Prata', Georgia, serif; --sans: 'Onest', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --ease: cubic-bezier(.22, 1, .36, 1); --spring: cubic-bezier(.34, 1.56, .64, 1);
    --nav: 64px; --wrap: 1180px;
}
@view-transition { navigation: auto; }

*, *::before, *::after { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--nav) + 8px); }
body {
    min-height: 100dvh; background: var(--bg); color: var(--ink);
    font: 400 15px/1.45 var(--sans); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
    /* бумажное зерно */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .27 0 0 0 0 .18 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
body:has(dialog[open]) { overflow: hidden; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: inherit; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 3px; border-radius: 10px; }
.dm-wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
svg.i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- hero ---------- */
.dm-hero { position: relative; overflow: hidden; padding-bottom: 34px; }
.dm-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 68px; position: relative; z-index: 2; }
.dm-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; min-width: 0; }
.dm-mono { width: 36px; height: 36px; border-radius: 50%; background: var(--ink); color: var(--bg); display: grid; place-items: center; font: 400 18px/1 var(--serif); letter-spacing: 0; overflow: hidden; flex: none; }
.dm-mono .i { width: 19px; height: 19px; }
.dm-lang { display: flex; padding: 3px; border-radius: 99px; background: rgba(28, 26, 22, .06); }
.dm-lang button { padding: 6px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; color: var(--ink2); transition: background .25s, color .25s; }
.dm-lang .is-on { background: var(--paper); color: var(--ink); box-shadow: 0 1px 3px rgba(28, 26, 22, .1); }

.dm-hero__txt { position: relative; z-index: 2; max-width: 62%; padding-top: 18px; }
.dm-eyebrow { display: flex; align-items: center; gap: 10px; width: max-content; white-space: nowrap; font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--acc); }
.dm-eyebrow::before { content: ''; width: 26px; height: 1.5px; background: currentColor; }
.dm-table { padding: 4px 10px; border-radius: 99px; background: var(--ink); color: var(--paper); letter-spacing: .06em; }
.dm-h1 { margin-top: 14px; font: 400 clamp(46px, 13vw, 104px)/.95 var(--serif); letter-spacing: -.02em; overflow-wrap: anywhere; }
.dm-venue { display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; padding: 10px 14px 10px 12px; border-radius: 16px; background: var(--paper); box-shadow: 0 1px 0 rgba(28, 26, 22, .05), 0 12px 30px -20px rgba(60, 40, 20, .45); max-width: 100%; transition: transform .25s var(--spring); }
.dm-venue:active { transform: scale(.97); }
.dm-venue span { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.dm-venue b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dm-venue small { color: var(--mute); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dm-venue .i { color: var(--acc); }
.dm-venue .i:last-child { color: var(--mute); width: 16px; }
.dm-status { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 13px; font-weight: 600; color: var(--ink2); }
.dm-status::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--mute); }
.dm-status.is-open::before { background: var(--ok); box-shadow: 0 0 0 0 rgba(79, 123, 57, .5); animation: pulse 2.2s infinite; }

.dm-plate { position: absolute; z-index: 1; top: 70px; right: -26vw; width: min(70vw, 560px); aspect-ratio: 1; pointer-events: none; animation: plateIn 1.6s var(--ease) both .15s; }
.dm-plate img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 34px 34px rgba(70, 45, 20, .26)); animation: spin 120s linear infinite; }
.dm-plate::before { content: ''; position: absolute; inset: -9%; border-radius: 50%; border: 1px solid var(--line); }
.dm-plate::after { content: ''; position: absolute; inset: -20%; border-radius: 50%; border: 1px dashed rgba(28, 26, 22, .08); animation: spin 90s linear infinite reverse; }
@media (min-width: 760px) {
    .dm-hero { padding-bottom: 64px; min-height: 560px; }
    .dm-hero__txt { max-width: 56%; padding-top: 56px; }
    .dm-plate { top: 40px; right: max(20px, calc((100vw - var(--wrap)) / 2 + 20px)); width: min(40vw, 470px); }
}
.dm-rise { animation: rise .9s var(--ease) both; animation-delay: calc(var(--d, 0) * 90ms); }

/* ---------- nav ---------- */
.dm-nav { position: sticky; top: 0; z-index: 20; background: rgba(243, 238, 229, .82); -webkit-backdrop-filter: saturate(1.5) blur(16px); backdrop-filter: saturate(1.5) blur(16px); border-bottom: 1px solid transparent; transition: border-color .3s, box-shadow .3s; }
.dm-nav.is-stuck { border-color: var(--line); box-shadow: 0 10px 30px -24px rgba(28, 26, 22, .5); }
.dm-nav .dm-wrap { display: flex; align-items: center; gap: 6px; height: var(--nav); padding-left: 12px; }
.dm-sbtn { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; flex: none; transition: background .2s; }
.dm-sbtn:hover { background: rgba(28, 26, 22, .06); }
.dm-chips { position: relative; flex: 1; min-width: 0; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, transparent, #000 12px, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, transparent, #000 12px, #000 calc(100% - 28px), transparent); padding: 0 12px; }
.dm-chips::-webkit-scrollbar { display: none; }
.dm-chip { position: relative; z-index: 1; flex: none; padding: 9px 15px; border-radius: 99px; font-size: 14px; font-weight: 600; color: var(--ink2); white-space: nowrap; transition: color .35s var(--ease); }
.dm-chip.is-on { color: var(--paper); }
.dm-pill { position: absolute; top: 50%; left: 0; width: 0; height: 38px; margin-top: -19px; border-radius: 99px; background: var(--ink); transition: transform .5s var(--ease), width .5s var(--ease); will-change: transform; }
.dm-q { -webkit-appearance: none; appearance: none; display: none; flex: 1; min-width: 0; height: 44px; border: 0; border-radius: 99px; padding: 0 18px; background: var(--paper); font: 500 16px var(--sans); color: var(--ink); outline: none; box-shadow: inset 0 0 0 1px var(--line); }
.dm-q::placeholder { color: var(--mute); }
.dm-q::-webkit-search-cancel-button { display: none; }
.dm-nav.is-search .dm-chips { display: none; }
.dm-nav.is-search .dm-q { display: block; animation: fadeR .35s var(--ease); }

/* ---------- menu ---------- */
.dm-menu { padding-bottom: 150px; }
.dm-sec { padding-top: 34px; }
.dm-sec[hidden] { display: none; }
.dm-sec__h { display: flex; align-items: baseline; gap: 12px; margin-bottom: 18px; font: 400 clamp(28px, 7vw, 44px)/1.1 var(--serif); letter-spacing: -.01em; }
.dm-sec__h small { font: 600 13px var(--sans); color: var(--mute); letter-spacing: .04em; }
.dm-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 720px) { .dm-grid { grid-template-columns: repeat(auto-fill, minmax(214px, 1fr)); gap: 18px; } }

.dm-card { display: flex; flex-direction: column; padding: 8px 8px 12px; border-radius: 24px; background: var(--paper); box-shadow: 0 1px 0 rgba(28, 26, 22, .04), 0 14px 34px -24px rgba(60, 40, 20, .4); }
.dm-card[hidden] { display: none; }
.js-reveal .dm-card { opacity: 0; transform: translateY(22px); }
.js-reveal .dm-card.is-in { opacity: 1; transform: none; transition: opacity .6s var(--ease), transform .8s var(--ease); transition-delay: calc(var(--i, 0) * 55ms); }
.dm-card__img { position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: 1; border-radius: 18px; background: radial-gradient(closest-side, var(--sand) 62%, rgba(236, 227, 212, 0)); }
.dm-card__img img { width: 90%; height: 90%; object-fit: contain; filter: drop-shadow(0 12px 12px rgba(70, 45, 20, .2)); opacity: 0; transform: scale(.86) rotate(-14deg); transition: opacity .5s, transform 1s var(--ease); }
.dm-card__img img.is-ld { opacity: 1; transform: none; }
@media (hover: hover) { .dm-card:hover .dm-card__img img.is-ld { transform: rotate(8deg) scale(1.04); } }
.dm-card__name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: 8px 6px 0; font-weight: 600; font-size: 15px; line-height: 1.28; }
.dm-card__meta { margin: 4px 6px 0; font-size: 12.5px; color: var(--mute); }
.dm-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin: auto 0 0; padding: 12px 0 0 6px; }
.dm-price { font-weight: 700; font-size: 16px; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* заглушка без фото — монограмма на «тарелке» */
.dm-ph { width: 76%; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; background: var(--paper); box-shadow: inset 0 0 0 10px var(--bg), inset 0 0 0 11px var(--line), 0 14px 24px -14px rgba(70, 45, 20, .35); font: 400 clamp(30px, 9vw, 46px)/1 var(--serif); color: var(--acc); }

/* + / степпер */
.dm-add { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--ink); color: var(--paper); transition: transform .25s var(--spring), background .2s; }
.dm-add:active { transform: scale(.86); }
.dm-add .i { stroke-width: 2.2; }
.dm-step { display: flex; align-items: center; height: 40px; border-radius: 99px; background: var(--acc); color: #fff; animation: pop .4s var(--spring); }
.dm-step button { width: 30px; height: 40px; display: grid; place-items: center; }
.dm-step button .i { width: 16px; stroke-width: 2.4; }
.dm-step b { min-width: 16px; text-align: center; font-variant-numeric: tabular-nums; }
.dm-step--lg { height: 56px; background: var(--sand); color: var(--ink); animation: none; }
.dm-step--lg button { width: 50px; height: 56px; }
.dm-step--lg b { min-width: 22px; font-size: 18px; }

.dm-none { padding: 80px 20px; text-align: center; }
.dm-none b { display: block; font: 400 28px/1.2 var(--serif); }
.dm-none p { margin-top: 8px; color: var(--mute); }
.dm-foot { padding: 40px 0 0; text-align: center; color: var(--mute); font-size: 13px; line-height: 1.7; }
.dm-foot a { color: var(--ink2); font-weight: 600; }

/* ---------- корзина-бар ---------- */
.dm-bar { position: fixed; z-index: 30; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom)); width: min(520px, calc(100% - 24px)); height: 64px; display: flex; align-items: center; gap: 12px; padding: 0 20px 0 11px; border-radius: 99px; background: var(--ink); color: var(--paper); box-shadow: 0 20px 44px -14px rgba(28, 26, 22, .6); transform: translate(-50%, 160%); transition: transform .55s var(--ease); }
.dm-bar.is-on { transform: translate(-50%, 0); }
.dm-bar__n { min-width: 42px; height: 42px; padding: 0 8px; border-radius: 99px; display: grid; place-items: center; background: var(--acc); font-weight: 700; font-variant-numeric: tabular-nums; }
.dm-bar__t { flex: 1; font-weight: 600; }
.dm-bar__sum { font-weight: 700; font-variant-numeric: tabular-nums; }
.dm-fly { position: fixed; z-index: 60; left: 0; top: 0; margin: 0; pointer-events: none; object-fit: contain; transform-origin: 0 0; will-change: transform; }

/* ---------- шторки (native <dialog>) ---------- */
.dm-dlg { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: none; color: inherit; overflow: hidden; }
.dm-dlg::backdrop { background: none; }
.dm-dlg__bg { position: absolute; inset: 0; touch-action: none; background: rgba(24, 18, 10, .46); opacity: 0; transition: opacity .4s; }
.dm-dlg__box { position: absolute; left: 0; right: 0; bottom: 0; max-height: 92dvh; overflow-y: auto; overscroll-behavior: contain; border-radius: 30px 30px 0 0; background: var(--paper); transform: translateY(100%); transition: transform .55s var(--ease); }
.dm-dlg__box:focus { outline: none; }
.dm-dlg.is-open .dm-dlg__bg { opacity: 1; }
.dm-dlg.is-open .dm-dlg__box { transform: none; }
.dm-dlg.is-drag .dm-dlg__box { transition: none; }
.dm-grab { position: sticky; top: 0; z-index: 3; display: block; height: 22px; margin-bottom: -22px; touch-action: none; }
.dm-grab::before { content: ''; position: absolute; left: 50%; top: 9px; width: 40px; height: 4px; margin-left: -20px; border-radius: 4px; background: rgba(28, 26, 22, .18); }
.dm-x { position: absolute; z-index: 4; top: 14px; right: 14px; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: rgba(251, 248, 242, .85); box-shadow: 0 2px 10px rgba(28, 26, 22, .12); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
@media (min-width: 720px) {
    .dm-dlg__box { left: 50%; top: 50%; bottom: auto; width: min(560px, 92vw); max-height: 88dvh; border-radius: 30px; opacity: 0; transform: translate(-50%, -46%) scale(.96); transition: transform .5s var(--ease), opacity .3s; }
    .dm-dlg.is-open .dm-dlg__box { opacity: 1; transform: translate(-50%, -50%); }
    .dm-grab { display: none; }
    .dm-prod__img { aspect-ratio: 1 / .68; }
    .dm-prod__img img { width: 62%; }
}

/* карточка блюда */
.dm-prod__img { position: relative; display: grid; place-items: center; aspect-ratio: 1 / .84; background: radial-gradient(56% 58% at 50% 54%, var(--sand), rgba(236, 227, 212, 0) 72%); }
.dm-prod__img img { width: 76%; max-width: 420px; aspect-ratio: 1; object-fit: contain; filter: drop-shadow(0 26px 26px rgba(70, 45, 20, .26)); }
.dm-prod__img .dm-ph { width: 52%; font-size: 64px; }
.dm-prod__body { padding: 0 24px 8px; }
.dm-kicker { font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--acc); }
.dm-prod h2 { margin-top: 8px; font: 400 clamp(28px, 7vw, 34px)/1.12 var(--serif); letter-spacing: -.01em; }
.dm-prod__meta { margin-top: 8px; color: var(--mute); font-size: 14px; }
.dm-prod__desc { margin-top: 12px; color: var(--ink2); }
.dm-nutr { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 20px; }
.dm-nutr div { padding: 12px 6px; border-radius: 16px; background: var(--bg); text-align: center; }
.dm-nutr b { display: block; font-size: 18px; font-variant-numeric: tabular-nums; }
.dm-nutr span { font-size: 11.5px; color: var(--mute); }
.dm-more { margin-top: 26px; }
.dm-more h3 { font: 600 13px var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--mute); }
.dm-more__row { display: flex; gap: 10px; margin: 12px -24px 0; padding: 0 24px 6px; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x mandatory; scroll-padding: 0 24px; }
.dm-more__row::-webkit-scrollbar { display: none; }
.dm-mini { flex: none; width: 118px; scroll-snap-align: start; }
.dm-mini .dm-card__img { border-radius: 16px; background: radial-gradient(closest-side, var(--sand) 62%, rgba(236, 227, 212, 0)); }
.dm-mini .dm-ph { font-size: 30px; }
.dm-mini b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 6px; font-size: 13px; font-weight: 600; line-height: 1.25; }
.dm-mini span { font-size: 13px; color: var(--mute); }
.dm-buy { position: sticky; bottom: 0; z-index: 2; display: flex; gap: 10px; padding: 18px 24px calc(18px + env(safe-area-inset-bottom)); background: linear-gradient(rgba(251, 248, 242, 0), var(--paper) 30%); }
.dm-cta { flex: 1; height: 56px; padding: 0 22px; border-radius: 99px; display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--ink); color: var(--paper); font-weight: 600; font-size: 16px; transition: transform .25s var(--spring); }
.dm-cta:active { transform: scale(.97); }
.dm-cta b { font-variant-numeric: tabular-nums; }
.dm-cta--acc { background: var(--acc); justify-content: center; }
.dm-swap { animation: swap .45s var(--ease); }

/* заказ */
.dm-sheet__h { padding: 30px 24px 6px; }
.dm-sheet__h h2 { font: 400 32px/1.1 var(--serif); }
.dm-sheet__h p { margin-top: 6px; color: var(--mute); font-size: 14px; }
.dm-rows { padding: 8px 24px; }
.dm-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.dm-row__img { width: 58px; height: 58px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--bg); }
.dm-row__img img { width: 100%; height: 100%; object-fit: contain; }
.dm-row__img .dm-ph { width: 100%; font-size: 22px; box-shadow: none; background: var(--bg); }
.dm-row__t { flex: 1; min-width: 0; }
.dm-row__t b { display: block; font-weight: 600; line-height: 1.25; }
.dm-row__t span { font-size: 13px; color: var(--mute); font-variant-numeric: tabular-nums; }
.dm-row .dm-step { animation: none; background: var(--sand); color: var(--ink); height: 36px; }
.dm-row .dm-step button { width: 30px; height: 36px; }
.dm-sum { display: flex; justify-content: space-between; align-items: baseline; padding: 18px 24px 0; font-size: 15px; color: var(--ink2); }
.dm-sum b { font: 400 30px var(--serif); color: var(--ink); font-variant-numeric: tabular-nums; }
.dm-link { display: block; margin: 4px auto 0; padding: 12px; color: var(--mute); font-size: 14px; font-weight: 600; text-align: center; }

/* экран для официанта */
.dm-waiter .dm-dlg__box { background: var(--ink); color: var(--paper); }
.dm-waiter .dm-grab::before { background: rgba(251, 248, 242, .25); }
.dm-waiter .dm-sheet__h p { color: rgba(251, 248, 242, .6); }
.dm-w { padding: 0 24px; }
.dm-w ul { padding: 0; }
.dm-w li { display: flex; gap: 14px; align-items: baseline; padding: 14px 0; border-bottom: 1px solid rgba(251, 248, 242, .12); font-size: 20px; line-height: 1.3; list-style: none; }
.dm-w li i { font: normal 700 22px var(--sans); color: var(--acc); min-width: 40px; }
.dm-waiter .dm-sum { color: rgba(251, 248, 242, .7); }
.dm-waiter .dm-sum b { color: var(--paper); font-size: 38px; }
.dm-waiter .dm-buy { background: linear-gradient(rgba(28, 26, 22, 0), var(--ink) 30%); }
.dm-waiter .dm-cta { background: var(--paper); color: var(--ink); justify-content: center; }
.dm-waiter .dm-x { background: rgba(251, 248, 242, .12); color: var(--paper); box-shadow: none; }
.dm-tbl { display: inline-block; margin-top: 14px; padding: 8px 16px; border-radius: 99px; background: var(--acc); color: #fff; font-weight: 700; font-size: 18px; }

/* заведения */
.dm-org { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.dm-org .i { color: var(--mute); }
.dm-org span { flex: 1; min-width: 0; }
.dm-org b { display: block; font-weight: 600; }
.dm-org small { color: var(--mute); font-size: 13px; }
.dm-org.is-on .i { color: var(--acc); }

/* ---------- анимации ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(26px); } }
@keyframes plateIn { from { opacity: 0; transform: translateX(18%) rotate(-70deg) scale(.82); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgba(79, 123, 57, 0); } 100% { box-shadow: 0 0 0 0 rgba(79, 123, 57, 0); } }
@keyframes pop { from { transform: scale(.6); opacity: 0; } }
@keyframes fadeR { from { opacity: 0; transform: translateX(14px); } }
@keyframes swap { from { opacity: 0; transform: translateY(12px); } }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
