/* =========================================================================
   PREMIUM DARK DESIGN SYSTEM — "Миллионный" дизайн
   Тёмная тема с золотыми акцентами. Шрифты: Playfair, Inter, JetBrains Mono.
   ========================================================================= */

:root {
    --color-bg: #0B0B0F;
    --color-bg-2: #131319;
    --color-bg-3: #1A1A22;
    --color-bg-4: #22222B;
    --color-surface: rgba(255, 255, 255, 0.04);
    --color-surface-hover: rgba(255, 255, 255, 0.08);
    --color-border: rgba(255, 255, 255, 0.08);
    --color-border-strong: rgba(255, 255, 255, 0.16);
    --color-text: #F5F5F7;
    --color-text-2: #B0B0B8;
    --color-text-3: #6E6E76;
    --color-gold: #C9A961;
    --color-gold-2: #E5C97A;
    --color-gold-3: #8E7438;
    --color-gold-glow: rgba(201, 169, 97, 0.25);
    --color-accent: #C9A961;
    --color-success: #6BCF7F;
    --color-warning: #FFB547;
    --color-danger: #FF6B6B;
    --color-info: #4A90E2;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);
    --shadow-gold: 0 8px 32px rgba(201, 169, 97, 0.15);
    --gradient-gold: linear-gradient(135deg, #C9A961 0%, #E5C97A 50%, #C9A961 100%);
    --gradient-gold-soft: linear-gradient(135deg, rgba(201, 169, 97, 0.1) 0%, rgba(229, 201, 122, 0.05) 100%);
    --gradient-hero: radial-gradient(ellipse at top, rgba(201, 169, 97, 0.15) 0%, transparent 50%), linear-gradient(180deg, #131319 0%, #0B0B0F 100%);
    --gradient-card: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
    --container-max: 1280px;
    --header-height: 72px;
    --font-heading: 'Playfair Display', 'Times New Roman', serif;
    --font-body: 'Inter', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', 'SF Mono', Consolas, monospace;
    --transition-fast: 0.15s ease;
    --transition-base: 0.25s ease;
    --transition-slow: 0.4s ease;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font-body); font-size: 16px; line-height: 1.6; color: var(--color-text); background: var(--color-bg); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: hidden; }
h1, h2, h3, h4, h5, h6 { font-family: var(--font-heading); font-weight: 700; line-height: 1.2; margin: 0 0 0.5em; color: var(--color-text); }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); }
p { margin: 0 0 1em; }
a { color: var(--color-gold); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--color-gold-2); }
img { max-width: 100%; height: auto; display: block; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
ul, ol { margin: 0 0 1em; padding-left: 1.5em; }
.container { width: 100%; max-width: var(--container-max); margin: 0 auto; padding: 0 24px; }
@media (max-width: 768px) { .container { padding: 0 16px; } }
.main { min-height: calc(100vh - var(--header-height) - 200px); }

.page-loader { position: fixed; top: 0; left: 0; width: 100%; height: 3px; background: transparent; z-index: 9999; opacity: 0; transition: opacity var(--transition-base); }
.page-loader.active { opacity: 1; }
.page-loader__bar { width: 0; height: 100%; background: var(--gradient-gold); box-shadow: 0 0 12px var(--color-gold-glow); transition: width var(--transition-base); }
.page-loader.active .page-loader__bar { width: 100%; }

.header { position: sticky; top: 0; z-index: 100; background: rgba(11, 11, 15, 0.85); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-bottom: 1px solid var(--color-border); transition: all var(--transition-base); }
.header.scrolled { background: rgba(11, 11, 15, 0.95); box-shadow: var(--shadow-md); }
.header__inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-height); gap: 16px; }
.logo { display: flex; align-items: center; gap: 12px; color: var(--color-text); text-decoration: none; flex-shrink: 0; }
.logo__icon { color: var(--color-gold); flex-shrink: 0; }
.logo__text { display: flex; flex-direction: column; line-height: 1; }
.logo__title { font-family: var(--font-heading); font-weight: 800; font-size: 18px; letter-spacing: 0.05em; color: var(--color-text); }
.logo__subtitle { font-size: 10px; letter-spacing: 0.1em; color: var(--color-text-3); text-transform: uppercase; margin-top: 2px; }

/* Desktop навигация (по центру) */
.nav--desktop { flex: 1; overflow: hidden; }
.nav--desktop .nav__list { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; justify-content: center; flex-wrap: wrap; }
.nav--desktop .nav__link { display: block; padding: 8px 12px; color: var(--color-text-2); font-size: 14px; font-weight: 500; border-radius: var(--radius-sm); transition: all var(--transition-fast); white-space: nowrap; }
.nav--desktop .nav__link:hover, .nav--desktop .nav__link.active { color: var(--color-gold); background: var(--color-surface); }

/* Правая часть хедера (actions + burger) */
.header__right { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.header__actions { display: flex; gap: 8px; align-items: center; }

/* Burger — три линии в круге */
.header__burger { display: none; width: 40px; height: 40px; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); cursor: pointer; flex-direction: column; justify-content: center; align-items: center; gap: 5px; transition: all var(--transition-base); }
.header__burger:hover { background: var(--color-surface-hover); border-color: var(--color-gold); }
.header__burger-line { display: block; width: 20px; height: 2px; background: var(--color-text); border-radius: 2px; transition: all var(--transition-base); transform-origin: center; }
.header__burger.active .header__burger-line:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.header__burger.active .header__burger-line:nth-child(2) { opacity: 0; transform: scaleX(0); }
.header__burger.active .header__burger-line:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Overlay затемнения для drawer */
.nav-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(4px); opacity: 0; visibility: hidden; transition: opacity var(--transition-base), visibility var(--transition-base); z-index: 100; }
.nav-overlay.active { opacity: 1; visibility: visible; }

/* Мобильный drawer (справа) */
.mobile-nav { position: fixed; top: 0; right: 0; bottom: 0; width: min(360px, 85vw); background: var(--color-bg-2); border-left: 1px solid var(--color-border); transform: translateX(100%); transition: transform var(--transition-base); z-index: 101; display: flex; flex-direction: column; box-shadow: -16px 0 48px rgba(0, 0, 0, 0.5); }
.mobile-nav.active { transform: translateX(0); }
.mobile-nav__header { display: flex; justify-content: space-between; align-items: center; padding: 20px 24px; border-bottom: 1px solid var(--color-border); }
.mobile-nav__title { font-family: var(--font-heading); font-size: 20px; font-weight: 700; color: var(--color-text); }
.mobile-nav__close { width: 36px; height: 36px; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-sm); color: var(--color-text-2); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all var(--transition-fast); }
.mobile-nav__close:hover { background: var(--color-surface-hover); color: var(--color-gold); border-color: var(--color-gold); }
.mobile-nav__body { flex: 1; overflow-y: auto; padding: 16px 12px; display: flex; flex-direction: column; }
.mobile-nav__list { list-style: none; margin: 0 0 24px; padding: 0; }
.mobile-nav__item { border-bottom: 1px solid var(--color-border); }
.mobile-nav__item:last-child { border-bottom: none; }
.mobile-nav__link { display: flex; justify-content: space-between; align-items: center; padding: 14px 12px; color: var(--color-text); font-size: 15px; font-weight: 500; text-decoration: none; transition: all var(--transition-fast); border-radius: var(--radius-sm); }
.mobile-nav__link:hover, .mobile-nav__link.active { background: var(--color-surface); color: var(--color-gold); padding-left: 16px; }
.mobile-nav__link svg { color: var(--color-text-3); transition: color var(--transition-fast); }
.mobile-nav__link:hover svg, .mobile-nav__link.active svg { color: var(--color-gold); }
.mobile-nav__actions { margin-top: auto; display: flex; flex-direction: column; gap: 8px; padding: 16px 12px; border-top: 1px solid var(--color-border); }

/* Адаптив: скрываем desktop навигацию на ≤1200px, показываем burger */
@media (max-width: 1200px) {
    .nav--desktop { display: none; }
    .header__burger { display: flex; }
    .header__btn-desktop { display: none; }
    .header__actions { gap: 6px; }
}
@media (min-width: 1201px) {
    .header__burger { display: none; }
}
@media (max-width: 600px) {
    .logo__subtitle { display: none; }
    .header__inner { gap: 8px; }
    .header__actions { display: none; }
}

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 24px; font-family: var(--font-body); font-size: 14px; font-weight: 600; line-height: 1; border-radius: var(--radius-md); cursor: pointer; transition: all var(--transition-base); border: 1px solid transparent; text-decoration: none; white-space: nowrap; }
.btn--sm { padding: 8px 16px; font-size: 12px; }
.btn--lg { padding: 16px 32px; font-size: 16px; }
.btn--gold { background: var(--gradient-gold); color: #1A1A22; box-shadow: var(--shadow-gold); }
.btn--gold:hover { color: #1A1A22; transform: translateY(-2px); box-shadow: 0 12px 36px var(--color-gold-glow); }
.btn--ghost { background: var(--color-surface); color: var(--color-text); border-color: var(--color-border); }
.btn--ghost:hover { background: var(--color-surface-hover); border-color: var(--color-border-strong); }
.btn--outline-gold { background: transparent; color: var(--color-gold); border-color: var(--color-gold); }
.btn--outline-gold:hover { background: var(--color-gold-glow); color: var(--color-gold-2); }
.btn--danger { background: rgba(255, 107, 107, 0.1); color: var(--color-danger); border-color: var(--color-danger); }
.btn--danger:hover { background: var(--color-danger); color: white; }
.btn--block { width: 100%; }
.btn:disabled, .btn.loading { opacity: 0.6; pointer-events: none; }

.hero { position: relative; background: var(--gradient-hero); padding: 80px 0 100px; overflow: hidden; }
.hero::before { content: ''; position: absolute; top: -50%; right: -10%; width: 600px; height: 600px; background: radial-gradient(circle, var(--color-gold-glow) 0%, transparent 70%); filter: blur(60px); pointer-events: none; }
.hero__inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
@media (max-width: 900px) { .hero__inner { grid-template-columns: 1fr; gap: 40px; } .hero { padding: 60px 0 80px; } }
.hero__badge { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; background: var(--color-gold-glow); border: 1px solid var(--color-gold); border-radius: var(--radius-full); font-size: 12px; font-weight: 600; color: var(--color-gold); margin-bottom: 24px; text-transform: uppercase; letter-spacing: 0.1em; }
.hero__badge::before { content: ''; width: 8px; height: 8px; background: var(--color-gold); border-radius: 50%; box-shadow: 0 0 12px var(--color-gold); animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
.hero__title { font-size: clamp(2.5rem, 6vw, 4.5rem); line-height: 1.05; margin-bottom: 24px; font-weight: 900; }
.hero__title em { background: var(--gradient-gold); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; font-style: italic; }
.hero__subtitle { font-size: clamp(1rem, 2vw, 1.25rem); color: var(--color-text-2); margin-bottom: 32px; line-height: 1.5; }
/* Кнопки героя всегда в одну строку: на планшетах и в узких колонках подпись
   переносится внутри кнопки, а не уезжает на вторую строку (CTA не «прыгает»). */
.hero__actions { display: flex; gap: 16px; flex-wrap: nowrap; align-items: center; }
.hero__actions > .btn { flex: 0 1 auto; min-width: 0; }
@media (max-width: 768px) {
    .hero__actions { gap: 10px; }
    .hero__actions > .btn--lg { padding: 14px 18px; font-size: 14px; white-space: normal; text-align: center; line-height: 1.25; }
}
@media (max-width: 420px) {
    .hero__actions { gap: 8px; }
    .hero__actions > .btn--lg { padding: 12px; font-size: 12px; gap: 6px; border-radius: var(--radius-sm); }
    .hero__actions > .btn--lg svg { width: 14px; height: 14px; flex: 0 0 auto; }
}
.hero__stats { display: flex; gap: 40px; margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--color-border); }
.hero__stat { display: flex; flex-direction: column; }
.hero__stat-value { font-family: var(--font-heading); font-size: clamp(1.5rem, 3vw, 2.5rem); font-weight: 800; color: var(--color-gold); }
.hero__stat-label { font-size: 12px; color: var(--color-text-3); text-transform: uppercase; letter-spacing: 0.1em; margin-top: 4px; }
.hero__visual { position: relative; aspect-ratio: 4 / 5; border-radius: var(--radius-xl); overflow: hidden; background: var(--color-bg-3); border: 1px solid var(--color-border-strong); }
.hero__visual img { width: 100%; height: 100%; object-fit: cover; }
.hero__visual::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(11, 11, 15, 0.7) 100%); pointer-events: none; }
.hero__visual-card { position: absolute; bottom: 24px; left: 24px; right: 24px; z-index: 2; padding: 20px; background: rgba(11, 11, 15, 0.85); backdrop-filter: blur(20px); border: 1px solid var(--color-border-strong); border-radius: var(--radius-lg); }
.hero__visual-card h3 { margin: 0 0 8px; font-size: 20px; }
.hero__visual-card p { margin: 0; color: var(--color-text-2); font-size: 14px; }

