/* ===== Усы и хвост — справочник пород кошек ===== */
:root {
  --bg: #FAF6F0;
  --surface: #FFFFFF;
  --surface-2: #F3EEE7;
  --ink: #2A2320;
  --muted: #6B615A;
  --line: #E8DFD4;
  --accent: #BF4F27;
  --accent-hover: #A5411D;
  --on-accent: #FFFFFF;
  --powder: #F6DDD6;
  --sage: #DCE9E0;
  --sand: #F6E8D2;
  --sky: #DEE7F1;
  --fur: #F3A552;
  --fur-dark: #D98636;
  --cream: #FFF1DE;
  --pink: #F5A99B;
  --radius: 22px;
  --shadow: 0 1px 2px rgba(42, 35, 32, .04), 0 14px 34px -14px rgba(42, 35, 32, .16);
  --shadow-lg: 0 2px 4px rgba(42, 35, 32, .05), 0 28px 60px -24px rgba(42, 35, 32, .28);
  --round: ui-rounded, "SF Pro Rounded", "Hiragino Maru Gothic ProN", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --text: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
/* Тёмная тема: графитовые оттенки. Включается кнопкой в шапке (data-theme на <html>),
   а если скрипты отключены — по настройке устройства. */
:root[data-theme="dark"] {
  --bg: #0F172A;
  --surface: #1E293B;
  --surface-2: #273449;
  --ink: #F1F5F9;
  --muted: #9FB0C6;
  --line: #334155;
  --accent: #F28B5B;
  --accent-hover: #F7A47C;
  --on-accent: #0F172A;
  --powder: #4A3340;
  --sage: #1F3D3A;
  --sand: #3B3A2E;
  --sky: #223A58;
  --shadow: 0 1px 2px rgba(2, 6, 23, .3), 0 14px 34px -14px rgba(2, 6, 23, .7);
  --shadow-lg: 0 2px 4px rgba(2, 6, 23, .35), 0 28px 60px -24px rgba(2, 6, 23, .85);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg: #0F172A;
    --surface: #1E293B;
    --surface-2: #273449;
    --ink: #F1F5F9;
    --muted: #9FB0C6;
    --line: #334155;
    --accent: #F28B5B;
    --accent-hover: #F7A47C;
    --on-accent: #0F172A;
    --powder: #4A3340;
    --sage: #1F3D3A;
    --sand: #3B3A2E;
    --sky: #223A58;
    --shadow: 0 1px 2px rgba(2, 6, 23, .3), 0 14px 34px -14px rgba(2, 6, 23, .7);
    --shadow-lg: 0 2px 4px rgba(2, 6, 23, .35), 0 28px 60px -24px rgba(2, 6, 23, .85);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 17px/1.62 var(--text); -webkit-font-smoothing: antialiased;
  transition: background-color .3s ease, color .3s ease;
}
img { display: block; max-width: 100%; height: auto; }
[hidden] { display: none !important; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--round); letter-spacing: -.025em; line-height: 1.12; margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 8px; }

