/* Warung Menu — тёплая палитра варунга: лист банана, перец чили, куркума, рисовая бумага */
[hidden] { display: none !important; }
:root {
  --bg: #F7F1E6; --surface: #FFFCF6; --surface2: #EFE6D6; --ink: #24201A; --ink2: #4F473C; --muted: #7A7062;
  --line: #E4D8C4; --leaf: #2F6B3A; --leaf-ink: #FFFFFF; --leaf-soft: #DCEBD8; --chili: #C2412D; --chili-soft: #F6DCD3;
  --turmeric: #D9962B; --wa: #1FA855; --shadow: 0 8px 28px rgba(36, 32, 26, .10); --r: 16px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #15130F; --surface: #1E1B16; --surface2: #29251E; --ink: #F3ECE0; --ink2: #D3C9B9; --muted: #9F9584;
    --line: #363027; --leaf: #6DBA77; --leaf-ink: #0D1A0F; --leaf-soft: #1F3322; --chili: #EE7B63; --chili-soft: #3D2119;
    --turmeric: #EBB252; --shadow: 0 8px 28px rgba(0, 0, 0, .4);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #15130F; --surface: #1E1B16; --surface2: #29251E; --ink: #F3ECE0; --ink2: #D3C9B9; --muted: #9F9584;
  --line: #363027; --leaf: #6DBA77; --leaf-ink: #0D1A0F; --leaf-soft: #1F3322; --chili: #EE7B63; --chili-soft: #3D2119;
  --turmeric: #EBB252; --shadow: 0 8px 28px rgba(0, 0, 0, .4);
  color-scheme: dark;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 Figtree, system-ui, sans-serif; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
h1, h2, h3 { font-family: "Young Serif", Georgia, serif; font-weight: 400; line-height: 1.15; margin: 0; text-wrap: balance; }
a { color: var(--leaf); }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.muted { color: var(--muted); }
.gut { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.in { max-width: 1080px; margin: 0 auto; }

/* шапка */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--bg); }
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.top .in { display: flex; align-items: center; gap: 12px; height: 58px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 20px "Young Serif", serif; white-space: nowrap; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.brand img { width: 32px; height: 32px; flex: none; }
.seg { display: flex; margin-left: auto; padding: 3px; border: 1px solid var(--line); border-radius: 99px; background: var(--surface); flex: none; }
.seg button { border: 0; background: none; height: 32px; min-width: 40px; padding: 0 10px; border-radius: 99px; font-weight: 700; font-size: 13px; cursor: pointer; color: var(--ink2); }
.seg button[aria-pressed="true"] { background: var(--leaf); color: var(--leaf-ink); }
@media (max-width: 420px) { .brand { font-size: 17px; gap: 8px; } .brand img { width: 28px; height: 28px; } .seg button { min-width: 34px; padding: 0 8px; } }
@media (max-width: 350px) { .brand { font-size: 14px; gap: 6px; } .brand img { width: 24px; height: 24px; } .seg button { min-width: 30px; padding: 0 6px; } }
.demo { background: var(--turmeric); color: #24201A; font-size: 13.5px; text-align: center; padding-block: 7px; }
.demo a { color: inherit; font-weight: 700; }

/* первый экран */
.hero { position: relative; color: #fff; overflow: hidden; }
.hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20, 14, 8, .15), rgba(20, 14, 8, .78)); }
.hero .in { position: relative; z-index: 1; padding-block: 92px 26px; display: grid; gap: 10px; }
.hero h1 { font-size: clamp(34px, 7vw, 56px); }
.hero p { margin: 0; max-width: 56ch; color: rgba(255, 255, 255, .9); }
.facts { display: flex; flex-wrap: wrap; gap: 8px; }
.facts span { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 99px; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .3); backdrop-filter: blur(6px); font-size: 14px; font-weight: 600; }
.facts svg { width: 16px; height: 16px; }
.facts .meja { background: var(--turmeric); border-color: var(--turmeric); color: #24201A; }

/* категории */
.cats { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 59px); z-index: 15; background: var(--bg); border-bottom: 1px solid var(--line); }
.cats .in { display: flex; gap: 8px; overflow-x: auto; padding-block: 10px; scrollbar-width: none; }
.cats .in::-webkit-scrollbar { display: none; }
.cats a { flex: none; padding: 7px 14px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); color: var(--ink2); font-weight: 600; font-size: 14px; text-decoration: none; white-space: nowrap; }
.cats a.on { background: var(--ink); border-color: var(--ink); color: var(--bg); }