.section { padding: 80px 0; }
.section--tight { padding: 40px 0; }
.section__header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 40px; gap: 24px; flex-wrap: wrap; }
.section__title { margin: 0; font-size: clamp(1.75rem, 4vw, 2.75rem); }
.section__title em { background: var(--gradient-gold); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; font-style: italic; }
.section__subtitle { color: var(--color-text-2); max-width: 600px; margin-top: 12px; }
.section__link { color: var(--color-gold); font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.section__link::after { content: '→'; transition: transform var(--transition-base); }
.section__link:hover::after { transform: translateX(4px); }

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.card-grid--3 { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }

.breed-card { position: relative; background: var(--gradient-card); border: 1px solid var(--color-border); border-radius: var(--radius-lg); overflow: hidden; transition: all var(--transition-base); display: flex; flex-direction: column; cursor: pointer; }
.breed-card:hover { border-color: var(--color-gold); transform: translateY(-4px); box-shadow: var(--shadow-md), var(--shadow-gold); }
.breed-card__image { aspect-ratio: 4 / 3; background: var(--color-bg-3); position: relative; overflow: hidden; }
.breed-card__image img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--transition-slow); }
.breed-card:hover .breed-card__image img { transform: scale(1.05); }
.breed-card__image-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--color-bg-3) 0%, var(--color-bg-2) 100%); color: var(--color-text-3); font-family: var(--font-heading); font-size: 48px; }
.breed-card__badge { position: absolute; top: 12px; left: 12px; padding: 4px 10px; background: rgba(11, 11, 15, 0.85); backdrop-filter: blur(8px); border-radius: var(--radius-full); font-size: 11px; font-weight: 600; color: var(--color-gold); border: 1px solid var(--color-border); }
.breed-card__fav { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; background: rgba(11, 11, 15, 0.85); backdrop-filter: blur(8px); border-radius: 50%; color: var(--color-text); border: 1px solid var(--color-border); transition: all var(--transition-fast); }
.breed-card__fav:hover { color: var(--color-danger); border-color: var(--color-danger); }
/* Активный лайк: залитое сердце, «опасный» цвет, свечение и подсветка фона */
.breed-card__fav.active,
.breed-card__fav.is-active { color: var(--color-danger); border-color: var(--color-danger); background: rgba(255, 107, 107, 0.18); box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.14); }
.breed-card__fav.active svg path,
.breed-card__fav.is-active svg path { fill: currentColor; }
.breed-card__fav.is-loading { opacity: 0.55; }
.breed-card__fav.just-liked { animation: favPop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1); }

@keyframes favPop {
    0% { transform: scale(1); }
    35% { transform: scale(1.28); }
    60% { transform: scale(0.94); }
    100% { transform: scale(1); }
}

/* Кнопка «В избранное» на странице породы и в личном кабинете */
.btn.js-fav.active,
.btn.js-fav.is-active { color: var(--color-danger); border-color: var(--color-danger); background: rgba(255, 107, 107, 0.14); }
.btn.js-fav.active svg path,
.btn.js-fav.is-active svg path { fill: currentColor; }
.btn.js-fav.just-liked { animation: favPop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1); }
.btn.js-fav.is-loading { opacity: 0.65; }
.btn--gold.js-fav.active { color: #fff; background: linear-gradient(135deg, #ff6b6b 0%, #d64545 100%); border-color: transparent; }

/* Чипы назначения на карточках и странице породы */
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: var(--radius-full); font-size: 11px; font-weight: 600; color: var(--color-text-2); background: var(--color-bg-3); border: 1px solid var(--color-border); text-decoration: none; line-height: 1.4; }
.tag:hover { color: var(--color-gold); border-color: var(--color-gold); }
.tag--gold { color: var(--color-gold); background: var(--color-gold-glow); border-color: rgba(212, 175, 55, 0.35); }
.breed-card__tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.breed-card__body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.breed-card__group { font-size: 11px; color: var(--color-text-3); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 8px; }
.breed-card__name { font-family: var(--font-heading); font-size: 20px; font-weight: 700; margin: 0 0 8px; color: var(--color-text); }
.breed-card__name a { color: inherit; }
.breed-card__name a:hover { color: var(--color-gold); }
.breed-card__summary { color: var(--color-text-2); font-size: 14px; line-height: 1.5; margin: 0 0 16px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.breed-card__meta { display: flex; gap: 12px; font-size: 12px; color: var(--color-text-3); flex-wrap: wrap; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--color-border); }
.breed-card__meta span { display: inline-flex; align-items: center; gap: 4px; }
.breed-card__rating { display: inline-flex; align-items: center; gap: 4px; color: var(--color-gold); font-weight: 700; }
.breed-card__actions { display: flex; gap: 8px; margin-top: 14px; }
/* Кнопки делят ширину карточки поровну — блок занимает всю ширину карточки */
.breed-card__actions .btn { flex: 1 1 0; justify-content: center; min-width: 0; }

/* Карточка породы: фото + основная информация (одна колонка на мобильных) */
.breed-hero-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.breed-hero-grid img { max-width: 100%; height: auto; }
/* Кнопки действий на странице породы (избранное / сравнение / отзывы) */
.breed-hero__actions { display: flex; gap: 12px; flex-wrap: wrap; }

.badge { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-full); font-size: 11px; font-weight: 600; color: var(--color-text-2); text-transform: uppercase; letter-spacing: 0.05em; }
.badge--gold { color: var(--color-gold); border-color: var(--color-gold); background: var(--color-gold-glow); }
.badge--success { color: var(--color-success); border-color: rgba(107, 207, 127, 0.3); background: rgba(107, 207, 127, 0.1); }
.badge--warning { color: var(--color-warning); border-color: rgba(255, 181, 71, 0.3); background: rgba(255, 181, 71, 0.1); }
.badge--danger { color: var(--color-danger); border-color: rgba(255, 107, 107, 0.3); background: rgba(255, 107, 107, 0.1); }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--color-border); overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
.tabs__btn { display: inline-flex; align-items: center; gap: 6px; padding: 14px 20px; font-size: 14px; font-weight: 600; color: var(--color-text-2); background: transparent; border: 0; border-bottom: 2px solid transparent; text-decoration: none; cursor: pointer; transition: all var(--transition-fast); white-space: nowrap; }
.tabs__btn:hover { color: var(--color-text); }
.tabs__btn.active, .tabs__btn.is-current { color: var(--color-gold); border-bottom-color: var(--color-gold); }
.tabs__content { padding: 32px 0; }
/* Разделы страницы породы: на странице видны ВСЕ секции, а переключатель-«таб»
   работает как якорь — плавно прокручивает к нужному разделу (см. main.js) */
.tab-panel { display: block; scroll-margin-top: calc(var(--header-height) + 60px); }
.tab-panel + .tab-panel { margin-top: 44px; padding-top: 44px; border-top: 1px solid var(--color-border); }
.tab-panel__title { font-family: var(--font-heading); font-size: clamp(1.35rem, 2.4vw, 1.85rem); font-weight: 800; margin: 0 0 18px; }
.tab-panel__title em { font-style: italic; color: var(--color-gold); }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* Фильтры каталога: блоки «Поиск → Основные → Назначение → Характер → Кому подойдёт → Бюджет» */
.filters { display: flex; flex-direction: column; gap: 22px; padding: 24px; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); margin-bottom: 32px; }
.filters__group { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.filters__group + .filters__group { border-top: 1px solid var(--color-border); padding-top: 20px; }
.filters__group-title { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; font-family: var(--font-heading); font-size: 15px; font-weight: 700; color: var(--color-text); }
.filters__hint { font-size: 12px; font-weight: 400; color: var(--color-text-3); }
/* minmax(0, …) — чтобы треки не растягивались по min-content содержимого select и не вылезали за карточку */
.filters__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; min-width: 0; }
.filters__actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; border-top: 1px solid var(--color-border); padding-top: 18px; }

.filter { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.filter__label { font-size: 12px; color: var(--color-text-3); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; }
.filter__select, .filter__input { width: 100%; max-width: 100%; min-width: 0; padding: 10px 14px; background: var(--color-bg-3); border: 1px solid var(--color-border); border-radius: var(--radius-md); color: var(--color-text); font-size: 14px; transition: all var(--transition-fast); }
.filter__select:focus, .filter__input:focus { outline: none; border-color: var(--color-gold); box-shadow: 0 0 0 3px var(--color-gold-glow); }
.filter__select option { background: var(--color-bg-3); }

/* Чипы-переключатели фильтров */
.chips-select { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: var(--radius-full); background: var(--color-bg-3); border: 1px solid var(--color-border); color: var(--color-text-2); font-size: 13px; font-weight: 600; line-height: 1.2; text-decoration: none; cursor: pointer; transition: all var(--transition-fast); }
.chip:hover { border-color: var(--color-gold); color: var(--color-text); }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
/* Значок у чипа-галочки занимает место всегда (фиксированный бокс),
   поэтому включение фильтра не сдвигает соседние чипы — меняется только символ */
.chip--check::before {
    content: '+';
    display: inline-flex; align-items: center; justify-content: center;
    width: 13px; height: 13px; flex: 0 0 13px;
    font-size: 12px; line-height: 1;
    color: var(--color-text-3);
    transition: color var(--transition-fast);
}
.chip--check.is-on,
.chip--check:has(input:checked) { color: var(--color-gold); border-color: var(--color-gold); background: var(--color-gold-glow); }
.chip--check.is-on::before,
.chip--check:has(input:checked)::before { content: '✓'; color: var(--color-gold); }

/* Активные фильтры над списком */
.active-filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 20px; }
.active-filters__title { font-size: 13px; font-weight: 600; color: var(--color-text-3); }
.active-filters__reset { font-size: 13px; color: var(--color-text-3); text-decoration: underline; }
.active-filters__reset:hover { color: var(--color-gold); }
.chip--active { color: var(--color-gold); border-color: rgba(212, 175, 55, 0.4); background: var(--color-gold-glow); }
.chip--active:hover { color: var(--color-danger); border-color: var(--color-danger); background: rgba(255, 107, 107, 0.12); }
.chip--active .chip__x { font-size: 15px; opacity: 0.75; }

