/* The menu by the guidebook (DishTile, MenuLine, Chip, Segmented) on the place page and the menu page.
   Price, weight and KBJU in one style (guideline «Вау»): numbers Nunito Sans 15/700 tabular, units 12/600 graphite;
   small orange text only orange-deep. menu.js: KBJU switch, chips of the place page, sticky bar of the menu page. */

.mn-tile, .mn-line { color: var(--ink); text-decoration: none; min-width: 0; }
.mn-tile:hover .mn-name, .mn-line:hover .mn-name { color: var(--orange-deep); }

/* tiles: a row with the photo on the right on a phone, a card with the photo on top from 900 */
.mn-tiles { display: grid; grid-template-columns: minmax(0, 1fr); }
.mn-tile { display: grid; grid-template-columns: minmax(0, 1fr) 112px; grid-template-rows: auto 1fr auto; column-gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.mn-ph { position: relative; display: block; grid-column: 2; grid-row: 1 / span 2; width: 112px; aspect-ratio: 4 / 3; border-radius: var(--radius-m); overflow: hidden; background: var(--paper); }
.mn-ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; color: transparent; }
.mn-tile .mn-name, .mn-tile .mn-desc { grid-column: 1; }
.mn-txt { display: contents; }
.mn-tile .mn-price { grid-column: 1 / -1; grid-row: 3; }
.mn-label { position: absolute; left: 8px; top: 8px; height: 22px; padding: 0 8px; border-radius: var(--radius-xs); background: var(--cream-fixed, #fffbf8); color: #c93f18; font: 600 12px/22px 'Nunito Sans', sans-serif; }

.mn-name { font: 600 15px/20px 'Nunito Sans', sans-serif; }
.mn-tile .mn-name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mn-desc { font: 400 13px/18px 'Nunito Sans', sans-serif; color: var(--graphite); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 36px; max-height: 36px; align-self: start; margin-top: 4px; }
.mn-desc b { font-weight: 600; color: var(--ink); }

/* the price line: the price, then calories and BJU; a wrap moves the KBJU group whole */
.mn-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 16px; margin-top: 8px; white-space: nowrap; }
.mn-n b { font: 600 15px/20px 'Nunito Sans', sans-serif; font-variant-numeric: tabular-nums; color: var(--ink); }
.mn-n i { font: 600 12px/16px 'Nunito Sans', sans-serif; font-style: normal; color: var(--graphite); margin-left: 3px; }
.mn-pr b { color: var(--orange-deep); }
.mn-bj i { margin: 0 4px 0 0; }
.mn-bj s { text-decoration: none; color: var(--rule); font-weight: 400; margin: 0 1px; }
.mn-kb { display: inline-flex; align-items: baseline; gap: 10px; }
.mn-off { font: 600 13px/20px 'Nunito Sans', sans-serif; color: var(--graphite); }
html:not([data-kb="h"]) .mn-kb-h { display: none; }
.mn-tile.off, .mn-line.off { opacity: .45; }

/* lines */
.mn-lines { display: grid; grid-template-columns: minmax(0, 1fr); }
.mn-line { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr auto; padding: 14px 0; border-bottom: 1px solid var(--line); }
.mn-line:last-child { border-bottom: 0; }
.mn-line.has-ph { grid-template-columns: minmax(0, 1fr) 112px; grid-template-rows: auto 1fr auto; column-gap: 12px; }
.mn-line.has-ph .mn-name, .mn-line.has-ph .mn-desc { grid-column: 1; }
.mn-thumb { grid-column: 2; grid-row: 1 / span 2; width: 112px; aspect-ratio: 4 / 3; border-radius: var(--radius-m); overflow: hidden; position: relative; background: var(--paper); }
.mn-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; color: transparent; }
.mn-line .mn-price { grid-column: 1 / -1; grid-row: 3; }
.mn-badge { display: inline-flex; align-items: center; height: 22px; padding: 0 7px; border: 1.5px solid var(--orange); border-radius: var(--radius-xs); color: var(--orange-deep); font: 600 12px/1 'Nunito Sans', sans-serif; vertical-align: 1px; margin-left: 4px; }
.mn-tiles + .mn-lines { margin-top: 0; }

