/* Панель владельца «Зерно». Слева — кассовая лента с Z-отчётом за период (термобумага из brand.css),
   справа — листы с графиками на миллиметровке. Замечания владельца — «ручкой»: терракотовая линия слева.
   Цвета точек: кобальт, карамель и матча; серии подписаны словами, а не только цветом. */

:root {
  --s1: #2743C8; --s2: #9A5716; --s3: #4A7327;
  --pen: #B23F16;
  --mm: rgba(39, 67, 200, .075); --mm2: rgba(39, 67, 200, .14);
  --q0: color-mix(in srgb, var(--accent) 9%, var(--surface));
  --q1: color-mix(in srgb, var(--accent) 24%, var(--surface));
  --q2: color-mix(in srgb, var(--accent) 40%, var(--surface));
  --q3: color-mix(in srgb, var(--accent) 60%, var(--surface));
  --q4: color-mix(in srgb, var(--accent) 88%, var(--surface));
  --t-lo: var(--ink); --t-hi: #FFFFFF;
  --kasa: #7A6D61;
}
:root[data-theme="dark"] {
  --s1: #8FA2FF; --s2: #E3A469; --s3: #9CC46A;
  --pen: #F08A5D;
  --mm: rgba(143, 162, 255, .07); --mm2: rgba(143, 162, 255, .13);
  --q0: color-mix(in srgb, var(--accent) 10%, var(--surface));
  --q1: color-mix(in srgb, var(--accent) 24%, var(--surface));
  --q2: color-mix(in srgb, var(--accent) 40%, var(--surface));
  --q3: color-mix(in srgb, var(--accent) 76%, var(--surface));
  --q4: color-mix(in srgb, var(--accent) 96%, var(--surface));
  --t-lo: var(--ink); --t-hi: #0E1330;
  --kasa: #A89A8B;
}

html { scroll-padding-top: 80px; }
body { min-height: 100vh; }
a { color: inherit; }
.skip { position: absolute; left: 12px; top: -80px; z-index: 100; padding: 12px 16px; border-radius: 12px; background: var(--ink); color: var(--bg); font-weight: 700; text-decoration: none; }
.skip:focus { top: 12px; }

/* ---------- полоса «демо» и шапка ---------- */
.demo-strip { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 18px; padding: 8px 24px; background: var(--surface-2); color: var(--muted); font-size: 13.5px; line-height: 1.4; }
.demo-strip b { color: var(--ink); }
.demo-strip a { color: var(--accent-ink); font-weight: 600; text-underline-offset: 3px; }
.demo-back { display: inline-flex; align-items: center; gap: 4px; min-height: 32px; text-decoration: none; }
.demo-back:hover { text-decoration: underline; }
.demo-back .icon { width: 16px; height: 16px; }

.top { display: flex; align-items: center; gap: 12px; max-width: 1680px; margin: 0 auto; padding: 14px 24px; }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.logo { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 12px; background: var(--surface-2); }
.logo svg { width: 32px; height: 32px; }
.logo-lid, .logo-cup { fill: var(--surface); stroke: var(--ink); stroke-width: 1.8; stroke-linejoin: round; }
.logo-sleeve { fill: var(--accent); }
.name { font-size: 26px; line-height: 1; }
.sub { margin-top: 3px; font-size: 13.5px; color: var(--muted); white-space: nowrap; }
.now { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; margin-left: auto; font-size: 14px; color: var(--muted); }
.now b { color: var(--ink); font-weight: 700; }
.now .mono { color: var(--ink); font-weight: 600; }
.st { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.st::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.st--open { color: var(--ok); }
.st--open::before { background: var(--ok); }
/* языки: RU · UA · EN · SK */
.langs { display: flex; flex: none; border: 1.5px solid var(--line-2); border-radius: 12px; overflow: hidden; background: var(--surface); }
.langs button { min-width: 44px; min-height: 41px; padding: 0 8px; font: 600 13px/1 var(--f-mono); letter-spacing: .02em; color: var(--muted); }
.langs button + button { border-left: 1px solid var(--line); }
.langs button:hover { color: var(--ink); }
.langs button[aria-pressed="true"] { background: var(--accent-soft); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--accent); }
.langs button:focus-visible { outline-offset: -3px; }
.tool { min-height: 44px; padding: 0 14px; font-size: 15px; border-radius: 12px; }
.tool .icon { width: 20px; height: 20px; }