.form-group { margin-bottom: 20px; }
.form-label { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 600; color: var(--color-text); }
.form-label .required { color: var(--color-danger); }
.form-input, .form-textarea, .form-select { width: 100%; padding: 12px 16px; background: var(--color-bg-3); border: 1px solid var(--color-border); border-radius: var(--radius-md); color: var(--color-text); font-size: 14px; font-family: var(--font-body); transition: all var(--transition-fast); }
.form-input:focus, .form-textarea:focus, .form-select:focus { outline: none; border-color: var(--color-gold); box-shadow: 0 0 0 3px var(--color-gold-glow); }
.form-textarea { min-height: 120px; resize: vertical; }
.form-input::placeholder, .form-textarea::placeholder { color: var(--color-text-3); }
.form-hint { font-size: 12px; color: var(--color-text-3); margin-top: 6px; }
.form-error { font-size: 12px; color: var(--color-danger); margin-top: 6px; display: flex; align-items: center; gap: 4px; }

.pagination { display: flex; justify-content: center; gap: 4px; margin-top: 40px; flex-wrap: wrap; }
.pagination__link, .pagination__span { min-width: 40px; height: 40px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); color: var(--color-text-2); font-size: 14px; font-weight: 600; text-decoration: none; transition: all var(--transition-fast); }
.pagination__link:hover { border-color: var(--color-gold); color: var(--color-gold); }
.pagination__link.active { background: var(--gradient-gold); color: #1A1A22; border-color: transparent; }
.pagination__span { color: var(--color-text-3); cursor: default; }

.empty-state { text-align: center; padding: 60px 20px; color: var(--color-text-3); }
.empty-state__icon { width: 64px; height: 64px; margin: 0 auto 16px; color: var(--color-text-3); }
.empty-state__title { font-size: 20px; color: var(--color-text); margin-bottom: 8px; }

.breadcrumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 12px; color: var(--color-text-3); margin-bottom: 24px; }
.breadcrumbs a { color: var(--color-text-2); }
.breadcrumbs a:hover { color: var(--color-gold); }
.breadcrumbs__sep { color: var(--color-text-3); }

.stat-block { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 20px; padding: 32px; background: var(--gradient-card); border: 1px solid var(--color-border); border-radius: var(--radius-lg); }
.stat-block__item { text-align: center; }
.stat-block__value { font-family: var(--font-heading); font-size: 2rem; font-weight: 800; color: var(--color-gold); line-height: 1; }
.stat-block__label { font-size: 12px; color: var(--color-text-3); text-transform: uppercase; letter-spacing: 0.05em; margin-top: 8px; }

.stars { display: inline-flex; align-items: center; gap: 2px; }
.stars__star { color: var(--color-text-3); font-size: 14px; }
.stars__star.filled { color: var(--color-gold); }

.alert { padding: 16px 20px; border-radius: var(--radius-md); border: 1px solid var(--color-border); background: var(--color-surface); margin-bottom: 16px; display: flex; align-items: flex-start; gap: 12px; }
.alert--success { border-color: rgba(107, 207, 127, 0.3); background: rgba(107, 207, 127, 0.08); color: var(--color-success); }
.alert--warning { border-color: rgba(255, 181, 71, 0.3); background: rgba(255, 181, 71, 0.08); color: var(--color-warning); }
.alert--danger { border-color: rgba(255, 107, 107, 0.3); background: rgba(255, 107, 107, 0.08); color: var(--color-danger); }
.alert--info { border-color: rgba(74, 144, 226, 0.3); background: rgba(74, 144, 226, 0.08); color: var(--color-info); }

.back-to-top { position: fixed; bottom: 24px; right: 24px; width: 48px; height: 48px; background: var(--gradient-gold); color: #1A1A22; border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-md); opacity: 0; transform: translateY(20px); transition: all var(--transition-base); z-index: 50; }
.back-to-top.visible { opacity: 1; transform: translateY(0); }
.back-to-top:hover { transform: translateY(-4px); box-shadow: var(--shadow-gold); }

.footer { background: var(--color-bg-2); border-top: 1px solid var(--color-border); padding: 60px 0 24px; margin-top: 80px; }
.footer__grid { display: grid; grid-template-columns: 2fr repeat(4, 1fr); gap: 40px; margin-bottom: 40px; }
@media (max-width: 900px) { .footer__grid { grid-template-columns: 1fr 1fr; gap: 32px; } }
@media (max-width: 600px) { .footer__grid { grid-template-columns: 1fr; } }
.footer__about { color: var(--color-text-2); font-size: 14px; margin: 16px 0; line-height: 1.6; }
.footer__social { display: flex; gap: 8px; }
.social-link { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 50%; color: var(--color-text-2); transition: all var(--transition-fast); }
.social-link:hover { color: var(--color-gold); border-color: var(--color-gold); transform: translateY(-2px); }
.footer__title { font-family: var(--font-body); font-size: 14px; font-weight: 700; color: var(--color-text); margin: 0 0 16px; text-transform: uppercase; letter-spacing: 0.05em; }
.footer__list { list-style: none; padding: 0; margin: 0; }
.footer__list li { margin-bottom: 8px; }
.footer__list a { color: var(--color-text-2); font-size: 14px; transition: color var(--transition-fast); }
.footer__list a:hover { color: var(--color-gold); }
.footer__bottom { padding-top: 24px; border-top: 1px solid var(--color-border); display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; color: var(--color-text-3); font-size: 12px; }
.footer__disclaimer { max-width: 600px; line-height: 1.5; }

.text-center { text-align: center; } .text-gold { color: var(--color-gold); } .text-muted { color: var(--color-text-3); }
.fs-sm { font-size: 14px; } .fs-xs { font-size: 12px; } .fw-600 { font-weight: 600; } .fw-700 { font-weight: 700; }
.mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; } .mb-4 { margin-bottom: 32px; }
.mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 32px; }
.d-flex { display: flex; } .gap-2 { gap: 16px; } .gap-3 { gap: 24px; } .align-center { align-items: center; } .flex-wrap { flex-wrap: wrap; }

.error-page { text-align: center; padding: 80px 20px; }
.error-page__code { font-family: var(--font-heading); font-size: clamp(4rem, 12vw, 8rem); font-weight: 900; background: var(--gradient-gold); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; line-height: 1; }
.error-page__title { font-size: clamp(1.5rem, 3vw, 2rem); margin: 16px 0 12px; }
.error-page__text { color: var(--color-text-2); margin-bottom: 32px; max-width: 500px; margin-left: auto; margin-right: auto; }

.spinner { width: 24px; height: 24px; border: 2px solid var(--color-surface-hover); border-top-color: var(--color-gold); border-radius: 50%; animation: spin 0.8s linear infinite; display: inline-block; }
.spinner--lg { width: 48px; height: 48px; border-width: 3px; }
@keyframes spin { to { transform: rotate(360deg); } }

.ai-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; background: linear-gradient(135deg, var(--color-gold) 0%, var(--color-gold-2) 100%); color: #1A1A22; border-radius: var(--radius-full); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
.ai-badge::before { content: ''; width: 6px; height: 6px; background: #1A1A22; border-radius: 50%; animation: pulse 2s infinite; }

.admin-layout { display: grid; grid-template-columns: 240px 1fr; min-height: calc(100vh - var(--header-height)); }
.admin-sidebar { background: var(--color-bg-2); border-right: 1px solid var(--color-border); padding: 24px 0; position: sticky; top: var(--header-height); height: calc(100vh - var(--header-height)); overflow-y: auto; }
.admin-sidebar__header { display: flex; justify-content: space-between; align-items: center; padding: 0 24px; margin-bottom: 16px; }
.admin-sidebar__title { font-size: 12px; color: var(--color-text-3); text-transform: uppercase; letter-spacing: 0.1em; font-weight: 700; }
.admin-sidebar__close { display: none; width: 32px; height: 32px; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-sm); color: var(--color-text-2); align-items: center; justify-content: center; cursor: pointer; }
.admin-sidebar__link { display: flex; align-items: center; gap: 12px; padding: 12px 24px; color: var(--color-text-2); font-size: 14px; transition: all var(--transition-fast); }
.admin-sidebar__link:hover, .admin-sidebar__link.active { background: var(--color-surface); color: var(--color-gold); border-left: 3px solid var(--color-gold); padding-left: 21px; }
.admin-content { padding: 32px; }

@media (max-width: 900px) {
    .admin-layout { grid-template-columns: 1fr; }
    .admin-sidebar {
        position: fixed; top: var(--header-height); left: 0; bottom: 0;
        width: min(280px, 80vw); z-index: 101;
        transform: translateX(-100%); transition: transform var(--transition-base);
        padding: 24px 0; box-shadow: 16px 0 48px rgba(0,0,0,0.5);
    }
    .admin-sidebar.active { transform: translateX(0); }
    .admin-sidebar__close { display: flex; }
}
@media (max-width: 600px) { .admin-content { padding: 16px; } }

.table { width: 100%; border-collapse: collapse; background: var(--color-surface); border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--color-border); }
.table th, .table td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--color-border); font-size: 14px; }
.table th { background: var(--color-bg-3); color: var(--color-text-2); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; }
.table tr:last-child td { border-bottom: none; }
.table tr:hover { background: var(--color-surface-hover); }

.progress { width: 100%; height: 8px; background: var(--color-bg-3); border-radius: var(--radius-full); overflow: hidden; }
.progress__bar { height: 100%; background: var(--gradient-gold); border-radius: var(--radius-full); transition: width var(--transition-slow); }

.bar-chart { display: flex; flex-direction: column; gap: 12px; }
.bar-chart__row { display: grid; grid-template-columns: 160px 1fr 60px; align-items: center; gap: 12px; }
.bar-chart__label { font-size: 13px; color: var(--color-text-2); }
.bar-chart__track { height: 8px; background: var(--color-bg-3); border-radius: var(--radius-full); overflow: hidden; }
.bar-chart__fill { height: 100%; background: var(--gradient-gold); border-radius: var(--radius-full); transition: width 1s ease; }
.bar-chart__value { font-size: 13px; color: var(--color-gold); font-weight: 700; text-align: right; }

.upload-zone { border: 2px dashed var(--color-border-strong); border-radius: var(--radius-lg); padding: 48px; text-align: center; cursor: pointer; transition: all var(--transition-base); background: var(--color-surface); }
.upload-zone:hover, .upload-zone.dragover { border-color: var(--color-gold); background: var(--color-gold-glow); }
.upload-zone__icon { width: 48px; height: 48px; margin: 0 auto 16px; color: var(--color-text-3); }
.upload-zone__text { color: var(--color-text-2); margin-bottom: 8px; }
.upload-zone__hint { font-size: 12px; color: var(--color-text-3); }

