:root {
  --bg: #f5f6fa;
  --surface: #ffffff;
  --surface-2: #eef0f5;
  --media: #ffffff;
  --ink: #12151c;
  --ink-2: #474f5e;
  --muted: #8a92a3;
  --line: #e4e7ee;
  --accent: #2f5cf5;
  --accent-ink: #ffffff;
  --accent-soft: #e8edff;
  --sale: #e5372b;
  --sale-soft: #ffebe9;
  --good: #14915a;
  --good-soft: #e3f6ec;
  --warn: #b26a00;
  --warn-soft: #fff3dc;
  --chart-line: #2f5cf5;
  --grid: #edf0f4;
  --header: rgba(245, 246, 250, 0.82);
  --shadow: 0 1px 2px rgba(18, 21, 28, 0.04), 0 4px 16px rgba(18, 21, 28, 0.06);
  --shadow-hover: 0 2px 4px rgba(18, 21, 28, 0.05), 0 12px 32px rgba(18, 21, 28, 0.12);
  --r-lg: 20px;
  --r-md: 14px;
  --r-sm: 10px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c0f14;
    --surface: #151922;
    --surface-2: #1d2330;
    --media: #f4f5f7;
    --ink: #eef1f6;
    --ink-2: #b6bdca;
    --muted: #7d8697;
    --line: #252c3a;
    --accent: #6d8cff;
    --accent-ink: #0c0f14;
    --accent-soft: #1d2747;
    --sale: #ff6b5e;
    --sale-soft: #3a1c1a;
    --good: #4fd394;
    --good-soft: #13301f;
    --warn: #f3a93f;
    --warn-soft: #33270f;
    --chart-line: #6d8cff;
    --grid: #202634;
    --header: rgba(12, 15, 20, 0.78);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 12px 32px rgba(0, 0, 0, 0.45);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.45 Onest, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
a { color: inherit; }
img { max-width: 100%; }
svg { flex: none; }
.wrap { max-width: 1180px; margin: 0 auto; padding-inline: 16px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Шапка ---------- */
.top {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--header);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top, 0px);
}
.top__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 12px 8px; }
.logo { display: flex; align-items: center; gap: 10px; font-size: 19px; font-weight: 600; letter-spacing: -0.02em; text-decoration: none; }
.logo img { border-radius: 9px; }
.logo b { font-weight: 800; }

.city-pick {
  display: flex; align-items: center; gap: 4px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
  padding-left: 12px; min-width: 0;
}
.top__actions { display: flex; align-items: center; gap: 8px; min-width: 0; }
.logo { flex: none; }

/* Обране: кнопка в шапці з лічильником подешевшань */
.fav-link {
  position: relative; flex: none; display: inline-grid; place-items: center;
  width: 40px; height: 40px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none;
}
.fav-link[aria-current] { color: var(--sale); }
.fav-link__n[hidden] { display: none; }
.fav-link:hover { border-color: color-mix(in srgb, var(--sale) 40%, var(--line)); }
.fav-link svg, .fav-btn svg, .fav-toggle svg, .toast svg {
  width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round;
}
.fav-link__n {
  position: absolute; top: -5px; right: -5px; min-width: 19px; height: 19px; padding: 0 5px;
  display: grid; place-items: center; border-radius: 999px; border: 2px solid var(--bg);
  background: var(--sale); color: #fff; font-size: 11px; font-weight: 700; line-height: 1;
}
.city-pick svg { width: 16px; height: 16px; fill: none; stroke: var(--accent); stroke-width: 2.2; }
.city-pick select { border: 0; background: transparent; font-weight: 600; padding: 8px 32px 8px 2px; min-width: 0; }

select, input[type=search] { font: inherit; color: var(--ink); }
select {
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%238a92a3' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m1 1.5 5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
  cursor: pointer; text-overflow: ellipsis;
}