/* ---------- фильтры ---------- */
.filters { position: sticky; top: 0; z-index: 30; background: var(--bg); border-block: 1px solid var(--line); }
.filters-in { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; max-width: 1680px; margin: 0 auto; padding: 10px 24px; }
.filters .seg, .seg--sm { grid-auto-columns: auto; }
.filters .seg button, .seg--sm button { min-height: 44px; padding: 4px 14px; font-size: 14.5px; }
.seg--period { margin-left: auto; }
.cmp { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px 0 6px; border-radius: 12px; font-weight: 600; font-size: 14.5px; }
.cmp:hover { background: var(--surface-2); }
.cmp[aria-checked="true"] .switch { background: var(--accent); }
.cmp[aria-checked="true"] .switch::after { transform: translateX(20px); }
.shop-select { position: relative; display: none; }
.shop-select select { width: 100%; min-height: 48px; padding: 0 44px 0 14px; border: 1.5px solid var(--line-2); border-radius: 12px; background: var(--surface); color: var(--ink); font: 700 16px var(--f-text); appearance: none; -webkit-appearance: none; }
.shop-select .icon { position: absolute; right: 12px; top: 50%; translate: 0 -50%; pointer-events: none; }

/* ---------- раскладка: лента слева, листы справа ---------- */
.dash { display: grid; gap: 22px; max-width: 1680px; margin: 0 auto; padding: 22px 24px 40px; }
.z { min-width: 0; width: 100%; max-width: 460px; justify-self: center; }
@media (min-width: 1000px) {
  .dash { grid-template-columns: 320px minmax(0, 1fr); align-items: start; }
  .z { position: sticky; top: 76px; max-width: none; }
}
@media (min-width: 1440px) { .dash { grid-template-columns: 344px minmax(0, 1fr); gap: 26px; } }
.sheets-wrap { container-type: inline-size; min-width: 0; }
.sheets { display: grid; gap: 20px; }
@container (min-width: 860px) {
  .sheets { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .card--wide { grid-column: 1 / -1; }
}

/* ---------- Z-отчёт: термобумага из brand.css, всегда светлая, как настоящий чек ---------- */
.z-paper { padding: 22px 22px 34px; font-size: 14px; line-height: 1.35; }
.z-paper .d.good { color: #1D7249; }
.z-paper .d.bad { color: #A33F17; }
.z-paper .d.flat { color: var(--paper-muted); }
.z-head { display: grid; gap: 3px; text-align: center; }
.z-brand { font-size: 32px; line-height: 1; }
.z-shop { font-size: 13px; color: var(--paper-muted); }
.z-title { margin-top: 10px; font-size: 12.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.z-dates { font-size: 12.5px; color: var(--paper-muted); }
.z-big { display: grid; gap: 2px; margin: 0 -8px; padding: 4px 8px; border-radius: 8px; }
.z-k, .z-h { font: 600 12px var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--paper-muted); }
.z-h { margin: 0 0 8px; }
.z-v { font-size: 40px; font-weight: 600; letter-spacing: -.035em; line-height: 1.05; }
.z-d { font-size: 13px; color: var(--paper-muted); }
.z-d .d { margin-right: 4px; }
.z-list { display: grid; gap: 7px; margin: 12px 0 0; }
.z-list + .z-toggle { margin-top: 14px; }
.z-h + .z-list { margin-top: 0; }
.z-row { display: flex; align-items: baseline; gap: 6px; margin: 0 -8px; padding: 1px 8px; border-radius: 6px; }
.z-row dt { display: flex; flex: 1; align-items: baseline; min-width: 0; }
.z-row dt::after { content: ""; flex: 1; min-width: 10px; margin: 0 0 0 8px; border-bottom: 1.5px dotted var(--paper-line); translate: 0 -4px; }
.z-row dd { display: flex; align-items: baseline; gap: 6px; margin: 0; white-space: nowrap; font-weight: 600; }
.z-row dd small { font: 500 12px var(--f-mono); color: var(--paper-muted); }
.z-foot { display: grid; gap: 4px; justify-items: center; padding-top: 4px; font-size: 11.5px; color: var(--paper-muted); text-transform: uppercase; letter-spacing: .06em; }
.z-code { width: 78%; height: 34px; margin-bottom: 6px; fill: var(--paper-ink); }
.z-toggle { display: none; align-items: center; justify-content: center; gap: 6px; width: 100%; min-height: 44px; border: 1.5px dashed var(--paper-line); border-radius: 10px; color: var(--paper-ink); font-weight: 700; font-size: 14.5px; }
.z-toggle .icon { width: 18px; height: 18px; transition: rotate .2s; }
.z-toggle[aria-expanded="true"] .icon { rotate: 180deg; }
@media (max-width: 999px) {
  .z-toggle { display: flex; }
  .z:not(.is-open) .z-more { display: none; }
  .z-more { margin-top: 12px; }
}
.z-paper.printing { animation: zprint .9s steps(18) both; }
@keyframes zprint { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 -40px 0); } }
.flash { animation: flash 1.8s var(--ease); }
@keyframes flash { 0%, 35% { background: rgba(39, 67, 200, .16); } 100% { background: transparent; } }

.d { font: 600 12px var(--f-mono); white-space: nowrap; }
.d.good { color: var(--ok); }
.d.bad { color: var(--warn); }
.d.flat { color: var(--muted); font-weight: 500; }
.d.new { color: var(--accent-ink); }

/* ---------- листы ---------- */
.card { min-width: 0; padding: 20px 22px 22px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; }
.card-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 10px 16px; margin-bottom: 14px; }
.card-head > div:first-child { min-width: 0; }
.card h2 { font-size: 19px; font-weight: 800; line-height: 1.2; letter-spacing: -.01em; }
.card-sub { margin-top: 3px; font-size: 13.5px; line-height: 1.4; color: var(--muted); }
.mini-h { margin: 20px 0 6px; font-size: 14.5px; font-weight: 700; }