.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(120%); background: var(--color-bg-3); border: 1px solid var(--color-border-strong); border-radius: var(--radius-md); padding: 14px 20px; box-shadow: var(--shadow-lg); z-index: 200; transition: transform var(--transition-base); display: flex; align-items: center; gap: 12px; max-width: 90vw; }
.toast.show { transform: translateX(-50%) translateY(0); }
.toast--success { border-color: var(--color-success); } .toast--danger { border-color: var(--color-danger); } .toast--info { border-color: var(--color-info); }
/* Кнопка внутри уведомления: «Войти», «Обновить» и т.п. */
.toast__action { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; padding: 5px 13px; border-radius: var(--radius-full); background: var(--color-gold-glow); border: 1px solid rgba(201, 169, 97, 0.45); color: var(--color-gold); font-size: 13px; font-weight: 600; white-space: nowrap; transition: all var(--transition-fast); }
.toast__action:hover { background: var(--color-gold); border-color: var(--color-gold); color: #17130A; }

.breed-hero { background: var(--gradient-hero); padding: 48px 0 32px; }
.breed-hero__inner { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
@media (max-width: 768px) { .breed-hero__inner { grid-template-columns: 1fr; } }
.breed-hero__image { aspect-ratio: 4 / 3; border-radius: var(--radius-xl); overflow: hidden; border: 1px solid var(--color-border-strong); }
.breed-hero__image img { width: 100%; height: 100%; object-fit: cover; }
.breed-hero__title { font-size: clamp(2rem, 5vw, 3.5rem); margin-bottom: 16px; }
.breed-hero__subtitle { color: var(--color-text-2); font-size: clamp(1rem, 2vw, 1.25rem); margin-bottom: 24px; }

.compare-grid { display: grid; gap: 24px; }
.compare-breed-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); overflow: hidden; }
.compare-breed-card__image { aspect-ratio: 4 / 3; background: var(--color-bg-3); }
.compare-breed-card__image img { width: 100%; height: 100%; object-fit: cover; }
.compare-breed-card__body { padding: 20px; }
.compare-breed-card__name { font-family: var(--font-heading); font-size: 20px; margin: 0 0 8px; }
.compare-breed-card__meta { font-size: 12px; color: var(--color-text-3); display: flex; gap: 12px; flex-wrap: wrap; }

.ai-verdict { background: linear-gradient(135deg, rgba(201, 169, 97, 0.05) 0%, rgba(11, 11, 15, 0.4) 100%); border: 1px solid var(--color-gold); border-radius: var(--radius-xl); padding: 32px; margin: 32px 0; position: relative; overflow: hidden; }
.ai-verdict::before { content: ''; position: absolute; top: -50%; right: -10%; width: 300px; height: 300px; background: radial-gradient(circle, var(--color-gold-glow) 0%, transparent 70%); filter: blur(40px); pointer-events: none; }
.ai-verdict__header { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; position: relative; }
.ai-verdict__icon { width: 56px; height: 56px; background: var(--gradient-gold); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #1A1A22; flex-shrink: 0; }
.ai-verdict__title { font-family: var(--font-heading); font-size: 24px; margin: 0; }
.ai-verdict__winner { font-size: 18px; margin-bottom: 16px; }
.ai-verdict__summary { color: var(--color-text-2); line-height: 1.6; }

.map-container { aspect-ratio: 16 / 9; background: var(--color-bg-3); border: 1px solid var(--color-border); border-radius: var(--radius-lg); overflow: hidden; position: relative; }
.quiz-question { padding: 32px; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); margin-bottom: 24px; }
.quiz-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.quiz-option { padding: 16px; background: var(--color-bg-3); border: 2px solid var(--color-border); border-radius: var(--radius-md); cursor: pointer; transition: all var(--transition-fast); text-align: center; }
.quiz-option:hover { border-color: var(--color-gold); background: var(--color-gold-glow); }
.quiz-option.selected { border-color: var(--color-gold); background: var(--color-gold-glow); color: var(--color-gold); }

.timeline { position: relative; padding-left: 40px; }
.timeline::before { content: ''; position: absolute; left: 12px; top: 0; bottom: 0; width: 2px; background: linear-gradient(180deg, var(--color-gold) 0%, transparent 100%); }
.timeline__item { position: relative; padding: 0 0 32px 24px; }
.timeline__item::before { content: ''; position: absolute; left: -28px; top: 6px; width: 12px; height: 12px; background: var(--color-gold); border-radius: 50%; box-shadow: 0 0 12px var(--color-gold); }
.timeline__year { font-family: var(--font-heading); font-size: 14px; color: var(--color-gold); font-weight: 700; margin-bottom: 4px; }
.timeline__title { font-size: 18px; margin: 0 0 8px; }
.timeline__text { color: var(--color-text-2); font-size: 14px; }

.glossary-letter { font-family: var(--font-heading); font-size: 48px; font-weight: 800; color: var(--color-gold); display: inline-block; margin-right: 24px; }
.faq-item { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); margin-bottom: 12px; overflow: hidden; }
.faq-item__question { padding: 20px 24px; cursor: pointer; font-weight: 600; display: flex; justify-content: space-between; align-items: center; gap: 12px; transition: all var(--transition-fast); }
.faq-item__question:hover { color: var(--color-gold); }
.faq-item__icon { transition: transform var(--transition-base); flex-shrink: 0; }
.faq-item.active .faq-item__icon { transform: rotate(45deg); }
.faq-item__answer { padding: 0 24px 0 24px; max-height: 0; overflow: hidden; transition: all var(--transition-base); color: var(--color-text-2); line-height: 1.6; }
.faq-item.active .faq-item__answer { padding: 0 24px 20px 24px; max-height: 1000px; }

.review-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: 24px; margin-bottom: 16px; }
.review-card__header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 12px; }
.review-card__title { font-size: 16px; font-weight: 700; margin: 0; }
.review-card__rating { color: var(--color-gold); }
.review-card__text { color: var(--color-text-2); font-size: 14px; line-height: 1.6; }
.review-card__meta { font-size: 12px; color: var(--color-text-3); margin-top: 12px; }

@media (max-width: 768px) { .section { padding: 56px 0; } .hero { padding: 40px 0 60px; } .stat-block { padding: 20px; } .filters { padding: 16px; } }
@media print { .header, .footer, .back-to-top, .nav, .header__actions { display: none; } body { background: white; color: black; } }

/* =========================================================================
   ADMIN-UTILITIES — дополнительные классы для админ-шаблонов
   ========================================================================= */
.grid { display: grid; gap: 24px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .grid--2, .grid--3 { grid-template-columns: 1fr; } }

.mb-5 { margin-bottom: 40px; } .mb-6 { margin-bottom: 48px; }
.mt-5 { margin-top: 40px; } .mt-6 { margin-top: 48px; }
.gap-1 { gap: 8px; } .gap-4 { gap: 32px; }
.ml-2 { margin-left: 16px; } .mr-2 { margin-right: 16px; }

.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }

.text-sm { font-size: 13px; }
.text-xs { font-size: 11px; }
.text-success { color: var(--color-success); }
.text-warning { color: var(--color-warning); }
.text-danger { color: var(--color-danger); }
.text-info { color: var(--color-info); }
.text-right { text-align: right; }
.text-center { text-align: center; }

.hidden { display: none !important; }
.no-scroll { overflow: hidden; }
body.no-scroll { overflow: hidden; position: fixed; width: 100%; height: 100%; }
code, pre { font-family: var(--font-mono); font-size: 13px; color: var(--color-gold-2); background: rgba(201, 169, 97, 0.06); padding: 1px 6px; border-radius: var(--radius-sm); }
pre { padding: 12px 16px; overflow-x: auto; }

fieldset { border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: 24px; margin-bottom: 24px; background: var(--color-surface); }
legend { padding: 0 12px; font-family: var(--font-heading); font-size: 16px; font-weight: 700; color: var(--color-gold); }

.form-checkbox { display: flex; align-items: center; gap: 8px; padding: 8px 0; }
.form-checkbox input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--color-gold); }
.form-hint { font-size: 12px; color: var(--color-text-3); margin-top: 6px; }

.admin-content h1 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 8px; }
.admin-content h2 { font-size: 1.25rem; margin-bottom: 12px; }
.admin-content .table code { font-size: 11px; }

/* =========================================================================
   UX-БЛОК: скроллбары, прогресс чтения, sticky-табы, сравнение, поиск, карта
   ========================================================================= */

/* ---------- 1. Скроллбары в стиле сайта (тёмная тема + золото) ---------- */
html { scrollbar-color: var(--color-gold-3) transparent; scrollbar-width: thin; }
* { scrollbar-width: thin; scrollbar-color: var(--color-gold-3) transparent; }
::-webkit-scrollbar { width: 12px; height: 8px; }
::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.03); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--color-gold-3) 0%, var(--color-gold) 55%, var(--color-gold-2) 100%);
    border: 3px solid var(--color-bg);
    border-radius: var(--radius-full);
    background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: var(--gradient-gold); background-clip: padding-box; border: 3px solid var(--color-bg); }
::-webkit-scrollbar-thumb:active { background: var(--color-gold-2); background-clip: padding-box; border: 3px solid var(--color-bg); }
::-webkit-scrollbar-corner { background: transparent; }
/* Горизонтальная полоса прокрутки на ПК — тонкая и минималистичная (без «толстой» рамки) */
::-webkit-scrollbar:horizontal { height: 6px; }
::-webkit-scrollbar-thumb:horizontal { border: 0; background: var(--color-gold-3); }
::-webkit-scrollbar-thumb:horizontal:hover,
::-webkit-scrollbar-thumb:horizontal:active { border: 0; background: var(--color-gold); }
/* Тонкие горизонтальные полосы внутри блоков (табы, таблицы, панели) */
.tabs::-webkit-scrollbar, .compare-bar__items::-webkit-scrollbar, .table-wrap::-webkit-scrollbar,
.search-results::-webkit-scrollbar, .quiz-options::-webkit-scrollbar { height: 6px; width: 6px; }
.tabs::-webkit-scrollbar-track, .compare-bar__items::-webkit-scrollbar-track,
.search-results::-webkit-scrollbar-track { background: transparent; }
.tabs::-webkit-scrollbar-thumb, .compare-bar__items::-webkit-scrollbar-thumb,
.search-results::-webkit-scrollbar-thumb { border: 0; background: var(--color-gold-3); }
.tabs::-webkit-scrollbar-thumb:hover, .compare-bar__items::-webkit-scrollbar-thumb:hover,
.search-results::-webkit-scrollbar-thumb:hover { background: var(--color-gold); }

/* ---------- 2. Полоса прогресса чтения страницы ---------- */
.scroll-progress { position: fixed; top: 0; left: 0; width: 100%; height: 3px; z-index: 200; pointer-events: none; }
.scroll-progress__bar {
    display: block; height: 100%; width: 0;
    background: var(--gradient-gold);
    box-shadow: 0 0 10px var(--color-gold-glow);
    transition: width 0.08s linear;
}
.scroll-progress--ready .scroll-progress__bar { width: 0; }

/* ---------- 3. Sticky-панель табов на странице породы ---------- */
.tabs-bar {
    position: sticky;
    top: var(--header-height);
    z-index: 90;
    background: rgba(11, 11, 15, 0.94);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 8px;
}
.tabs-bar::before, .tabs-bar::after {
    content: ''; position: absolute; top: 0; bottom: 0; width: 32px; pointer-events: none; z-index: 2;
}
.tabs-bar::before { left: 0; background: linear-gradient(90deg, rgba(11, 11, 15, 0.95) 0%, transparent 100%); }
.tabs-bar::after { right: 0; background: linear-gradient(270deg, rgba(11, 11, 15, 0.95) 0%, transparent 100%); }
.tabs--scroll { position: relative; scroll-behavior: smooth; scroll-snap-type: x proximity; padding: 0 20px; border-bottom: none; }
.tabs--scroll .tabs__btn { scroll-snap-align: center; position: relative; border-radius: var(--radius-sm) var(--radius-sm) 0 0; }
.tabs--scroll .tabs__btn.active { background: var(--gradient-gold-soft); }
.tabs__pill {
    display: flex; align-items: center; gap: 8px; padding: 10px 0 12px;
    font-size: 12px; color: var(--color-text-3); white-space: nowrap;
}
.tabs__pill strong { color: var(--color-gold); font-weight: 600; }
.tabs-bar__line { position: absolute; bottom: 0; left: 0; height: 2px; width: 0; background: var(--gradient-gold); transition: transform var(--transition-base), width var(--transition-base); }
@media (max-width: 600px) {
    .tabs-bar { top: var(--header-height); }
    .tabs--scroll { padding: 0 8px; }
    .tabs--scroll .tabs__btn { padding: 12px 14px; font-size: 13px; }
}