/* ----- Шапка ----- */
.top {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 800 1.12rem/1 var(--round); letter-spacing: -.02em; }
.brand svg { width: 34px; height: 34px; flex: none; }
.nav { display: flex; align-items: center; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { padding: 9px 14px; border-radius: 999px; text-decoration: none; font-size: .95rem; font-weight: 500; color: var(--muted); white-space: nowrap; transition: background .15s, color .15s; }
.nav a:hover { background: var(--surface-2); color: var(--ink); }

/* ----- Кнопки и мелочи ----- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 14px 24px; border: 0; border-radius: 999px; cursor: pointer; text-decoration: none;
  font: 600 1rem/1.1 var(--round); letter-spacing: -.005em;
  background: var(--accent); color: var(--on-accent);
  box-shadow: 0 10px 24px -12px var(--accent);
  transition: transform .16s ease, background .16s ease, box-shadow .16s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { background: var(--accent-hover); transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn.ghost { background: var(--surface); color: var(--ink); border: 1px solid var(--line); box-shadow: var(--shadow); }
.btn.ghost:hover { background: var(--surface-2); }
.btn.small { padding: 10px 18px; font-size: .92rem; }
.chip { display: inline-flex; align-items: center; padding: 5px 12px; border-radius: 999px; font-size: .82rem; font-weight: 500; background: var(--surface-2); color: var(--ink); white-space: nowrap; }
.chip.c1 { background: var(--powder); } .chip.c2 { background: var(--sage); } .chip.c3 { background: var(--sand); } .chip.c4 { background: var(--sky); }
.eyebrow { font-size: .8rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--accent); }
.lead { font-size: 1.14rem; color: var(--muted); max-width: 34em; }
section { padding: 76px 0; }
.sec-head { display: grid; gap: 12px; margin-bottom: 34px; max-width: 46em; }
.sec-head h2 { font-size: clamp(1.8rem, 3.6vw, 2.5rem); font-weight: 800; }
.sec-head p { color: var(--muted); font-size: 1.06rem; }

/* ----- Первый экран ----- */
.hero { padding: 44px 0 64px; }
.hero .wrap { display: grid; grid-template-columns: 1fr 1.02fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(2.4rem, 5.4vw, 4rem); font-weight: 800; letter-spacing: -.035em; line-height: 1.04; margin: 16px 0 20px; }
.hero h1 em { font-style: normal; background: linear-gradient(transparent 62%, var(--powder) 62%); border-radius: 4px; padding: 0 .06em; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero .facts { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 10px 34px; margin: 36px 0 0; padding: 24px 0 0; border-top: 1px solid var(--line); list-style: none; color: var(--muted); font-size: .9rem; line-height: 1.35; }
.hero .facts b { display: block; font: 800 1.5rem/1.1 var(--round); color: var(--ink); letter-spacing: -.02em; }
.hero-photo { position: relative; }
.hero-photo img { width: 100%; aspect-ratio: 4 / 3.3; object-fit: cover; border-radius: 34px; box-shadow: var(--shadow-lg); background: var(--surface-2); }
.float { position: absolute; display: flex; align-items: center; gap: 10px; padding: 11px 16px 11px 12px; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-lg); font-size: .88rem; line-height: 1.25; animation: bob 6s ease-in-out infinite; }
.float b { font-family: var(--round); font-weight: 700; display: block; }
.float span { color: var(--muted); }
.float i { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--sand); font-style: normal; font-size: 20px; }
.float.f1 { left: -22px; bottom: 34px; }
.float.f2 { right: -14px; top: 30px; animation-delay: -3s; }
.float.f2 i { background: var(--sage); }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* ----- Каталог ----- */
.tools { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr) auto; gap: 12px; padding: 14px; margin-bottom: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.field { position: relative; }
.field label { position: absolute; left: 16px; top: 8px; font-size: .7rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); pointer-events: none; }
.field input, .field select {
  width: 100%; height: 56px; padding: 22px 16px 6px; border: 1px solid transparent; border-radius: 14px;
  background: var(--surface-2); color: var(--ink); font: 500 1rem/1.2 var(--text); appearance: none; -webkit-appearance: none;
  transition: border-color .15s, background .15s;
}
.field select { padding-right: 38px; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='m5 8 5 5 5-5' fill='none' stroke='%238a7f77' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 18px; }
.field input::placeholder { color: color-mix(in srgb, var(--muted) 70%, transparent); }
.field input:hover, .field select:hover { border-color: var(--line); }
.field input:focus, .field select:focus { outline: none; border-color: var(--accent); background-color: var(--surface); }
.reset { height: 56px; padding: 0 18px; border: 0; border-radius: 14px; background: transparent; color: var(--muted); font: 500 .95rem/1 var(--text); cursor: pointer; }
.reset:hover { background: var(--surface-2); color: var(--ink); }
.found { margin: 0 4px 22px; color: var(--muted); font-size: .93rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(258px, 1fr)); gap: 22px; }
.card { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform .22s ease, box-shadow .22s ease, opacity .2s ease; }
.card.out { opacity: 0; transform: scale(.94); pointer-events: none; }
.card:focus-within { box-shadow: var(--shadow-lg); border-color: var(--accent); }
/* Ссылка на породу стоит в заголовке и растянута на всю карточку; метки лежат поверх и нажимаются отдельно */
.card-link { color: inherit; text-decoration: none; outline: none; }
.card-link::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.card .tags { position: relative; z-index: 2; }
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.card figure { margin: 0; overflow: hidden; background: var(--surface-2); }
.card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .5s ease; }
.card:hover img { transform: scale(1.05); }
.card .body { display: grid; gap: 8px; padding: 18px 20px 20px; }
.card h3 { font-size: 1.22rem; font-weight: 700; }
.card p { color: var(--muted); font-size: .94rem; line-height: 1.5; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.card[hidden] { display: none; }
a.chip { text-decoration: none; cursor: pointer; transition: box-shadow .15s ease, transform .15s ease; }
a.chip:hover, a.chip:focus-visible { box-shadow: inset 0 0 0 1.5px var(--accent); outline: none; }
a.chip.on { background: var(--ink); color: var(--bg); }
.quick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 14px; }
.tag-on { display: inline-flex; align-items: center; gap: 6px; margin-left: 4px; padding: 5px 6px 5px 14px; border: 1px dashed var(--accent); border-radius: 999px; font-size: .88rem; color: var(--muted); }
.tag-on b { color: var(--ink); font-weight: 600; }
.tag-on button { width: 26px; height: 26px; border: 0; border-radius: 50%; background: var(--surface-2); color: var(--ink); font: 400 1.1rem/1 var(--text); cursor: pointer; }
.tag-on button:hover { background: var(--accent); color: var(--on-accent); }
.empty { display: none; grid-column: 1 / -1; padding: 44px 20px; text-align: center; color: var(--muted); background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); }
.empty.show { display: block; }
.empty b { display: block; margin-bottom: 6px; font: 700 1.2rem/1.3 var(--round); color: var(--ink); }

