/* Спокойная тёмная тема в стиле канала. Лайм — только для того, что ведёт к оплате. */
:root {
  --bg: #0D1220;
  --card: #151C2E;
  --card-2: #1B2439;
  --line: rgba(163, 174, 201, 0.12);
  --line-2: rgba(163, 174, 201, 0.22);
  --text: #EEF2FB;
  --muted: #A3AEC9;
  --teal: #5EE0F2;
  --blue: #7AA7FF;
  --lime: #C6FF3D;
  --danger: #FF5C7A;
  --on-lime: #0D1220;

  --radius: 16px;
  --pad: 16px;
  --tabbar-h: 62px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

body {
  min-width: 320px;
  min-height: 100vh;
  padding: 0 var(--pad) calc(var(--tabbar-h) + 24px + env(safe-area-inset-bottom));
  overflow-x: hidden;
}

button { font: inherit; color: inherit; }
a { color: var(--blue); }

header, main { max-width: 560px; margin-inline: auto; }

/* ---------- Вайбик ---------- */
.hero {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  padding: 14px 0 16px;
}

.vb {
  --size: 84px;
  position: relative;
  flex: none;
  width: var(--size);
  height: calc(var(--size) * 300 / 280);
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  transition: width 0.3s ease, height 0.3s ease;
}
body[data-route="catalog"] .vb { --size: 132px; }

.vb-body {
  position: absolute;
  inset: 0;
  animation: bob 3.6s ease-in-out infinite;
}
.vb-pose {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.vb-pose.on { opacity: 1; }
.vb-pose svg, .vb-pose img { display: block; width: 100%; height: 100%; }

.vb-eye { transform-box: fill-box; transform-origin: 50% 50%; transition: transform 0.07s ease; }
.vb.blink .vb-eye { transform: scaleY(0.12); }

@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3.5px); } }

.vb-spark {
  position: absolute;
  top: -6%;
  left: 50%;
  width: 26px;
  height: 26px;
  margin-left: -13px;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle, var(--lime) 0 18%, transparent 19%),
              conic-gradient(from 45deg, transparent 0 20%, rgba(198, 255, 61, 0.9) 21% 24%, transparent 25% 45%,
                             rgba(198, 255, 61, 0.9) 46% 49%, transparent 50% 70%, rgba(198, 255, 61, 0.9) 71% 74%,
                             transparent 75% 95%, rgba(198, 255, 61, 0.9) 96% 99%, transparent 100%);
  border-radius: 50%;
}
.vb-spark.go { animation: spark 0.6s ease-out; }
@keyframes spark {
  0% { opacity: 0; transform: scale(0.3) rotate(0); }
  30% { opacity: 1; }
  100% { opacity: 0; transform: scale(1.8) rotate(90deg); }
}

.bubble {
  position: relative;
  flex: 1;
  min-width: 0;
  margin-bottom: 18px;
  padding: 10px 14px 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius) var(--radius) var(--radius) 6px;
}
.bubble::before {
  content: "";
  position: absolute;
  left: -6px;
  bottom: 10px;
  width: 11px;
  height: 11px;
  background: var(--card);
  border-left: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  transform: rotate(45deg);
}
.bubble-name { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; }
.online { display: inline-flex; align-items: center; gap: 5px; font-weight: 500; font-size: 12px; color: var(--teal); }
.online::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--teal); }
.bubble-text { margin-top: 3px; font-size: 14.5px; line-height: 1.45; color: var(--text); }
.bubble-text.swap { animation: swap 0.3s ease; }
@keyframes swap { from { opacity: 0; transform: translateY(3px); } }

/* ---------- Нижняя панель ---------- */
.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
  display: flex;
  justify-content: space-around;
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  padding: 6px 4px env(safe-area-inset-bottom);
  background: rgba(13, 18, 32, 0.96);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(10px);
}
.tab {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  max-width: 96px;
  padding-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
}
.tab[hidden] { display: none; }
.tab svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tab.active { color: var(--teal); }
.tab .dot {
  position: absolute;
  top: 3px;
  left: calc(50% + 9px);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 2px var(--bg);
}

