/* Миниапп отзывов — стиль «строгий премиум» (по образцу LVL STORE, DESIGN.md). Без inline-стилей (CSP style-src 'self').
   Один шрифт Golos Text и веса 400/500/600, линии вместо теней, радиусы 6/8/10, одна акцентная кнопка,
   монохромные иконки, реакция на нажатие вместо подъёма при наведении. Две палитры: тёмная (из LVL) и светлая;
   в Telegram — по его теме (data-theme ставит JS), в браузере — по prefers-color-scheme. */
@font-face {
  font-family: "Golos Text";
  src: url("/static/fonts/golos-text.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
:root {
  color-scheme: dark;
  --bg: #0e0f12;
  --surface-1: #15161b;
  --surface-2: #1b1d23;
  --surface-3: #23252d;
  --line: #292b33;
  --line-strong: #383b46;
  --line-input: #6e7384;
  --text: #ecebe8;
  --text-2: #c3c2bf;
  --muted: #8f919b;
  --btn: #ecebe8; --btn-hover: #ffffff; --btn-text: #0e0f12;
  --link: #c3cce0;
  --focus: #ecebe8;
  --ok: #3fbf7f;   --ok-text: #b6e8cc;   --ok-line: rgba(63, 191, 127, .4);
  --warn: #d9a94a; --warn-text: #f1dcae; --warn-line: rgba(217, 169, 74, .4);
  --bad: #e06470;  --bad-text: #f6c2c7;  --bad-line: rgba(224, 100, 112, .4);
  --overlay: rgba(8, 9, 11, .88);
  --on-overlay: #ecebe8;
  --edge: inset 0 1px 0 rgba(255, 255, 255, .04);
  --ring: 0 0 0 3px rgba(236, 235, 232, .18);
  --fs-xs: .75rem; --fs-sm: .875rem; --fs-lg: 1.125rem; --fs-xl: 1.375rem; --fs-2xl: 1.625rem; --fs-3xl: 2rem;
  --r-sm: 6px; --r-md: 8px; --r-lg: 10px;
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px; --s-6: 32px; --s-7: 48px;
  --t-fast: 120ms; --t-base: 180ms; --ease: cubic-bezier(.2, .7, .2, 1);
  --font: "Golos Text", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --header-h: 60px;
}
/* Светлая палитра (DESIGN.md §3, контраст проверен тестом). Два одинаковых блока: тема Telegram и тема системы. */
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f4f0;
  --surface-1: #ffffff;
  --surface-2: #eeede8;
  --surface-3: #e3e2dc;
  --line: #e0ded7;
  --line-strong: #c4c1b8;
  --line-input: #7f7c73;
  --text: #17181c;
  --text-2: #3c3e45;
  --muted: #64666e;
  --btn: #17181c; --btn-hover: #2c2e35; --btn-text: #f5f4f0;
  --link: #2e4a7d;
  --focus: #17181c;
  --ok: #1d7f50;   --ok-text: #17663f;   --ok-line: rgba(29, 127, 80, .4);
  --warn: #8a5d0c; --warn-text: #6e4a09; --warn-line: rgba(138, 93, 12, .4);
  --bad: #ad3442;  --bad-text: #8f2a36;  --bad-line: rgba(173, 52, 66, .4);
  --overlay: rgba(8, 9, 11, .88);
  --on-overlay: #ecebe8;
  --edge: inset 0 1px 0 rgba(255, 255, 255, .7);
  --ring: 0 0 0 3px rgba(23, 24, 28, .14);
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --bg: #f5f4f0;
    --surface-1: #ffffff;
    --surface-2: #eeede8;
    --surface-3: #e3e2dc;
    --line: #e0ded7;
    --line-strong: #c4c1b8;
    --line-input: #7f7c73;
    --text: #17181c;
    --text-2: #3c3e45;
    --muted: #64666e;
    --btn: #17181c; --btn-hover: #2c2e35; --btn-text: #f5f4f0;
    --link: #2e4a7d;
    --focus: #17181c;
    --ok: #1d7f50;   --ok-text: #17663f;   --ok-line: rgba(29, 127, 80, .4);
    --warn: #8a5d0c; --warn-text: #6e4a09; --warn-line: rgba(138, 93, 12, .4);
    --bad: #ad3442;  --bad-text: #8f2a36;  --bad-line: rgba(173, 52, 66, .4);
    --overlay: rgba(8, 9, 11, .88);
    --on-overlay: #ecebe8;
    --edge: inset 0 1px 0 rgba(255, 255, 255, .7);
    --ring: 0 0 0 3px rgba(23, 24, 28, .14);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 8px); background: var(--bg); }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 16px/1.5 var(--font);
  min-height: var(--tg-viewport-stable-height, 100vh); display: flex; flex-direction: column;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: var(--link); text-decoration: none; }