/* ----- Подбор породы ----- */
.band { background: var(--surface-2); }
.two { display: grid; grid-template-columns: .82fr 1.18fr; gap: 44px; align-items: center; }
.two .sec-head { margin-bottom: 0; }
.mascot { width: min(240px, 60%); margin-top: 26px; overflow: visible; }
.mascot .tail { transform-box: fill-box; transform-origin: 6% 96%; animation: tail 3.6s ease-in-out infinite; }
.mascot .eyes { transform-box: fill-box; transform-origin: center; animation: blink 5.2s infinite; }
@keyframes tail { 0%, 100% { transform: rotate(-5deg); } 50% { transform: rotate(7deg); } }
@keyframes blink { 0%, 94%, 100% { transform: scaleY(1); } 96.5% { transform: scaleY(.08); } }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 28px; box-shadow: var(--shadow-lg); padding: 30px; }
.progress { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--accent); transition: width .45s cubic-bezier(.3, 1, .4, 1); }
.q-meta { display: flex; justify-content: space-between; align-items: center; margin: 14px 0 8px; font-size: .86rem; color: var(--muted); }
.q-back { border: 0; background: none; padding: 4px 0; color: var(--muted); font: inherit; cursor: pointer; }
.q-back:hover { color: var(--ink); }
.q-back[hidden] { display: none; }
.q-step { animation: rise .4s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.q-step h3 { font-size: clamp(1.3rem, 2.4vw, 1.65rem); font-weight: 700; margin: 6px 0 20px; }
.opts { display: grid; grid-template-columns: 1fr; gap: 10px; }
.opt { display: flex; align-items: center; gap: 14px; text-align: left; padding: 16px; border: 1.5px solid var(--line); border-radius: 18px; background: var(--surface); color: var(--ink); cursor: pointer; font: 500 1rem/1.3 var(--text); transition: border-color .15s, transform .15s, background .15s; }
.opt:hover { border-color: var(--accent); transform: translateY(-2px); background: color-mix(in srgb, var(--powder) 35%, var(--surface)); }
.opt i { display: grid; place-items: center; flex: none; width: 46px; height: 46px; border-radius: 14px; background: var(--surface-2); font-style: normal; font-size: 24px; }
.opt small { display: block; color: var(--muted); font-size: .84rem; margin-top: 2px; }
.result { display: grid; grid-template-columns: 200px 1fr; gap: 22px; align-items: center; animation: rise .45s ease both; }
.result img { width: 200px; height: 200px; object-fit: cover; border-radius: 22px; background: var(--surface-2); }
.result h3 { font-size: 1.7rem; font-weight: 800; margin: 6px 0 8px; }
.result p { color: var(--muted); }
.result .actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.also { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); font-size: .92rem; color: var(--muted); }
.also a { color: var(--ink); font-weight: 600; text-underline-offset: 3px; }