.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: -4px 0 8px; font-size: 13px; color: var(--muted); }
.lg { display: inline-flex; align-items: center; gap: 7px; }
.lg::before { content: ""; width: 14px; height: 10px; border-radius: 2px; }
.lg-bar::before, .lg-app::before { background: var(--accent); }
.lg-kasa::before { background: var(--kasa); }
.lg-prev::before, .lg-line::before { width: 20px; height: 0; border-top: 2px dashed var(--ink); border-radius: 0; }
.lg-line::before { border-top-style: solid; }
.lg-back::before { background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--line-2); }
.legend .lg[hidden] { display: none; }

.insight { margin-top: 14px; padding: 11px 14px 12px 15px; border-left: 3px solid var(--pen); border-radius: 0 10px 10px 0; background: var(--surface-2); font-size: 14.5px; line-height: 1.45; }
.as-table { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 14.5px; }
.as-table .icon { width: 18px; height: 18px; }
.table-wrap { overflow-x: auto; margin-top: 6px; }
.empty { padding: 18px 0; color: var(--muted); font-size: 14.5px; }

/* ---------- графики ---------- */
.chart { position: relative; border-radius: 8px; touch-action: pan-y; cursor: crosshair; -webkit-user-select: none; user-select: none; }
.chart:focus { outline: none; }
.chart:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 5px; }
.chart-box { min-height: 120px; }
.chart-box svg { display: block; overflow: visible; }
.c-mm { fill: none; stroke: var(--mm); stroke-width: 1; }
.c-mm2 { fill: none; stroke: var(--mm2); stroke-width: 1; }
.c-hatch { stroke: var(--line-2); stroke-width: 1.2; }
.c-tick { stroke: var(--line-2); stroke-width: 1; stroke-dasharray: 2 3; }
.c-yl, .c-xl { font: 500 11.5px var(--f-mono); fill: var(--muted); }
.c-base { stroke: var(--ink); stroke-width: 1.5; }
.c-bar { fill: var(--accent); transition: fill .12s; }
.c-bar.late { fill: var(--pen); }
.c-bar.is-on { fill: var(--ink); }
.c-prev { fill: none; stroke: var(--ink); stroke-width: 1.7; stroke-dasharray: 5 4; stroke-linejoin: round; }
.c-prev-dot { fill: var(--surface); stroke: var(--ink); stroke-width: 1.7; }
.c-cross { stroke: var(--ink); stroke-width: 1; stroke-dasharray: 3 3; }
.c-lead { fill: none; stroke: var(--ink); stroke-width: 1; }
.c-dot { fill: var(--ink); }
.c-ball { fill: var(--surface); stroke: var(--ink); stroke-width: 1.5; }
.c-ball-n { font: 600 12px var(--f-mono); fill: var(--ink); }
.c-note { font: 600 11.5px var(--f-text); fill: var(--muted); }
.c-norm { stroke: var(--pen); stroke-width: 1.5; stroke-dasharray: 6 4; }
.c-line { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linejoin: round; }
.c-pt { fill: var(--surface); stroke: var(--ink); stroke-width: 2; }
.c-pt.late { fill: var(--pen); stroke: var(--pen); }
.c-pt.is-on { stroke-width: 2.5; }
.c-back { fill: var(--accent-soft); }
.c-q0 { fill: var(--q0); } .c-q1 { fill: var(--q1); } .c-q2 { fill: var(--q2); } .c-q3 { fill: var(--q3); } .c-q4 { fill: var(--q4); }
[class^="c-q"].is-on { stroke: var(--ink); stroke-width: 2.5; }
.c-cell { font: 600 11.5px var(--f-mono); pointer-events: none; }
.c-t0, .c-t1, .c-t2, .c-t3 { fill: var(--t-lo); }
.c-t4 { fill: var(--t-hi); }
:root[data-theme="dark"] .c-t3 { fill: var(--t-hi); }
.c-ring { fill: none; stroke: var(--pen); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }

.tip { position: absolute; z-index: 3; display: grid; gap: 3px; width: max-content; max-width: 250px; padding: 9px 11px 10px; border-radius: 10px; background: var(--ink); color: var(--bg); font-size: 13px; line-height: 1.35; pointer-events: none; box-shadow: var(--shadow); }
.tip-t { font-weight: 700; }
.tip-m { opacity: .82; }
.tip .d { color: inherit; font-weight: 700; }
.tip-ev { display: inline-flex; align-items: center; gap: 6px; margin-top: 2px; font-weight: 600; }
.tip-ev i { display: inline-grid; place-items: center; width: 18px; height: 18px; border: 1.5px solid currentColor; border-radius: 50%; font: 600 11px var(--f-mono); font-style: normal; }

.evs { display: grid; gap: 6px; margin-top: 12px; font-size: 13.5px; line-height: 1.4; color: var(--muted); }
.evs:empty { display: none; }
.evs li { display: flex; gap: 10px; align-items: baseline; }
.evs b { color: var(--ink); }
.ball { display: inline-grid; place-items: center; flex: none; width: 22px; height: 22px; border: 1.5px solid var(--ink); border-radius: 50%; color: var(--ink); font: 600 12px var(--f-mono); }

.scale { display: flex; align-items: center; gap: 4px; margin-top: 8px; font-size: 12.5px; color: var(--muted); }
.scale span:first-child { margin-right: 4px; }
.scale span:last-child { margin-left: 4px; }
.scale i { width: 24px; height: 12px; border-radius: 3px; }
.scale .c-q0 { background: var(--q0); } .scale .c-q1 { background: var(--q1); } .scale .c-q2 { background: var(--q2); } .scale .c-q3 { background: var(--q3); } .scale .c-q4 { background: var(--q4); }

table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th, table.data td { padding: 7px 10px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
table.data thead th { font: 600 12px var(--f-mono); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); border-bottom: 1.5px solid var(--ink); }
table.data .num, .items .num { text-align: right; }
.data--heat td, .data--heat th { padding: 6px 7px; }