/* Ссылки в тексте отличаются не только цветом */
p a:not([class]), .notice a, .prose a { text-decoration: underline; text-underline-offset: .18em; text-decoration-thickness: 1px; text-decoration-color: var(--line-input); }
h1 { font-size: var(--fs-2xl); line-height: 1.2; letter-spacing: -.01em; font-weight: 600; margin: 0 0 var(--s-3); overflow-wrap: anywhere; text-wrap: balance; }
h2 { font-size: var(--fs-xl); line-height: 1.25; letter-spacing: -.005em; font-weight: 600; margin: 0 0 var(--s-3); overflow-wrap: anywhere; text-wrap: balance; }
p { margin: var(--s-2) 0; }
b, strong { font-weight: 600; }
img, svg { display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
:focus:not(:focus-visible) { outline: none; }

.wrap { width: 100%; max-width: 760px; margin: 0 auto; padding: 0 max(var(--s-4), env(safe-area-inset-right)) 0 max(var(--s-4), env(safe-area-inset-left)); }
.main { flex: 1; padding-top: var(--s-5); padding-bottom: calc(var(--s-6) + env(safe-area-inset-bottom)); }
.main:focus { outline: none; }
.muted { color: var(--muted); }
.center { text-align: center; }
.hidden { display: none !important; }
.small { font-size: var(--fs-sm); }
.num { font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0; }
.skip { position: absolute; left: var(--s-4); top: calc(-1 * var(--s-7)); z-index: 20; padding: 10px 14px; border-radius: var(--r-sm);
  background: var(--btn); color: var(--btn-text); font-weight: 500; transition: top var(--t-fast); }
.skip:focus { top: var(--s-2); outline-offset: 0; }
.eyebrow { font-size: var(--fs-xs); font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
  margin: 0 0 var(--s-2); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }

/* Иконки: один набор линий. Центр рисунка каждой иконки — в центре рамки 24×24 (проверено getBBox, 01.12.2026).
   У подписей иконка опущена на .03em: так её центр встаёт на .31em над базовой линией — оптическую середину
   подписи из строчных и заглавной в Golos Text (замер в браузере: без сдвига центр на .34em). */
.ic { width: 20px; height: 20px; flex: none; stroke-width: 1.75; }
.btn > svg, .back > .ic, .notice > .ic { position: relative; top: .03em; }
.back > .ic { top: .085em; }   /* у ссылки «назад» строка выше (line-height 1.5) — центр строки выше на .055em */

/* Шапка — только в браузере. В Telegram своя шапка и родная кнопка «Назад» (html[data-tg]) */
.top { position: sticky; top: 0; z-index: 10; background: var(--bg); border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top); }
.top-inner { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); min-height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 11px; color: var(--text); font-weight: 600; letter-spacing: .14em; font-size: .9375rem;
  min-height: 44px; text-transform: uppercase; }