/* ----- Калькулятор ----- */
.calc { display: grid; grid-template-columns: 1fr 1fr; gap: 0; padding: 0; overflow: hidden; }
.calc > div { padding: 32px; }
.calc .out { background: var(--sand); }
.ctl { display: grid; gap: 8px; margin-bottom: 22px; }
.ctl > span, .ctl legend { font: 700 .95rem/1.3 var(--round); padding: 0; }
fieldset.ctl { border: 0; padding: 0; margin: 0 0 22px; min-width: 0; }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; border-radius: 16px; background: var(--surface-2); }
.seg label { position: relative; display: block; }
.seg input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.seg span { display: block; padding: 11px 6px; border-radius: 12px; text-align: center; font-size: .92rem; font-weight: 500; color: var(--muted); transition: background .18s, color .18s, box-shadow .18s; }
.seg input:checked + span { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.seg input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.switch { display: flex; align-items: center; gap: 14px; cursor: pointer; font-weight: 500; }
.switch input { position: absolute; opacity: 0; }
.switch i { position: relative; flex: none; width: 50px; height: 30px; border-radius: 999px; background: var(--line); transition: background .2s; }
.switch i::after { content: ""; position: absolute; left: 3px; top: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .2); transition: transform .22s cubic-bezier(.3, 1.3, .5, 1); }
.switch input:checked + i { background: var(--accent); }
.switch input:checked + i::after { transform: translateX(20px); }
.switch input:focus-visible + i { outline: 3px solid var(--accent); outline-offset: 3px; }
.switch small { display: block; color: var(--muted); font-weight: 400; font-size: .86rem; }
.sum-label { font-size: .82rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.sum { font: 800 clamp(2.4rem, 5vw, 3.4rem)/1.05 var(--round); letter-spacing: -.035em; font-variant-numeric: tabular-nums; margin: 6px 0 2px; }
.sum-year { color: var(--muted); font-variant-numeric: tabular-nums; }
.sum-year b { color: var(--ink); font-weight: 700; }
.bars { display: grid; gap: 14px; margin: 26px 0 0; padding: 0; list-style: none; }
.bars li { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; font-size: .94rem; }
.bars b { font-weight: 600; font-variant-numeric: tabular-nums; }
.bars .track { grid-column: 1 / -1; height: 10px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 9%, transparent); overflow: hidden; }
.bars .track i { display: block; height: 100%; width: 0; border-radius: inherit; transition: width .5s cubic-bezier(.3, 1, .4, 1); }
.bars .b1 i { background: #D9632A; } .bars .b2 i { background: #6F9E84; } .bars .b3 i { background: #6C8FBF; } .bars .b4 i { background: #C98BA0; }
.note { margin-top: 22px; font-size: .84rem; color: var(--muted); }

/* ----- Переключатель темы ----- */
.top-right { display: flex; align-items: center; gap: 6px; min-width: 0; }
.theme { position: relative; flex: none; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--ink); cursor: pointer; box-shadow: var(--shadow); transition: transform .2s ease, background .2s ease; -webkit-tap-highlight-color: transparent; }
.theme:hover { transform: translateY(-1px) rotate(12deg); }
.theme:active { transform: scale(.94); }
.theme svg { position: absolute; inset: 0; margin: auto; width: 20px; height: 20px; transition: transform .5s cubic-bezier(.4, 1.6, .5, 1), opacity .3s ease; }
.theme .moon { opacity: 0; transform: rotate(-90deg) scale(.3); }
:root[data-theme="dark"] .theme .sun { opacity: 0; transform: rotate(90deg) scale(.3); }
:root[data-theme="dark"] .theme .moon { opacity: 1; transform: none; }