/* chips (Chip) and the KBJU switch (Segmented) */
.mn-chips { display: flex; gap: 8px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; padding: 2px 40px 2px 0; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent); }
.mn-chips::-webkit-scrollbar { display: none; }
/* menu.js wraps the row: the fade follows the side with more chips, a mouse gets arrows over the faded edge */
.mn-chipsw { position: relative; min-width: 0; }
.mn-chipsw.fits .mn-chips { padding-right: 0; -webkit-mask-image: none; mask-image: none; }
.mn-chipsw.at-end:not(.at-start) .mn-chips { -webkit-mask-image: linear-gradient(90deg, transparent, #000 40px); mask-image: linear-gradient(90deg, transparent, #000 40px); }
.mn-chipsw:not(.at-start):not(.at-end) .mn-chips { -webkit-mask-image: linear-gradient(90deg, transparent, #000 40px, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(90deg, transparent, #000 40px, #000 calc(100% - 40px), transparent); }
.mn-arr { display: none; position: absolute; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; padding: 0; border-radius: 50%; border: 1.5px solid var(--rule); background: var(--cream); color: var(--ink); cursor: pointer; align-items: center; justify-content: center; }
.mn-arr svg { width: 18px; height: 18px; }
.mn-arr:hover { border-color: var(--ink); }
.mn-arr-prev { left: 0; }
.mn-arr-next { right: 0; }
@media (hover: hover) and (pointer: fine) {
  .mn-chipsw:not(.fits):not(.at-start) .mn-arr-prev, .mn-chipsw:not(.fits):not(.at-end) .mn-arr-next { display: inline-flex; }
}
.mn-chip { flex: none; height: 40px; padding: 0 14px; border-radius: var(--radius-m); border: 1.5px solid var(--rule); background: transparent; color: var(--ink); font: 400 15px/1 'Nunito Sans', sans-serif; display: inline-flex; align-items: center; text-decoration: none; white-space: nowrap; }
.mn-chip.on { background: var(--orange-strong, #c93f18); border-color: var(--orange-strong, #c93f18); color: #fff; font-weight: 600; }
.mn-kbsw { display: inline-flex; flex-direction: column; gap: 6px; flex: none; }
.mn-kbl { font: 600 13px/16px 'Nunito Sans', sans-serif; color: var(--graphite); }
.mn-seg { display: inline-flex; gap: 4px; padding: 4px; border-radius: var(--radius-sheet); background: var(--paper); height: 44px; box-sizing: border-box; }
.mn-seg button { height: 36px; padding: 0 14px; border-radius: var(--radius-m); border: 0; background: transparent; color: var(--ink); font: 400 15px/1 'Nunito Sans', sans-serif; cursor: pointer; white-space: nowrap; }
.mn-seg button.on { background: var(--ink); color: var(--cream); font-weight: 600; }

/* the place page block */
.mn-place { display: flex; flex-direction: column; gap: 16px; }
.mn-place > h2 { margin: 0; }
/* one bar: the chips («Всё меню» first) and the KBJU switch; on a phone the switch above the chips */
.mn-ctl { display: flex; flex-direction: column; gap: 16px; }
.mn-ctl .mn-kbsw { order: -1; }
.mn-foot { display: flex; flex-direction: column; gap: 16px; margin-top: 8px; }
.mn-open { height: 56px; border-radius: var(--radius-m); border: 1.5px solid var(--rule); display: flex; align-items: center; gap: 10px; padding: 0 20px; color: var(--orange-deep); font: 600 17px/1 'Nunito Sans', sans-serif; text-decoration: none; }
.mn-open .mn-cnt { color: var(--graphite); font-weight: 400; font-size: 15px; }
.mn-open .ico { margin-left: auto; }

/* the menu page; .mp keeps its 20px gap between its blocks */
.mn-top { display: flex; flex-direction: column; }
.mn-title { display: flex; align-items: baseline; gap: 14px; }
.mn-title .mo-title { margin: 0; }
.mn-sub { font: var(--type-t3); color: var(--graphite); display: inline-block; white-space: nowrap; }
.mn-note { font: 400 13px/18px 'Nunito Sans', sans-serif; color: var(--graphite); margin: 6px 0 0; }
.mn-segrow { display: flex; margin-top: 12px; }
.mn-bar { position: sticky; top: 0; z-index: 20; background: var(--cream); display: flex; align-items: flex-end; gap: 16px; padding: 8px 0; margin-top: -8px; border-bottom: 1px solid var(--line); }
.mn-bar .mn-chips, .mn-bar .mn-chipsw { flex: 1; min-width: 0; }
.mn-bar .mn-kbsw { display: none; }
.mn-sec { padding-top: 40px; scroll-margin-top: 130px; }
.mn-sec:first-child { padding-top: 0; }
.mn-sh { display: flex; align-items: baseline; flex-wrap: wrap; gap: var(--space-4) var(--space-12); margin-bottom: var(--space-16); }
.mn-sh h2 { font: 400 22px/26px var(--font-display); margin: 0; color: var(--ink); }
.mn-sh .mn-cnt { font: var(--type-t4); color: var(--graphite); white-space: nowrap; }
.mn-sh .mn-art { width: 32px; height: 32px; object-fit: contain; flex: none; align-self: center; }
.mn-page .mp-found { gap: 0; }

@media (max-width: 899px) {
  .mn-kbsw { width: 100%; }
  .mn-seg { width: 100%; }
  .mn-seg button { flex: 1; }
}

@media (min-width: 900px) {
  .mn-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 24px; }
  /* the tiles of a row share their tracks (subgrid): photos, texts and price lines start on one line across the row,
     a price line that wraps its KBJU only grows downwards */
  .mn-tile { grid-row: span 3; grid-template-columns: minmax(0, 1fr); grid-template-rows: subgrid; row-gap: 0; padding: 0; border: 0; }
  .mn-ph { grid-column: 1; grid-row: 1; width: auto; margin-bottom: 10px; }
  .mn-tile .mn-txt { display: block; grid-row: 2; }
  .mn-tile .mn-price { grid-row: 3; align-self: start; padding-top: 8px; margin-top: 0; column-gap: 12px; }
  .mn-tile .mn-kb { gap: 8px; }
  .mn-tiles + .mn-lines { margin-top: 16px; }
  .mn-lines { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 48px; }
  .mn-line:nth-last-child(2):nth-child(odd) { border-bottom: 0; }
  .mn-foot { flex-direction: row; }
  .mn-ctl { flex-direction: row; align-items: flex-end; gap: 24px; }
  .mn-ctl .mn-chips, .mn-ctl .mn-chipsw { flex: 1; min-width: 0; }
  .mn-ctl .mn-kbsw { order: 0; }
  .mn-open { height: 48px; font-size: 15px; padding: 0 18px; }
  .mn-open .ico { margin-left: 14px; }

  .mn-page .mo-bar { display: none; }
  .mn-page .mo-title { font-size: 44px; line-height: 48px; }
  .mn-title { margin-top: 8px; }
  .mn-segrow { display: none; }
  .mn-bar { margin-top: 4px; }
  .mn-bar .mn-kbsw { display: inline-flex; }
  .mn-page .mn-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px 20px; }
  .mn-sec { padding-top: 48px; scroll-margin-top: 110px; }
  .mn-sh h2 { font: var(--type-d4); }
  .mn-sh .mn-art { width: 40px; height: 40px; }
}

@media (min-width: 1200px) {
  .mn-page .mn-lines { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 40px; }
  .mn-page .mn-line:nth-last-child(2):nth-child(odd) { border-bottom: 1px solid var(--line); }
  .mn-page .mn-line:nth-last-child(-n+3):nth-child(3n+1), .mn-page .mn-line:nth-last-child(-n+2):nth-child(3n+2) { border-bottom: 0; }
}

/* ---- the guest-flow audit of 11.11 (zone «venue»): the menu page and the dish page ---- */
/* one bar: back to the place's menu block, «Меню · <place>» as the heading, the count; the search open under it */
.mp-h1 { margin: 0; font: 600 17px/24px var(--font-text); color: var(--ink); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mp-bar .mo-who { flex: 1; align-items: flex-start; text-align: left; gap: 0; }
.mp-bar .mn-sub { font: 400 13px/18px var(--font-text); }
.mp-find { margin-top: -8px; }
.mp-find input { height: 48px; }
@media (min-width: 900px) {
  .mn-page .mp-bar { display: flex; position: static; margin: 0; padding: 0; justify-content: flex-start; }
  .mn-page .mp-bar .mo-btn { display: none; }
  .mp-bar .mo-who { flex-direction: row; align-items: baseline; gap: 16px; }
  .mp-h1 { font: 400 44px/48px var(--font-display); white-space: normal; overflow: visible; }
  .mp-h1-dot { display: none; }
  .mp-bar .mn-sub { font: var(--type-t3); }
  .mn-page:has(.mp-find:not([hidden])) { display: grid; grid-template-columns: minmax(0, 1fr) 360px; column-gap: 24px; }
  .mn-page:has(.mp-find:not([hidden])) > * { grid-column: 1 / -1; }
  .mn-page:has(.mp-find:not([hidden])) > .mp-bar { grid-column: 1; }
  .mn-page:has(.mp-find:not([hidden])) > .mp-find { grid-column: 2; grid-row: 2; align-self: end; margin: 0; }
  .mn-page { row-gap: 20px; }
}
/* «Разделы»: every section in one list, so 26 chips need no swiping */
.mn-bar { align-items: center; }
.mp-secs { position: relative; flex: none; }
.mp-secs summary { list-style: none; cursor: pointer; gap: 6px; font-weight: 600; }
.mp-secs summary::-webkit-details-marker { display: none; }
.mp-secs summary .ico, .mp-secs summary .ico svg { width: 18px; height: 18px; }
.mp-secs[open] summary { background: var(--orange-strong); border-color: var(--orange-strong); color: #fff; }
.mp-secs-list { position: absolute; z-index: 25; left: 0; top: calc(100% + 8px); width: min(340px, calc(100vw - 32px)); max-height: min(60vh, 480px); overflow-y: auto; margin: 0; padding: 8px; list-style: none; border: var(--border-panel) solid var(--line); border-radius: var(--radius-sheet); background: var(--surface); box-shadow: var(--shadow-pop); }
.mp-secs-list a { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; min-height: 44px; padding: 10px 12px; border-radius: var(--radius-m); color: var(--ink); text-decoration: none; font: 400 15px/22px var(--font-text); }
.mp-secs-list a:hover { background: var(--paper); }
.mp-secs-list small { flex: none; color: var(--graphite); font: 400 13px/18px var(--font-text); }
/* section headings: one line with their count (they ran into the dishes at 80 px on a computer) */
.mn-sh { flex-wrap: nowrap; align-items: baseline; }
.mn-sh h2 { min-width: 0; overflow-wrap: anywhere; font: 400 22px/26px var(--font-display); }
@media (min-width: 900px) { .mn-sh h2 { font: 400 28px/32px var(--font-display); } }
.mn-sh .mn-art { align-self: center; }
/* an empty filter: «Всё меню» is a link, not a grey button */
.mp-none .link-arrow { color: var(--orange-deep); }
/* the dish page: where the place is, open or not, the route */
.dp-where { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 16px; }
.dp .dp-where .dp-venue { margin: 0; display: flex; flex-wrap: wrap; gap: 0 8px; font: 400 15px/22px var(--font-text); color: var(--graphite); }
.dp-where .dp-venue a { color: var(--ink); font-weight: 600; }
.dp-where .dp-venue > * + *::before { content: '·'; margin-right: 8px; color: var(--graphite); }
.dp-where .vp-route-list { bottom: auto; top: calc(100% + 8px); left: 0; right: auto; }
.dish-more .mn-foot { margin-top: 16px; }
@media (max-width: 1023px) { .dp-where .vp-route { display: none; } }
/* no photo on a computer: the dish on the left, «Ещё из меню» on the right, no empty half */
@media (min-width: 1024px) {
  .dp:has(.dp-no-ph) { display: grid; grid-template-columns: minmax(0, 1fr) 400px; column-gap: 48px; align-items: start; }
  .dp:has(.dp-no-ph) > * { grid-column: 1 / -1; }
  .dp:has(.dp-no-ph) > .dp-dish { grid-column: 1; max-width: none; }
  .dp:has(.dp-no-ph) > .dish-more { grid-column: 2; grid-row: 2; margin: 0; }
  .dp:has(.dp-no-ph) > .dish-more .mn-lines { grid-template-columns: 1fr; }
}
/* phones: the dock calls or books, so the page's own filled button would be a second one on the screen */
@media (max-width: 1023px) { .mp > .mo-cta, .dp .dp-action .mo-cta { display: none; } }
/* «205 блюд» stays on one line beside the menu title (owner 12.11 pass) */
.mo-who .mn-sub { white-space: nowrap; }