/* ---------- допродажи ---------- */
.adds { display: grid; gap: 14px; }
.add { display: grid; grid-template-columns: minmax(0, 1fr) 56px; grid-template-areas: "name x" "bars x"; gap: 6px 12px; align-items: center; }
.add-name { grid-area: name; font-weight: 700; font-size: 15px; }
.add-bars { grid-area: bars; display: grid; gap: 4px; }
.hbar { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.hbar i { display: block; height: 12px; width: calc(var(--w) * (100% - 64px)); min-width: 2px; border-radius: 3px; background: var(--kasa); }
.hbar--app i { background: var(--accent); }
.hbar b { font-weight: 600; }
.add-x { grid-area: x; text-align: right; font-weight: 600; font-size: 16px; color: var(--accent-ink); }
.add-sum { display: grid; gap: 10px; margin: 4px 0 0; padding-top: 14px; border-top: 1.5px dashed var(--line-2); font-size: 14.5px; }
.add-sum dt { font: 600 12px var(--f-mono); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.add-sum dd { margin: 3px 0 0; }
.add-sum dd b { color: var(--ok); font-weight: 600; }

/* ---------- позиции ---------- */
.items-wrap { container-type: inline-size; overflow: visible; }
.items { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.items th, .items td { padding: 7px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.items thead th { padding-block: 0; font: 600 12px var(--f-mono); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); border-bottom: 1.5px solid var(--ink); white-space: nowrap; }
.items thead th.num button { margin-left: auto; }
.items thead button { display: flex; align-items: center; gap: 3px; min-height: 44px; font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; }
.items thead button:hover, .items th[aria-sort] button { color: var(--ink); }
.items thead .icon { width: 15px; height: 15px; opacity: .55; }
.items th[aria-sort] .icon { opacity: 1; }
.items tbody tr:hover { background: var(--bg); }
.items tbody th { font-weight: 400; }
.it { display: flex; align-items: center; gap: 10px; }
.it-pic { display: grid; place-items: center; flex: none; width: 34px; height: 42px; }
.it-pic .cup { width: 32px; height: 42px; }
.it-pic .cup--pastry { width: 34px; height: 30px; }
.it-name { display: grid; font-weight: 700; line-height: 1.25; }
.it-name small { font-weight: 500; font-size: 12.5px; color: var(--muted); }
.share { white-space: nowrap; }
.sharebar { display: inline-block; width: 84px; height: 8px; margin-right: 8px; overflow: hidden; border-radius: 4px; background: var(--surface-2); vertical-align: middle; }
.sharebar i { display: block; height: 100%; background: var(--accent); }
.spark-c { width: 110px; }
.spark { display: block; color: var(--ink); }
.spark path { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; }
.spark circle { fill: currentColor; }
.items tfoot th, .items tfoot td { border-top: 1.5px solid var(--ink); border-bottom: 0; font-weight: 700; }
@container (max-width: 700px) {
  .items thead { display: none; }
  .items, .items tbody, .items tfoot { display: block; }
  .items tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .items tbody tr:hover { background: none; }
  .items th[scope="row"] { grid-column: 1 / -1; padding: 0; border: 0; }
  .items td { display: grid; align-content: start; gap: 2px; padding: 0; border: 0; text-align: left; }
  .items td.num { text-align: left; }
  .items td::before { content: attr(data-l); font: 600 11px var(--f-mono); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
  .items td:empty { display: none; }
  .items .share { white-space: normal; }
  .items .sharebar { display: none; }
  .items tfoot tr { border-top: 1.5px solid var(--ink); border-bottom: 0; }
  .items tfoot th, .items tfoot td { border: 0; }
  .spark-c { width: auto; }
  .items-wrap:not(.is-all) tr.more { display: none; }
  .items-wrap .items-more { display: flex; width: 100%; margin-top: 12px; min-height: 46px; }
}
.items-more { display: none; }

/* ---------- скорость бара ---------- */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0 0 14px; }
.stats div { min-width: 0; padding: 10px 12px 11px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.stats dt { font-size: 12.5px; line-height: 1.3; color: var(--muted); }
.stats dd { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; margin: 4px 0 0; font-size: 22px; font-weight: 600; letter-spacing: -.02em; }

/* ---------- точки ---------- */
.share-bar { display: flex; gap: 3px; height: 46px; margin: 0 0 14px; }
.sh { display: flex; flex-direction: column; justify-content: center; flex-basis: 0; min-width: 0; padding: 0 10px; overflow: hidden; border-radius: 8px; color: #FFFFFF; font-size: 12.5px; line-height: 1.2; white-space: nowrap; transition: opacity .2s; }
.sh b, .sh span { overflow: hidden; text-overflow: ellipsis; }
:root[data-theme="dark"] .sh { color: #15110E; }
.sh1, .sw1 { background: var(--s1); } .sh2, .sw2 { background: var(--s2); } .sh3, .sw3 { background: var(--s3); }
.sh.dim { opacity: .32; }
.sp1 { color: var(--s1); } .sp2 { color: var(--s2); } .sp3 { color: var(--s3); }
.shops { display: grid; gap: 8px; }
.shop { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name rev" "meta spark"; gap: 6px 12px; width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--bg); text-align: left; transition: border-color .15s; }
.shop:hover { border-color: var(--line-2); }
.shop.is-on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.shop-name { grid-area: name; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: 8px; min-width: 0; }
.shop-name b { font-size: 16px; }
.shop-name small { grid-column: 2; font-size: 12.5px; line-height: 1.3; color: var(--muted); }
.sw { width: 12px; height: 12px; border-radius: 3px; }
.shop-rev { grid-area: rev; display: grid; justify-items: end; gap: 1px; font-size: 17px; font-weight: 600; }
.shop-meta { grid-area: meta; display: flex; flex-wrap: wrap; gap: 3px 12px; font-size: 13px; color: var(--muted); }
.shop-meta .mono { color: var(--ink); font-weight: 600; }
.shop-spark { grid-area: spark; align-self: end; }

/* ---------- сегодня вживую ---------- */
.feed { display: grid; }
.fd { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 10px 0; border-bottom: 1px dashed var(--line-2); font-size: 14px; line-height: 1.35; }
.fd time { padding-top: 1px; color: var(--muted); font-size: 13px; }
.fd-lines { font-weight: 700; }
.fd-lines small { font-weight: 500; font-size: 12.5px; color: var(--muted); }
.fd-who { display: block; margin-top: 3px; font-size: 12.5px; color: var(--muted); }
.fd-tag { display: inline-block; margin: 0 6px 2px 0; padding: 2px 7px; border-radius: 6px; background: var(--accent); color: var(--on-accent); font: 600 11.5px var(--f-mono); }
.fd-sum { font-weight: 600; }
.fd--demo { margin: 4px -10px; padding: 10px; border: 0; border-radius: 10px; background: var(--accent-soft); }
.fd.fresh { animation: fdin .7s var(--ease) both; }
@keyframes fdin { from { opacity: 0; translate: 0 -10px; } }
.feed-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 16px; font-size: 13.5px; line-height: 1.4; color: var(--muted); }
.feed-cta .btn { min-height: 46px; font-size: 15px; }
.feed-cta .icon { width: 20px; height: 20px; }
.feed-cta span { flex: 1 1 200px; }

/* ---------- отчёт в Telegram ---------- */
.msg { max-width: 480px; margin: 0 0 12px; padding: 12px 14px 14px; border: 1px solid var(--line); border-radius: 16px 16px 16px 4px; background: var(--bg); }
.msg-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 14px; }
.msg-ava { display: grid; place-items: center; width: 30px; height: 30px; flex: none; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-weight: 800; font-size: 15px; }
.msg-bot { padding: 2px 6px; border-radius: 5px; background: var(--surface-2); color: var(--muted); font: 600 11px var(--f-mono); }
.msg-head time { margin-left: auto; font-size: 12px; color: var(--muted); }
.msg-text { margin: 0; white-space: pre-wrap; font: 400 14.5px/1.5 var(--f-text); color: var(--ink); }

/* ---------- подвал и тост ---------- */
.foot { max-width: 1680px; margin: 0 auto; padding: 8px 24px 40px; font-size: 13.5px; line-height: 1.5; color: var(--muted); }
.foot a { color: var(--accent-ink); text-underline-offset: 3px; }
.toast { bottom: 20px; }

/* ---------- узкие экраны ---------- */
@media (max-width: 999px) {
  .z { position: static; }
}
@media (max-width: 759px) {
  .demo-strip { padding: 8px 16px; }
  .top { flex-wrap: wrap; padding: 12px 16px; }
  .now { order: 5; width: 100%; margin-left: 0; }
  .brand { margin-right: auto; }
  .tool { padding: 0 12px; }
  .tool[data-theme-toggle] span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .filters { position: static; }
  .filters-in { padding: 10px 16px; }
  .seg--shop { display: none; }
  .shop-select { display: block; flex: 1 1 100%; }
  .seg--period { flex: 1 1 100%; margin-left: 0; grid-auto-columns: minmax(0, 1fr); }
  .filters .seg--period button { padding: 4px 2px; font-size: 14px; }
  .dash { padding: 16px 16px 32px; gap: 18px; }
  .card { padding: 16px 16px 18px; border-radius: 16px; }
  .card-head .seg--sm { width: 100%; grid-auto-columns: minmax(0, 1fr); }
  .seg--sm button { padding: 4px 4px; font-size: 14px; }
  .stats { grid-template-columns: minmax(0, 1fr); }
  .stats div { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
  .stats dd { margin: 0; font-size: 19px; justify-content: flex-end; }
  .foot { padding: 4px 16px 32px; }
}
@media (max-width: 380px) {
  .sub { display: none; }
  .z-paper { padding: 18px 16px 30px; }
  .z-v { font-size: 34px; }
}