.brand .logo { width: 26px; height: 26px; stroke-width: 1.6; }
.brand > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 60vw; }
html[data-tg] .top, html[data-tg] .back { display: none; }
html[data-tg] .main { padding-top: var(--s-4); }
.back { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; color: var(--muted); margin-bottom: var(--s-2);
  font-weight: 500; font-size: var(--fs-sm); max-width: 100%; }
.back > .ic { width: 18px; height: 18px; }
.back:active { color: var(--text); }

/* Кнопки: одна главная — слоновая кость (в светлой теме — графит); остальное — контур */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px;
  border: 1px solid var(--btn); border-radius: var(--r-sm); background: var(--btn); color: var(--btn-text); font-weight: 500;
  line-height: 1.2; white-space: nowrap; cursor: pointer; position: relative; text-decoration: none;
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast), transform var(--t-fast); }
.btn:active { transform: scale(.985); }
.btn.ghost { background: transparent; border-color: var(--line-strong); color: var(--text); }
.btn.ghost:active { background: var(--surface-2); }
.btn.wide { width: 100%; min-height: 48px; }
.btn:disabled { background: var(--surface-3); border-color: var(--surface-3); color: var(--muted); cursor: not-allowed; transform: none; }
.btn .ic { width: 18px; height: 18px; }
/* Отправка: подпись меняется на глагол («Отправляем…»), ширина держится JS, спиннера нет */
.btn.is-pending, .btn.is-pending:disabled { background: var(--btn); border-color: var(--btn); color: var(--btn-text); opacity: .7; cursor: progress; }
.btn.ghost.is-pending { background: transparent; border-color: var(--line-strong); color: var(--text); }
.iconbtn { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 0 8px; border: 0;
  border-radius: var(--r-sm); background: transparent; color: var(--muted); cursor: pointer; transition: color var(--t-fast), background var(--t-fast); }
.iconbtn:active { background: var(--surface-2); color: var(--text); }

/* Блоки: линия и световая кромка сверху вместо тени */
.card { background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s-5);
  box-shadow: var(--edge); margin-bottom: var(--s-4); }
.card > :first-child { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }
.narrow { max-width: 520px; margin-left: auto; margin-right: auto; }
.notice { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-left: 2px solid var(--line-input);
  border-radius: var(--r-sm); padding: 12px 14px; margin: var(--s-3) 0; background: transparent; color: var(--text-2); }
.notice .ic { color: var(--muted); margin-top: 2.55px; }   /* к первой строке: строка 24px, значок 20px (замер) */
.notice > div { min-width: 0; }
.notice.warn { border-left-color: var(--warn); color: var(--warn-text); }
.notice.warn .ic { color: var(--warn); }
.notice.ok { border-left-color: var(--ok); color: var(--ok-text); }
.notice.ok .ic { color: var(--ok); }
.notice.bad { border-left-color: var(--bad); color: var(--bad-text); }
.notice.bad .ic { color: var(--bad); }
.empty { display: grid; justify-items: center; gap: var(--s-2); color: var(--muted); text-align: center; padding: var(--s-6) 0; }
.empty .ic { width: 36px; height: 36px; color: var(--line-strong); }
.empty p { margin: 0; }

/* Каталог: поиск, сортировка, ведомость магазинов */
.page-title { margin-bottom: var(--s-4); }
.search { position: relative; margin: 0 0 var(--s-3); }
.search-ic { position: absolute; left: 14px; top: 50%; margin-top: -10px; color: var(--muted); pointer-events: none; }
.chips { display: flex; gap: var(--s-2); flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; min-height: 36px; padding: 6px 14px; border-radius: var(--r-sm); border: 1px solid var(--line-strong);
  background: transparent; color: var(--text-2); font-weight: 500; font-size: var(--fs-sm); cursor: pointer; text-decoration: none;
  transition: border-color var(--t-fast), background var(--t-fast), color var(--t-fast); }