/* ---------- Общие блоки ---------- */
.section-title {
  margin: 22px 2px 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.section-title:first-child { margin-top: 4px; }

.stack { display: grid; gap: 12px; }

.card {
  padding: var(--pad);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  animation: rise 0.3s ease both;
}
.stack > .card:nth-child(2) { animation-delay: 0.04s; }
.stack > .card:nth-child(3) { animation-delay: 0.08s; }
.stack > .card:nth-child(4) { animation-delay: 0.12s; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }

.card h3 { margin: 0; font-size: 17px; line-height: 1.3; font-weight: 700; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

.product-top { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.num {
  display: inline-grid;
  place-items: center;
  min-width: 32px;
  height: 24px;
  padding: 0 8px;
  border-radius: 8px;
  background: rgba(122, 167, 255, 0.12);
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
}
.tag {
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.tag-new { background: rgba(94, 224, 242, 0.12); color: var(--teal); }
.tag-free { background: rgba(122, 167, 255, 0.12); color: var(--blue); }
.tag-owned { background: rgba(94, 224, 242, 0.12); color: var(--teal); }

.product-short { margin: 6px 0 0; color: var(--muted); }
.product-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
}
.price { font-size: 18px; font-weight: 800; white-space: nowrap; }
.price .alt { margin-left: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.owned-note { font-weight: 600; color: var(--teal); }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 12px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.12s, opacity 0.2s;
}
.btn:active { transform: scale(0.97); }
.btn[disabled] { opacity: 0.55; pointer-events: none; }
.btn-buy { background: var(--lime); color: var(--on-lime); }
.btn-primary { background: var(--blue); color: var(--on-lime); }
.btn-ghost { background: var(--card-2); color: var(--text); border: 1px solid var(--line-2); }
.btn-wide { width: 100%; }
.btn.loading { position: relative; color: transparent; }
.btn.loading::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(13, 18, 32, 0.25);
  border-top-color: var(--on-lime);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.btn-ghost.loading::after { border-color: rgba(238, 242, 251, 0.25); border-top-color: var(--text); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Списки ---------- */
.row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.row-main { flex: 1; min-width: 0; }
.row-title { font-weight: 600; line-height: 1.3; }
.row-sub { margin-top: 2px; font-size: 13px; color: var(--muted); }
.row .btn { min-height: 38px; padding: 0 14px; font-size: 14px; }

.menu-list { display: grid; gap: 8px; }
.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px var(--pad);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-align: left;
  cursor: pointer;
}
.menu-item .icon { font-size: 20px; }
.menu-item .row-main { flex: 1; display: flex; flex-direction: column; }
.menu-item::after { content: "›"; color: var(--muted); font-size: 20px; }
.menu-item.soon { opacity: 0.6; cursor: default; }
.menu-item.soon::after { content: "скоро"; font-size: 12px; font-weight: 600; }

.empty { padding: 28px var(--pad); text-align: center; }
.empty h3 { margin-bottom: 6px; }
.empty p { margin: 0 0 16px; color: var(--muted); }

/* ---------- Шторка ---------- */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10;
  background: rgba(5, 8, 16, 0.6);
  animation: fade 0.2s ease;
}
.sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 11;
  max-width: 560px;
  margin-inline: auto;
  padding: 20px var(--pad) calc(20px + env(safe-area-inset-bottom));
  background: var(--card);
  border: 1px solid var(--line-2);
  border-bottom: 0;
  border-radius: 20px 20px 0 0;
  animation: slide 0.25s cubic-bezier(0.3, 0.7, 0.3, 1);
}
.sheet h3 { margin: 0 0 8px; font-size: 18px; }
.sheet p { margin: 0 0 14px; color: var(--muted); }
.sheet .links { display: grid; gap: 8px; margin-bottom: 16px; }
.sheet .link {
  display: flex;
  justify-content: space-between;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--card-2);
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}
.sheet .link::after { content: "↗"; color: var(--blue); }
.sheet .actions { display: grid; gap: 10px; }
@keyframes slide { from { transform: translateY(100%); } }
@keyframes fade { from { opacity: 0; } }