.filters { padding-block: 2px 12px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.search {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  padding-inline: 14px; transition: border-color .15s, box-shadow .15s;
}
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.search svg { width: 20px; height: 20px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; }
.search input { flex: 1; border: 0; background: transparent; padding: 12px 0; font-size: 16px; outline: none; min-width: 0; }
.search input::placeholder { color: var(--muted); }

.filters__row { display: flex; gap: 8px; align-items: center; }
.pill {
  flex: 1 1 0; min-width: 0;
  background-color: var(--surface); border: 1px solid var(--line); border-radius: 999px;
  padding: 9px 34px 9px 14px; font-size: 14px; font-weight: 500;
}
.pill:hover, .city-pick:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.chip-toggle { position: relative; cursor: pointer; }
.chip-toggle input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip-toggle span {
  display: block; white-space: nowrap; font-size: 14px; font-weight: 600;
  padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
  transition: background .15s, color .15s, border-color .15s;
}
.chip-toggle input:checked + span { background: var(--sale); border-color: var(--sale); color: #fff; }
.chip-toggle input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.top.is-product .filters { display: none; }
@media (max-width: 520px) {
  .top__row { padding-block: 10px 6px; }
  .filters { gap: 8px; padding-bottom: 10px; }
  .search input { padding: 10px 0; }
  .pill { padding: 8px 28px 8px 12px; font-size: 13px; background-position: right 10px center; }
  .chip-toggle span { padding: 8px 12px; font-size: 13px; }
}

/* ---------- Розділи ---------- */
.groups {
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
  margin: 16px -16px 0; padding: 2px 16px 4px;
  scroll-padding-inline: 16px;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 24px), transparent);
  mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 24px), transparent);
}
.groups::-webkit-scrollbar { display: none; }
.groups-wrap { position: relative; }
.groups { -webkit-user-select: none; user-select: none; }
.groups.is-dragging { cursor: grabbing; }
.groups.is-dragging .gchip { pointer-events: none; }
.gscroll { display: none; }
/* З мишею — стрілки обабіч ряду (а не поверх чипів); на сенсорних екранах їх немає, там свайп. */
@media (hover: hover) {
  .groups-wrap { display: flex; align-items: center; gap: 6px; margin-top: 16px; }
  .groups-wrap .groups {
    flex: 1; min-width: 0; margin: 0; padding: 2px 12px 4px; scroll-padding-inline: 12px;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 12px, #000 calc(100% - 12px), transparent);
    mask-image: linear-gradient(90deg, transparent 0, #000 12px, #000 calc(100% - 12px), transparent);
  }
  .gscroll {
    display: inline-flex; flex: none; width: 36px; height: 36px; padding: 0; justify-content: center;
    font-size: 22px; line-height: 1; font-weight: 500;
    background: var(--surface); box-shadow: var(--shadow);
  }
  .gscroll:disabled { opacity: .35; pointer-events: none; }
}
.gchip {
  flex: none; display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px; font-size: 14px; font-weight: 500; white-space: nowrap;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.gchip span { font-size: 17px; line-height: 1; }
.gchip small { color: var(--muted); font-size: 12px; font-weight: 500; font-variant-numeric: tabular-nums; }
.gchip[aria-pressed=true] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.gchip[aria-pressed=true] small { color: inherit; opacity: .65; }

/* ---------- Список ---------- */
.status { color: var(--muted); text-align: center; padding: 56px 0; }
.empty { text-align: center; padding: 64px 16px; color: var(--ink-2); }
.empty b { display: block; font-size: 40px; margin-bottom: 6px; }
.count { color: var(--muted); font-size: 13px; margin: 18px 2px 10px; }
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(176px, 1fr));
  gap: 14px;
}
@media (max-width: 520px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }

.card {
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  display: flex; flex-direction: column;
  text-decoration: none; overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease;
}
@media (hover: hover) { .card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); } }
.card__media { position: relative; background: var(--media); margin: 6px 6px 0; border-radius: calc(var(--r-lg) - 6px); }
.card__img { display: block; aspect-ratio: 1; width: 100%; object-fit: contain; padding: 10px; mix-blend-mode: multiply; }
.card__body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card__name { font-size: 14px; line-height: 1.3; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card__price { margin-top: auto; display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.card__flags { display: flex; gap: 4px; flex-wrap: wrap; }
.card__flags:empty { display: none; }

.price { font-weight: 700; font-size: 19px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.price small { font-weight: 500; color: var(--muted); font-size: 12px; letter-spacing: 0; }
.price--sale { color: var(--sale); }
.old { color: var(--muted); text-decoration: line-through; font-size: 13px; font-variant-numeric: tabular-nums; }
.per { flex-basis: 100%; color: var(--muted); font-size: 12px; font-weight: 500; font-variant-numeric: tabular-nums; margin-top: -4px; }
.product__per { flex-basis: 100%; color: var(--ink-2); font-size: 14px; font-weight: 500; font-variant-numeric: tabular-nums; }

.badge {
  position: absolute; top: 8px; left: 8px;
  background: var(--sale); color: #fff;
  font-size: 12px; font-weight: 700;
  padding: 3px 8px; border-radius: 999px;
}
.tag {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 11.5px; font-weight: 600; line-height: 1;
  padding: 5px 7px; border-radius: 999px; white-space: nowrap;
}
.tag--up { color: var(--sale); background: var(--sale-soft); }
.tag--down { color: var(--good); background: var(--good-soft); }
.tag--warn { color: var(--warn); background: var(--warn-soft); }
.more { display: block; margin: 20px auto; }

/* Серце на картці */
.fav-btn {
  position: absolute; top: 6px; right: 6px; width: 34px; height: 34px; padding: 0; justify-content: center;
  border: 0; color: #8a92a3; background: rgba(255, 255, 255, 0.88); box-shadow: 0 1px 4px rgba(18, 21, 28, 0.12);
}
.fav-btn:hover { color: var(--sale); }
.fav-btn[aria-pressed=true] { color: #e5372b; }
.fav-btn[aria-pressed=true] svg, .fav-toggle[aria-pressed=true] svg, .fav-link[aria-current] svg, .toast svg { fill: currentColor; }
@media (hover: hover) {
  .card .fav-btn[aria-pressed=false] { opacity: 0; transition: opacity .15s; }
  .card:hover .fav-btn, .card .fav-btn:focus-visible { opacity: 1; }
}
.card--missing { opacity: .6; }
.card--missing .card__body { gap: 4px; }

/* Ціна в інших містах: точка на шкалі від найдешевшого до найдорожчого */
.compare__summary { margin: 0 0 12px; font-size: 14px; color: var(--ink-2); }
.compare__summary b { color: var(--ink); font-variant-numeric: tabular-nums; }
.crows { columns: 2 420px; column-gap: 24px; }
.crow {
  display: grid; grid-template-columns: minmax(80px, 9em) 1fr 7.6em 5.6em; align-items: center; gap: 12px;
  width: 100%; break-inside: avoid; margin-bottom: 2px; padding: 8px 10px; border: 0; border-radius: var(--r-sm); background: transparent;
  font-weight: 500; text-align: left;
}
.crow:hover { background: var(--surface-2); }
.crow.is-here { background: var(--accent-soft); cursor: default; }
.crow.is-extra { display: none; }
#compare.is-open .crow.is-extra { display: grid; }
.crow__city { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crow.is-here .crow__city { font-weight: 700; }
.crow__track { position: relative; height: 4px; border-radius: 2px; background: var(--grid); margin-inline: 5px; }
.crow__track i {
  position: absolute; top: 50%; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%;
  background: var(--chart-line); box-shadow: 0 0 0 2px var(--surface);
}
.crow.is-here .crow__track i { box-shadow: 0 0 0 2px var(--accent-soft); }
.crow__price { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
.crow__price .old { font-weight: 500; font-size: 12px; margin-left: 2px; }
.crow__diff { font-size: 12px; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.crow__diff--down { color: var(--good); font-weight: 600; }
.crow__diff--up { color: var(--sale); font-weight: 600; }
.compare__more { margin: 8px 0 0; padding: 7px 14px; font-size: 13px; }
#compare .note { margin: 12px 0 0; }
@media (max-width: 520px) {
  .crow { grid-template-columns: minmax(0, 1fr) auto 5.4em; gap: 8px; padding-inline: 8px; }
  .crow__track { display: none; }
}

/* Що змінилося */
.today-banner {
  display: flex; align-items: center; flex-wrap: wrap; gap: 4px 14px; margin-top: 16px;
  padding: 11px 16px; border-radius: var(--r-md); background: var(--surface); box-shadow: var(--shadow);
  text-decoration: none; font-size: 14px; font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums;
}
.today-banner b { color: var(--ink); }
.today-banner:hover { box-shadow: var(--shadow-hover); }
.tb__down { color: var(--good); }
.tb__up { color: var(--sale); }
.today-banner__go { margin-left: auto; color: var(--accent); }
.today-sub { margin: -4px 0 14px; }
.today-tabs { display: flex; flex-wrap: wrap; width: fit-content; max-width: 100%; margin-bottom: 16px; border-radius: var(--r-md); }
.today-tabs a {
  padding: 7px 12px; border-radius: calc(var(--r-md) - 3px); font-size: 13.5px; font-weight: 600;
  color: var(--ink-2); text-decoration: none; white-space: nowrap;
}
.today-tabs a small { color: var(--muted); font-weight: 500; margin-left: 2px; }
.today-tabs a[aria-selected=true] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }

/* Сторінка «Обране» */
.page-title { font-size: clamp(22px, 3vw, 28px); letter-spacing: -0.02em; margin: 0 0 12px; }
.notify { display: flex; align-items: center; gap: 10px 16px; flex-wrap: wrap; margin: 0 0 8px; padding: 14px 16px; }
.notify .note { margin: 0; flex: 1 1 260px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 22px 2px 10px; }
.section-head h2 { font-size: 17px; letter-spacing: -0.01em; margin: 0; }
.section-head button { padding: 7px 14px; font-size: 13px; }

/* Сторінка товару: «Стежити за ціною» */
.fav-actions { display: contents; }
.fav-toggle[aria-pressed=true] { color: var(--sale); background: var(--sale-soft); border-color: transparent; }
.fav-target { flex-basis: 100%; order: 3; display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; font-size: 13.5px; color: var(--ink-2); }
.fav-target input {
  width: 96px; font: inherit; font-weight: 600; color: var(--ink);
  padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
}
.fav-target input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }

/* Підказка «подешевшало» */
.toast {
  position: fixed; z-index: 30; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%);
  display: flex; align-items: center; gap: 10px; max-width: calc(100% - 32px);
  background: var(--ink); color: var(--bg); text-decoration: none; font-weight: 600; font-size: 14px;
  padding: 12px 18px; border-radius: 999px; box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
  animation: toast-in .3s ease;
}
.toast svg { color: #ff6b5e; }
.toast span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 12px); } }

/* Скелетони під час завантаження */
.skeleton .card__media, .sk {
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--line) 50%, var(--surface-2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite linear;
}
.skeleton .card__media { aspect-ratio: 1; }
.sk { height: 12px; border-radius: 6px; }
@keyframes shimmer { to { background-position: -200% 0; } }

button, .btn {
  font: inherit; font-weight: 600; font-size: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  border-radius: 999px;
  padding: 10px 18px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex; align-items: center; gap: 6px;
  transition: border-color .15s, background .15s;
}
button:hover, .btn:hover { border-color: var(--accent); }
.btn--primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn--primary:hover { filter: brightness(1.08); }

/* ---------- Сторінка товару ---------- */
.back {
  display: inline-flex; align-items: center; gap: 6px; margin: 16px 0 12px;
  color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: 14px;
}
.back:hover { color: var(--accent); }
.product {
  display: grid; grid-template-columns: 300px 1fr; gap: 28px; align-items: center;
  background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 16px;
}
@media (max-width: 700px) {
  .product { grid-template-columns: 1fr; gap: 14px; }
  .product__media { max-width: 260px; margin: 0 auto; width: 100%; }
}
.product__media { background: var(--media); border-radius: var(--r-md); }
.product__img { display: block; aspect-ratio: 1; object-fit: contain; width: 100%; padding: 16px; mix-blend-mode: multiply; }
.product h1 { font-size: clamp(20px, 3vw, 26px); line-height: 1.25; letter-spacing: -0.02em; margin: 0 0 10px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.chip { font-size: 12.5px; font-weight: 500; color: var(--ink-2); background: var(--surface-2); padding: 4px 10px; border-radius: 999px; }
.product__price { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.product__price .price { font-size: 36px; }
.product__price .old { font-size: 16px; }
.product__label { display: inline-block; background: var(--sale-soft); color: var(--sale); border-radius: 999px; padding: 4px 10px; font-size: 13px; font-weight: 700; }
.product__promo { display: inline-block; background: var(--accent-soft); color: var(--accent); border-radius: 999px; padding: 4px 10px; font-size: 13px; font-weight: 600; }
.product__actions { margin-top: 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

.panel { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 18px; margin-top: 16px; }
.panel__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.panel h2 { font-size: 17px; letter-spacing: -0.01em; margin: 0; }
.seg { display: inline-flex; background: var(--surface-2); border-radius: 999px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 6px 12px; font-size: 13px; color: var(--ink-2); }
.seg button[aria-pressed=true] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin-top: 14px; }
.stat { background: var(--surface-2); border-radius: var(--r-md); padding: 12px 14px; }
.stat__k { color: var(--muted); font-size: 12px; font-weight: 500; }
.stat__v { font-weight: 700; font-size: 17px; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; margin-top: 2px; }

.chart { position: relative; touch-action: pan-y; }
.chart > svg { display: block; width: 100%; height: 280px; overflow: visible; }
.chart .axis text { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; font-family: inherit; }
.chart .gridline { stroke: var(--grid); stroke-width: 1; }
.chart .line { fill: none; stroke: var(--chart-line); stroke-width: 2.5; stroke-linejoin: round; }
.chart .area { fill: url(#areaGrad); }
.chart .sale-band { fill: var(--sale); opacity: .09; }
.chart .cross { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.chart .dot { fill: var(--chart-line); stroke: var(--surface); stroke-width: 3; }
.chart .old-line, .legend .old-line { fill: none; stroke: var(--muted); stroke-width: 1.5; stroke-dasharray: 5 3; }
.chart .old-line--inflated, .legend .old-line--inflated { stroke: var(--warn); stroke-width: 2; }
.chart .ref-line, .legend .ref-line { fill: none; stroke: var(--warn); stroke-width: 2; stroke-dasharray: 0 4; stroke-linecap: round; }
.chart .legend svg { display: inline; width: 18px; height: 10px; vertical-align: -1px; margin-right: 5px; }
.tip {
  position: absolute; top: -6px; pointer-events: none;
  background: var(--ink); color: var(--bg); border-radius: var(--r-sm);
  padding: 8px 11px; font-size: 12.5px; line-height: 1.45;
  box-shadow: 0 8px 24px rgba(0,0,0,.18);
  white-space: nowrap; transform: translateX(-50%);
}
.tip b { font-size: 15px; font-variant-numeric: tabular-nums; }
.tip .old { color: inherit; opacity: .6; }
.tip .warn { color: var(--warn); }
@media (prefers-color-scheme: light) { .tip .warn { color: #ffc266; } }
.legend { display: flex; gap: 6px 16px; flex-wrap: wrap; font-size: 12px; color: var(--ink-2); margin-top: 8px; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-right: 6px; vertical-align: -2px; }
.note { color: var(--muted); font-size: 13px; }

.warn { color: var(--warn); font-size: 12px; font-weight: 600; }
.warn-box {
  display: flex; gap: 10px; align-items: flex-start;
  background: var(--warn-soft); color: var(--ink); border-radius: var(--r-md);
  padding: 12px 14px; margin: 14px 0 0; font-size: 14px; line-height: 1.45;
}
.warn-box > b:first-child { color: var(--warn); font-size: 18px; line-height: 1.1; }

details.table { margin-top: 14px; }
details.table summary { cursor: pointer; color: var(--accent); font-size: 14px; font-weight: 500; }
.tablewrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 13.5px; margin-top: 8px; font-variant-numeric: tabular-nums; }
th { color: var(--muted); font-weight: 500; font-size: 12px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); }

.foot { color: var(--muted); font-size: 12px; padding-block: 32px 40px; text-align: center; line-height: 1.6; }
.foot p { margin: 4px 0; }

/* Плавні переходи між сторінками */
@media (prefers-reduced-motion: no-preference) {
  ::view-transition-old(root), ::view-transition-new(root) { animation-duration: .18s; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