.chip:active { background: var(--surface-2); }
.chip[aria-current="true"] { border-color: var(--text); background: var(--surface-2); color: var(--text); }
.sorts { margin-bottom: var(--s-4); align-items: center; flex-wrap: nowrap; }
.sorts-label { color: var(--muted); font-size: var(--fs-sm); margin-right: var(--s-1); white-space: nowrap; }
.sorts .chip { flex: 0 1 auto; white-space: nowrap; }
.shoplist { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface-1);
  box-shadow: var(--edge); }
.shoplist li + li { border-top: 1px solid var(--line); }
.shoprow { display: flex; align-items: center; gap: var(--s-3); min-height: 72px; padding: 12px 12px 12px 14px; color: var(--text);
  transition: background var(--t-fast), transform var(--t-fast); }
.shoplist li:first-child .shoprow { border-radius: var(--r-lg) var(--r-lg) 0 0; }
.shoplist li:last-child .shoprow { border-radius: 0 0 var(--r-lg) var(--r-lg); }
.shoplist li:only-child .shoprow { border-radius: var(--r-lg); }
.shoprow:active { background: var(--surface-2); }
.shoprow-body { flex: 1; min-width: 0; display: grid; gap: 2px; }
.shoprow-name { font-weight: 500; font-size: var(--fs-lg); line-height: 1.3; overflow-wrap: anywhere; }
.shoprow-meta { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: var(--fs-sm); flex-wrap: wrap; }
.shoprow-meta b { color: var(--text); font-weight: 500; }
.shoprow-meta .star { width: 14px; height: 14px; }
.chev { color: var(--muted); width: 18px; height: 18px; }