/* ---------- 4. Активная кнопка сравнения ---------- */
.js-compare-add, .btn--outline-gold { position: relative; }
.js-compare-add.active, .btn--outline-gold.active {
    background: var(--color-gold-glow);
    border-color: var(--color-gold);
    color: var(--color-gold-2);
    box-shadow: inset 0 0 0 1px rgba(201, 169, 97, 0.35);
}
.js-compare-add .js-compare-check { display: none; }
.js-compare-add.active .js-compare-check { display: inline-flex; }
.js-compare-add.active .js-compare-plus { display: none; }

/* ---------- 5. Панель выбранных пород для сравнения (глобальная) ---------- */
.compare-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 130;
    padding: 0 16px 16px;
    transform: translateY(130%);
    transition: transform var(--transition-base);
    pointer-events: none;
}
.compare-bar.active { transform: translateY(0); }
.compare-bar__inner {
    pointer-events: auto;
    max-width: var(--container-max); margin: 0 auto;
    display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
    padding: 12px 16px;
    background: rgba(19, 19, 25, 0.97);
    border: 1px solid var(--color-gold);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg), var(--shadow-gold);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}
.compare-bar__title { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--color-text); white-space: nowrap; }
.compare-bar__title span { color: var(--color-gold); }
.compare-bar__items { display: flex; align-items: center; gap: 10px; flex: 1 1 240px; overflow-x: auto; padding-bottom: 2px; min-height: 60px; }
.compare-bar__item { position: relative; flex: 0 0 56px; width: 56px; height: 56px; border-radius: var(--radius-md); overflow: hidden; border: 1px solid var(--color-border); background: var(--color-bg-3); }
.compare-bar__item img { width: 100%; height: 100%; object-fit: cover; }
.compare-bar__item-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: var(--color-gold); font-family: var(--font-heading); font-size: 20px; }
.compare-bar__item-name { position: absolute; left: 0; right: 0; bottom: 0; padding: 2px 4px; font-size: 9px; line-height: 1.2; text-align: center; color: var(--color-text); background: rgba(11, 11, 15, 0.82); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.compare-bar__remove {
    position: absolute; top: 2px; right: 2px; width: 18px; height: 18px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%; border: 1px solid var(--color-border);
    background: rgba(11, 11, 15, 0.85); color: var(--color-text-2);
    font-size: 11px; line-height: 1; cursor: pointer; transition: all var(--transition-fast);
}
.compare-bar__remove:hover { color: var(--color-danger); border-color: var(--color-danger); }
.compare-bar__actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.compare-bar__hint { font-size: 12px; color: var(--color-text-3); }
body.has-compare-bar .back-to-top { bottom: 116px; }
@media (max-width: 767px) {
    .compare-bar { padding: 0 8px 8px; }
    .compare-bar__inner { gap: 10px; padding: 10px; }
    .compare-bar__label { display: none; }
    .compare-bar__actions { width: 100%; margin-left: 0; }
    .compare-bar__actions .btn { flex: 1; }
    body.has-compare-bar .back-to-top { bottom: 150px; }
}

/* ---------- 6. Выпадающие результаты поиска (карточки с кнопками) ---------- */
.search-results {
    position: absolute; top: calc(100% + 10px); left: 0; right: 0; z-index: 150;
    max-height: min(72vh, 620px); overflow-y: auto; overscroll-behavior: contain;
    padding: 10px;
    background: rgba(19, 19, 25, 0.98);
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    text-align: left;
}
.search-results__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 8px 10px; border-bottom: 1px solid var(--color-border); margin-bottom: 8px; }
.search-results__count { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--color-text-3); }
.search-results__count strong { color: var(--color-gold); }
.search-results__item {
    display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 12px;
    padding: 10px; border-radius: var(--radius-md);
    border: 1px solid transparent; transition: all var(--transition-fast);
}
.search-results__item:hover, .search-results__item.is-focused { background: var(--color-surface-hover); border-color: var(--color-gold); }
.search-results__thumb { width: 76px; height: 64px; border-radius: var(--radius-sm); overflow: hidden; background: var(--color-bg-3); }
.search-results__thumb img { width: 100%; height: 100%; object-fit: cover; }
.search-results__thumb-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: var(--color-text-3); font-family: var(--font-heading); font-size: 24px; }
.search-results__body { min-width: 0; }
.search-results__name { font-family: var(--font-heading); font-size: 16px; font-weight: 700; color: var(--color-text); display: block; }
.search-results__name:hover { color: var(--color-gold); }
.search-results__latin { font-size: 11px; color: var(--color-text-3); font-style: italic; }
.search-results__meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.search-results__chip { padding: 2px 8px; border-radius: var(--radius-full); font-size: 10px; font-weight: 600; background: var(--color-surface); border: 1px solid var(--color-border); color: var(--color-text-2); }
.search-results__chip--gold { color: var(--color-gold); border-color: rgba(201, 169, 97, 0.35); background: var(--color-gold-glow); }
.search-results__summary { font-size: 12px; color: var(--color-text-2); margin: 0 0 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.search-results__actions { display: flex; flex-wrap: wrap; gap: 6px; }
.search-results__actions .btn { padding: 6px 10px; font-size: 12px; }
.search-results__footer { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--color-border); }
.search-results__footer .btn { flex: 1 1 auto; justify-content: center; }
.search-no-results { padding: 24px 12px; text-align: center; color: var(--color-text-2); font-size: 14px; }
.search-no-results strong { color: var(--color-gold); }
@media (max-width: 600px) {
    .search-results__item { grid-template-columns: 60px minmax(0, 1fr); }
    .search-results__thumb { width: 60px; height: 54px; }
}

/* ---------- 7. Результат распознавания породы по фото ---------- */
.photo-result { text-align: left; }
.photo-result__top { display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 1fr); gap: 24px; align-items: start; }
.photo-result__preview { border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--color-border); background: var(--color-bg-3); }
.photo-result__preview img { width: 100%; height: 100%; object-fit: cover; }
.photo-result__breed { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 8px; }
.photo-result__title { font-family: var(--font-heading); font-size: 26px; margin: 0; }
.photo-result__latin { color: var(--color-text-3); font-style: italic; font-size: 13px; }
.photo-result__desc { color: var(--color-text-2); font-size: 14px; margin: 12px 0 0; }
.confidence-row { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.confidence-row__label { font-size: 12px; color: var(--color-text-3); text-transform: uppercase; letter-spacing: 0.06em; }
.confidence-row__value { font-weight: 700; color: var(--color-gold); font-size: 15px; }
.confidence-bar { flex: 1; height: 8px; border-radius: var(--radius-full); background: var(--color-bg-4); overflow: hidden; }
.confidence-bar__fill { height: 100%; background: var(--gradient-gold); border-radius: var(--radius-full); transition: width var(--transition-slow); }
.confidence-bar__fill--muted { background: linear-gradient(90deg, var(--color-gold-3) 0%, var(--color-text-3) 100%); }
.photo-result__blocks { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-top: 24px; }
.photo-result__block { padding: 18px; border-radius: var(--radius-lg); background: var(--gradient-card); border: 1px solid var(--color-border); }
.photo-result__block h4 { margin: 0 0 10px; font-size: 14px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--color-text-3); font-family: var(--font-body); font-weight: 600; }
.photo-result__alt { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--color-border); }
.photo-result__alt:last-child { border-bottom: none; }
.photo-result__alt-name { font-size: 14px; font-weight: 600; color: var(--color-text); }
.photo-result__alt .confidence-bar { min-width: 60px; }
.color-swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.color-swatch { width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--color-bg-2); box-shadow: var(--shadow-sm); }
.feature-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.photo-result__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.photo-result__similar { margin-top: 28px; }
.photo-result__similar .card-grid { margin-top: 16px; }
.photo-result__provider { font-size: 11px; color: var(--color-text-3); margin-top: 10px; }
@media (max-width: 767px) {
    .photo-result__top { grid-template-columns: 1fr; }
    .photo-result__title { font-size: 22px; }
}

