@font-face { font-family: "Unbounded"; font-weight: 600; font-display: swap; src: url(fonts/unbounded-cyrillic-600-normal.woff2) format("woff2"); unicode-range: U+0301, 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+2000-206F; }
@font-face { font-family: "Unbounded"; font-weight: 700; font-display: swap; src: url(fonts/unbounded-cyrillic-700-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Unbounded"; font-weight: 700; font-display: swap; src: url(fonts/unbounded-latin-700-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+2000-206F; }
@font-face { font-family: "Golos"; font-weight: 400; font-display: swap; src: url(fonts/golos-text-cyrillic-400-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Golos"; font-weight: 400; font-display: swap; src: url(fonts/golos-text-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+2000-206F; }
@font-face { font-family: "Golos"; font-weight: 600; font-display: swap; src: url(fonts/golos-text-cyrillic-600-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Golos"; font-weight: 600; font-display: swap; src: url(fonts/golos-text-latin-600-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+2000-206F; }

:root {
  --bg: #17110D;        /* обжаренное зерно */
  --surface: #241A14;   /* тёмная обжарка */
  --raised: #33251C;
  --line: rgba(217, 195, 165, .16);
  --crema: #D9C3A5;     /* крема — акцент */
  --text: #FFFFFF;
  --text-2: #CDBBA6;
  --stable: #A8C49A;
  --dip: #E6A55B;
  --new: #B7C3D1;
  --display: "Unbounded", "Roboto", sans-serif;
  --body: "Golos", "Roboto", sans-serif;
  --tab-h: 66px;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font: 400 16px/1.45 var(--body); -webkit-tap-highlight-color: transparent; min-height: 100vh; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--crema); outline-offset: 2px; }
.muted { color: var(--text-2); }
.small { font-size: 14px; }

main { padding: calc(env(safe-area-inset-top) + 8px) 18px calc(var(--tab-h) + env(safe-area-inset-bottom) + 90px); max-width: 640px; margin: 0 auto; outline: none; }
h1 { font: 700 26px/1.12 var(--display); letter-spacing: -0.02em; margin: 10px 0 6px; }
h2 { font: 600 17px/1.25 var(--display); letter-spacing: -0.01em; margin: 32px 0 12px; }
p { margin: 0 0 10px; }

/* Главная */
.home-head { display: flex; justify-content: space-between; align-items: center; padding-top: 6px; }
.logo { font: 600 14px/1.2 var(--display); color: var(--crema); }
.demo { font-size: 12px; color: var(--text-2); border: 1px solid var(--line); border-radius: 999px; padding: 2px 9px; }
.scan-hero {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 14px;
  margin-top: 16px; padding: 20px; border-radius: 22px; text-decoration: none;
  background: var(--crema); color: var(--bg);
}
.scan-hero b { display: block; font: 700 21px/1.15 var(--display); letter-spacing: -0.02em; }
.scan-hero span { font-size: 14px; }
.scan-hero svg { width: 54px; height: 54px; fill: var(--bg); }
.search { width: 100%; margin-top: 14px; padding: 13px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); }
.search::placeholder { color: var(--text-2); }

.shelf { display: flex; gap: 12px; overflow-x: auto; margin: 0 -18px; padding: 2px 18px 6px; scroll-snap-type: x mandatory; scroll-padding-left: 18px; scrollbar-width: none; }
.shelf::-webkit-scrollbar { display: none; }
.tile { flex: none; width: 150px; scroll-snap-align: start; text-decoration: none; }
.tile .art { background: var(--surface); border-radius: 18px; padding: 12px 18px 8px; height: 170px; display: grid; place-items: center; }
.tile .art svg { height: 150px; width: auto; }
.tile .t-name { font-weight: 600; font-size: 14px; line-height: 1.25; margin-top: 8px; }
.tile .t-meta { font-size: 13px; color: var(--text-2); }
.match { color: var(--crema); font-weight: 600; }
.section-sub { margin: -6px 0 12px; font-size: 14px; color: var(--text-2); }

.chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 8px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; border: 1px solid var(--line); background: transparent; border-radius: 999px; padding: 7px 13px; font-size: 14px; cursor: pointer; color: var(--text); }
.chip[aria-pressed="true"] { background: var(--crema); color: var(--bg); border-color: var(--crema); }

.list { list-style: none; margin: 0; padding: 0; }
.row { display: grid; grid-template-columns: 56px 1fr auto; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.row .thumb { width: 56px; height: 72px; display: grid; place-items: center; background: var(--surface); border-radius: 12px; }
.row .thumb svg { height: 62px; width: auto; }
.row-name { font-weight: 600; line-height: 1.25; display: block; }
.row-sub { font-size: 13px; color: var(--text-2); display: block; margin-top: 2px; }
.row-side { text-align: right; }
.score { font: 700 22px/1 var(--display); letter-spacing: -0.02em; }
.score.prelim { color: var(--text-2); }
.count { display: block; font-size: 12px; color: var(--text-2); margin-top: 4px; }

.badge { display: inline-block; margin-top: 6px; margin-right: 4px; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 6px; }
.badge.stable { color: var(--stable); background: rgba(168, 196, 154, .12); }
.badge.dip { color: var(--dip); background: rgba(230, 165, 91, .13); }
.badge.new { color: var(--new); background: rgba(183, 195, 209, .12); }
.badge.relaunch { color: var(--dip); border: 1px solid rgba(230, 165, 91, .45); }

/* Карточка продукта */
.p-top { display: flex; justify-content: space-between; align-items: center; padding-top: 4px; }
.icon-btn { background: var(--surface); border: 0; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; text-decoration: none; }
.icon-btn svg { width: 22px; height: 22px; fill: var(--text); }
.icon-btn[aria-pressed="true"] { background: var(--crema); }
.icon-btn[aria-pressed="true"] svg { fill: var(--bg); }
.p-hero { position: relative; display: grid; place-items: center; height: 300px; margin: 6px -18px 0; overflow: hidden; }
.p-hero::before { content: ""; position: absolute; width: 330px; height: 330px; border-radius: 50%; background: radial-gradient(circle, #3A2A1F 0 58%, #2A1E17 58% 72%, transparent 72%); top: -10px; }
.p-hero svg { position: relative; height: 270px; width: auto; filter: drop-shadow(0 18px 24px rgba(0, 0, 0, .45)); }
.p-maker { color: var(--crema); font-size: 15px; margin-top: 8px; }
.p-name { font: 700 28px/1.1 var(--display); letter-spacing: -0.02em; margin: 4px 0 4px; }
.p-origin { color: var(--text-2); font-size: 15px; }

.verdict { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: center; margin-top: 18px; padding: 16px; border-radius: 18px; background: var(--surface); }
.verdict .big { font: 700 50px/0.9 var(--display); letter-spacing: -0.04em; }
.verdict .big.prelim { color: var(--text-2); }
.stars-row { display: flex; gap: 2px; }
.stars-row svg { width: 16px; height: 16px; }
.verdict-meta { font-size: 14px; color: var(--text-2); margin-top: 4px; }
.verdict-match { margin-top: 6px; font-size: 14px; }
.status-note { font-size: 14px; color: var(--text-2); margin: 10px 2px 0; }

.stats3 { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 12px; border: 1px solid var(--line); border-radius: 16px; }
.stats3 div { padding: 12px; }
.stats3 div + div { border-left: 1px solid var(--line); }
.stats3 dt { font-size: 12px; color: var(--text-2); }
.stats3 dd { margin: 2px 0 0; font: 600 15px/1.2 var(--display); }

.buy { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; margin-top: 12px; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--line); }
.buy .price { font: 600 19px var(--display); }
.ad-label { font-size: 12px; color: var(--text-2); }

.btn { display: block; width: 100%; text-align: center; text-decoration: none; cursor: pointer; padding: 14px 18px; border-radius: 14px; border: 1px solid var(--crema); background: transparent; color: var(--text); font-weight: 600; }
.btn.primary { background: var(--crema); color: var(--bg); }
.btn.compact { width: auto; padding: 10px 16px; }
.btn:disabled { opacity: .4; }
.stack { display: grid; gap: 10px; margin-top: 18px; }

/* Разбор вкуса */
.expert { background: var(--surface); border-radius: 20px; padding: 18px; }
.expert-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.sca { text-align: right; }
.sca b { display: block; font: 700 30px/1 var(--display); color: var(--crema); }
.sca span { font-size: 12px; color: var(--text-2); }
.radar { display: block; width: 100%; max-width: 360px; margin: 10px auto 0; height: auto; }
.radar text { font-family: var(--body); font-size: 11px; fill: var(--text-2); }
.legend { display: flex; gap: 16px; justify-content: center; font-size: 13px; color: var(--text-2); margin-top: 4px; }
.legend i { display: inline-block; width: 12px; height: 3px; vertical-align: middle; margin-right: 6px; border-radius: 2px; }
.wheel { list-style: none; padding: 0; margin: 14px 0 0; }
.wheel li { display: grid; grid-template-columns: 110px 1fr; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 15px; }
.wheel li span:first-child { color: var(--text-2); }

.scale { margin-top: 14px; }
.scale-row { display: grid; grid-template-columns: 76px 1fr 76px; gap: 10px; align-items: center; font-size: 13px; color: var(--text-2); padding: 7px 0; }
.scale-row span:last-child { text-align: right; }
.track { position: relative; height: 8px; border-radius: 4px; background: var(--raised); }
.track i { position: absolute; top: 50%; width: 30%; height: 8px; border-radius: 4px; background: var(--crema); transform: translate(-50%, -50%); }
.notes-bars { list-style: none; margin: 12px 0 0; padding: 0; }
.notes-bars li { display: grid; grid-template-columns: 96px 1fr 44px; gap: 10px; align-items: center; font-size: 14px; padding: 5px 0; }
.notes-bars .bar { height: 6px; border-radius: 3px; background: var(--raised); overflow: hidden; }
.notes-bars .bar i { display: block; height: 100%; background: var(--crema); }
.notes-bars li span:last-child { text-align: right; color: var(--text-2); }

.pairs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pair { background: var(--surface); border-radius: 16px; padding: 14px; }
.pair.wide { grid-column: 1 / -1; }
.pair h3 { margin: 0 0 4px; font: 600 14px/1.2 var(--display); color: var(--crema); }
.pair p { margin: 0; font-size: 14px; }
.milk-level { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 6px; margin-bottom: 6px; }
.milk-level.great { color: var(--stable); background: rgba(168, 196, 154, .12); }
.milk-level.good { color: var(--crema); background: rgba(217, 195, 165, .12); }
.milk-level.avoid { color: var(--dip); background: rgba(230, 165, 91, .13); }
.brew { list-style: none; padding: 0; margin: 0; }
.brew li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.brew b { display: block; }

.chart { width: 100%; height: auto; display: block; }
.chart text { font-family: var(--body); font-size: 10px; fill: var(--text-2); }
.batches { list-style: none; padding: 0; margin: 6px 0 0; }
.batch { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.batch .b-score { font: 600 18px var(--display); white-space: nowrap; }
.batch .b-score.dip { color: var(--dip); }
.batch .b-score.prelim { color: var(--text-2); }
.kv { display: flex; justify-content: space-between; padding: 6px 0; font-size: 15px; }
.panel { background: var(--surface); border-radius: 16px; padding: 14px 16px; }

/* Сравнение */
.compare-tray { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--tab-h) + env(safe-area-inset-bottom) + 12px); z-index: 7; display: flex; gap: 10px; align-items: center; padding: 8px 8px 8px 16px; border-radius: 999px; background: var(--crema); color: var(--bg); font-weight: 600; font-size: 14px; text-decoration: none; box-shadow: 0 8px 24px rgba(0, 0, 0, .4); }
.compare-tray span { background: var(--bg); color: var(--crema); border-radius: 999px; padding: 6px 12px; }
.cmp { display: grid; gap: 8px; margin-top: 12px; }
.cmp-row { display: grid; gap: 8px; align-items: center; }
.cmp-cell { background: var(--surface); border-radius: 12px; padding: 10px; font-size: 14px; text-align: center; min-width: 0; }
.cmp-cell svg { height: 90px; width: auto; }
.cmp-label { font-size: 12px; color: var(--text-2); margin: 10px 0 -2px; }
.cmp-cell .best { color: var(--crema); font-weight: 600; }

/* Скан */
.scanner { position: relative; margin-top: 14px; aspect-ratio: 3 / 4; background: #000; border-radius: 22px; overflow: hidden; }
.scanner video { width: 100%; height: 100%; object-fit: cover; display: block; }
.scanner .frame { position: absolute; inset: 22% 16%; border: 3px solid var(--crema); border-radius: 18px; box-shadow: 0 0 0 999px rgba(23, 17, 13, .5); }
.scanner .scan-msg { position: absolute; left: 0; right: 0; bottom: 14px; text-align: center; font-size: 14px; padding: 0 16px; }
.field { display: grid; gap: 6px; margin-top: 16px; }
.field[hidden] { display: none; }
.field label, .field .label { font-size: 14px; font-weight: 600; }
.input { width: 100%; padding: 13px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.input::placeholder { color: var(--text-2); }
textarea.input { min-height: 88px; resize: vertical; }
select.input option { background: var(--surface); }
input[type="range"] { width: 100%; accent-color: var(--crema); }

/* Оценка */
.verified { color: var(--stable); font-weight: 600; font-size: 14px; margin-top: 6px; }
.stars { display: flex; gap: 6px; }
.star { width: 52px; height: 52px; padding: 0; border: 0; background: none; cursor: pointer; }
.star svg { width: 100%; height: 100%; display: block; }
.score-read { font: 700 22px var(--display); min-height: 28px; color: var(--crema); }
.notes { display: flex; flex-wrap: wrap; gap: 8px; }
.slider-row { display: grid; grid-template-columns: 1fr; gap: 2px; margin-top: 8px; }
.slider-ends { display: flex; justify-content: space-between; font-size: 13px; color: var(--text-2); }

/* Профиль вкуса */
.me-card { background: var(--crema); color: var(--bg); border-radius: 22px; padding: 18px; margin-top: 14px; }
.me-card h2 { margin: 0 0 6px; }
.me-card .scale-row { color: rgba(23, 17, 13, .75); }
.me-card .track { background: rgba(23, 17, 13, .15); }
.me-card .track i { background: var(--bg); }
.mine { list-style: none; padding: 0; margin: 0; }
.mine li { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.mine svg { height: 54px; width: auto; }
.explain { padding-left: 18px; margin: 0; }
.explain li { margin-bottom: 8px; }

/* Навигация и слои */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; display: grid; grid-template-columns: repeat(4, 1fr); height: calc(var(--tab-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: #120D0A; border-top: 1px solid var(--line); }
.tab { display: grid; place-items: center; align-content: center; gap: 2px; text-decoration: none; font-size: 12px; color: var(--text-2); }
.tab svg { width: 24px; height: 24px; fill: currentColor; }
.tab.active { color: var(--text); font-weight: 600; }
.tab-scan svg { width: 34px; height: 34px; padding: 6px; border-radius: 50%; background: var(--crema); fill: var(--bg); }
.tab-scan.active { color: var(--crema); }
.toast { position: fixed; left: 50%; bottom: calc(var(--tab-h) + env(safe-area-inset-bottom) + 84px); transform: translate(-50%, 10px); background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 11; max-width: 90vw; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.sheet-wrap { position: fixed; inset: 0; z-index: 10; background: rgba(0, 0, 0, .6); display: flex; align-items: flex-end; }
.sheet-wrap[hidden] { display: none; }
.sheet { width: 100%; max-width: 640px; max-height: 88vh; overflow-y: auto; margin: 0 auto; background: var(--surface); border-radius: 22px 22px 0 0; padding: 22px 18px calc(22px + env(safe-area-inset-bottom)); }
.sheet h2 { margin-top: 0; }
/* Кофейни */
.map-box { position: relative; margin: 14px -18px 0; background: var(--surface); }
.scheme { display: block; width: 100%; height: auto; }
.scheme text { font: 700 12px var(--display); }
.scheme .pin { cursor: pointer; }
.scheme text.you { font: 600 11px var(--body); fill: #B7C3D1; }
.nowrap { white-space: nowrap; }
.scheme .pin:focus { outline: none; }
.scheme .pin:focus-visible path { stroke: var(--crema); stroke-width: 3; }
.ymap { width: 100%; height: 340px; }
.map-note { font-size: 12px; color: var(--text-2); padding: 8px 18px 10px; border-bottom: 1px solid var(--line); }
.ypin { position: absolute; transform: translate(-50%, -100%); min-width: 44px; padding: 5px 8px; border-radius: 8px; background: #D9C3A5; color: #17110D; font: 700 12px/1 "Unbounded", sans-serif; text-align: center; border: 1.5px solid #17110D; white-space: nowrap; }
.ypin::after { content: ""; position: absolute; left: 50%; bottom: -7px; margin-left: -6px; border: 6px solid transparent; border-top-color: #17110D; border-bottom: 0; }
.ypin.prelim { background: #33251C; color: #CDBBA6; }
.ypin.on { background: #FFFFFF; }
.filter-product { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 10px; padding: 10px 14px; border-radius: 12px; background: var(--surface); font-size: 14px; }
.link-btn { color: var(--crema); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.cafe-preview { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; margin-top: 12px; padding: 14px 16px; border-radius: 16px; background: var(--crema); color: var(--bg); text-decoration: none; }
.cafe-preview > span:first-child { display: grid; gap: 2px; }
.cafe-preview .muted, .cafe-preview .count { color: rgba(23, 17, 13, .7); }
.cafe-preview .score.prelim { color: rgba(23, 17, 13, .6); }
.cafe-row { display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.cafe-row.on .row-name { color: var(--crema); }
.tag { display: inline-block; margin: 6px 4px 0 0; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 6px; }
.tag.cup { color: var(--crema); background: rgba(217, 195, 165, .13); }
.tag.pack { color: var(--new); background: rgba(183, 195, 209, .12); }
.tag.good { color: var(--stable); background: rgba(168, 196, 154, .12); }
.tag.bad { color: var(--dip); background: rgba(230, 165, 91, .13); }
.stats3.two { grid-template-columns: repeat(2, 1fr); }
.stats3 dd + .small { display: block; font-size: 11px; margin-top: 2px; }
.cafe-links { list-style: none; margin: 0; padding: 0; }
.cafe-links li { display: grid; grid-template-columns: 52px 1fr auto; gap: 12px; align-items: start; padding: 14px 0; border-bottom: 1px solid var(--line); }
.cl-art { display: grid; place-items: center; height: 68px; background: var(--surface); border-radius: 12px; }
.cl-art svg { height: 58px; width: auto; }
.cl-name { font-weight: 600; line-height: 1.25; text-decoration: none; }
.confirm { font-size: 12px; color: var(--stable); margin-top: 6px; }
.cl-scores { display: grid; grid-template-columns: auto auto; gap: 2px 12px; text-align: center; }
.cl-scores b { display: block; font: 700 18px/1 var(--display); }
.cl-scores i { font-style: normal; font-size: 11px; color: var(--text-2); }
.cl-scores .worse { color: var(--dip); }
.cl-verdict { grid-column: 1 / -1; font-size: 11px; color: var(--text-2); max-width: 104px; line-height: 1.2; margin-top: 4px; }
.cl-verdict.worse { color: var(--dip); }
.cafe-links .hold { grid-column: 2 / -1; justify-self: start; margin-top: 2px; }
.cups { list-style: none; margin: 0; padding: 0; }
.cups li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.cups p { margin: 6px 0 0; }
.cup-head { display: flex; justify-content: space-between; gap: 10px; }
.reply { margin-top: 10px; padding: 10px 12px; border-left: 3px solid var(--crema); background: var(--surface); border-radius: 0 10px 10px 0; font-size: 14px; }
.reply p { margin: 2px 0 0; }
.visit { display: grid; gap: 10px; margin-top: 16px; padding: 14px 16px; border-radius: 16px; border: 1px dashed rgba(217, 195, 165, .45); }
.visit-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.field.optional { padding: 12px 14px; border-radius: 14px; background: var(--surface); }
.stars { align-items: center; }
.star-read { font: 700 20px var(--display); color: var(--crema); margin-left: 8px; }
.toggle { display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: center; cursor: pointer; }
.toggle > span { display: grid; gap: 2px; }
.toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.toggle i { width: 50px; height: 30px; border-radius: 999px; background: var(--raised); position: relative; transition: background .2s; }
.toggle i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: var(--text-2); transition: transform .2s, background .2s; }
.toggle input:checked + i { background: var(--crema); }
.toggle input:checked + i::after { transform: translateX(20px); background: var(--bg); }
.toggle input:focus-visible + i { outline: 2px solid var(--crema); outline-offset: 2px; }

/* 0.4: бренд, аккаунт, уведомления, кабинеты */
.brand { display: flex; align-items: center; gap: 8px; }
.brand svg { flex: none; border-radius: 8px; }
.bell { position: relative; width: 42px; height: 42px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; text-decoration: none; }
.bell svg { width: 22px; height: 22px; fill: var(--text); }
.bell i, .count-dot { font-style: normal; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--dip); color: var(--bg); font: 700 11px/18px var(--body); text-align: center; }
.bell i { position: absolute; top: -2px; right: -2px; }
.push { position: fixed; left: 10px; right: 10px; top: calc(env(safe-area-inset-top) + 10px); z-index: 20; display: grid; grid-template-columns: 34px 1fr; gap: 10px; align-items: start; padding: 12px 14px; border-radius: 18px; background: #F3EADF; color: #17110D; text-decoration: none; box-shadow: 0 12px 32px rgba(0, 0, 0, .5); transform: translateY(-140%); transition: transform .3s; max-width: 620px; margin: 0 auto; }
.push.show { transform: translateY(0); }
.push svg { border-radius: 8px; display: block; }
.push > span:last-child { display: grid; gap: 1px; font-size: 14px; line-height: 1.3; }
.push-app { font-size: 12px; color: rgba(23, 17, 13, .6); }
.acc-card { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; margin-top: 14px; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--line); text-decoration: none; }
.acc-card > span:first-child { display: grid; gap: 2px; }
.link-list { display: grid; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.link-list a { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 16px; text-decoration: none; }
.link-list a + a { border-top: 1px solid var(--line); }
.link-list a::after { content: "›"; color: var(--text-2); font-size: 22px; line-height: 1; margin-left: auto; }
.link-list .count-dot { margin-left: auto; }
.link-list .count-dot + ::after { margin-left: 8px; }
.login-logo { margin-top: 12px; }
.login-logo svg { border-radius: 16px; display: block; }
.check { display: grid; grid-template-columns: 24px 1fr; gap: 10px; align-items: start; margin-top: 14px; font-size: 14px; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--crema); }
.inline-link { background: none; border: 0; padding: 0; color: var(--crema); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-size: inherit; text-align: left; }
.center { text-align: center; }
.sso { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; margin-top: 10px; }
.sso .btn { padding: 12px 8px; font-size: 14px; }
.btn.danger { border-color: var(--dip); color: var(--dip); }
.btn.ghost { border-color: var(--line); color: var(--text-2); }
.stack-tight { display: grid; gap: 16px; }
h3.sub { font: 600 15px var(--display); margin: 18px 0 8px; }
.warn { color: var(--dip); }
.good { color: var(--stable); }
.inbox, .posts, .mod { list-style: none; margin: 0; padding: 0; }
.inbox a { display: grid; gap: 3px; padding: 14px 0 14px 14px; border-bottom: 1px solid var(--line); text-decoration: none; position: relative; }
.inbox a.unread::before { content: ""; position: absolute; left: 0; top: 20px; width: 7px; height: 7px; border-radius: 50%; background: var(--dip); }
.inbox a span:not(.muted) { font-size: 15px; }
.posts li, .mod li { padding: 14px 0; border-bottom: 1px solid var(--line); }
.posts p, .mod p { margin: 6px 0 0; }
.biz-top { display: flex; justify-content: space-between; align-items: center; padding-top: 4px; }
.biz-role { color: var(--crema); font-size: 14px; margin-top: 12px; }
.biz-nav { margin: 8px -18px 6px; padding: 4px 18px 8px; }
.biz-nav .chip { text-decoration: none; }
.biz-nav .chip[aria-selected="true"] { background: var(--crema); color: var(--bg); border-color: var(--crema); }
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0 0; }
.kpis div { background: var(--surface); border-radius: 14px; padding: 12px; min-width: 0; }
.kpis dt { font-size: 12px; color: var(--text-2); }
.kpis dd { margin: 4px 0 2px; font: 700 18px/1.15 var(--display); overflow-wrap: anywhere; }
.kpis .small { font-size: 12px; display: block; line-height: 1.3; }
.bars { width: 100%; height: auto; display: block; }
.bars text { font: 10px var(--body); fill: var(--text-2); }
.biz-list { list-style: none; margin: 0; padding: 0; }
.biz-list > li { display: grid; grid-template-columns: 56px 1fr; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.biz-list.plain > li { grid-template-columns: 1fr auto; align-items: start; }
.biz-list .thumb { width: 56px; height: 72px; display: grid; place-items: center; background: var(--surface); border-radius: 12px; }
.biz-list .thumb svg { height: 62px; width: auto; }
.biz-list .kpis { grid-template-columns: repeat(3, 1fr); gap: 6px; }
.biz-list .kpis div { padding: 8px; }
.biz-list .kpis dd { font-size: 15px; }
.tariffs { display: grid; gap: 10px; margin-top: 12px; }
.tariff { border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px; }
.tariff.on { border-color: var(--crema); background: var(--surface); }
.t-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.t-head b { font: 700 17px var(--display); }
.t-head .tag { margin: 0; }
.t-price { font: 700 22px var(--display); margin: 6px 0 2px; }
.t-price span { font: 400 14px var(--body); color: var(--text-2); }
.tariff p { margin: 4px 0 8px; }
.tariff .btn { margin-top: 10px; }
.calc { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.calc .field label { font-size: 13px; font-weight: 400; color: var(--text-2); min-height: 34px; }
#calcOut { margin-top: 14px; }
.cup-attr { display: grid; grid-template-columns: 118px 1fr 44px; gap: 10px; align-items: center; font-size: 14px; }
.cup-attr b { text-align: right; font-family: var(--display); font-size: 14px; }
.cup-total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 18px; padding: 14px 16px; border-radius: 14px; background: var(--crema); color: var(--bg); }
.cup-total b { font: 700 28px var(--display); }
.reply-form { margin-top: 10px; display: grid; gap: 8px; }
.reply-form textarea { min-height: 70px; }
.rules { list-style: none; margin: 10px 0 0; padding: 0; }
.rules li { display: grid; gap: 2px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.rules span { color: var(--text-2); }
.risk { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 6px; white-space: nowrap; }
.risk.hi { color: #17110D; background: var(--dip); }
.risk.mid { color: var(--dip); background: rgba(230, 165, 91, .13); }
.risk.lo { color: var(--stable); background: rgba(168, 196, 154, .12); }
.alert { border-radius: 18px; padding: 14px 16px; margin-top: 12px; background: var(--surface); border-left: 4px solid var(--dip); }
.alert.mid { border-left-color: rgba(230, 165, 91, .5); }
.alert p { margin: 6px 0; }
.funnel { list-style: none; padding: 0; margin: 0; }
.funnel li { display: grid; grid-template-columns: 1fr 90px 52px; gap: 10px; align-items: center; padding: 6px 0; font-size: 14px; }
.funnel .bar { height: 8px; border-radius: 4px; background: var(--raised); overflow: hidden; }
.funnel .bar i { display: block; height: 100%; background: var(--crema); }
.funnel b { text-align: right; }
.money { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 13px; }
.money th, .money td { text-align: left; padding: 8px 4px; border-bottom: 1px solid var(--line); vertical-align: top; }
.money th { color: var(--text-2); font-weight: 400; }
.money td:last-child, .money th:last-child { text-align: right; white-space: nowrap; }
.money tfoot td { font-weight: 600; border-bottom: 0; }

@media (prefers-reduced-motion: reduce) { .toast, .toggle i, .toggle i::after, .push { transition: none; } }

/* ---------- 0.5: вход, роли, тестовый режим, фото ---------- */
body.gated .tabbar { display: none; }
body.gated #view { padding-bottom: 24px; }
.welcome { position: relative; min-height: 88vh; overflow: hidden; }
.welcome-bg { position: absolute; inset: -40px -40px auto -40px; display: grid; place-items: center; filter: blur(28px); opacity: .28; transform: scale(1.4); pointer-events: none; }
.welcome-inner { position: relative; padding: 26px 0 32px; }
.welcome-logo { display: grid; place-items: center; }
.welcome h1 { text-align: center; margin: 12px 0 6px; }
.center { text-align: center; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: var(--raised); border-radius: 12px; padding: 4px; margin: 18px 0 14px; }
.seg-btn { border: 0; background: none; color: var(--text-2); font: inherit; font-weight: 600; padding: 10px; border-radius: 9px; cursor: pointer; }
.seg-btn.on { background: var(--crema); color: #241A14; }
.role-list { display: grid; gap: 8px; }
.role { text-align: left; background: var(--surface); border: 1px solid var(--raised); border-radius: 12px; padding: 12px; color: var(--text); font: inherit; cursor: pointer; display: grid; gap: 2px; }
.role.on { border-color: var(--crema); box-shadow: inset 0 0 0 1px var(--crema); }
.err { color: var(--dip); font-size: 14px; margin: 4px 0 0; }
.soc-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.btn.soc { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn.soc svg { width: 20px; height: 20px; fill: currentColor; }
.test-note { display: grid; gap: 4px; background: rgba(183,195,209,.12); border: 1px solid rgba(183,195,209,.35); border-radius: 12px; padding: 12px; margin-top: 14px; }
.test-note b { color: var(--new); font-size: 14px; }
.test-note span { color: var(--text-2); font-size: 13px; line-height: 1.45; }
.hint-btn { width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--text-2); background: none; color: var(--text-2); font-size: 11px; line-height: 1; cursor: pointer; padding: 0; }
.photo-prev { width: 120px; height: 120px; object-fit: cover; border-radius: 12px; margin-top: 10px; }
.photo-row { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 8px; }
.photo-item { width: 104px; height: 104px; object-fit: cover; border-radius: 12px; flex: 0 0 auto; }
.panel-link { display: block; background: var(--surface); border-radius: 12px; padding: 12px 14px; margin-top: 12px; color: var(--crema); font-weight: 600; text-decoration: none; }
.bullets { margin: 8px 0 0; padding-left: 20px; color: var(--text-2); font-size: 14px; line-height: 1.5; }
.bullets li { margin-bottom: 6px; }
a.chip { text-decoration: none; display: inline-flex; align-items: center; }

.row.plain-row { grid-template-columns: 1fr auto; }
.sup-side { text-align: right; color: var(--crema); font-size: 13px; font-weight: 600; }

/* 0.6: пароль, партнёрский блок, предупреждение о лимите */
.pass-wrap { position: relative; }
.pass-wrap .input { padding-right: 46px; }
.eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; display: grid; place-items: center; background: none; border: 0; cursor: pointer; padding: 0; }
.eye svg { width: 22px; height: 22px; fill: var(--text-2); }
.eye[aria-pressed="true"] svg { fill: var(--crema); }
.panel.coop { margin-top: 16px; }
.panel.coop b { display: block; }
.warn-note { background: rgba(230,165,91,.12); border: 1px solid rgba(230,165,91,.4); color: var(--text); border-radius: 12px; padding: 12px; font-size: 13px; line-height: 1.5; margin-top: 12px; }
.biz-list.plain li .btn.compact { margin-top: 8px; }

.empty-state { margin-top: 14px; }
.empty-state b { display: block; color: var(--crema); }

/* ---------- 0.9: график, ссылки в списках, план переходов ---------- */
.bars-grid { stroke: rgba(217,195,165,.18); stroke-width: 1; }
.bars-axis { fill: var(--text-2); font-size: 10px; }
.bars .bar { cursor: pointer; transition: fill .12s; }
.bars .bar:hover, .bars .bar.on { fill: #E6A55B; }
.bars-read { margin: 6px 0 0; font-size: 13px; color: var(--text-2); min-height: 20px; }
.biz-link { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; text-decoration: none; color: inherit; width: 100%; }
.biz-link .go { display: block; font-size: 12px; color: var(--crema); margin-top: 6px; white-space: nowrap; }
.plan-field { background: var(--surface); border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; }
.geo-row { margin-top: 12px; }
.geo-row .inline-link { background: none; border: 0; padding: 0; color: var(--crema); text-decoration: underline; cursor: pointer; }
.nav-brand { display: none; }

/* ---------- Веб-версия: экран компьютера ---------- */
@media (min-width: 900px) {
  :root { --side-w: 248px; }
  main { max-width: 1120px; margin: 0 auto 0 calc(var(--side-w) + 24px); padding: 26px 32px 80px; }
  .tabbar {
    position: fixed; top: 0; left: 0; bottom: 0; right: auto; width: var(--side-w); height: 100vh;
    display: flex; flex-direction: column; gap: 4px; padding: 20px 14px; border-top: 0;
    border-right: 1px solid var(--line); background: #120D0A; overflow-y: auto;
  }
  .nav-brand { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: center; padding: 4px 8px 18px; }
  .nav-brand span { display: grid; line-height: 1.2; }
  .nav-brand b { font: 700 17px/1.1 var(--display); }
  .nav-brand i { font-style: normal; font-size: 12px; color: var(--text-2); margin-top: 2px; }
  .tabbar .tab {
    display: flex; flex-direction: row; align-items: center; justify-content: flex-start;
    gap: 12px; height: 46px; padding: 0 12px; border-radius: 10px; font-size: 15px; color: var(--text-2);
  }
  .tabbar .tab svg { width: 22px; height: 22px; }
  .tabbar .tab span { font-size: 15px; }
  .tabbar .tab:hover { background: rgba(217,195,165,.08); color: var(--text); }
  .tabbar .tab.active { background: rgba(217,195,165,.14); color: var(--crema); }
  .tabbar .tab.tab-scan { background: none; }
  .tabbar .tab.tab-scan.active { background: rgba(217,195,165,.14); }
  body.gated main { margin: 0 auto; max-width: 1000px; padding-top: 40px; }

  h1 { font-size: 34px; }
  h2 { font-size: 21px; margin-top: 38px; }
  .home-head { padding-top: 0; }
  .home-head .brand { display: none; }
  .home-head { justify-content: flex-end; }
  .shelf { margin: 0; padding: 2px 0 6px; }
  .tile { width: 210px; }
  .list .row { padding: 16px 0; }
  .kpis { grid-template-columns: repeat(4, 1fr); }
  .tariffs { grid-template-columns: repeat(3, 1fr); }
  .calc { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 18px; }
  .stats3 { grid-template-columns: repeat(3, 1fr); }
  .photo-item { width: 150px; height: 150px; }
  .map-box { height: 460px; }
  .bars { width: 100%; max-width: 760px; }
  .scanner { max-width: 520px; }
  .sheet { max-width: 520px; border-radius: 16px; }
  .sheet-wrap { align-items: center; }
  .toast { left: calc(var(--side-w) + 24px); }

  /* экран входа в две колонки */
  .welcome-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; max-width: 940px; margin: 0 auto; padding: 40px 0; }
  .welcome-inner > .welcome-logo, .welcome-inner > h1, .welcome-inner > .center { grid-column: 1; }
  .welcome-logo { justify-items: start; }
  .welcome h1 { text-align: left; font-size: 40px; }
  .welcome .center { text-align: left; }
  .welcome-inner .seg { grid-column: 2; grid-row: 1 / span 3; margin-top: 0; }
  .welcome-inner .field, .welcome-inner .stack, .welcome-inner .err,
  .welcome-inner .panel, .welcome-inner .soc-row, .welcome-inner p.muted:not(.center) { grid-column: 2; }
  .welcome-bg { opacity: .18; }
}

@media (min-width: 1400px) {
  main { margin-left: calc(var(--side-w) + 60px); }
}

[hidden] { display: none !important; }

/* 0.10: список товаров производителя */
.biz-list li.archived { opacity: .55; }
.biz-list li.archived .thumb { filter: grayscale(1); }
.biz-list .tag { display: inline-block; margin-left: 8px; vertical-align: middle; }
.row-actions { display: flex; gap: 8px; margin-top: 10px; }
.row-actions .btn { flex: 1; text-align: center; text-decoration: none; }
@media (min-width: 900px) { .row-actions { max-width: 420px; } }

/* 0.11: итоговые строки расчётов */
.kv.kv-total { border-top: 1px solid var(--line); padding-top: 8px; margin-top: 4px; }
.kv.kv-total b { color: var(--stable); }
.kv.kv-bad b { color: var(--dip); }
.lead-row { display: flex; align-items: center; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.input.compact { width: auto; padding: 8px 10px; font-size: 14px; }
.biz-list.leads li { display: block; }
.report-bar { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; }
.report-bar .search { margin: 0; }
.biz-list.partners li { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; }
@media (max-width: 600px) { .report-bar { grid-template-columns: 1fr; } }

/* ---------- 0.12: согласие на cookie и аналитику, устройства ---------- */
.consent-bar { position: fixed; left: 12px; right: 12px; bottom: calc(var(--tab-h) + env(safe-area-inset-bottom) + 10px); z-index: 9; max-width: 616px; margin: 0 auto; background: var(--raised); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); font-size: 13px; line-height: 1.4; }
body.gated .consent-bar { bottom: calc(env(safe-area-inset-bottom) + 12px); }
.consent-bar p { margin: 0 0 10px; color: var(--text-2); }
.consent-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.consent-actions .btn { flex: 1 1 140px; margin: 0; }
.linkish { background: none; border: 0; padding: 0; color: var(--crema); font: inherit; text-decoration: underline; cursor: pointer; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -2px; }
.money.dev { min-width: 640px; }
.money.dev td, .money.dev th { white-space: nowrap; text-align: right; }
.money.dev td:first-child, .money.dev th:first-child { text-align: left; white-space: normal; min-width: 150px; }
.insights { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 8px; }
.insights li { background: var(--surface); border-radius: 12px; padding: 10px 12px; font-size: 14px; border-left: 3px solid var(--stable); }
.insights li.warn { border-left-color: var(--dip); }
@media (min-width: 900px) {
  .consent-bar { left: calc(var(--side-w, 248px) + 24px); right: 24px; bottom: 20px; max-width: 760px; margin: 0; }
  body.gated .consent-bar { left: 24px; margin: 0 auto; right: 24px; }
  .consent-actions .btn { flex: 0 0 auto; }
}
body.has-consent main { padding-bottom: calc(var(--tab-h) + env(safe-area-inset-bottom) + 230px); }

/* ---------- 0.13: ценность кофейни ---------- */
.cv-hero { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0 12px; }
.cv-hero > div { background: var(--surface); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cv-hero b { font: 600 20px/1.2 var(--display); color: var(--text); overflow-wrap: anywhere; }
.cv-hero > div:nth-child(2) b { color: var(--crema); }
.cv-hero > div:nth-child(3) b { color: var(--stable); }
.cv-bar { display: flex; height: 18px; border-radius: 9px; overflow: hidden; background: var(--raised); gap: 2px; }
.cv-bar i { display: block; height: 100%; }
.cv-cost { background: #5A4536; }
.cv-net { background: var(--stable); }
.cv-fee { background: var(--dip); }
.cv-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 8px 0 12px; font-size: 13px; color: var(--text-2); }
.cv-legend span { display: inline-flex; align-items: center; gap: 6px; }
.cv-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.value-list { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 8px; }
.value-list li { background: var(--surface); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.value-list li span { color: var(--text-2); }
.cv-tiers td:nth-child(2), .cv-tiers th:nth-child(2) { text-align: right; }
@media (max-width: 420px) { .cv-hero b { font-size: 16px; } .cv-hero > div { padding: 8px 9px; } }
@media (min-width: 900px) { .value-list { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) {
  .cv-hero { grid-template-columns: 1fr 1fr; }
  .cv-hero > div:first-child { grid-column: 1 / -1; }
  .cv-hero > div:first-child b { font-size: 24px; }
}