/* ----- Генератор имён ----- */
.names { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; align-items: end; }
.names .btn { height: 56px; white-space: nowrap; }
.names-out { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 22px; min-height: 104px; }
.name { display: grid; place-items: center; gap: 4px; padding: 22px 12px; border-radius: 20px; text-align: center; background: var(--powder); opacity: 0; transform: translateY(14px) scale(.96); animation: pop .5s cubic-bezier(.3, 1.4, .5, 1) forwards; }
.name:nth-child(2) { background: var(--sage); animation-delay: .1s; }
.name:nth-child(3) { background: var(--sky); animation-delay: .2s; }
.name b { font: 800 clamp(1.2rem, 2.4vw, 1.6rem)/1.15 var(--round); letter-spacing: -.02em; overflow-wrap: anywhere; }
.name span { font-size: .8rem; color: var(--muted); }
.names-hint { grid-column: 1 / -1; align-self: center; text-align: center; color: var(--muted); font-size: .95rem; }
@keyframes pop { to { opacity: 1; transform: none; } }

/* ----- Страница породы ----- */
.crumbs { padding: 22px 0 0; font-size: .9rem; color: var(--muted); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.b-head { padding: 22px 0 46px; }
.b-head .wrap { display: grid; grid-template-columns: 1.05fr .95fr; gap: 44px; align-items: center; }
.b-head figure { margin: 0; }
.b-head img { width: 100%; aspect-ratio: 4 / 3.2; object-fit: cover; border-radius: 34px; box-shadow: var(--shadow-lg); background: var(--surface-2); }
.b-head figcaption, .credit { margin-top: 10px; font-size: .78rem; color: var(--muted); }
.b-head figcaption a, .credit a { color: inherit; }
.b-head h1 { font-size: clamp(2.3rem, 5vw, 3.6rem); font-weight: 800; letter-spacing: -.035em; margin: 12px 0 6px; }
.b-head .en { color: var(--muted); font-size: 1.02rem; }
.quote { margin: 22px 0 0; padding-left: 20px; border-left: 4px solid var(--powder); font: 500 1.24rem/1.5 var(--round); letter-spacing: -.01em; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat { padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); }
.stat .ico { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; background: var(--sand); font-size: 21px; margin-bottom: 14px; }
.stat:nth-child(2) .ico { background: var(--sage); } .stat:nth-child(3) .ico { background: var(--sky); } .stat:nth-child(4) .ico { background: var(--powder); }
.stat dt { font-size: .8rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.stat dd { margin: 4px 0 0; font: 700 1.18rem/1.3 var(--round); letter-spacing: -.015em; }
.stat dd small { display: block; font: 400 .86rem/1.4 var(--text); color: var(--muted); letter-spacing: 0; margin-top: 2px; }
.meters { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 16px; }
.meter { padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; }
.meter span { display: flex; justify-content: space-between; font-size: .93rem; font-weight: 600; margin-bottom: 10px; }
.meter span em { font-style: normal; font-weight: 400; color: var(--muted); }
.dots { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; }
.dots i { height: 8px; border-radius: 999px; background: var(--surface-2); }
.dots i.on { background: var(--accent); }
.b-body { padding: 56px 0 30px; }
.b-body .wrap { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 56px; align-items: start; }
.toc { position: sticky; top: 96px; display: grid; gap: 4px; }
.toc b { font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.toc a { padding: 9px 14px; border-radius: 12px; text-decoration: none; color: var(--muted); font-size: .96rem; font-weight: 500; }
.toc a:hover { background: var(--surface-2); color: var(--ink); }
.prose { max-width: 720px; }
.prose > section { padding: 0 0 46px; }
.prose h2 { font-size: clamp(1.5rem, 2.8vw, 1.95rem); font-weight: 800; margin-bottom: 16px; }
.prose h3 { font-size: 1.12rem; font-weight: 700; margin: 22px 0 6px; }
.prose p + p { margin-top: 14px; }
.prose ul { margin: 12px 0 0; padding-left: 0; list-style: none; display: grid; gap: 10px; }
.prose ul li { position: relative; padding-left: 26px; }
.prose ul li::before { content: ""; position: absolute; left: 4px; top: .62em; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.prose a { color: var(--accent); text-underline-offset: 3px; }
.box { padding: 28px; border-radius: 26px; background: var(--sand); }
.box h2 { display: flex; align-items: center; gap: 12px; }
.box h2 i { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--surface); font-style: normal; font-size: 22px; }
.care { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 6px; }
.care div { padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; }
.care h3 { margin: 0 0 6px; display: flex; align-items: center; gap: 8px; }
.care p { font-size: .96rem; color: var(--muted); }
.gene { display: grid; gap: 12px; margin-top: 16px; }
.gene div { padding: 18px 20px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--accent); }
.gene h3 { margin: 0 0 4px; }
.gene h3 small { font: 400 .86rem/1.4 var(--text); color: var(--muted); letter-spacing: 0; }
.gene p { font-size: .97rem; color: var(--muted); }
.warn { margin-top: 18px; padding: 16px 18px; border-radius: 16px; background: var(--sage); font-size: .95rem; }
.sources { font-size: .92rem; color: var(--muted); }
.sources ol { margin: 10px 0 0; padding-left: 20px; display: grid; gap: 6px; }
.sources a { word-break: break-word; }

/* ----- Подвал ----- */
footer { margin-top: 40px; padding: 48px 0 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: .93rem; }
footer .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 36px; }
footer h4 { font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink); margin-bottom: 12px; font-family: var(--text); font-weight: 700; }
footer ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 7px; }
footer a { text-decoration: none; }
footer a:hover { color: var(--ink); text-decoration: underline; }
footer .fine { margin-top: 34px; padding-top: 20px; border-top: 1px solid var(--line); font-size: .84rem; display: flex; flex-wrap: wrap; gap: 6px 24px; justify-content: space-between; }
.credits-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.credits-table th, .credits-table td { padding: 12px 10px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.credits-table th { font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.table-scroll { overflow-x: auto; }

/* ----- Узкие экраны ----- */
@media (max-width: 980px) {
  .hero .wrap, .two, .b-head .wrap { grid-template-columns: 1fr; gap: 32px; }
  .hero-photo { order: -1; }
  .float.f1 { left: 12px; } .float.f2 { right: 12px; }
  .tools { grid-template-columns: 1fr 1fr; }
  .tools .field:first-child { grid-column: 1 / -1; }
  .reset { grid-column: 1 / -1; height: 44px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .b-body .wrap { grid-template-columns: 1fr; gap: 26px; }
  .toc { position: static; display: flex; flex-wrap: wrap; gap: 6px; }
  .toc b { width: 100%; margin: 0; }
  .toc a { background: var(--surface-2); padding: 7px 14px; border-radius: 999px; font-size: .9rem; }
  .calc { grid-template-columns: 1fr; }
  footer .cols { grid-template-columns: 1fr 1fr; }
  footer .cols > :first-child { grid-column: 1 / -1; }
  section { padding: 56px 0; }
}
@media (max-width: 620px) {
  body { font-size: 16px; }
  .wrap { padding: 0 18px; }
  .nav a { padding: 7px 8px; font-size: .86rem; }
  .top .wrap { gap: 8px; }
  .brand span { display: none; }
  .hero { padding-top: 22px; }
  .float { display: none; }
  .panel { padding: 22px; border-radius: 24px; }
  .calc > div { padding: 24px; }
  .result { grid-template-columns: 1fr; }
  .result img { width: 100%; height: auto; aspect-ratio: 4 / 3; }
  .meters, .care { grid-template-columns: 1fr; }
  .tools { grid-template-columns: 1fr; }
  .seg span { font-size: .84rem; padding: 11px 2px; }
  .names { grid-template-columns: 1fr; }
  .names-out { grid-template-columns: 1fr; }
  .theme { width: 38px; height: 38px; }
  .box { padding: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .name { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .card, .card.out { transition: none; }
}

/* ----- Кнопка «Наверх» ----- */
.to-top { position: fixed; right: max(18px, env(safe-area-inset-right)); bottom: max(18px, env(safe-area-inset-bottom)); z-index: 30; display: grid; place-items: center; width: 50px; height: 50px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--ink); box-shadow: var(--shadow-lg); cursor: pointer; opacity: 0; visibility: hidden; transform: translateY(12px); transition: opacity .25s ease, transform .25s ease, visibility .25s, background .15s ease, color .15s ease; }
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
@media (prefers-reduced-motion: reduce) { .to-top { transition: none; } }

/* ----- Карта происхождения ----- */
.mapbox { display: grid; grid-template-columns: 1.55fr 1fr; gap: 28px; align-items: start; }
.map-card { padding: 22px; }
.map-wrap { position: relative; }
.map-wrap svg { display: block; width: 100%; height: auto; }
.map-wrap .land { fill: color-mix(in srgb, var(--ink) 20%, transparent); }
.map-pins { position: absolute; inset: 0; }
.pin { position: absolute; width: 34px; height: 34px; margin: -17px 0 0 -17px; padding: 0; border: 3px solid var(--surface); border-radius: 50%; background: var(--accent); color: var(--on-accent); font: 700 .86rem/1 var(--round); cursor: pointer; box-shadow: var(--shadow); transition: transform .2s cubic-bezier(.3, 1.5, .5, 1); -webkit-tap-highlight-color: transparent; }
.pin i { position: absolute; inset: -9px; border-radius: 50%; border: 2px solid var(--accent); opacity: 0; animation: ping 2.4s ease-out infinite; }
.pin:hover, .pin.on { transform: scale(1.22); }
.pin.on { background: var(--ink); color: var(--bg); }
.pin.on i { border-color: var(--ink); }
@keyframes ping { 0% { transform: scale(.55); opacity: .7; } 100% { transform: scale(1.25); opacity: 0; } }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.chip-btn { padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font: 500 .88rem/1.2 var(--text); cursor: pointer; transition: background .15s, border-color .15s; }
.chip-btn:hover { border-color: var(--accent); }
.chip-btn[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.map-panel h3 { font-size: 1.5rem; font-weight: 800; margin: 6px 0 16px; }
.origin-list { display: grid; gap: 10px; }
.origin { display: flex; align-items: center; gap: 14px; padding: 10px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); text-decoration: none; transition: transform .18s ease, border-color .18s ease; }
.origin:hover { transform: translateX(4px); border-color: var(--accent); }
.origin img { flex: none; width: 72px; height: 72px; object-fit: cover; border-radius: 13px; background: var(--surface-2); }
.origin b { display: block; font: 700 1.04rem/1.25 var(--round); }
.origin small { display: block; margin-top: 3px; color: var(--muted); font-size: .86rem; line-height: 1.4; }

/* ----- Помощники: заголовок страницы и плитки ----- */
.page-head { padding: 54px 0 10px; }
.page-head h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 800; letter-spacing: -.035em; margin: 12px 0 14px; }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(208px, 1fr)); gap: 16px; }
.tool { display: grid; gap: 8px; align-content: start; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); text-decoration: none; box-shadow: var(--shadow); transition: transform .2s ease, box-shadow .2s ease; }
.tool:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.tool i { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--sand); font-style: normal; font-size: 23px; margin-bottom: 6px; }
.tool:nth-child(2) i { background: var(--sage); } .tool:nth-child(3) i { background: var(--powder); } .tool:nth-child(4) i { background: var(--sky); } .tool:nth-child(5) i { background: var(--sand); }
.tool b { font: 700 1.08rem/1.25 var(--round); }
.tool span { color: var(--muted); font-size: .92rem; line-height: 1.45; }