/* ---------- 8. Интерактивная карта пород (Leaflet + локальная карта мира) ---------- */
.map-container--breeds {
    aspect-ratio: 16 / 9; min-height: 340px; border-radius: var(--radius-lg);
    border: 1px solid var(--color-border); overflow: hidden; position: relative; z-index: 1;
    /* Океан: мягкий градиент вместо плоской заливки + внутренняя тень по краям */
    background: radial-gradient(125% 125% at 50% 38%, #131C2C 0%, #0B1017 56%, #06090E 100%);
    box-shadow: inset 0 0 70px rgba(0, 0, 0, 0.55);
}
/* Leaflet добавляет класс leaflet-container на тот же div, поэтому нужен составной селектор */
.map-container--breeds.leaflet-container,
.map-container--breeds .leaflet-container {
    background: radial-gradient(125% 125% at 50% 38%, #131C2C 0%, #0B1017 56%, #06090E 100%);
    font-family: var(--font-body);
}
/* Локальная карта мира: океан + контуры стран + координатная сетка (без внешних тайлов) */
.world-grid-line { pointer-events: none; }
.world-land { stroke-linejoin: round; }
.map-container--breeds.is-loading .map-fallback { color: var(--color-text-3); }
.map-container--breeds.map-ready .map-fallback { display: none !important; }
.map-container--breeds.map-no-base .map-fallback {
    inset: auto 12px 12px auto; width: auto; max-width: 340px;
    align-items: flex-start; justify-content: flex-start; text-align: left;
    background: rgba(11, 11, 15, 0.82); border: 1px solid var(--color-border);
    border-radius: var(--radius-sm); padding: 8px 12px; font-size: 11px; line-height: 1.4;
}
.leaflet-container .leaflet-control-attribution,
.leaflet-control-attribution { display: none !important; }
.leaflet-control-zoom { border: 1px solid var(--color-border) !important; border-radius: var(--radius-md) !important; overflow: hidden; box-shadow: var(--shadow-md); }
.leaflet-control-zoom a { background: rgba(19, 19, 25, 0.95) !important; color: var(--color-gold) !important; border-bottom-color: var(--color-border) !important; }
.leaflet-control-zoom a:hover { background: var(--color-bg-3) !important; color: var(--color-gold-2) !important; }
.leaflet-container a { color: var(--color-gold); }
.leaflet-popup-content-wrapper, .leaflet-popup-tip {
    background: rgba(19, 19, 25, 0.97); color: var(--color-text);
    border: 1px solid var(--color-gold); box-shadow: var(--shadow-lg);
}
.leaflet-popup-content { margin: 14px 16px; font-size: 13px; line-height: 1.5; }
.leaflet-popup-content h4 { font-family: var(--font-heading); font-size: 16px; margin: 0 0 6px; color: var(--color-text); }
.leaflet-popup-content .popup-list { margin: 8px 0 0; padding: 0; list-style: none; }
.leaflet-popup-content .popup-list li { padding: 3px 0; }
.leaflet-popup-content .popup-list a { color: var(--color-gold); }
.leaflet-container a.leaflet-popup-close-button { color: var(--color-text-2); }
.map-marker {
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: var(--gradient-gold);
    border: 2px solid rgba(8, 10, 14, 0.92);
    box-shadow: 0 0 12px var(--color-gold-glow), 0 0 0 4px rgba(201, 169, 97, 0.14);
    color: #1A1A22; font-weight: 700; font-size: 11px; cursor: pointer;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}
.map-marker:hover { transform: scale(1.14); box-shadow: 0 0 20px var(--color-gold-glow), 0 0 0 7px rgba(201, 169, 97, 0.22); }
.map-marker--dot { font-size: 10px; }
/* Чем больше пород, тем заметнее «маячок» страны */
.map-marker--major { box-shadow: 0 0 16px var(--color-gold-glow), 0 0 0 6px rgba(201, 169, 97, 0.18); }
.map-legend {
    position: absolute; bottom: 16px; left: 16px; z-index: 500;
    background: rgba(11, 11, 15, 0.88);
    backdrop-filter: blur(8px);
    padding: 12px 16px; border-radius: var(--radius-md);
    border: 1px solid var(--color-border); font-size: 12px; color: var(--color-text-2);
}
.map-legend strong { color: var(--color-text); font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; }
.map-legend__row { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.map-legend__dot { display: inline-block; background: var(--gradient-gold); border-radius: 50%; }
.map-legend__label { font-size: 11px; }
.map-fallback { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 24px; text-align: center; color: var(--color-text-2); font-size: 14px; }
@media (max-width: 767px) { .map-container--breeds { aspect-ratio: 4 / 3; } }

/* ---------- 9. Бейдж количества пород для сравнения ---------- */
.compare-badge {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 18px; height: 18px; padding: 0 5px; margin-left: 6px;
    border-radius: var(--radius-full);
    background: var(--gradient-gold);
    color: #1A1A22; font-size: 11px; font-weight: 700; line-height: 1;
}

/* ---------- 10. Детали карты: названия стран, сетка, элементы управления ---------- */
.map-marker-wrap { position: absolute; transform: translate(-50%, -50%); }
.map-marker { margin: 0 auto; }
.map-country-label {
    position: absolute; top: calc(100% + 3px); left: 50%; transform: translateX(-50%);
    padding: 2px 8px; white-space: nowrap; font-size: 11px; font-weight: 600; line-height: 1.35;
    color: var(--color-text); background: rgba(9, 11, 16, 0.82);
    backdrop-filter: blur(3px);
    border: 1px solid var(--color-border); border-radius: var(--radius-full);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85); cursor: pointer; pointer-events: auto;
}
.map-country-label:hover { color: var(--color-gold-2); border-color: var(--color-gold); }
.map-country-label--above { top: auto; bottom: calc(100% + 3px); }
.map-country-label--right { top: 50%; left: calc(100% + 6px); transform: translateY(-50%); }
.map-labels-off .map-country-label { display: none; }
.map-tick-label {
    display: inline-block; transform: translate(-50%, -50%); white-space: nowrap;
    font-size: 10px; letter-spacing: 0.04em; color: #4C5361; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
}
.map-geo-label {
    display: inline-block; transform: translate(-50%, -50%); white-space: nowrap;
    font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
    color: #566074; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.95); pointer-events: none;
}
.map-geo-label--ocean { color: #3F6E8F; font-style: italic; text-transform: none; letter-spacing: 0.1em; font-size: 13px; }
.map-geo-label--continent { color: #8A7A4E; font-size: 13px; letter-spacing: 0.22em; }
.map-geo-label--line { color: #7A6A3C; text-transform: none; letter-spacing: 0.08em; font-size: 11px; }
.map-readout {
    position: absolute; top: 12px; right: 12px; z-index: 500;
    padding: 6px 10px; font-family: var(--font-mono); font-size: 11px;
    color: var(--color-text-2); background: rgba(11, 11, 15, 0.82);
    border: 1px solid var(--color-border); border-radius: var(--radius-sm); pointer-events: none;
}
.map-controls { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.map-controls__btn {
    padding: 7px 10px; font-size: 11px; font-weight: 600; text-align: left;
    color: var(--color-text-2); background: rgba(19, 19, 25, 0.95);
    border: 1px solid var(--color-border); border-radius: var(--radius-sm);
    cursor: pointer; transition: all var(--transition-fast);
}
.map-controls__btn:hover { color: var(--color-gold); border-color: var(--color-gold); }
.map-controls__btn[aria-pressed="true"] { color: var(--color-gold); border-color: var(--color-gold); background: var(--color-gold-glow); }
.map-controls__hint { margin-top: 2px; font-size: 10px; line-height: 1.45; color: var(--color-text-3); max-width: 132px; }
.leaflet-control-scale-line {
    background: rgba(11, 11, 15, 0.8) !important; color: var(--color-text-2) !important;
    border: 1px solid var(--color-border) !important; font-size: 10px !important;
}
/* Подсказка при наведении на метку страны */
.leaflet-tooltip.map-marker-tooltip {
    background: rgba(11, 11, 15, 0.95); color: var(--color-gold);
    border: 1px solid var(--color-gold); border-radius: var(--radius-sm);
    font-size: 12px; font-weight: 600; padding: 4px 8px; box-shadow: var(--shadow-md);
}
.leaflet-tooltip.map-marker-tooltip::before { border-top-color: var(--color-gold); }
/* Вторая строка подсказки метки: количество пород и намёк про клик */
.map-marker-tooltip__hint { display: block; margin-top: 2px; font-size: 10px; font-weight: 500; letter-spacing: 0; color: var(--color-text-2); }
/* Легенда-плашка под картой (не закрывает страны и подписи) */
.map-legend--bar {
    position: static; inset: auto; margin-top: 16px; padding: 14px 18px;
    display: flex; flex-wrap: wrap; align-items: center; gap: 18px;
    background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg);
}
.map-legend--bar .map-legend__row { margin-top: 0; }
.map-legend--bar strong { letter-spacing: 0.05em; }
.map-legend__hint { flex: 1 1 240px; color: var(--color-text-3); font-size: 11px; line-height: 1.5; }
@media (max-width: 767px) {
    .map-country-label { font-size: 10px; padding: 1px 5px; }
    .map-geo-label, .map-geo-label--ocean { font-size: 10px; letter-spacing: 0.1em; }
    .map-geo-label--continent { font-size: 11px; }
    .map-readout { font-size: 10px; padding: 4px 8px; }
    .map-legend { padding: 8px 10px; font-size: 10px; }
    .map-controls__btn { padding: 6px 8px; font-size: 10px; }
}

/* ---------- 11. Страница сравнения: слоты, метры, таблица параметров ---------- */
.compare-meter { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 0 0 20px; }
.compare-meter__track { flex: 1 1 220px; height: 8px; background: var(--color-bg-3); border-radius: var(--radius-full); overflow: hidden; }
.compare-meter__fill { display: block; height: 100%; background: var(--gradient-gold); border-radius: var(--radius-full); transition: width var(--transition-slow); }
.compare-meter__text { font-size: 13px; color: var(--color-text-2); white-space: nowrap; }
.compare-meter__text strong { color: var(--color-gold); }

.compare-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(212px, 1fr)); gap: 16px; margin-bottom: 24px; }
/* Карточка породы в списке сравнения: сверху фото, затем название и две кнопки */
.compare-slot {
    position: relative; display: flex; flex-direction: column; overflow: hidden;
    background: var(--gradient-card); border: 1px solid var(--color-border); border-radius: var(--radius-lg);
    transition: border-color var(--transition-fast), background var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
}
.compare-slot:hover { border-color: var(--color-border-strong); background: var(--color-surface-hover); transform: translateY(-3px); box-shadow: var(--shadow-md); }
.compare-slot--empty { border-style: dashed; background: transparent; align-items: center; justify-content: center; text-align: center; min-height: 240px; }
.compare-slot--empty:hover { border-color: var(--color-gold); background: var(--color-gold-glow); transform: none; box-shadow: none; }
.compare-slot__thumb { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--color-bg-3); }
.compare-slot__thumb img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform var(--transition-slow); }
.compare-slot:hover .compare-slot__thumb img { transform: scale(1.04); }
.compare-slot__order {
    position: absolute; top: 10px; left: 10px; width: 24px; height: 24px; display: inline-flex;
    align-items: center; justify-content: center; border-radius: 50%;
    background: var(--gradient-gold); color: #17130A; font-size: 12px; font-weight: 700;
}
.compare-slot__body { display: flex; flex-direction: column; gap: 10px; flex: 1; min-width: 0; padding: 14px 16px 16px; }
.compare-slot__name { display: block; font-family: var(--font-heading); font-size: 17px; line-height: 1.25; color: var(--color-text); }
.compare-slot__name:hover { color: var(--color-gold); }
.compare-slot__meta { display: flex; flex-wrap: wrap; gap: 6px; }
.compare-slot__chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: var(--radius-full); background: var(--color-bg-3); border: 1px solid var(--color-border); font-size: 11px; font-weight: 600; letter-spacing: 0.02em; color: var(--color-text-2); }
.compare-slot__chip--gold { color: var(--color-gold); border-color: rgba(201, 169, 97, 0.35); background: var(--color-gold-glow); }
.compare-slot__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 4px; }
.compare-slot__actions .btn { flex: 1 1 auto; justify-content: center; }
.compare-slot__add { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 22px 16px; color: var(--color-text-3); }
.compare-slot__add-icon { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 50%; border: 1px dashed var(--color-border-strong); font-size: 22px; line-height: 1; color: var(--color-gold); transition: all var(--transition-fast); }
.compare-slot__add-title { font-size: 14px; font-weight: 600; color: var(--color-text-2); }
.compare-slot__add-hint { font-size: 12px; }
.compare-slot--empty:hover .compare-slot__add { color: var(--color-gold); }
.compare-slot--empty:hover .compare-slot__add-icon { border-color: var(--color-gold); background: var(--color-gold-glow); }

.compare-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin: 24px 0; }
.compare-summary__card { padding: 18px; background: var(--gradient-card); border: 1px solid var(--color-border); border-radius: var(--radius-lg); }
.compare-summary__card--winner { border-color: var(--color-gold); box-shadow: var(--shadow-gold); }
.compare-summary__name { font-family: var(--font-heading); font-size: 18px; margin: 0 0 6px; }
.compare-summary__score { font-size: 13px; color: var(--color-text-2); }
.compare-summary__score strong { color: var(--color-gold); }
.compare-summary__note { grid-column: 1 / -1; margin: 0; font-size: 12px; line-height: 1.6; color: var(--color-text-3); }

