@font-face {
  font-family: "Onest";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(/fonts/onest-cyrillic.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Onest";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(/fonts/onest-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Unbounded";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url(/fonts/unbounded-cyrillic.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Unbounded";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url(/fonts/unbounded-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ============================================================
   Магазини: поверх Bootstrap 6 alpha.1.
   Палітра спокійна (чорнило й холодне тло), а колір сторінкам дають
   самі магазини: --b ставиться на плитку чи шапку з lib/brands.js.
   ============================================================ */
:root {
  --ink: light-dark(#1d1d22, #f3f1ea);
  --ink-2: light-dark(#45454d, #c9c6bc);
  --mute: light-dark(#76757d, #9b988f);
  --canvas: light-dark(#ffffff, #141416);
  --surface: light-dark(#ffffff, #1c1c20);
  --surface-2: light-dark(#f6f5f0, #232327);
  --line: light-dark(#e9e7e0, #312f35);
  --sun: #ffd12a;
  --sun-deep: #f5b800;
  --sun-soft: light-dark(#fff6d1, #2a2614);
  --star: #f5b800;
  --link: var(--ink);
  --radius-s: 12px;
  --radius-m: 18px;
  --radius-l: 28px;
  --display: "Unbounded", "Onest", system-ui, sans-serif;

  /* токени Bootstrap 6: головна кнопка жовта з чорним текстом, як логотип */
  --bs-body-font-family: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --bs-body-font-size: 1.0625rem;
  --bs-body-line-height: 1.6;
  --bs-bg-body: var(--canvas);
  --bs-fg-body: var(--ink);
  --bs-border-color: var(--line);
  --bs-link-color: var(--ink);
  --bs-link-hover-color: var(--ink);
  --bs-primary-base: #ffd12a;
  --bs-primary-bg: #ffd12a;
  --bs-primary-fg: var(--ink);
  --bs-primary-contrast: #1d1d22;
  --bs-primary-border: var(--sun-deep);
  --bs-primary-bg-subtle: var(--sun-soft);
  --bs-primary-focus-ring: color-mix(in srgb, #f5b800 55%, transparent);
  --bs-secondary-bg: var(--surface);
  --bs-secondary-contrast: var(--ink);
  --bs-secondary-border: var(--line);
  --bs-secondary-fg: var(--ink);
}

body { background: var(--canvas); color: var(--ink); -webkit-font-smoothing: antialiased; }
.container { max-width: 1180px; padding-inline: 20px; }
@media (max-width: 575px) { .container { padding-inline: 16px; } }

h1, h2, .display { font-family: var(--display); font-weight: 700; letter-spacing: -0.015em; color: var(--ink); }
h1 { font-size: clamp(1.75rem, 1.1rem + 2.4vw, 2.9rem); line-height: 1.1; margin: 0 0 18px; text-wrap: balance; }
h2 { font-size: clamp(1.3rem, 1.05rem + 0.9vw, 1.7rem); line-height: 1.2; margin: 0 0 12px; text-wrap: balance; }
h3 { font-size: 1.2rem; font-weight: 700; line-height: 1.3; margin: 0 0 6px; }
p { margin: 0 0 14px; }
a { color: var(--ink); text-underline-offset: 0.2em; text-decoration-thickness: 2px; text-decoration-color: var(--sun-deep); }
a:hover { color: var(--ink); text-decoration-color: var(--ink); }
:focus-visible { outline: 3px solid var(--sun-deep); outline-offset: 2px; border-radius: 4px; }

.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 50; padding: 8px 14px; background: var(--surface); color: var(--ink); border-radius: 8px; }
.skip-link:focus { left: 12px; }
.ic { width: 20px; height: 20px; }

/* ---------- кнопки: Bootstrap 6 btn-solid / btn-outline з нашими кольорами ---------- */
.btn-solid, .btn-outline { --bs-btn-border-radius: 999px; --bs-btn-font-weight: 600; --bs-btn-padding-x: 1.25rem; min-height: 46px; text-decoration: none; }
.btn-outline.theme-secondary { --bs-btn-color: var(--ink); --bs-btn-border-color: var(--line); --bs-btn-bg: var(--surface); --bs-btn-hover-bg: var(--surface-2); --bs-btn-hover-color: var(--ink); --bs-btn-hover-border-color: var(--ink-2); }
.btn-sm { min-height: 36px; --bs-btn-padding-x: 0.9rem; }
/* кнопка у фірмовому кольорі магазину: --b задає батьківський блок */
.btn-brand { --bs-btn-bg: color-mix(in oklch, var(--b) 88%, black); --bs-btn-border-color: transparent; --bs-btn-color: #fff;
  --bs-btn-hover-bg: color-mix(in oklch, var(--b) 74%, black); --bs-btn-hover-color: #fff; --bs-btn-hover-border-color: transparent;
  --bs-btn-active-bg: color-mix(in oklch, var(--b) 66%, black); --bs-btn-active-color: #fff; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 0; }

/* ---------- шапка ---------- */
.site-head { position: sticky; top: 0; z-index: 30; background: color-mix(in oklch, var(--surface) 92%, transparent); backdrop-filter: blur(10px) saturate(1.4); border-bottom: 1px solid var(--line); }
.head-row { display: flex; align-items: center; gap: 28px; min-height: 66px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: var(--sun); color: #1d1d22; font-family: var(--display); font-weight: 800; font-size: 18px; line-height: 1; box-shadow: inset 0 -3px 0 rgb(0 0 0 / 0.12); }
.brand-name { font-family: var(--display); font-weight: 700; font-size: 17px; letter-spacing: -0.02em; }
.brand-name span { font-weight: 400; color: var(--mute); }
.head-nav { display: flex; gap: 4px; margin-left: auto; }
.head-nav a { padding: 8px 12px; border-radius: 999px; color: var(--ink-2); font-weight: 500; text-decoration: none; white-space: nowrap; }
.head-nav a:hover { background: var(--surface-2); color: var(--ink); }
.theme-btn { width: 40px; height: 40px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); display: grid; place-items: center; cursor: pointer; }
.theme-btn .moon { display: none; }
[data-bs-theme=dark] .theme-btn .sun { display: none; }
[data-bs-theme=dark] .theme-btn .moon { display: block; }
@media (prefers-color-scheme: dark) { :root:not([data-bs-theme]) .theme-btn .sun { display: none; } :root:not([data-bs-theme]) .theme-btn .moon { display: block; } }
@media (max-width: 860px) {
  .head-row { flex-wrap: wrap; gap: 0 12px; padding-top: 10px; }
  .theme-btn { margin-left: auto; }
  .head-nav { order: 3; width: 100%; margin: 6px -16px 0; padding: 0 16px 10px; overflow-x: auto; scrollbar-width: none; }
  .head-nav::-webkit-scrollbar { display: none; }
  .head-nav a { padding: 7px 12px; background: var(--surface-2); }
}

/* ---------- крихти ---------- */
.crumbs { display: flex; flex-wrap: wrap; gap: 4px 8px; list-style: none; padding: 18px 0 0; margin: 0; font-size: 14px; color: var(--mute); }
.crumbs li + li::before { content: "/"; margin-right: 8px; color: var(--line); }
.crumbs a { color: var(--mute); text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }

/* ---------- розділи сторінки ---------- */
.section { padding: 44px 0 8px; }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 8px 24px; margin-bottom: 18px; }
.section-head h2 { margin: 0; }
.section-head p { margin: 6px 0 0; color: var(--ink-2); max-width: 62ch; }
.more-link { font-weight: 600; white-space: nowrap; }
.lead { font-size: 1.15rem; line-height: 1.6; color: var(--ink-2); max-width: 64ch; }
.intro { color: var(--ink-2); max-width: 70ch; }
.note { padding: 14px 16px; border-radius: var(--radius-s); background: var(--surface); border: 1px dashed var(--line); color: var(--ink-2); }

/* ---------- головна: вітрина з плиток магазинів ---------- */
.home-hero { padding: 40px 0 24px; }
/* на десктопі вітрина праворуч від тексту, на телефоні одразу під заголовком */
.hero-grid { display: grid; grid-template-columns: 1fr; gap: 0; }
.hero-grid .window { margin: 6px 0 22px; }
@media (min-width: 992px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 520px); column-gap: 56px; grid-template-rows: auto auto 1fr; }
  .hero-grid h1 { grid-column: 1; grid-row: 1; align-self: end; }
  .hero-grid .lead { grid-column: 1; grid-row: 2; }
  .hero-grid .actions { grid-column: 1; grid-row: 3; align-self: start; }
  .hero-grid .window { grid-column: 2; grid-row: 1 / span 3; margin: 0; align-self: center; }
}
.home-hero h1 { font-size: clamp(1.9rem, 1.2rem + 2.2vw, 2.75rem); }
.home-hero .lead { font-size: 1.1rem; }
.window { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tile { --b: #2b3350; position: relative; display: flex; flex-direction: column; justify-content: space-between; aspect-ratio: 1 / 1; padding: 12px; border-radius: var(--radius-m); background: var(--b); color: #fff; text-decoration: none; overflow: hidden; }
.tile::after { content: ""; position: absolute; inset: auto -30% -55% auto; width: 90%; aspect-ratio: 1; border-radius: 50%; background: rgb(255 255 255 / 0.12); pointer-events: none; }
.tile .plate { width: 54%; aspect-ratio: 1; border-radius: 14px; background: #fff; display: grid; place-items: center; padding: 8px; box-shadow: 0 2px 6px rgb(0 0 0 / 0.12); }
.tile .plate img { width: 100%; height: 100%; object-fit: contain; }
.tile b { font-family: var(--display); font-weight: 600; font-size: clamp(12px, 0.7rem + 0.4vw, 15px); line-height: 1.15; letter-spacing: -0.01em; }
.tile:hover { color: #fff; text-decoration: none; filter: saturate(1.15) brightness(1.04); }
.tile:hover .plate { transform: rotate(-4deg); }
.tile .plate { transition: transform .2s ease; }
@media (prefers-reduced-motion: reduce) { .tile .plate { transition: none; } }

/* ---------- картки магазинів (головна, каталог, схожі) ---------- */
.shops { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; list-style: none; padding: 0; margin: 0; }
.shop { --b: #2b3350; display: flex; gap: 14px; align-items: flex-start; height: 100%; padding: 16px; border-radius: var(--radius-m); background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none; position: relative; }
a.shop:hover { border-color: color-mix(in oklch, var(--b) 55%, var(--line)); box-shadow: 0 6px 20px -12px color-mix(in oklch, var(--b) 70%, transparent); text-decoration: none; color: var(--ink); }
.shop-logo { flex: 0 0 56px; height: 56px; border-radius: 14px; background: color-mix(in srgb, var(--b) 16%, var(--surface)); display: grid; place-items: center; padding: 9px; }
.shop-logo img { width: 100%; height: 100%; object-fit: contain; }
.shop-main { min-width: 0; flex: 1; }
.shop-cat { display: block; font-size: 13px; color: var(--mute); margin-bottom: 1px; }
.shop-name { display: block; font-weight: 700; font-size: 1.05rem; line-height: 1.3; }
a.shop:hover .shop-name { color: color-mix(in oklch, var(--b) 80%, var(--ink)); }
.shop-desc { display: block; margin-top: 4px; font-size: 14.5px; line-height: 1.5; color: var(--ink-2); }
.shop-rate { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 13.5px; color: var(--mute); }
.shop-rate b { color: var(--ink); }

/* служби доставки: та сама картка без посилання */
.svc .shop-logo { background: var(--surface-2); }

/* ---------- зірки ---------- */
.stars { display: inline-flex; gap: 1px; vertical-align: middle; }
.stars svg { width: 15px; height: 15px; fill: var(--line); }
.stars svg.on { fill: var(--star); }
.stars.big svg { width: 22px; height: 22px; }

/* ---------- FAQ на нативному details (accordion Bootstrap 6) ---------- */
.accordion { --bs-accordion-bg: var(--surface); --bs-accordion-border-color: var(--line); --bs-accordion-border-radius: var(--radius-m); --bs-accordion-active-bg: var(--surface-2); --bs-accordion-active-color: var(--ink); max-width: 860px; }
.accordion-header { font-weight: 650; font-size: 1.05rem; cursor: pointer; list-style: none; gap: 16px; }
.accordion-header::after { content: "+"; margin-left: auto; font-family: var(--display); font-weight: 400; font-size: 22px; line-height: 1; color: var(--mute); transition: transform .2s ease; }
.accordion-item[open] > .accordion-header::after { transform: rotate(45deg); }
.accordion-body { color: var(--ink-2); padding-top: 4px; }
.accordion-body p:last-child { margin: 0; }

/* ---------- шапка розділу (каталог, відгуки, статті) ---------- */
.page-hero { padding: 24px 0 8px; }
.page-hero .lead { margin-bottom: 0; }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 0; padding: 0; list-style: none; }
.tabs a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 600; text-decoration: none; }
.tabs a:hover { border-color: var(--ink-2); }
.tabs a[aria-current] { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.cats { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.cats a { display: inline-block; padding: 7px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); text-decoration: none; font-size: 15px; }
.cats a:hover { color: var(--ink); border-color: var(--ink-2); }

/* ---------- сторінка магазину: шапка у фірмовому кольорі ---------- */
.store-band { --b: #2b3350; margin-top: 14px; background: color-mix(in srgb, var(--b) 13%, var(--surface)); border-top: 6px solid var(--b); border-bottom: 1px solid color-mix(in srgb, var(--b) 22%, var(--line)); }
.store-band .container { display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: center; padding-top: 34px; padding-bottom: 34px; }
.store-plate { width: 132px; height: 132px; border-radius: var(--radius-l); background: #fff; display: grid; place-items: center; padding: 18px; box-shadow: 0 10px 30px -14px color-mix(in oklch, var(--b) 80%, black); }
.store-plate img { width: 100%; height: 100%; object-fit: contain; }
.store-band h1 { margin-bottom: 12px; font-size: clamp(1.6rem, 1rem + 2vw, 2.5rem); }
.store-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.store-meta li a, .store-meta li span { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 12px; border-radius: 999px; background: color-mix(in oklch, var(--surface) 75%, transparent); border: 1px solid color-mix(in srgb, var(--b) 25%, var(--line)); color: var(--ink); font-size: 14.5px; text-decoration: none; }
.store-meta li a:hover { border-color: var(--b); }
.store-meta .stars svg { width: 14px; height: 14px; }
@media (max-width: 640px) {
  .store-band .container { grid-template-columns: 1fr; gap: 16px; padding-top: 22px; padding-bottom: 24px; }
  .store-plate { width: 84px; height: 84px; padding: 12px; border-radius: var(--radius-m); }
}

/* тіло сторінки магазину: текст + бокова картка */
.store-body { padding-top: 32px; }
.store-body .row { row-gap: 28px; }
.aside-card { --b: #2b3350; position: sticky; top: 86px; padding: 20px; border-radius: var(--radius-m); background: var(--surface); border: 1px solid var(--line); }
.aside-card h2 { font-size: 1.05rem; margin-bottom: 10px; }
.aside-score { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.aside-score b { font-family: var(--display); font-size: 2rem; font-weight: 600; line-height: 1; }
.aside-score small { display: block; color: var(--mute); font-size: 14px; }
.aside-card .btn-solid, .aside-card .btn-outline { width: 100%; justify-content: center; }
.aside-card .actions { flex-direction: column; margin-top: 4px; }
.aside-facts { list-style: none; padding: 0; margin: 14px 0 0; font-size: 14.5px; border-top: 1px solid var(--line); }
.aside-facts li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.aside-facts li span:first-child { color: var(--mute); }
.aside-facts li span:last-child { text-align: right; }

/* ---------- текст статей і оглядів ---------- */
.copy { max-width: 70ch; font-size: 1.0625rem; }
.copy > :first-child { margin-top: 0; }
.copy > .lead { font-size: 1.18rem; color: var(--ink); margin-bottom: 18px; }
.copy h2 { margin: 40px 0 12px; scroll-margin-top: 90px; }
.copy h3 { margin: 26px 0 8px; }
.copy p, .copy li { color: var(--ink-2); line-height: 1.7; }
.copy strong { color: var(--ink); }
.copy ul, .copy ol { padding-left: 1.3em; margin: 0 0 16px; }
.copy li { margin-bottom: 6px; }
.copy li::marker { color: var(--mute); }
.copy ol > li::marker { font-weight: 700; color: var(--ink); }
.copy img { max-width: 100%; height: auto; border-radius: var(--radius-s); }
.copy img[src$=".svg"] { max-height: 72px; width: auto; }
.copy blockquote { margin: 18px 0; padding: 4px 0 4px 18px; border-left: 4px solid var(--sun); }
.copy table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 15px; }
.copy th, .copy td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.copy th { color: var(--mute); font-weight: 600; }
.table-scroll { overflow-x: auto; }
.copy #toc { list-style: none; margin: 22px 0 10px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); columns: 2; column-gap: 28px; }
.copy #toc li { margin: 0 0 7px; break-inside: avoid; line-height: 1.4; }
.copy #toc a { color: var(--ink); text-decoration-color: var(--line); }
.copy #toc a:hover { text-decoration-color: var(--ink); }
@media (max-width: 640px) { .copy #toc { columns: 1; } }

/* ---------- відгуки ---------- */
.store-reviews { padding-top: 48px; max-width: 760px; }
.ratingbox { display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: center; padding: 22px 24px; margin: 18px 0; border-radius: var(--radius-m); background: var(--surface); border: 1px solid var(--line); max-width: 760px; }
.ratingbox .score { text-align: center; }
.ratingbox .score b { display: block; font-family: var(--display); font-weight: 600; font-size: 2.8rem; line-height: 1; margin-bottom: 6px; }
.ratingbox .score small { display: block; margin-top: 6px; color: var(--mute); font-size: 14px; }
.bars { display: grid; gap: 7px; }
.bar { display: grid; grid-template-columns: 40px 1fr 32px; align-items: center; gap: 10px; font-size: 14px; color: var(--mute); }
.bar .track { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.bar .fill { display: block; height: 100%; border-radius: 99px; background: var(--star); }
.bar .num { text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 520px) { .ratingbox { grid-template-columns: 1fr; gap: 16px; } }

.reviews { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; max-width: 760px; }
.reviews > li { padding: 18px 20px; border-radius: var(--radius-m); background: var(--surface); border: 1px solid var(--line); }
.reviews-wide { max-width: none; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.rv-store { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.rv-store img { width: 30px; height: 30px; object-fit: contain; border-radius: 8px; background: #fff; padding: 3px; border: 1px solid var(--line); }
.rv-store a { font-weight: 700; color: var(--ink); text-decoration: none; }
.rv-store a:hover { text-decoration: underline; }
.rv-store .stars { margin-left: auto; }
.rv-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.rv-who { font-weight: 700; }
.rv-when { font-size: 13.5px; color: var(--mute); }
.rv-title { font-weight: 650; font-size: 1.05rem; line-height: 1.35; margin: 8px 0 4px; }
.rv-title a { color: var(--ink); }
.rv-text { color: var(--ink-2); margin: 0; overflow-wrap: anywhere; }
.rv-pm { margin-top: 10px; padding-left: 12px; border-left: 3px solid var(--line); }
.rv-pm b { font-size: 14px; }
.rv-pm p { margin: 2px 0 0; color: var(--ink-2); }
.rv-pm.plus { border-color: #3fa752; }
.rv-pm.minus { border-color: #e04848; }
.rv-shots { display: flex; gap: 8px; margin-top: 12px; }
.rv-shots button { padding: 0; border: 0; background: none; border-radius: 10px; overflow: hidden; cursor: zoom-in; }
.rv-shots img { display: block; width: 84px; height: 84px; object-fit: cover; }
.rv-replies { margin-top: 12px; display: grid; gap: 8px; }
.rv-reply { padding: 10px 14px; border-radius: var(--radius-s); background: var(--surface-2); }
.rv-reply p { margin: 2px 0; color: var(--ink-2); }
.rv-reply small { color: var(--mute); font-size: 13px; }
.rv-foot { display: flex; align-items: center; gap: 14px; margin-top: 12px; }
.linkbtn { border: 0; background: none; padding: 0; color: var(--mute); font: inherit; font-size: 14.5px; cursor: pointer; text-decoration: underline; text-underline-offset: 0.18em; }
.linkbtn:hover { color: var(--ink); }

/* ---------- діалоги (Bootstrap 6 .dialog на нативному <dialog>) ---------- */
.dialog { --bs-dialog-width: 560px; --bs-dialog-bg: var(--surface); --bs-dialog-border-radius: var(--radius-l); }
.dialog .dialog-title { font-family: var(--display); font-weight: 600; font-size: 1.15rem; }
.dlg-close { margin-left: auto; width: 36px; height: 36px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 20px; line-height: 1; cursor: pointer; }
.f { display: block; margin-bottom: 14px; }
.f > span { display: block; margin-bottom: 5px; font-weight: 600; font-size: 15px; }
.f > span i { font-style: normal; color: #d33a3a; }
.f input[type=text], .f input[type=email], .f input[type=password], .f textarea { width: 100%; padding: 10px 12px; border-radius: var(--radius-s); border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); font: inherit; }
.f input:focus, .f textarea:focus { outline: 3px solid color-mix(in srgb, #f5b800 45%, transparent); border-color: #f5b800; }
.f .hint { display: block; margin-top: 4px; color: var(--mute); font-size: 13.5px; }
.rate { display: inline-flex; flex-direction: row-reverse; gap: 4px; }
.rate input { position: absolute; opacity: 0; pointer-events: none; }
.rate label { cursor: pointer; }
.rate svg { width: 30px; height: 30px; fill: var(--line); }
.rate input:checked ~ label svg, .rate label:hover svg, .rate label:hover ~ label svg { fill: var(--star); }
.rate input:focus-visible + label { outline: 3px solid #f5b800; border-radius: 6px; }
.shots-preview { display: flex; gap: 8px; flex-wrap: wrap; }
.shots-preview img { width: 70px; height: 70px; object-fit: cover; border-radius: 10px; }
.lightbox .dialog-body img { display: block; max-width: 100%; max-height: 70vh; margin: 0 auto; border-radius: var(--radius-s); }
.lightbox .count { color: var(--mute); }

/* ---------- гортання ---------- */
.pager { display: flex; justify-content: center; gap: 10px; list-style: none; padding: 0; margin: 28px 0 0; }

/* ---------- підвал ---------- */
.site-foot { margin-top: 72px; padding: 48px 0 28px; background: #1d1d22; color: #cfccc4; }
.site-foot .brand { color: #fff; }
.site-foot .brand-name span { color: #8d97ad; }
.site-foot p { color: #9aa4bd; font-size: 15px; max-width: 40ch; margin-top: 14px; }
.foot-cols { row-gap: 28px; }
.site-foot h2 { font-family: var(--display); font-size: 14px; font-weight: 600; color: #fff; margin: 4px 0 12px; letter-spacing: 0; }
.site-foot ul { list-style: none; padding: 0; margin: 0; }
.site-foot li { margin-bottom: 7px; }
.site-foot a { color: #c9d0e2; text-decoration: none; }
.site-foot a:hover { color: #fff; text-decoration: underline; }
.foot-copy { margin: 36px 0 0 !important; padding-top: 18px; border-top: 1px solid #34333a; font-size: 14px !important; max-width: none !important; }

/* сторінка помилки й вхід */
.form { max-width: 420px; }
/* форма всередині діалогу: шапка й кнопки на місці, прокручується лише середина */
.dialog > form { display: flex; flex-direction: column; max-height: calc(100dvh - 3.5rem); min-height: 0; }
.dialog > form > .dialog-body { overflow-y: auto; min-height: 0; }
.f > span small { font-weight: 400; color: var(--mute); }
#vidhuky, [id^="review-"] { scroll-margin-top: 84px; }

/* ============================================================
   Бренд «М»: жовтий і чорний, ілюстрації з /img/vectors
   ============================================================ */
.brand-mark { width: 36px; height: 36px; border-radius: 8px; font-size: 20px; box-shadow: none; }
.brand-name { font-size: 19px; font-weight: 700; margin-left: -6px; }
.site-head { background: color-mix(in srgb, var(--canvas) 94%, transparent); }
.head-nav a:hover { background: var(--sun-soft); }
.tabs a[aria-current] { background: var(--sun); border-color: var(--sun); color: #1d1d22; }
.btn-solid.theme-primary { --bs-btn-hover-bg: var(--sun-deep); --bs-btn-hover-border-color: var(--sun-deep); --bs-btn-hover-color: #1d1d22; }
.btn-outline.theme-secondary { --bs-btn-border-color: var(--ink); --bs-btn-hover-bg: var(--ink); --bs-btn-hover-color: var(--canvas); --bs-btn-hover-border-color: var(--ink); }
.btn-solid, .btn-outline { min-height: 50px; --bs-btn-padding-x: 1.5rem; font-size: 1.02rem; }
.btn-sm { min-height: 36px; --bs-btn-padding-x: 0.9rem; font-size: 0.92rem; }

/* жовтий маркер під кінцем заголовка, як на старому сайті */
.mark { background: linear-gradient(transparent 62%, var(--sun) 62%, var(--sun) 92%, transparent 92%); padding: 0 0.08em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }

/* головна: ілюстрація на жовтому колі */
.home-hero { padding: 48px 0 36px; }
.hero-art { position: relative; aspect-ratio: 1 / 0.86; max-width: 500px; width: 100%; justify-self: center; }
.art-sun { position: absolute; inset: 6% 8% 4% 8%; border-radius: 50%; background: var(--sun); }
.art-main { position: absolute; left: 50%; top: 52%; width: 56%; height: auto; transform: translate(-50%, -50%); }
.art-chip { position: absolute; width: 20%; height: auto; padding: 10px; border-radius: 22px; background: var(--surface); box-shadow: 0 10px 24px -12px rgb(0 0 0 / 0.35); }
.art-chip.a1 { left: 2%; top: 12%; transform: rotate(-8deg); }
.art-chip.a2 { right: 1%; top: 6%; transform: rotate(7deg); }
.art-chip.a3 { left: 0; bottom: 6%; transform: rotate(5deg); }
.art-chip.a4 { right: 3%; bottom: 2%; transform: rotate(-6deg); }
@media (prefers-reduced-motion: no-preference) {
  .art-chip { animation: chip-in .5s cubic-bezier(.2,.8,.3,1.3) both; }
  .art-chip.a2 { animation-delay: .12s; } .art-chip.a3 { animation-delay: .24s; } .art-chip.a4 { animation-delay: .36s; }
  @keyframes chip-in { from { opacity: 0; translate: 0 18px; scale: .8; } }
}
.hero-grid .hero-art { margin: 8px auto 22px; }
@media (min-width: 992px) { .hero-grid .hero-art { grid-column: 2; grid-row: 1 / span 3; margin: 0; align-self: center; } }
@media (max-width: 991px) { .hero-grid .hero-art { max-width: 340px; } }

/* розділи сайту під героєм */
.guides { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; list-style: none; padding: 0; margin: 0 0 28px; }
.guides a { display: flex; align-items: center; gap: 14px; height: 100%; padding: 16px; border-radius: var(--radius-m); background: var(--surface-2); color: var(--ink); text-decoration: none; border: 2px solid transparent; }
.guides a:hover { border-color: var(--sun); background: var(--sun-soft); }
.guides img { flex: 0 0 52px; width: 52px; height: 52px; }
.guides b { display: block; font-weight: 700; line-height: 1.25; }
.guides small { display: block; color: var(--mute); font-size: 14px; margin-top: 2px; }
@media (max-width: 991px) { .guides { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .guides { grid-template-columns: 1fr; } .guides a { padding: 12px 14px; } }

/* заголовки розділів з ілюстрацією */
.h-art { display: flex; align-items: center; gap: 14px; }
.h-art img { flex: 0 0 44px; width: 44px; height: 44px; }

/* жовта смуга на всю ширину */
.band { margin-top: 40px; padding: 44px 0 40px; background: var(--sun-soft); }
.band .shop { border-color: transparent; }

/* картки: на білому тлі сторінки сірі, при наведенні жовта рамка */
.shop { background: var(--surface-2); border: 2px solid transparent; }
a.shop:hover { border-color: var(--sun); box-shadow: none; background: var(--surface); }
a.shop:hover .shop-name { color: var(--ink); }
.shop-logo { background: color-mix(in srgb, var(--b) 14%, var(--surface)); }
.accordion { --bs-accordion-bg: var(--surface-2); --bs-accordion-border-color: transparent; --bs-accordion-active-bg: var(--sun-soft); }
.accordion-header::after { color: var(--ink); }
.reviews > li, .ratingbox, .aside-card, .note { background: var(--surface-2); border-color: transparent; }
.prose #toc, .copy #toc { background: var(--sun-soft); border-color: transparent; }
.copy #toc a { text-decoration-color: var(--sun-deep); }
.copy blockquote { border-left-color: var(--sun); }

/* сторінка магазину: жовта шапка, логотип на білій плашці */
.store-band { background: var(--sun-soft); border-top: 0; border-bottom: 0; margin-top: 14px; }
.store-band .container { position: relative; }
.store-plate { box-shadow: 0 10px 30px -16px rgb(0 0 0 / 0.35); border: 3px solid var(--b); }
.store-meta li a, .store-meta li span { background: var(--surface); border-color: transparent; }
.store-meta li a:hover { border-color: var(--ink); }
.btn-brand { --bs-btn-bg: var(--sun); --bs-btn-color: #1d1d22; --bs-btn-hover-bg: var(--sun-deep); --bs-btn-hover-color: #1d1d22; --bs-btn-active-bg: var(--sun-deep); --bs-btn-active-color: #1d1d22; }

/* підвал */
.site-foot { background: #1d1d22; }
.site-foot .brand-name span, .site-foot p { color: #a19e95; }
.site-foot a { color: #e8e5dc; }
.site-foot a:hover { color: var(--sun); text-decoration-color: var(--sun); }

/* картки магазинів: компактний рядок, логотип на білому кружечку в кільці фірмового кольору */
.shops.signs { grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); gap: 14px; }
.signs .shop { align-items: center; gap: 18px; padding: 16px 20px; background: var(--surface); border: 2px solid var(--line); }
.signs a.shop:hover { border-color: var(--sun); background: var(--sun-soft); }
.signs .shop-logo { flex: 0 0 68px; width: 68px; height: 68px; border-radius: 50%; padding: 4px; background: var(--b); }
.signs .shop-logo img { width: 100%; height: 100%; padding: 11px; border-radius: 50%; background: #fff; object-fit: contain; }
.signs .shop-name { font-family: var(--display); font-weight: 700; font-size: 1.08rem; letter-spacing: -0.01em; }
.signs .shop-desc { font-size: 15px; margin-top: 3px; }
.signs .shop-cat { margin-bottom: 4px; }
.signs .shop-rate { margin-top: 8px; }
.band .shop { background: var(--surface); }

/* ілюстрація праворуч у шапці магазину й довідників */
.band-art { display: none; }
@media (min-width: 992px) {
  .store-band .container { grid-template-columns: auto 1fr auto; }
  .store-band .band-art { display: block; width: 150px; height: 150px; }
  .art-hero { background: var(--sun-soft); margin-top: 14px; padding: 36px 0 32px; }
  .art-hero .container { position: relative; padding-right: 220px; }
  .art-hero .band-art { display: block; position: absolute; right: 30px; top: 50%; width: 150px; height: 150px; transform: translateY(-50%); }
}
@media (max-width: 991px) { .art-hero { background: var(--sun-soft); margin-top: 14px; padding: 24px 0; } }
/* на темній темі світлий текст на жовтому не читається: маркер стає суцільною плашкою */
[data-bs-theme=dark] .mark { color: #1d1d22; background: var(--sun); border-radius: 8px; padding: 0 0.15em; }
@media (prefers-color-scheme: dark) { :root:not([data-bs-theme]) .mark { color: #1d1d22; background: var(--sun); border-radius: 8px; padding: 0 0.15em; } }
/* правило для всіх посилань перебивало колір тексту кнопок-посилань */
a.btn-solid, a.btn-outline { color: var(--bs-btn-color); text-decoration: none; }
a.btn-solid:hover, a.btn-outline:hover { color: var(--bs-btn-hover-color); }
.btn-solid.theme-primary, .btn-brand { --bs-btn-color: #1d1d22; }
/* під підвалом при «пружинній» прокрутці macOS не має з'являтися біла смуга */
html { overscroll-behavior-y: none; background: #1d1d22; }
body { min-height: 100vh; display: flex; flex-direction: column; }
body > main { flex: 1 0 auto; }
/* акварельні ілюстрації вертикальні: вписуємо в квадратні місця без обрізання */
img[src*="/img/ill/"] { object-fit: contain; }
.art-chip[src*="/img/ill/"] { padding: 6px; }
/* реалістичні фото: вирізані предмети вписуємо, мініатюри вже мають білий квадрат з кутами */
img[src*="/img/photo/"] { object-fit: contain; }
.art-chip[src*="/img/photo/"] { padding: 0; }
/* набір svg-real: векторні, вписуємо без обрізання */
img[src*="/img/svg-real/"] { object-fit: contain; }