/* ---------- Прочее ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--tabbar-h) + 16px + env(safe-area-inset-bottom));
  z-index: 20;
  max-width: calc(100% - 32px);
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--card-2);
  border: 1px solid var(--line-2);
  font-weight: 600;
  text-align: center;
  opacity: 0;
  transform: translate(-50%, 12px);
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.skeleton {
  height: 150px;
  margin-bottom: 12px;
  border-radius: var(--radius);
  background: linear-gradient(90deg, var(--card) 0%, var(--card-2) 50%, var(--card) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.2s linear infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }

.confetti { position: fixed; inset: 0; z-index: 30; pointer-events: none; overflow: hidden; }
.confetti i {
  position: absolute;
  top: -12px;
  width: 8px;
  height: 12px;
  border-radius: 2px;
  animation: fall 1.5s ease-in forwards;
}
@keyframes fall { to { transform: translate(var(--dx), 105vh) rotate(var(--rot)); opacity: 0.9; } }

.foot { margin-top: 24px; text-align: center; font-size: 12px; color: var(--muted); }
.foot a { color: var(--muted); }

/* ---------- Каталог и карточка продукта ---------- */
a.plain { color: inherit; text-decoration: none; }
.product-card.has-cover { padding-top: 0; overflow: hidden; }
.cover-link { display: block; margin: 0 calc(var(--pad) * -1) 14px; }
.card-cover { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }

.product-cover {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin-bottom: 12px;
  border-radius: var(--radius);
  object-fit: cover;
  background: var(--card);
  border: 1px solid var(--line);
}
.product-cover.placeholder {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
  padding: var(--pad);
  background: linear-gradient(135deg, #1B2A4A, var(--card));
}
.product-cover.placeholder b { font-size: 22px; font-weight: 800; letter-spacing: 0.01em; }
.product-cover.placeholder .num { align-self: flex-start; }
.product-title { margin: 0; font-size: 21px; line-height: 1.25; }
.product-desc { margin: 12px 0 0; white-space: pre-line; }
.price-row { margin-top: 14px; }
.features { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.features li {
  position: relative;
  padding: 12px 14px 12px 38px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.features li::before { content: "✓"; position: absolute; left: 14px; color: var(--teal); font-weight: 800; }
.product-action { margin-top: 16px; display: grid; gap: 10px; }
.owned-box { padding: 12px; text-align: center; font-weight: 700; color: var(--teal); }
.main-inline { margin-top: 14px; }

.pay-options { display: grid; gap: 10px; margin-bottom: 12px; }
.pay-option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px;
  background: var(--card-2);
  border: 1px solid var(--line-2);
  border-radius: 14px;
  text-align: left;
  cursor: pointer;
}
.pay-option .row-main { display: flex; flex-direction: column; }
.pay-option b { font-size: 16px; white-space: nowrap; }
.pay-icon { font-size: 24px; }

.done-card { padding-top: 32px; }
.actions-col { display: grid; gap: 10px; }

/* ---------- Новости ---------- */
.news-card { overflow: hidden; }
.news-image { display: block; width: calc(100% + var(--pad) * 2); margin: calc(var(--pad) * -1) calc(var(--pad) * -1) 14px; max-height: 260px; object-fit: cover; }
.news-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.news-body p { margin: 8px 0 0; }
.news-body ul { margin: 8px 0 0; padding-left: 20px; }
.news-body.clamp { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.read-more { display: inline-block; margin-top: 10px; font-weight: 600; text-decoration: none; }
.more-btn { margin-top: 12px; }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: 6px 0; }

/* ---------- ИИ-помощник ---------- */
.paywall { display: grid; gap: 12px; }
.paywall p { margin: 0; }
.paywall .features li { background: var(--bg); }
.chat { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.msg { max-width: 90%; padding: 10px 14px; border-radius: 16px; overflow-wrap: anywhere; }
.msg-user { align-self: flex-end; white-space: pre-wrap; background: #24406F; border-bottom-right-radius: 6px; }
.msg-bot { align-self: flex-start; background: var(--card); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.msg-bot p { margin: 0 0 8px; }
.msg-bot p:last-child, .msg-bot ul:last-child, .msg-bot pre:last-child { margin-bottom: 0; }
.msg-bot ul { margin: 0 0 8px; padding-left: 20px; }
.msg-bot pre { margin: 0 0 8px; padding: 10px; overflow-x: auto; border-radius: 10px; background: var(--bg); font-size: 13px; }
.msg-bot code { font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
.news-body pre { padding: 10px; overflow-x: auto; border-radius: 10px; background: var(--bg); font-size: 13px; }
.typing { display: flex; gap: 5px; padding: 14px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: typing 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: 0.2s; }
.typing i:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing { 0%, 60%, 100% { opacity: 0.3; } 30% { opacity: 1; } }
.chat-input { display: flex; align-items: flex-end; gap: 8px; }
.chat-input .input { flex: 1; resize: none; }
.chat-foot, .ai-sub { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.chat-foot { margin-top: 8px; }
.ai-sub { margin-bottom: 12px; padding: 10px 12px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); }
.link-btn { flex: none; padding: 0; border: 0; background: none; color: var(--blue); font-weight: 600; font-size: inherit; cursor: pointer; }

/* ---------- Формы ---------- */
.input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--line-2);
  border-radius: 12px;
  color: var(--text);
  font: inherit;
  resize: vertical;
}
.input:focus { outline: 2px solid rgba(122, 167, 255, 0.5); outline-offset: 1px; }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 32px; }
textarea.input { line-height: 1.45; }
.form { display: grid; gap: 14px; }
.form > :empty { display: none; }
.field { display: grid; gap: 6px; min-width: 0; align-content: start; }
a.menu-item { color: inherit; text-decoration: none; }
.field-label { font-size: 13px; font-weight: 600; color: var(--muted); }
.field-hint { font-size: 12px; color: var(--muted); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.inline-form { display: flex; gap: 8px; }
.inline-form .input { flex: 1; }
.toggles { display: grid; gap: 10px; }
.switch { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch-ui {
  position: relative;
  flex: none;
  width: 44px;
  height: 26px;
  border-radius: 999px;
  background: var(--card-2);
  border: 1px solid var(--line-2);
  transition: background 0.2s;
}
.switch-ui::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--muted);
  transition: transform 0.2s, background 0.2s;
}
.switch input:checked + .switch-ui { background: rgba(94, 224, 242, 0.25); border-color: var(--teal); }
.switch input:checked + .switch-ui::after { transform: translateX(18px); background: var(--teal); }
.switch input:disabled ~ * { opacity: 0.5; }
.checks { display: grid; gap: 8px; }
.check { display: flex; align-items: center; gap: 10px; }
.check input { width: 18px; height: 18px; accent-color: var(--teal); }

.photo-box { display: grid; gap: 8px; }
.photo-preview {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 12px;
  background: var(--bg);
  border: 1px dashed var(--line-2);
  color: var(--muted);
  font-size: 13px;
}
.photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.photo-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.upload-btn { margin-top: 10px; }

.btn-danger { background: rgba(255, 92, 122, 0.12); color: var(--danger); border: 1px solid rgba(255, 92, 122, 0.4); }
.danger-zone { margin-top: 24px; }
.icon-btn { flex: none; width: 32px; height: 32px; border: 0; border-radius: 8px; background: var(--card-2); color: var(--muted); cursor: pointer; }
.notice-ok {
  padding: 12px;
  border-radius: 12px;
  background: rgba(94, 224, 242, 0.08);
  border: 1px solid rgba(94, 224, 242, 0.3);
  font-size: 13px;
}
.warning {
  padding: 12px;
  border-radius: 12px;
  background: rgba(255, 92, 122, 0.08);
  border: 1px solid rgba(255, 92, 122, 0.3);
  font-size: 13px;
  line-height: 1.45;
}

/* ---------- Админка ---------- */
.admin-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 2px 14px; }
.admin-head h2 { margin: 0; font-size: 20px; }
.admin-head .btn { min-height: 38px; padding: 0 14px; }
a.admin-row { color: inherit; text-decoration: none; }
.file-actions { display: flex; gap: 6px; }
.file-row .btn { min-width: 40px; padding: 0 10px; }
.thumb-img { flex: none; width: 52px; height: 40px; border-radius: 8px; object-fit: cover; }
.chip { flex: none; padding: 3px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.chip-ok { background: rgba(94, 224, 242, 0.12); color: var(--teal); }
.chip-new { background: rgba(122, 167, 255, 0.14); color: var(--blue); }
.chip-muted { background: var(--card-2); color: var(--muted); }
.chip-danger { background: rgba(255, 92, 122, 0.14); color: var(--danger); }
.search { margin-bottom: 12px; }
.recipients { padding: 10px 12px; border-radius: 12px; background: var(--bg); font-weight: 700; color: var(--teal); }
.stat-line { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 6px 0; font-size: 13px; color: var(--muted); }
.stat-line b { color: var(--text); }
.phrases { display: grid; gap: 6px; }
.phrase { display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 12px; border-radius: 10px; background: var(--bg); }
.phrase span { flex: 1; }
.info { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; font-size: 14px; }
.info dt { color: var(--muted); }
.info dd { margin: 0; word-break: break-word; }
.log-details { margin-top: 4px; font-size: 12px; color: var(--muted); word-break: break-word; }

.segmented { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; margin-bottom: 12px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); }
.segmented button { min-height: 36px; border: 0; border-radius: 9px; background: none; color: var(--muted); font-weight: 600; cursor: pointer; }
.segmented button.on { background: var(--card-2); color: var(--text); }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.kpi { display: grid; gap: 2px; padding: 12px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); min-width: 0; }
.kpi span { font-size: 12px; color: var(--muted); }
.kpi b { font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.chart { margin: 0 0 12px; padding: 14px var(--pad) 10px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); }
.chart figcaption { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 10px; font-size: 14px; }
.chart-tip { color: var(--muted); font-size: 13px; white-space: nowrap; }
.chart svg { display: block; width: 100%; height: 120px; }
.chart path { fill: #5B8EF0; transition: opacity 0.15s; }
.chart .bar.on path { fill: #7AA7FF; }
.chart line { stroke: var(--line-2); stroke-width: 1; }
.chart-axis { display: flex; justify-content: space-between; margin-top: 6px; font-size: 11px; color: var(--muted); }
.table-wrap { padding: 4px var(--pad); overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { padding: 10px 6px; text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); }
.table td { padding: 9px 6px; border-top: 1px solid var(--line); }
.table td:not(:first-child), .table th:not(:first-child) { text-align: right; }
.table-toggle summary { cursor: pointer; font-weight: 600; }
.table-toggle .table { margin-top: 8px; }

@media (max-width: 360px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .field-row { grid-template-columns: 1fr; }
}

/* при «уменьшить движение» — без покачивания и конфетти, смена поз остаётся */
@media (prefers-reduced-motion: reduce) {
  .vb-body, .card, .bubble-text.swap, .skeleton { animation: none !important; }
  .vb-spark.go { animation: none; }
  .confetti { display: none; }
}