.compare-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-top: 24px; border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: var(--color-bg-2); }
.compare-table { width: 100%; border-collapse: collapse; min-width: 620px; }
.compare-table th, .compare-table td { padding: 13px 16px; border-bottom: 1px solid var(--color-border); font-size: 14px; }
.compare-table thead th { background: var(--color-bg-3); color: var(--color-text); font-size: 14px; text-align: center; }
.compare-table thead th:first-child { text-align: left; color: var(--color-text-2); font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; }
.compare-table tbody th {
    position: sticky; left: 0; z-index: 1; background: var(--color-bg-2);
    text-align: left; font-weight: 500; font-size: 13px; color: var(--color-text-3); white-space: nowrap;
}
.compare-table td { text-align: center; color: var(--color-text); }
.compare-table tbody tr:hover td, .compare-table tbody tr:hover th { background: rgba(255, 255, 255, 0.03); }
.compare-table__cell--best { color: var(--color-gold); font-weight: 700; }
/* Название породы в шапке таблицы и в сводке ведёт на карточку породы */
.compare-table thead th a { color: inherit; text-decoration: none; border-bottom: 1px dotted rgba(201, 169, 97, 0.45); }
.compare-table thead th a:hover { color: var(--color-gold); border-bottom-color: var(--color-gold); }
.compare-summary__name a { color: inherit; text-decoration: none; }
.compare-summary__name a:hover { color: var(--color-gold); }
.compare-table__best { display: block; margin-top: 2px; font-size: 10px; font-weight: 600; letter-spacing: 0.04em; color: var(--color-gold); text-transform: uppercase; }
.metric-bar { display: block; width: 100%; height: 5px; margin-top: 6px; background: var(--color-bg-4); border-radius: var(--radius-full); overflow: hidden; }
.metric-bar__fill { display: block; height: 100%; background: var(--gradient-gold); border-radius: var(--radius-full); }
.compare-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
@media (max-width: 767px) {
    .compare-table th, .compare-table td { padding: 11px 12px; font-size: 13px; }
    .compare-slots { grid-template-columns: 1fr; }
    .compare-slot__thumb { aspect-ratio: 16 / 9; }
    .compare-actions .btn { flex: 1 1 100%; }
}

/* ---------- 12. Селекты в стиле сайта: кастомная стрелка + тёмный выпадающий список ----------
   Нативные select получают оформление сайта, а JS (main.js → enhanceSelects) вместо системного
   списка рисует собственный — в тёмной теме, с золотой подсветкой и галочкой у выбранного пункта.
   Форма при этом остаётся нативной: значение синхронизируется с исходным select и «change» летит как обычно. */
select.filter__select,
select.form-select,
select.form-input,
select.ui-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 42px;
    background-color: var(--color-bg-3);
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%23C9A961' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 12px 8px;
    cursor: pointer;
    text-overflow: ellipsis;
}
select.filter__select:hover,
select.form-select:hover,
select.form-input:hover { border-color: var(--color-border-strong); background-color: var(--color-bg-4); }
select.filter__select:disabled,
select.form-select:disabled,
select.form-input:disabled { opacity: 0.55; cursor: not-allowed; }
select.filter__select option, select.form-select option, select.form-input option { background-color: var(--color-bg-3); color: var(--color-text); }
select.filter__select option:checked, select.form-select option:checked { background-color: var(--color-bg-4); color: var(--color-gold); }

/* Селект в момент, когда открыт собственный список */
select.ui-select-open { border-color: var(--color-gold); background-color: var(--color-bg-4); box-shadow: 0 0 0 3px var(--color-gold-glow); }

.ui-select-menu {
    position: fixed; z-index: 320; min-width: 196px; max-height: 320px; overflow-y: auto; overscroll-behavior: contain;
    padding: 6px; background: var(--color-bg-2); border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-md); box-shadow: var(--shadow-lg); animation: uiSelectIn 0.14s ease;
}
.ui-select-menu__option {
    display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%;
    padding: 9px 12px; border: 0; border-radius: var(--radius-sm); background: none; color: var(--color-text-2);
    font-size: 14px; font-family: var(--font-body); line-height: 1.35; text-align: left; cursor: pointer;
    transition: background var(--transition-fast), color var(--transition-fast);
}
.ui-select-menu__option:hover, .ui-select-menu__option.is-active { background: var(--color-surface-hover); color: var(--color-text); }
.ui-select-menu__option.is-selected { color: var(--color-gold); font-weight: 600; }
.ui-select-menu__check { flex: 0 0 auto; opacity: 0; color: var(--color-gold); transition: opacity var(--transition-fast); }
.ui-select-menu__option.is-selected .ui-select-menu__check { opacity: 1; }
.ui-select-menu__empty { padding: 10px 12px; color: var(--color-text-3); font-size: 13px; }
.ui-select-menu::-webkit-scrollbar { width: 8px; }
.ui-select-menu::-webkit-scrollbar-thumb { background: var(--color-border-strong); border-radius: var(--radius-full); }
@keyframes uiSelectIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .ui-select-menu { animation: none; } }

/* ---------- 13. Адаптивность и визуальные улучшения (сеть, фокус, печать) ---------- */
:root { color-scheme: dark; }
::selection { background: var(--color-gold-glow); color: var(--color-text); }
html { scroll-padding-top: calc(var(--header-height) + 16px); }
h1, h2, h3 { text-wrap: balance; }
img { height: auto; }
.section { padding: clamp(48px, 6vw, 80px) 0; }
.section--tight { padding: clamp(28px, 4vw, 40px) 0; }
.hero { padding: clamp(48px, 7vw, 80px) 0 clamp(56px, 8vw, 100px); }
.hero__stats { gap: clamp(20px, 4vw, 40px); flex-wrap: wrap; }
.hero__title { letter-spacing: -0.01em; }

/* Клавиатурная доступность: заметная золотая рамка вместо системного outline */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible, [tabindex]:focus-visible, .leaflet-container a:focus-visible {
    outline: 2px solid var(--color-gold); outline-offset: 2px; border-radius: var(--radius-sm);
}

/* Ховер карточек: мягкий подъём и золотая рамка (только там, где есть курсор) */
.breed-card { transition: transform var(--transition-base), border-color var(--transition-base), box-shadow var(--transition-base); }
@media (hover: hover) and (pointer: fine) {
    .breed-card:hover { transform: translateY(-4px); border-color: var(--color-border-strong); box-shadow: var(--shadow-md); }
}

/* Панель сравнения: не перекрываем контент и учитываем «безопасные зоны» iOS */
body.has-compare-bar { padding-bottom: calc(120px + env(safe-area-inset-bottom, 0px)); }
.compare-bar { padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
.back-to-top { bottom: calc(24px + env(safe-area-inset-bottom, 0px)); right: calc(24px + env(safe-area-inset-right, 0px)); }
.toast { bottom: calc(24px + env(safe-area-inset-bottom, 0px)); }
@media (max-width: 767px) {
    body.has-compare-bar { padding-bottom: calc(148px + env(safe-area-inset-bottom, 0px)); }
}

/* Уважаем настройку «уменьшить движение» */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important; animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important; scroll-behavior: auto !important;
    }
}

/* Планшеты */
@media (max-width: 991px) {
    .card-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
    .hero__visual { aspect-ratio: 16 / 10; }
    .stat-block { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 16px; padding: 24px; }
    .filters { padding: 18px; }
    .filters__grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
}

/* Мобильные */
@media (max-width: 768px) {
    .btn--lg { padding: 14px 22px; font-size: 15px; }
    .btn--sm { padding: 10px 14px; min-height: 40px; }
    .hero__actions { width: 100%; }
    .hero__actions .btn { flex: 1 1 100%; }
    .hero__stats { justify-content: space-between; }
    .section__header { align-items: flex-start; }
    .tabs__btn { padding: 12px 14px; }
    .breadcrumbs { font-size: 11px; gap: 6px; }
    .stat-block { padding: 20px; }
    .mobile-nav__link { padding: 16px 12px; }
}

@media (max-width: 560px) {
    .container { padding: 0 14px; }
    .card-grid, .card-grid--3 { grid-template-columns: 1fr; gap: 16px; }
    .filters { padding: 16px; }
    .filters__grid { grid-template-columns: minmax(0, 1fr); }
    .active-filters { margin-top: 16px; }
    .chip { padding: 8px 12px; font-size: 12px; }
    .compare-bar__item { flex-basis: 48px; width: 48px; height: 48px; }
    .breed-card__actions { flex-direction: column; }
    .breed-card__actions .btn { flex: 1 1 100%; width: 100%; }
    /* На мобильных кнопки действий на странице породы — на всю ширину */
    .breed-hero__actions { flex-direction: column; }
    .breed-hero__actions .btn { flex: 1 1 100%; width: 100%; }
    .breed-hero-grid { grid-template-columns: 1fr; gap: 24px; }
    .stat-block__value { font-size: 1.5rem; }
    .toast { padding: 12px 16px; font-size: 13px; }
    .pagination__link, .pagination__span { min-width: 36px; height: 36px; }
    h1 { font-size: clamp(1.75rem, 8vw, 2.25rem); }
}