/* блюда */
main { padding-block: 8px 140px; }
.sec { scroll-margin-top: calc(env(safe-area-inset-top, 0px) + 120px); padding-top: 26px; }
.sec h2 { font-size: 26px; margin-bottom: 12px; display: flex; align-items: baseline; gap: 10px; }
.sec h2 small { font: 600 13px Figtree, sans-serif; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.grid { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1020px) { .grid { grid-template-columns: 1fr 1fr 1fr; } }
.dish { display: grid; grid-template-columns: 108px 1fr; gap: 14px; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); min-width: 0; }
@media (min-width: 1020px) { .dish { grid-template-columns: 1fr; padding: 0; overflow: hidden; } .dish .ph { border-radius: 0; aspect-ratio: 4 / 3; } .dish .bd { padding: 0 14px 14px; } }
.ph { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--surface2); max-width: 100%; }
.ph img { width: 100%; height: 100%; object-fit: cover; }
.bd { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.dish h3 { font-size: 18px; }
.alt { font-size: 13px; color: var(--muted); font-style: italic; }
.desc { font-size: 14px; color: var(--ink2); margin: 2px 0 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 99px; }
.tag svg { width: 13px; height: 13px; }
.tag.hot { background: var(--chili-soft); color: var(--chili); }
.tag.veg { background: var(--leaf-soft); color: var(--leaf); }
.buy { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 8px; flex-wrap: wrap; }
.price b { font-size: 17px; font-variant-numeric: tabular-nums; }
.price span { display: block; font-size: 12.5px; color: var(--muted); }
.add { height: 40px; padding: 0 16px; border-radius: 99px; border: 0; background: var(--leaf); color: var(--leaf-ink); font-weight: 700; font-size: 15px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.add svg { width: 18px; height: 18px; }
.step { display: inline-flex; align-items: center; border-radius: 99px; background: var(--leaf-soft); height: 40px; }
.step button { width: 40px; height: 40px; border: 0; background: none; color: var(--leaf); cursor: pointer; display: grid; place-items: center; border-radius: 99px; }
.step b { min-width: 22px; text-align: center; font-variant-numeric: tabular-nums; }
.dish.off { opacity: .62; }
.dish.off .ph img { filter: grayscale(1); }
.habis { position: absolute; left: 8px; top: 8px; background: var(--ink); color: var(--bg); font-size: 12px; font-weight: 800; padding: 3px 9px; border-radius: 99px; text-transform: uppercase; letter-spacing: .05em; }

/* нижняя полоса корзины */
.bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; padding-bottom: max(12px, env(safe-area-inset-bottom, 0px)); padding-top: 12px; pointer-events: none; }
.bar button { pointer-events: auto; width: 100%; max-width: 560px; margin: 0 auto; display: flex; align-items: center; gap: 12px; height: 58px; padding: 0 10px 0 20px; border: 0; border-radius: 99px; background: var(--ink); color: var(--bg); box-shadow: var(--shadow); cursor: pointer; font-weight: 700; font-size: 16px; }
.bar .n { display: grid; place-items: center; min-width: 28px; height: 28px; border-radius: 99px; background: var(--turmeric); color: #24201A; font-size: 14px; }
.bar .go { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; background: var(--leaf); color: var(--leaf-ink); height: 42px; padding: 0 16px; border-radius: 99px; font-variant-numeric: tabular-nums; }

/* лист заказа */
.sheet { position: fixed; inset: 0; z-index: 40; display: flex; align-items: flex-end; justify-content: center; background: rgba(15, 12, 8, .5); }
.sheet .pn { width: 100%; max-width: 560px; max-height: calc(100dvh - 24px - env(safe-area-inset-top, 0px)); overflow-y: auto; background: var(--bg); border-radius: 22px 22px 0 0; padding-block: 18px max(20px, env(safe-area-inset-bottom, 0px)); display: grid; gap: 14px; align-content: start; }
@media (min-width: 640px) { .sheet { align-items: center; } .sheet .pn { border-radius: 22px; } }
.pn-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pn-h h2 { font-size: 26px; }
.x { width: 40px; height: 40px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; display: grid; place-items: center; flex: none; }
.lines { display: grid; gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 0 14px; }
.ln { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.ln:last-child { border-bottom: 0; }
.ln > div { min-width: 0; }
.ln h4 { margin: 0; font-size: 15.5px; }
.ln p { margin: 0; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.mode { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mode button { height: 46px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.mode button[aria-pressed="true"] { border-color: var(--leaf); background: var(--leaf-soft); color: var(--leaf); }
.fld { display: grid; gap: 5px; font-size: 13.5px; font-weight: 700; color: var(--ink2); }
.fld input, .fld textarea { width: 100%; font: 16px Figtree, sans-serif; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 11px 13px; }
.fld textarea { min-height: 70px; resize: vertical; }
.fld input:focus, .fld textarea:focus { outline: 2px solid var(--leaf); outline-offset: 1px; border-color: transparent; }
.fld .bad { border-color: var(--chili); }
.tot { display: flex; justify-content: space-between; align-items: baseline; font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }
.tot span { font-size: 13px; font-weight: 600; color: var(--muted); }
.send { height: 54px; width: 100%; border: 0; border-radius: 99px; background: var(--wa); color: #fff; font-weight: 800; font-size: 16.5px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 10px; text-decoration: none; }
.send:disabled { opacity: .55; cursor: wait; }
.send svg { width: 22px; height: 22px; fill: currentColor; stroke: none; }
.fine { font-size: 12.5px; color: var(--muted); text-align: center; margin: 0; }
.ok { text-align: center; display: grid; gap: 10px; justify-items: center; }
.ok .code { font: 34px "Young Serif", serif; letter-spacing: .04em; }
.kit { width: 100%; text-align: left; background: var(--surface); border: 1px dashed var(--line); border-radius: var(--r); padding: 12px 14px; font: 13.5px/1.55 ui-monospace, Menlo, monospace; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink2); margin: 0; }
.kit-h { font-size: 12.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); justify-self: start; }

/* подвал */
.foot { padding-block: 28px 120px; text-align: center; color: var(--muted); font-size: 13.5px; display: grid; gap: 6px; border-top: 1px solid var(--line); }
.foot p { margin: 0; }
.toast { position: fixed; left: 50%; bottom: calc(90px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 20px); opacity: 0; transition: .25s; background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 99px; font-weight: 600; font-size: 14px; z-index: 50; pointer-events: none; max-width: calc(100vw - 32px); text-align: center; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* общие для кабинета, QR и предложения */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: 12px; border: 0; background: var(--leaf); color: var(--leaf-ink); font-weight: 700; text-decoration: none; cursor: pointer; }
.btn.ghost { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.btn.small { height: 36px; padding: 0 12px; font-size: 14px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.chip { display: inline-flex; align-items: center; height: 34px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 600; font-size: 14px; text-decoration: none; cursor: pointer; }
.again { height: 44px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 700; cursor: pointer; }
.doc { max-width: 760px; margin: 0 auto; padding-block: 32px 40px; }
.doc h2 { font-size: 28px; margin-top: 40px; } .doc h3 { font-size: 19px; margin-top: 24px; } .doc li { margin: 4px 0; }