/* Знак магазина: фото или первая буква; скруглённый квадрат, не круг */
.avatar { display: grid; place-items: center; flex: none; overflow: hidden; border-radius: var(--r-md); background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--line); color: var(--text-2); font-weight: 600; line-height: 1; }
.avatar.md { width: 48px; height: 48px; font-size: var(--fs-xl); }
.avatar.lg { width: 72px; height: 72px; font-size: var(--fs-3xl); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-btn { padding: 0; border: 0; background: none; border-radius: var(--r-md); cursor: zoom-in; flex: none; }

/* Звёзды: закрашенная — цвет текста, пустая — контур серым (≥ 3:1 к фону) */
.stars { display: inline-flex; gap: 2px; }
.star { width: 16px; height: 16px; color: var(--muted); }
.star.on { color: var(--text); }

/* Страница магазина */
.shop-head { display: flex; align-items: center; gap: var(--s-4); margin: var(--s-1) 0 var(--s-4); }
.shop-head-body { min-width: 0; }
.shop-head h1 { margin: 0 0 var(--s-1); }
.shop-head-meta { margin: 0; display: flex; align-items: center; gap: 6px; color: var(--muted); flex-wrap: wrap; }
.shop-head-meta b { color: var(--text); font-weight: 500; }
.links { display: flex; flex-wrap: wrap; gap: var(--s-2); margin: 0 0 var(--s-3); }
.linkbtn { flex: 1 1 calc(50% - var(--s-2)); min-width: 0; max-width: 100%; }
.linkbtn span { overflow: hidden; text-overflow: ellipsis; }
.linkbtn svg { width: 18px; height: 18px; flex: none; color: var(--muted); }
.prose { white-space: pre-line; overflow-wrap: anywhere; color: var(--text-2); margin: 0 0 var(--s-3); }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); margin: var(--s-4) 0 var(--s-5); }
.rating-summary { display: grid; grid-template-columns: auto 1fr; gap: var(--s-5); align-items: center; }
.rating-big { display: grid; justify-items: center; gap: 6px; min-width: 104px; }
.rating-value { font-size: var(--fs-3xl); font-weight: 600; line-height: 1; letter-spacing: -.02em; }
.rating-count { color: var(--muted); font-size: var(--fs-sm); white-space: nowrap; }
.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.bars li { display: grid; grid-template-columns: 1.2ch 1fr 3ch; align-items: center; gap: 10px; font-size: var(--fs-sm); color: var(--muted); }
.bar { display: block; height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.bar svg { width: 100%; height: 100%; }
.bar rect { fill: var(--text-2); }
.bar-count { text-align: right; }
.reviews { margin-top: var(--s-5); }

/* Отзывы — ведомость: записи через линию */
.review-list { list-style: none; margin: 0 0 var(--s-4); padding: 0; border-top: 1px solid var(--line); }
.review { padding: var(--s-4) 0; border-bottom: 1px solid var(--line); }
.review-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); margin-bottom: var(--s-2); }
.review-date { color: var(--muted); font-size: var(--fs-sm); font-variant-numeric: tabular-nums; white-space: nowrap; }
.review-text { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.thumbs { list-style: none; margin: var(--s-3) 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s-2); }
.thumb { display: block; width: 72px; height: 72px; padding: 0; border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden;
  background: var(--surface-2); cursor: zoom-in; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.more-row { list-style: none; padding-top: var(--s-4); }

/* Просмотр фото */
.lightbox { padding: 0; border: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh;
  overflow: hidden; }
.lightbox[open] { display: grid; place-items: center; }
.lightbox::backdrop { background: var(--overlay); }
.lightbox img { max-width: 100vw; max-height: 100vh; object-fit: contain; }
.lightbox-close { position: fixed; z-index: 2; top: calc(env(safe-area-inset-top) + 8px); right: max(8px, env(safe-area-inset-right));
  color: var(--on-overlay); background: var(--overlay); }

/* Формы */
.form { display: grid; gap: var(--s-4); margin-top: var(--s-4); }
.field { display: grid; gap: 6px; }
.field > label, .label { font-weight: 500; }
.hint { font-weight: 400; color: var(--muted); font-size: var(--fs-sm); margin: 0; }
.counter { text-align: right; }
input[type=text], input[type=search] {
  width: 100%; min-height: 48px; background: var(--surface-2); color: var(--text); border: 1px solid var(--line-input);
  border-radius: var(--r-sm); padding: 11px 14px; transition: border-color var(--t-fast), box-shadow var(--t-fast); }
input[type=search] { padding-left: 44px; -webkit-appearance: none; appearance: none; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
input[type=text]:focus, input[type=search]:focus, textarea:focus { outline: 2px solid transparent; outline-offset: 2px; border-color: var(--text); box-shadow: var(--ring); }
textarea { width: 100%; min-height: 140px; display: block; background: var(--surface-2); color: var(--text); line-height: 1.45;
  border: 1px solid var(--line-input); border-radius: var(--r-sm); padding: 11px 14px; resize: vertical;
  transition: border-color var(--t-fast), box-shadow var(--t-fast); }
.rate { border: 0; padding: 0; margin: 0; min-width: 0; }
.rate legend { font-weight: 500; padding: 0; margin-bottom: 6px; }
.rate-stars { display: flex; gap: var(--s-1); margin-left: -6px; }
.rate-stars label { display: grid; place-items: center; width: 48px; height: 48px; border-radius: var(--r-sm); cursor: pointer;
  color: var(--line-input); transition: color var(--t-fast), transform var(--t-fast); }
.rate-stars label .star { width: 34px; height: 34px; color: inherit; }
.rate-stars label:active { transform: scale(.94); }
.rate-stars input:focus-visible + label { outline: 2px solid var(--focus); outline-offset: 0; }
.rate[data-value="1"] label:nth-of-type(-n+1),
.rate[data-value="2"] label:nth-of-type(-n+2),
.rate[data-value="3"] label:nth-of-type(-n+3),
.rate[data-value="4"] label:nth-of-type(-n+4),
.rate[data-value="5"] label:nth-of-type(-n+5) { color: var(--text); }
.rate .hint { margin-top: 2px; }
.picker { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s-2); }
.picker li { position: relative; width: 84px; height: 84px; border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--line);
  background: var(--surface-2); }
