/* ---------- type ---------- */
@font-face { font-family: "Unbounded"; font-weight: 600; font-display: swap; src: url(fonts/unbounded-cyrillic-600-normal.woff2) format("woff2"); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Unbounded"; font-weight: 600; font-display: swap; src: url(fonts/unbounded-latin-600-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+20AC, U+2013-2014, U+2212; }
@font-face { font-family: "Unbounded"; font-weight: 800; font-display: swap; src: url(fonts/unbounded-cyrillic-800-normal.woff2) format("woff2"); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Unbounded"; font-weight: 800; font-display: swap; src: url(fonts/unbounded-latin-800-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+20AC, U+2013-2014, U+2212; }
@font-face { font-family: "Onest"; font-weight: 400; font-display: swap; src: url(fonts/onest-cyrillic-400-normal.woff2) format("woff2"); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Onest"; font-weight: 400; font-display: swap; src: url(fonts/onest-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+20AC, U+2013-2014, U+2212; }
@font-face { font-family: "Onest"; font-weight: 500; font-display: swap; src: url(fonts/onest-cyrillic-500-normal.woff2) format("woff2"); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Onest"; font-weight: 500; font-display: swap; src: url(fonts/onest-latin-500-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+20AC, U+2013-2014, U+2212; }
@font-face { font-family: "Onest"; font-weight: 700; font-display: swap; src: url(fonts/onest-cyrillic-700-normal.woff2) format("woff2"); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Onest"; font-weight: 700; font-display: swap; src: url(fonts/onest-latin-700-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+20AC, U+2013-2014, U+2212; }

/* ---------- tokens ---------- */
:root {
  --shelf: #edf1ec;      /* page: cool, like a supermarket floor */
  --card: #ffffff;
  --ink: #18231c;
  --muted: #5f6e64;
  --line: #d8e0d9;
  --tint: #f3f6f2;       /* illustration tiles */
  --sticker: #ffda1a;    /* the promo sticker: the one loud colour */
  --sticker-ink: #1d1a05;
  --cut: #d7262d;        /* discounts */
  --good: #1f7a45;
  --focus: #1f7a45;
  --lidl: #0050aa; --kaufland: #e10915; --dm: #e6b400; --billa: #e5c600; --fantastico: #e2241b;
  --r-card: 18px;
  --display: "Unbounded", "Arial Black", sans-serif;
  --body: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root { --shelf: #121915; --card: #1b241e; --ink: #e9f0ea; --muted: #9aaaa0; --line: #2c3a31; --tint: #233029; --good: #6fd197; --focus: #6fd197; --cut: #ff6b6b; }
}

/* background themes, picked in settings */
:root[data-bg="white"] { --shelf: #f6f7f6; --tint: #eef1ee; --line: #e1e6e2; }
:root[data-bg="sky"] { --shelf: #e7eef7; --tint: #eef3fa; --line: #d3deeb; --ink: #15233a; --muted: #5b6a80; --good: #1f6f4a; }
:root[data-bg="peach"] { --shelf: #f7ece6; --tint: #fbf3ef; --line: #ead8ce; --ink: #2a1d18; --muted: #7a655c; }
:root[data-bg="lilac"] { --shelf: #eeecf6; --tint: #f5f4fa; --line: #dcd8ea; --ink: #1f1b33; --muted: #676080; }
:root[data-bg="dark"] { --shelf: #121915; --card: #1b241e; --ink: #e9f0ea; --muted: #9aaaa0; --line: #2c3a31; --tint: #233029; --good: #6fd197; --focus: #6fd197; --cut: #ff6b6b; color-scheme: dark; }
:root[data-bg="night"] { --shelf: #0f1420; --card: #182030; --ink: #e8edf6; --muted: #98a3b8; --line: #2a3448; --tint: #212b3e; --good: #74d3a0; --focus: #74d3a0; --cut: #ff7272; color-scheme: dark; }
@media (prefers-color-scheme: dark) {
  :root[data-bg="white"], :root[data-bg="sky"], :root[data-bg="peach"], :root[data-bg="lilac"], :root[data-bg="mint"] {
    --card: #ffffff; --ink: #18231c; --muted: #5f6e64; --good: #1f7a45; --focus: #1f7a45; --cut: #d7262d; color-scheme: light; }
  :root[data-bg="mint"] { --shelf: #edf1ec; --line: #d8e0d9; --tint: #f3f6f2; }
  :root[data-bg="white"] { --shelf: #f6f7f6; --tint: #eef1ee; --line: #e1e6e2; }
  :root[data-bg="sky"] { --shelf: #e7eef7; --tint: #eef3fa; --line: #d3deeb; --ink: #15233a; --muted: #5b6a80; --good: #1f6f4a; }
  :root[data-bg="peach"] { --shelf: #f7ece6; --tint: #fbf3ef; --line: #ead8ce; --ink: #2a1d18; --muted: #7a655c; }
  :root[data-bg="lilac"] { --shelf: #eeecf6; --tint: #f5f4fa; --line: #dcd8ea; --ink: #1f1b33; --muted: #676080; }
}
.shelfpick { display: flex; flex-wrap: wrap; gap: 6px; max-height: 190px; overflow: auto; }
.shelfpick button { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 4px 10px 4px 6px; font-size: 13px; }
.shelfpick button img { width: 18px; height: 18px; }
.shelfpick button[aria-pressed="false"] { opacity: .45; text-decoration: line-through; }
.swatches { display: flex; flex-wrap: wrap; gap: 24px 10px; }
.swatches button { width: 38px; height: 38px; border-radius: 12px; border: 2px solid var(--line); padding: 0; position: relative; }
.swatches button[aria-pressed="true"] { border-color: var(--ink); box-shadow: 0 0 0 2px var(--card) inset; }
.swatches button span { position: absolute; inset: auto 0 -18px; font-size: 10.5px; color: var(--muted); white-space: nowrap; text-align: center; }
.swatches { padding-bottom: 16px; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--shelf); color: var(--ink); font: 400 15px/1.45 var(--body); }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2.5px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
img { display: block; }

/* ---------- header ---------- */
.top { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--shelf) 94%, transparent);
  backdrop-filter: saturate(1.4) blur(10px); padding-top: env(safe-area-inset-top); }
.bar, .searchrow, .rail, main, .foot { max-width: 1180px; margin: 0 auto; padding-left: 16px; padding-right: 16px; }
.bar { display: flex; align-items: center; gap: 18px; padding-top: 12px; position: relative; }
.wordmark { font: 800 26px/1 var(--display); letter-spacing: -1px; color: var(--ink); text-decoration: none; }
.tabs { display: flex; gap: 4px; margin-right: auto; }
.tabs button { border: 0; background: none; padding: 9px 13px; border-radius: 999px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.tabs button.on { background: var(--ink); color: var(--shelf); }
.badge:not(:empty) { margin-left: 6px; font-size: 12px; font-weight: 700; background: var(--sticker); color: var(--sticker-ink); border-radius: 999px; padding: 1px 7px; }
.gear { border: 0; background: none; color: var(--muted); padding: 8px; border-radius: 999px; line-height: 0; }
.gear[aria-expanded="true"] { background: var(--card); color: var(--ink); }
.settings { position: absolute; right: 16px; top: 54px; z-index: 20; width: min(320px, calc(100vw - 32px));
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); padding: 16px; box-shadow: 0 12px 32px rgba(15, 30, 20, .16); }
.switch { display: flex; gap: 10px; align-items: center; font-weight: 500; }
.switch input { width: 18px; height: 18px; accent-color: var(--good); }
.seg { border: 0; padding: 0; margin: 14px 0 0; }
.seg legend { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.seg label { display: inline-flex; margin: 0 6px 6px 0; }
.seg input { position: absolute; opacity: 0; }
.seg label span { border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: 14px; }
.seg input:checked + span { background: var(--ink); color: var(--card); border-color: var(--ink); }
.seg input:focus-visible + span { outline: 2.5px solid var(--focus); outline-offset: 2px; }
.fine { font-size: 12.5px; color: var(--muted); margin: 10px 0 0; }

.searchrow { padding-top: 12px; }
.search { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: 0 14px; color: var(--muted); }
.search:focus-within { border-color: var(--good); box-shadow: 0 0 0 3px color-mix(in srgb, var(--good) 18%, transparent); }
.fresh { margin: 8px 2px 0; font-size: 12.5px; color: var(--muted); }
.search input { flex: 1; border: 0; background: none; padding: 13px 0; outline: none; color: var(--ink); font-size: 16px; }

/* shelf rail */
.rail { display: flex; gap: 6px; overflow-x: auto; padding-top: 10px; padding-bottom: 10px; scrollbar-width: none; scroll-snap-type: x proximity;
  -webkit-mask-image: linear-gradient(90deg, #000 92%, transparent); mask-image: linear-gradient(90deg, #000 92%, transparent); }
.rail::-webkit-scrollbar { display: none; }
.shelf { flex: 0 0 auto; scroll-snap-align: start; display: grid; justify-items: center; align-content: start; gap: 4px; width: 86px; padding: 10px 4px 8px;
  border: 1px solid transparent; border-radius: 16px; background: none; color: var(--ink); }
.shelf img { width: 38px; height: 38px; }
.shelf .nm { font-size: 12px; line-height: 1.2; text-align: center; font-weight: 500; }
.shelf .ct { font-size: 11px; color: var(--muted); }
.shelf:hover { background: var(--card); }
.shelf.on { background: var(--ink); color: var(--shelf); }
.shelf.on .ct { color: color-mix(in srgb, var(--shelf) 70%, transparent); }

/* ---------- toolbar ---------- */
main { padding-bottom: 40px; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 0 16px; }
.stores { display: flex; gap: 6px; flex-wrap: wrap; }
.store { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--card);
  border-radius: 999px; padding: 5px 11px 5px 9px; font-size: 13.5px; font-weight: 500; }
.store i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.store.off { opacity: .45; background: none; }
.store .warn { color: var(--cut); font-weight: 700; }
.tools { display: flex; gap: 12px; align-items: center; }
.chk { display: inline-flex; gap: 7px; align-items: center; font-size: 14px; }
.chk input { width: 17px; height: 17px; accent-color: var(--good); }
.sel select { background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: 14px; }

/* ---------- sections ---------- */
.sec { margin: 4px 0 30px; }
.sec-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.sec-head img { width: 40px; height: 40px; }
.sec-head h2 { font: 600 19px/1.2 var(--display); letter-spacing: -.3px; margin: 0; }
.sec-head .ct { color: var(--muted); font-size: 14px; }
.sec-head .all { margin-left: auto; border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 6px 13px; font-size: 14px; font-weight: 500; white-space: nowrap; }
.title { font: 600 22px/1.2 var(--display); letter-spacing: -.4px; margin: 2px 0 16px; display: flex; align-items: center; gap: 12px; }
.title img { width: 44px; height: 44px; }
.title small { font: 400 14px var(--body); color: var(--muted); letter-spacing: 0; }

.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.strip { display: grid; gap: 12px; grid-auto-flow: column; grid-auto-columns: minmax(290px, 1fr); overflow-x: auto;
  scroll-snap-type: x mandatory; padding-bottom: 6px; scrollbar-width: thin; }
.strip > * { scroll-snap-align: start; }
.grid { align-items: start; }
.card { display: flex; flex-direction: column; }
.card > .foot-chips { padding-top: 10px; }
.rows { margin-bottom: 2px; }
@media (min-width: 900px) { .strip { grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); overflow: visible; } }

/* ---------- compare card ---------- */
.card { background: var(--card); border-radius: var(--r-card); padding: 14px; position: relative; border: 1px solid var(--line); }
.card-top { display: grid; grid-template-columns: 56px 1fr; gap: 12px; align-items: center; margin-bottom: 8px; padding-right: 30px; }
.pic { width: 56px; height: 56px; border-radius: 16px; background: var(--tint); display: grid; place-items: center; overflow: hidden; }
.pic img { width: 40px; height: 40px; object-fit: contain; }
.pic.photo { background: #fff; }
.pic.photo img { width: 52px; height: 52px; }
.card h3 { font-size: 15.5px; font-weight: 700; line-height: 1.3; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .size { color: var(--muted); font-size: 13px; margin-top: 2px; }
.star { position: absolute; top: 10px; right: 10px; border: 0; background: none; padding: 6px; border-radius: 999px; color: var(--line); line-height: 0; }
.star svg { width: 22px; height: 22px; }
.star:hover { color: var(--muted); }
.star.on, .star.on:hover { color: #e6b400; }

.row { display: grid; grid-template-columns: 96px 1fr auto; min-height: 50px; gap: 10px; align-items: center; padding: 9px 2px; color: inherit; text-decoration: none; border-top: 1px solid var(--line); }
.row:first-child { border-top: 0; }
.tag { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.tag i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; flex: none; }
.lidl i { background: var(--lidl); } .kaufland i { background: var(--kaufland); } .dm i { background: var(--dm); }
.billa i { background: var(--billa); } .fantastico i { background: var(--fantastico); }
.row .what { min-width: 0; font-size: 12.5px; color: var(--muted); line-height: 1.3; }
.row .what span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .what span + span { margin-top: 2px; }
.flag { font-style: normal; font-weight: 700; font-size: 11.5px; color: var(--sticker-ink); background: color-mix(in srgb, var(--sticker) 55%, transparent); border-radius: 5px; padding: 1px 5px; margin-right: 4px; }
.flag.bad { background: color-mix(in srgb, var(--cut) 14%, transparent); color: var(--cut); }
.promo { color: var(--cut); }
@media (prefers-color-scheme: dark) { .flag { color: var(--ink); background: color-mix(in srgb, var(--sticker) 28%, transparent); } }
.price { text-align: right; white-space: nowrap; line-height: 1.1; color: inherit; text-decoration: none; }
.price b { font: 800 17px/1 var(--display); letter-spacing: -.5px; }
.price s { display: block; color: var(--muted); font-size: 12px; margin-bottom: 3px; }
.price .per { display: block; color: var(--muted); font-size: 11.5px; margin-top: 4px; }

/* variants folded under a store row */
.srow + .srow { border-top: 1px solid var(--line); }
.srow .row { border-top: 0; }
.more-v { border: 0; background: none; color: var(--muted); font-size: 12.5px; padding: 0 2px 8px; margin-top: -4px; text-decoration: underline; text-underline-offset: 3px; }
.more-v:hover { color: var(--ink); }
.variants { display: grid; gap: 2px; margin: 0 0 10px; padding: 6px 10px; background: var(--tint); border-radius: 12px; }
.variant { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; color: inherit; text-decoration: none; font-size: 13px; }
.variant + .variant { border-top: 1px dashed var(--line); }
.variant em { font-style: normal; color: var(--muted); }
.vp { text-align: right; white-space: nowrap; font-weight: 700; }
.vp small { display: block; font-weight: 400; color: var(--muted); font-size: 11.5px; }

/* the sticker: cheapest price in a card */
.row.best .price b, .price.promo b { display: inline-block; background: var(--sticker); color: var(--sticker-ink); padding: 6px 9px 5px;
  border-radius: 6px 12px 6px 6px; transform: rotate(-2.5deg); box-shadow: 0 2px 0 rgba(0, 0, 0, .12); font-size: 18px; }

.foot-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: 12px; border-radius: 999px; padding: 3px 9px; background: var(--tint); color: var(--muted); font-weight: 500; }
.chip.save { background: color-mix(in srgb, var(--good) 14%, transparent); color: var(--good); font-weight: 700; }
.chip.warn { background: color-mix(in srgb, var(--cut) 12%, transparent); color: var(--cut); }
.chip.soft { background: none; border: 1px dashed var(--line); }
.chip.cardp { background: color-mix(in srgb, var(--sticker) 45%, transparent); color: var(--ink); }
.note { color: var(--cut); font-weight: 500; }

/* ---------- product card ---------- */
.prod { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center; padding-right: 30px; flex: 1; }
.prod .price { min-width: 84px; }
.prod .meta { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; margin-top: 4px; font-size: 12.5px; color: var(--muted); }
.off-badge { color: var(--cut); font: 800 12px var(--display); }

/* ---------- coupons ---------- */
.connect { margin-top: 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); padding: 22px; max-width: 660px; }
.connect h2 { font: 600 21px/1.25 var(--display); margin: 0 0 8px; letter-spacing: -.3px; }
.connect ol { padding-left: 20px; margin: 14px 0; }
.connect li { margin: 8px 0; }
.connect code { background: var(--tint); padding: 1px 6px; border-radius: 6px; font-size: 13px; }
.btn { border: 0; background: var(--ink); color: var(--card); border-radius: 999px; padding: 11px 18px; font-weight: 700; }
.btn.ghost { background: none; color: var(--ink); border: 1px solid var(--line); }
.btn.small { padding: 7px 13px; font-size: 13.5px; }
.paste { display: flex; gap: 8px; margin-top: 12px; }
.paste input { flex: 1; min-width: 0; border: 1px solid var(--line); background: var(--shelf); border-radius: 12px; padding: 11px 12px; }
.err { color: var(--cut); font-size: 14px; margin-top: 10px; }
.coupon { display: grid; grid-template-columns: 64px 1fr; gap: 12px; align-items: start; }
.coupon .pic { width: 64px; height: 64px; background: #fff; }
.coupon .pic img { width: 60px; height: 60px; }
.coupon .deal { font: 800 18px/1.15 var(--display); letter-spacing: -.4px; }
.coupon .desc { font-size: 13.5px; margin: 3px 0; }
.coupon .when { font-size: 12.5px; color: var(--muted); }
.coupon .act { margin-top: 10px; }
.coupon.active { border-color: var(--good); }
.coupon.active .act .btn { background: var(--good); color: #fff; }
.cbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 14px; }

/* ---------- list & empty ---------- */
.empty { text-align: center; padding: 44px 16px; color: var(--muted); max-width: 520px; margin: 0 auto; }
.empty img { width: 72px; height: 72px; margin: 0 auto 14px; }
.empty p { margin: 0 0 16px; }
.watch { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 18px; }
.watch .chip { display: inline-flex; gap: 4px; align-items: center; font-size: 14px; padding: 6px 6px 6px 12px; background: var(--card); border: 1px solid var(--line); color: var(--ink); }
.watch .chip button { border: 0; background: none; color: var(--muted); padding: 0 6px; font-size: 16px; line-height: 1; }
.more { display: block; margin: 20px auto 0; }
.foot { color: var(--muted); font-size: 12px; padding-top: 10px; padding-bottom: 40px; text-align: center; }


/* ---------- deals ("удари") ---------- */
.kinds { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 18px; }
.kinds button { border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 999px; padding: 7px 13px; font-weight: 500; font-size: 14px; }
.kinds button .n { margin-left: 6px; color: var(--muted); font-size: 12.5px; }
.kinds button[aria-pressed="true"] { background: var(--ink); color: var(--shelf); border-color: var(--ink); }
.kinds button[aria-pressed="true"] .n { color: inherit; opacity: .7; }
.card.deal { padding-top: 16px; }
.deal .card-top { margin-bottom: 12px; }
.deal .size { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 4px; }
/* the shelf-edge sticker: what the deal is, in two or three characters */
.dsticker { position: absolute; left: 8px; top: 8px; z-index: 1; width: 66px; display: flex; flex-direction: column; align-items: center;
  background: var(--sticker); color: var(--sticker-ink); font: 800 17px/1 var(--display); letter-spacing: -.6px;
  padding: 7px 2px 6px; border-radius: 10px 16px 10px 10px; transform: rotate(-6deg); box-shadow: 0 2px 0 rgba(0, 0, 0, .14); white-space: nowrap; }
.dsticker small { font: 700 10px/1.1 var(--body, inherit); letter-spacing: 0; margin-top: 3px; }
.deal .card-top { grid-template-columns: 66px 1fr; }
.deal .card-top .pic { width: 66px; height: 66px; margin-top: 22px; }
.dprice { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; color: inherit; text-decoration: none; }
.dprice b { font: 800 26px/1 var(--display); letter-spacing: -1px; color: var(--cut); }
.dprice s { color: var(--muted); font-size: 14px; }
.dprice span { flex-basis: 100%; color: var(--muted); font-size: 13px; }
.spark { margin: 12px 0 0; }
.spark svg { display: block; width: 100%; height: 44px; overflow: visible; }
.spark .line { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; opacity: .75; }
.spark .usual { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 4; vector-effect: non-scaling-stroke; }
.spark .now { fill: var(--cut); stroke: var(--card); stroke-width: 2; vector-effect: non-scaling-stroke; }
.spark figcaption { display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; margin-top: 3px; }
.deal .foot-chips { padding-top: 12px; }
.deal .more-v { margin: 10px 0 0; padding: 0; text-align: left; }
.deal .variants { margin: 8px 0 0; }
.legend { max-width: 70ch; margin-top: 4px; }
.tabs .short { display: none; }

/* ---------- phone ---------- */
@media (max-width: 760px) {
  /* a blurred sticky header would trap the fixed tab bar inside it, and eats half a phone screen */
  .top { position: static; backdrop-filter: none; background: var(--shelf); }
  .bar { gap: 10px; }
  .sec-head { flex-wrap: nowrap; }
  .sec-head h2 { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .sec-head img { width: 32px; height: 32px; }
  .sec-head .all .n { display: none; }
  .rail { scroll-padding-left: 16px; }
  .stores { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; width: 100%; }
  .stores::-webkit-scrollbar { display: none; }
  .store { flex: none; }
  /* store + name stacked on the left, price on the right */
  .row { grid-template-columns: 1fr auto; grid-template-areas: "tag price" "what price"; row-gap: 2px; }
  .row .tag { grid-area: tag; }
  .row .what { grid-area: what; }
  .row .price { grid-area: price; }
  .sec-head h2 { font-size: 17px; }
  .sec-head .ct { font-size: 13px; }
  .title { font-size: 19px; }
  .tabs { position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 30; margin: 0;
    background: var(--ink); border-radius: 22px; padding: 6px; justify-content: space-between; box-shadow: 0 10px 30px rgba(10, 20, 14, .3); }
  .tabs button { flex: 1; color: color-mix(in srgb, var(--shelf) 72%, transparent); padding: 10px 2px; font-size: 13px; }
  .tabs .long { display: none; }
  .tabs .short { display: inline; }
  .dsec .sec-head .ct { display: none; }
  .kinds { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-right: -16px; padding-right: 16px; }
  .kinds button { flex: none; }
  .dprice b { font-size: 24px; }
  .tabs button.on { background: var(--shelf); color: var(--ink); }
  .badge:not(:empty) { margin-left: 4px; padding: 0 5px; font-size: 11px; }
  .bar .gear { margin-left: auto; }
  .grid { grid-template-columns: 1fr; gap: 10px; }
  .sec { margin-bottom: 24px; }
  .sec-head .all { padding: 5px 11px; font-size: 13px; }
  .card { padding: 12px; }
  .prod { grid-template-columns: 48px 1fr auto; gap: 10px; }
  .prod .pic { width: 48px; height: 48px; border-radius: 13px; }
  .prod .pic img { width: 34px; height: 34px; }
  .prod h3 { font-size: 14.5px; }
  .tools { width: 100%; justify-content: space-between; }
  .shelf { width: 76px; }
  .foot { padding-bottom: 110px; }
  main { padding-bottom: 20px; }
}

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } .row.best .price b, .price.promo b, .dsticker { transform: none; } }