/* ----- Калькулятор окрасов ----- */
.gene-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; align-items: end; }
.gene-form .btn { height: 56px; }
.gene-out { display: grid; gap: 14px; margin: 24px 0 0; padding: 0; list-style: none; min-height: 60px; }
.gene-row { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; font-size: .98rem; opacity: 0; animation: rise .4s ease forwards; }
.gene-row span { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.gene-row b { font: 700 1.05rem/1.3 var(--round); font-variant-numeric: tabular-nums; }
.gene-row .track { grid-column: 1 / -1; height: 12px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.gene-row .track i { display: block; height: 100%; border-radius: inherit; transition: width .7s cubic-bezier(.3, 1, .4, 1); }
.swatch { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--line); }
.c-red .swatch, .c-red .track i { background: #E8853D; }
.c-black .swatch, .c-black .track i { background: #4A4440; }
.c-tortie .swatch, .c-tortie .track i { background: repeating-linear-gradient(115deg, #E8853D 0 9px, #4A4440 9px 18px); }
:root[data-theme="dark"] .c-black .swatch, :root[data-theme="dark"] .c-black .track i { background: #8F99A8; }
:root[data-theme="dark"] .c-tortie .swatch, :root[data-theme="dark"] .c-tortie .track i { background: repeating-linear-gradient(115deg, #E8853D 0 9px, #8F99A8 9px 18px); }

/* ----- Календарь ухода ----- */
.cal-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cal-form .btn { grid-column: 1 / -1; height: 54px; }
.field input[type="date"] { cursor: pointer; }
.form-err { min-height: 1.4em; margin-top: 10px; color: var(--accent); font-size: .92rem; }
.tl-head { display: grid; gap: 4px; margin: 8px 0 20px; padding: 16px 18px; border-radius: 18px; background: var(--sage); }
.tl-head b { font: 700 1.1rem/1.3 var(--round); }
.tl-head span { font-size: .92rem; color: var(--muted); }
.tl { position: relative; margin: 0; padding: 0 0 0 30px; list-style: none; display: grid; gap: 18px; }
.tl::before { content: ""; position: absolute; left: 20px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.tl li { position: relative; display: grid; gap: 2px; padding: 14px 18px 14px 30px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); opacity: 0; animation: rise .4s ease forwards; }
.tl li i { position: absolute; left: -30px; top: 12px; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--surface); border: 2px solid var(--line); font-style: normal; font-size: 19px; }
.tl time { font-size: .8rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--accent); }
.tl b { font: 700 1.05rem/1.3 var(--round); }
.tl p { color: var(--muted); font-size: .94rem; }

/* ----- Кот в настоящий размер ----- */
.ar-stage { position: relative; display: grid; place-items: center; aspect-ratio: 4 / 3.4; border-radius: 22px; background: radial-gradient(circle at 50% 38%, var(--surface) 0%, var(--surface-2) 78%); overflow: hidden; }
.ar-stage .mascot { width: 54%; margin: 0; }
.ar-stage model-viewer { width: 100%; height: 100%; background: transparent; --poster-color: transparent; }
.ar-go { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); white-space: nowrap; }
.ar-go:hover { transform: translateX(-50%) translateY(-2px); }
.ar-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 18px; }
.ar-facts { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 0; padding: 0; list-style: none; }

@media (max-width: 980px) {
  .mapbox { grid-template-columns: 1fr; }
  .pin { width: 28px; height: 28px; margin: -14px 0 0 -14px; font-size: .78rem; border-width: 2px; }
}
@media (max-width: 620px) {
  .gene-form, .cal-form { grid-template-columns: 1fr; }
  .map-card { padding: 14px; }
  .tl { padding-left: 24px; } .tl::before { left: 16px; }
  .tl li { padding-left: 26px; } .tl li i { left: -26px; width: 34px; height: 34px; font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .gene-row, .tl li { opacity: 1; }
}