.picker img { width: 100%; height: 100%; object-fit: cover; }
.picker .remove { position: absolute; top: 4px; right: 4px; display: grid; place-items: center; width: 32px; height: 32px; padding: 0;
  border: 0; border-radius: var(--r-sm); background: var(--overlay); color: var(--on-overlay); cursor: pointer; }
.picker .remove .ic { width: 16px; height: 16px; }
.addphoto { justify-self: start; }
.form-error:empty { display: none; }
.form-error .notice { margin: 0; }
.needs-tg { display: grid; gap: var(--s-3); margin: var(--s-3) 0; }
.row { display: flex; gap: var(--s-3); flex-wrap: wrap; align-items: center; }
.row.center { justify-content: center; }

/* Статусные страницы и успех */
.status-page { text-align: center; padding-top: var(--s-6); padding-bottom: var(--s-6); }
.status-page:focus { outline: none; }
.status-page p { color: var(--text-2); }
.status-page .row { margin-top: var(--s-4); }
.status-icon { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto var(--s-4);
  color: var(--text-2); box-shadow: inset 0 0 0 1px var(--line-strong); }
.status-icon .ic { width: 30px; height: 30px; }
.status-icon.ok { color: var(--ok); box-shadow: inset 0 0 0 1px var(--ok-line); }
.status-icon.warn { color: var(--warn); box-shadow: inset 0 0 0 1px var(--warn-line); }

/* Наведение — только там, где есть мышь; на телефоне работает :active */
@media (hover: hover) {
  a:hover { text-decoration: underline; }
  .brand:hover, .btn:hover, .chip:hover, .shoprow:hover, .back:hover { text-decoration: none; }
  .btn:hover { background: var(--btn-hover); border-color: var(--btn-hover); }
  .btn.ghost:hover { background: var(--surface-2); border-color: var(--line-input); }
  .btn:disabled:hover { background: var(--surface-3); border-color: var(--surface-3); }
  .btn.is-pending:hover { background: var(--btn); border-color: var(--btn); }
  .iconbtn:hover { color: var(--text); background: var(--surface-2); }
  .back:hover { color: var(--text); }
  .chip:hover { border-color: var(--line-input); color: var(--text); }
  .shoprow:hover { background: var(--surface-2); }
  .thumb:hover, .avatar-btn:hover .avatar { box-shadow: inset 0 0 0 1px var(--line-input); }
  .rate-stars label:hover { color: var(--text-2); }
}

/* Особые режимы */
@media (forced-colors: active) {
  .star.on, .rate[data-value] label { forced-color-adjust: none; }
  .bar rect { fill: Highlight; }
  input[type=text]:focus, input[type=search]:focus, textarea:focus { outline: 2px solid Highlight; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .shoprow:active, .btn:active, .rate-stars label:active { transform: none; }
}
@media print {
  body { background: #fff; color: #000; }
  .top, .btn, .back, .actions, .links, .search, .sorts { display: none !important; }
  .card, .shoplist, .review, .notice { background: none; color: #000; border-color: #999; box-shadow: none; }
}

/* Телефон */
@media (max-width: 560px) {
  h1 { font-size: var(--fs-xl); }
  h2 { font-size: 1.1875rem; }
  .main { padding-top: var(--s-4); }
  .card { padding: var(--s-4); border-radius: var(--r-md); }
  .rating-summary { gap: var(--s-4); }
  .rating-big { min-width: 88px; }
}
@media (max-width: 400px) {
  .actions { grid-template-columns: 1fr; }
}
/* Ссылки магазина: по две в ряд на телефоне, по три на широком экране; нечётная последняя — во всю ширину */
@media (min-width: 561px) {
  .linkbtn { flex-basis: calc(33.333% - var(--s-2)); }
}