/* Печать: сравнительная таблица и карточки без интерфейса */
@media print {
    .compare-bar, .back-to-top, .no-print, .compare-actions, .toast, .scroll-progress { display: none !important; }
    body { background: #fff; color: #000; }
    body.has-compare-bar { padding-bottom: 0; }
    .compare-table-wrap, .table-wrap { overflow: visible; border: none; }
    .compare-table { min-width: 0; }
    .compare-table tbody th { position: static; background: transparent; }
    .compare-table thead th, .compare-table td, .compare-table th { border-color: #ccc; }
    .metric-bar { display: none; }
    .section { padding: 12px 0; }
}


/* =========================================================================
   UX-БЛОК 2: бейджи-ссылки, зелёные уведомления о входе, пошаговый тест,
   выбор нескольких пород из результатов подбора и переход к сравнению
   ========================================================================= */

/* ---------- 12. Бейджи-ссылки на странице породы (переход в отфильтрованный каталог) ---------- */
a.badge { text-decoration: none; transition: all var(--transition-fast); }
a.badge:hover { color: var(--color-gold); border-color: var(--color-gold); background: var(--color-gold-glow); }
a.badge--gold:hover { background: rgba(201, 169, 97, 0.22); }
a.badge--success:hover { color: var(--color-success); border-color: var(--color-success); background: rgba(107, 207, 127, 0.18); }
a.badge--warning:hover { color: var(--color-warning); border-color: var(--color-warning); background: rgba(255, 181, 71, 0.18); }

/* ---------- 13. Тосты: зелёное подтверждение входа и других успешных действий ---------- */
.toast { display: inline-flex; align-items: center; gap: 10px; max-width: min(560px, calc(100vw - 32px)); text-align: left; }
.toast__icon {
    flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
    width: 22px; height: 22px; border-radius: 50%; font-size: 12px; font-weight: 700; line-height: 1;
}
.toast__text { flex: 1 1 auto; min-width: 0; }
.toast--success {
    border-color: rgba(107, 207, 127, 0.55);
    background: linear-gradient(90deg, rgba(107, 207, 127, 0.18) 0%, var(--color-bg-3) 46%);
    box-shadow: 0 0 0 1px rgba(107, 207, 127, 0.12), var(--shadow-md);
}
.toast--success .toast__icon { background: rgba(107, 207, 127, 0.18); color: var(--color-success); border: 1px solid rgba(107, 207, 127, 0.55); }
.toast--danger .toast__icon { background: rgba(255, 107, 107, 0.16); color: var(--color-danger); border: 1px solid rgba(255, 107, 107, 0.5); }
.toast--info .toast__icon { background: rgba(77, 171, 247, 0.16); color: var(--color-info); border: 1px solid rgba(77, 171, 247, 0.5); }

/* ---------- 14. Тест подбора породы: пошаговый режим (один вопрос на экран) ---------- */
.quiz-shell {
    background: var(--color-surface); border: 1px solid var(--color-border);
    border-radius: var(--radius-lg); padding: 24px; scroll-margin-top: calc(var(--header-height) + 24px);
}
.quiz-progress { display: flex; flex-direction: column; gap: 10px; margin-bottom: 22px; }
.quiz-progress__meta {
    display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
    font-size: 12px; color: var(--color-text-3); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600;
}
.quiz-progress__meta strong { font-family: var(--font-heading); font-size: 15px; color: var(--color-gold); text-transform: none; letter-spacing: 0; }
.quiz-progress__track { height: 6px; border-radius: var(--radius-full); background: var(--color-bg-3); overflow: hidden; }
.quiz-progress__bar { display: block; height: 100%; width: 0; background: var(--gradient-gold); transition: width var(--transition-base); }
.quiz-step { display: none; }
.quiz-step.active { display: block; animation: fadeIn 0.3s ease; }
.quiz-step .quiz-question { padding: 0; background: transparent; border: 0; margin: 0; }
.quiz-step .quiz-options { margin-top: 16px; }
.quiz-nav { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.quiz-nav__spacer { flex: 1 1 auto; }
.quiz-hint { font-size: 12px; color: var(--color-text-3); }

/* ---------- 15. Результаты подбора: мультивыбор пород + кнопка сравнения ---------- */
.quiz-matches { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.quiz-match {
    position: relative; display: flex; flex-direction: column;
    background: var(--color-surface); border: 1px solid var(--color-border);
    border-radius: var(--radius-lg); overflow: hidden; transition: all var(--transition-fast);
}
.quiz-match:hover { border-color: var(--color-border-strong); }
.quiz-match.is-selected { border-color: var(--color-gold); box-shadow: 0 0 0 1px var(--color-gold-glow), var(--shadow-md); }
.quiz-match__pick {
    position: absolute; top: 12px; left: 12px; z-index: 3;
    display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px;
    border-radius: var(--radius-full); background: rgba(11, 11, 15, 0.72);
    border: 1px solid var(--color-border-strong); color: var(--color-text-2);
    font-size: 12px; font-weight: 600; cursor: pointer; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.quiz-match__pick input { width: 15px; height: 15px; accent-color: var(--color-gold); cursor: pointer; }
.quiz-match.is-selected .quiz-match__pick { color: var(--color-gold); border-color: var(--color-gold); }
.quiz-match__image { aspect-ratio: 4 / 3; overflow: hidden; background: var(--color-bg-3); }
.quiz-match__image img { width: 100%; height: 100%; object-fit: cover; }
.quiz-match__body { display: flex; flex-direction: column; gap: 10px; padding: 16px; flex: 1 1 auto; }
.quiz-match__score { font-family: var(--font-heading); font-size: 22px; font-weight: 800; color: var(--color-gold); }
.quiz-match__name { font-family: var(--font-heading); font-size: 19px; font-weight: 700; margin: 0; }
.quiz-match__reason { margin: 0; color: var(--color-text-2); font-size: 14px; line-height: 1.55; }
.quiz-match__actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; }
.quiz-match__actions .btn { flex: 1 1 0; justify-content: center; min-width: 0; }
.quiz-compare-bar {
    position: sticky; bottom: 12px; z-index: 5;
    display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
    margin-top: 24px; padding: 14px 18px;
    background: rgba(11, 11, 15, 0.92); border: 1px solid var(--color-gold-3);
    border-radius: var(--radius-lg); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.quiz-compare-bar__text { font-size: 14px; color: var(--color-text-2); }
.quiz-compare-bar__text strong { color: var(--color-gold); }

@media (max-width: 560px) {
    .quiz-shell { padding: 16px; }
    .quiz-nav { flex-direction: column-reverse; align-items: stretch; }
    .quiz-nav .btn { width: 100%; }
    .quiz-match__actions { flex-direction: column; }
    .quiz-match__actions .btn { flex: 1 1 100%; width: 100%; }
    .quiz-compare-bar { flex-direction: column; align-items: stretch; }
    .quiz-compare-bar .btn { width: 100%; }
}

/* ---------- 16. Описание породы: 3000–7000 символов на все разделы вместе ---------- */
.article-content { color: var(--color-text-2); font-size: 15.5px; line-height: 1.75; }
.article-content > * + * { margin-top: 16px; }
.article-content p { margin: 0; }
/* Лид раздела (первый абзац) крупнее остального текста — читается как статья */
.article-content > p:first-child { color: var(--color-text); font-size: 16.5px; }
.article-content h3 { margin: 28px 0 0; font-family: var(--font-heading); font-size: 19px; font-weight: 700; color: var(--color-text); }
.article-content > h3:first-child { margin-top: 0; }
.article-content ul, .article-content ol { margin: 0; padding-left: 22px; display: grid; gap: 8px; }
.article-content li::marker { color: var(--color-gold); }
.article-content strong { color: var(--color-text); }
.article-content a { color: var(--color-gold); text-decoration: underline; }
/* Таблица параметров внутри раздела */
.content-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 320px; }
.content-table th, .content-table td { padding: 10px 14px; border-bottom: 1px solid var(--color-border); text-align: left; vertical-align: top; }
.content-table th { width: 42%; font-weight: 600; color: var(--color-text); background: var(--color-bg-2); }
.content-table th[scope="row"] { border-right: 1px solid var(--color-border); }
.content-table tr:last-child th, .content-table tr:last-child td { border-bottom: 0; }
.content-table tbody tr:hover th, .content-table tbody tr:hover td { background: var(--color-surface); }

/* ---------- 17. Согласие на cookie: баннер и диалог настроек ---------- */
.consent-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 300;
    padding: 0 8px calc(8px + env(safe-area-inset-bottom, 0px));
}
.consent-bar[hidden] { display: none; }
.consent-bar__inner {
    max-width: var(--container-max); margin: 0 auto;
    display: flex; align-items: center; gap: 20px;
    padding: 16px 20px;
    background: rgba(19, 19, 25, 0.96);
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.consent-bar__text { flex: 1 1 auto; min-width: 0; }
.consent-bar__title { display: block; font-family: var(--font-heading); font-size: 16px; color: var(--color-text); margin-bottom: 4px; }
.consent-bar__text p { margin: 0; font-size: 13.5px; line-height: 1.55; color: var(--color-text-2); }
.consent-bar__text a { text-decoration: underline; }
.consent-bar__actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; flex: 0 0 auto; }

.consent-dialog {
    width: min(640px, calc(100vw - 32px));
    max-height: min(86vh, 760px);
    padding: 0;
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-lg);
    background: var(--color-bg-2);
    color: var(--color-text);
    box-shadow: var(--shadow-lg);
    overflow-y: auto;
}
.consent-dialog::backdrop { background: rgba(0, 0, 0, 0.6); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.consent-dialog__form { display: grid; gap: 14px; padding: 24px; }
.consent-dialog__title { margin: 0; font-size: 22px; }
.consent-dialog__lead { margin: 0; font-size: 14px; line-height: 1.6; color: var(--color-text-2); }

.consent-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.consent-list__label {
    display: flex; gap: 12px; align-items: flex-start;
    padding: 14px 16px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-surface);
    cursor: pointer;
    transition: border-color var(--transition-fast), background var(--transition-fast);
}
.consent-list__label:hover { border-color: var(--color-border-strong); background: var(--color-surface-hover); }
.consent-list__label input { flex: 0 0 auto; width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--color-gold); cursor: pointer; }
.consent-list__label input:disabled { cursor: default; opacity: 0.8; }
.consent-list__body { display: grid; gap: 4px; }
.consent-list__name { font-size: 15px; font-weight: 600; color: var(--color-text); }
.consent-list__name em { margin-left: 6px; font-style: normal; font-size: 12px; font-weight: 600; color: var(--color-gold); }
.consent-list__desc { font-size: 13.5px; line-height: 1.55; color: var(--color-text-2); }

.consent-dialog__actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }

/* Кнопка, выглядящая как ссылка в тексте (переоткрытие настроек cookie) */
.link-button {
    display: inline;
    padding: 0;
    border: 0;
    background: none;
    color: var(--color-gold);
    font: inherit;
    text-decoration: underline;
    cursor: pointer;
}
.link-button:hover { color: var(--color-gold-2); }
.link-button:focus-visible { outline: 2px solid var(--color-gold); outline-offset: 2px; border-radius: 2px; }

@media (max-width: 900px) {
    .consent-bar__inner { flex-direction: column; align-items: stretch; gap: 12px; }
    .consent-bar__actions .btn { flex: 1 1 auto; }
}
@media (max-width: 560px) {
    .consent-bar__actions .btn { flex: 1 1 100%; }
    .consent-dialog__form { padding: 18px; }
    .consent-dialog__actions { flex-direction: column-reverse; }
    .consent-dialog__actions .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
    .consent-list__label, .consent-bar__inner { transition: none; }
}
@media print {
    .consent-bar, .consent-dialog { display: none !important; }
}

/* ---------- 18. Живой поиск: выпадающие подсказки (породы, блог, глоссарий) ---------- */
/* Пункт 43: панель рисует assets/js/modules/search.js, поэтому стили собраны здесь:
   до этого разметка подсказок существовала, но CSS для неё не было вообще. */
.search-results {
    position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 90;
    max-height: min(70vh, 620px); overflow-y: auto; overscroll-behavior: contain;
    padding: 8px;
    background: rgba(19, 19, 25, 0.98);
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    animation: searchDropIn 0.16s ease-out;
}
@keyframes searchDropIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

.search-results__head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding: 6px 10px 10px; }
.search-results__count { font-size: 12.5px; color: var(--color-text-3); }
.search-results__count strong { color: var(--color-text); }
.search-results__section + .search-results__section { margin-top: 6px; border-top: 1px solid var(--color-border); }
.search-results__section > .search-results__head { padding-top: 12px; }

.search-results__item {
    display: flex; gap: 12px; align-items: flex-start;
    padding: 10px; border-radius: var(--radius-md);
    border: 1px solid transparent;
}
.search-results__item--simple { align-items: center; border-bottom: 1px solid var(--color-border); border-radius: 0; }
.search-results__item--simple:last-of-type { border-bottom: 0; }
.search-results [data-nav-item].is-active,
.search-results__item.is-active { border-color: var(--color-gold); background: var(--color-surface-hover); }

.search-results__thumb { flex: 0 0 auto; width: 64px; height: 64px; border-radius: var(--radius-sm); overflow: hidden; background: var(--color-bg-3); }
.search-results__thumb img { width: 100%; height: 100%; object-fit: cover; }
.search-results__body { min-width: 0; flex: 1 1 auto; }
.search-results__name { display: inline-block; font-family: var(--font-heading); font-size: 16px; color: var(--color-text); }
.search-results__name:hover { color: var(--color-gold-2); }
.search-results__latin { font-size: 12px; color: var(--color-text-3); }
.search-results__meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.search-results__chip {
    display: inline-block; padding: 2px 8px; border-radius: var(--radius-full);
    font-size: 11.5px; color: var(--color-text-2);
    background: var(--color-surface); border: 1px solid var(--color-border);
}
.search-results__chip--gold { color: var(--color-gold); border-color: var(--color-gold-3); }
.search-results__chip--history { cursor: pointer; color: var(--color-text); }
.search-results__chip--history:hover { border-color: var(--color-gold); color: var(--color-gold-2); }
.search-results__summary { margin: 6px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--color-text-2); }
.search-results__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.search-results__chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 10px; }

.search-results__footer { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px; border-top: 1px solid var(--color-border); }
.search-no-results { padding: 12px 10px; font-size: 13.5px; color: var(--color-text-2); }

@media (max-width: 640px) {
    .search-results { max-height: 76vh; }
    .search-results__thumb { width: 48px; height: 48px; }
    .search-results__actions .btn, .search-results__footer .btn { flex: 1 1 auto; }
}
@media (prefers-reduced-motion: reduce) { .search-results { animation: none; } }


