/* public_html/css/style.css
   Версия 202611151640
   Изменено 15.11.2026 16:40:00 */
/* Layout: one-screen hero — copy + chip-number form on the left, looping 3D mark on the right; a quiet three-step strip below. Single dark look. */
:root {
    --ink: #0A101D;
    --fg: #EEF2F8;
    --muted: #93A1B8;
    --line: #25324A;
    --accent: #356E94;
    --accent-ink: #FFFFFF;
    --glow: #3B2A8C;
    --ok: #34C77B;
    --err: #FF8A7A;
    --f-display: "Unbounded", "Onest", system-ui, sans-serif;
    --f-body: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
    --f-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
    color-scheme: dark;
}

html,
body {
    background: var(--ink);
    color: var(--fg)
}

/* одинаковая ширина страницы с полосой прокрутки и без: шапка не прыгает между страницами */
html {
    scrollbar-gutter: stable
}

/* фон привязан к окну, а не к высоте страницы: на всех страницах выглядит одинаково */
body {
    background-attachment: fixed
}

/* футер всегда внизу экрана: страница не ниже окна, футер прижат к низу (не плавающий — на длинных страницах в конце) */
body {
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    min-height: calc(100vh - 8px);       /* 8px — верхний отступ body */
    min-height: calc(100dvh - 8px);
    margin-bottom: 0
}

footer {
    margin-top: auto
}

/* в колонке body отступы auto не растягивают блок — ширина основной колонки страниц задаётся явно, как была */
main.res {
    width: 100%;
    box-sizing: border-box;
    max-width: calc(760px + max(20px, env(safe-area-inset-left, 0px)) + max(20px, env(safe-area-inset-right, 0px)))
}

body {
    font-family: var(--f-body);
    font-size: 16px;
    line-height: 1.55;
    overflow-x: hidden;
    background: radial-gradient(70% 55% at 72% 100%, rgba(59, 42, 140, .55) 0%, rgba(59, 42, 140, 0) 70%),
        radial-gradient(40% 40% at 85% 30%, rgba(53, 110, 148, .22) 0%, rgba(53, 110, 148, 0) 70%), var(--ink)
}

.wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding-left: max(20px, env(safe-area-inset-left, 0px));
    padding-right: max(20px, env(safe-area-inset-right, 0px))
}

header .wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-block: 22px
}

.logo {
    font-family: var(--f-display);
    font-weight: 700;
    font-size: 22px;
    letter-spacing: -.01em;
    color: var(--fg);
    text-decoration: none
}

.logo b {
    color: var(--accent);
    font-weight: 700
}

.soon {
    font-size: 13px;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--muted);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 6px 12px
}

.hero .wrap {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 24px;
    align-items: center;
    padding-block: 24px 40px
}

@media (max-width:880px) {
    .hero .wrap {
        grid-template-columns: 1fr
    }

    .stage {
        order: -1;
        max-width: 420px;
        margin: 0 auto
    }
}

.copy {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0
}

h1 {
    font-family: var(--f-display);
    font-weight: 600;
    font-size: clamp(30px, 4vw, 52px);   /* Unbounded широкий: при 4.3vw/56px «Зарегистрируйте» шире колонки */
    line-height: 1.08;
    letter-spacing: -.02em;
    margin: 0;
    text-wrap: balance
}

h1 span {
    color: var(--accent)
}

.lead {
    color: var(--muted);
    font-size: 18px;
    max-width: 30em;
    margin: 0
}

form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 560px
}

.field {
    display: flex;
    background: #F4F6FA;
    border-radius: 999px;
    padding: 6px;
    gap: 6px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, .35)
}

.field input {
    flex: 1;
    min-width: 0;
    border: 0;
    background: transparent;
    font: 500 18px/1 var(--f-mono);
    color: #0A101D;
    padding: 0 18px;
    letter-spacing: .04em;
    font-variant-numeric: tabular-nums;
    outline: none
}

.field input::placeholder {
    font-family: var(--f-body);
    letter-spacing: 0;
    color: #6B778C;
    font-weight: 400
}

.field:focus-within {
    outline: 2px solid var(--accent);
    outline-offset: 3px
}

.field button {
    border: 0;
    border-radius: 999px;
    background: var(--accent);
    color: var(--accent-ink);
    font: 600 16px var(--f-body);
    padding: 14px 26px;
    cursor: pointer;
    white-space: nowrap
}

.field button:hover {
    filter: brightness(1.08)
}

@media (max-width:420px) {
    .field input {
        padding: 0 12px;
        font-size: 16px
    }

    .field button {
        padding: 12px 18px
    }
}

.field button:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px
}

.hint {
    font-size: 14px;
    color: var(--muted);
    min-height: 1.5em;
    margin: 0 0 0 20px
}

.hint.err {
    color: var(--err)
}

.hint.ok {
    color: var(--ok)
}

.stage {
    position: relative;
    aspect-ratio: 1/1;
    width: 100%;
    max-width: 100%
}

/* canvas is 2x the stage so flying cubes never hit an edge; it sits behind the copy and ignores the pointer */
.stage canvas {
    position: absolute;
    left: -50%;
    top: -50%;
    width: 200%;
    height: 200%;
    display: block;
    pointer-events: none
}

/* на телефоне холст поменьше и всё, что вылетает за край экрана, обрезается: страница не ездит вбок */
html,
body {
    overflow-x: hidden;
    overflow-x: clip
}

.hero {
    overflow-x: clip
}

@media (max-width:880px) {
    .stage canvas {
        left: -25%;
        top: -25%;
        width: 150%;
        height: 150%
    }
}

.copy {
    position: relative;
    z-index: 1
}

header,
.steps,
footer {
    position: relative;
    z-index: 1
}

/* шапка с выпадающим меню — над всеми блоками страницы (FAQ, карточки и т. п. тоже на z-index: 1) */
header {
    z-index: 40
}

.hero,
.stage {
    position: relative
}

.steps .wrap {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    padding-block: 8px 48px
}

@media (max-width:720px) {
    .steps .wrap {
        grid-template-columns: 1fr
    }
}

.step {
    border-top: 1px solid var(--line);
    padding-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0
}

.step .k {
    font-family: var(--f-mono);
    font-size: 21px;
    color: var(--muted)
}

.step h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 600
}

.step p {
    margin: 0;
    color: var(--muted);
    font-size: 18px
}

footer .wrap {
    padding-block: 20px 32px;
    color: var(--muted);
    font-size: 14px;
    border-top: 1px solid var(--line);
    text-decoration: none;
}

footer .wrap a {
    color: var(--muted);
    text-decoration: none;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px
}

.logo img {
    width: 50px;
    height: 50px;
    display: block
}

/* ---- Страницы поиска, чипа и 404 ---- */
.res {
    max-width: 760px;
    padding-block: 24px 56px;
    display: flex;
    flex-direction: column;
    gap: 18px
}

.res h1 {
    font-size: clamp(26px, 1.9vw, 32px)
}

.q {
    font-size: 20px;
    color: var(--fg)
}

.card {
    background: #111A2B;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px
}

.card p {
    margin: 3px
}

.pet-head {
    display: flex;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap
}

.pet-head h2 {
    margin: 0;
    font-family: var(--f-display);
    font-weight: 600;
    font-size: 26px
}

.pet-head .sub {
    color: var(--muted)
}

.badge {
    font-size: 13px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 138, 122, .15);
    color: var(--err)
}

dl.facts {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 8px 20px;
    margin: 0
}

dl.facts dt {
    color: var(--muted)
}

dl.facts dd {
    margin: 0;
    min-width: 0
}

.note {
    background: #0E1626;
    border-left: 3px solid var(--accent);
    padding: 12px 14px;
    border-radius: 8px;
    line-height: 1.5
}

.contacts {
    display: flex;
    flex-direction: column;
    gap: 10px
}

.phones {
    display: flex;
    gap: 10px;
    flex-wrap: wrap
}

.phones a {
    font: 600 17px var(--f-body);
    color: #fff;
    background: var(--accent);
    padding: 10px 16px;
    border-radius: 999px;
    text-decoration: none;
    font-variant-numeric: tabular-nums
}

.vacc {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px
}

.vacc td {
    padding: 8px 0;
    border-top: 1px solid var(--line);
    vertical-align: top
}

.vacc td:first-child {
    width: 7.5em;
    color: var(--muted);
    font-variant-numeric: tabular-nums
}

.vacc .exp {
    color: var(--err);
    font-size: 13px
}

.card h3 {
    margin: 0 0 4px;
    font-size: 13px;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 500
}

.src {
    color: var(--muted);
    font-size: 15px
}

.err {
    color: var(--err)
}

.actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font: 600 16px var(--f-body);
    color: var(--fg);
    background: #1A263C;
    border: 1px solid #2C3C59;
    border-radius: 999px;
    padding: 12px 22px;
    text-decoration: none
}

.btn:hover {
    background: #21304B
}

.btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px
}

.btn.primary {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff
}

.btn.primary:hover {
    filter: brightness(1.1)
}


.ok-note {
    color: var(--ok);
    margin: 0
}

/* подтверждение скрывается через 5 с (js/field-msg.js) */
.ok-note,
p.f-ok {
    transition: opacity .4s
}

.ok-gone {
    opacity: 0
}

.code404 {
    font-family: var(--f-display);
    font-weight: 700;
    font-size: clamp(64px, 10vw, 120px);
    line-height: 1;
    margin: 0;
    color: var(--accent)
}


/* ---- Регистрация и вход ---- */
.reg {
    max-width: none;
    gap: 16px
}

.reg fieldset {
    margin: 0;
    min-width: 0
}

.reg legend {
    float: left;
    width: 100%;
    padding: 0;
    margin: 0 0 6px;
    font-size: 13px;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--muted)
}

.reg .row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px
}

.f {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 14px;
    color: var(--muted);
    min-width: 0
}

.f input,
.f select,
.f textarea {
    font: 16px var(--f-body);
    color: var(--fg);
    background: #0E1626;
    border: 1px solid #2C3C59;
    border-radius: 10px;
    padding: 11px 12px;
    width: 100%;
    box-sizing: border-box
}

.f textarea {
    resize: vertical;
    min-height: 80px
}

.f input:focus,
.f select:focus,
.f textarea:focus {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
    border-color: var(--accent)
}

.f input[type=file] {
    padding: 9px;
    cursor: pointer
}

.f-err {
    color: var(--err);
    font-size: 14px;
    margin: 2px 0 0
}

.radios {
    display: flex;
    gap: 18px;
    flex-wrap: wrap
}

.radios label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer
}

.radios input,
.check input {
    accent-color: var(--accent);
    width: 18px;
    height: 18px;
    flex: none
}

.lost-fields {
    display: none !important
}

.reg:has(input[name=status][value=lost]:checked) .lost-fields {
    display: grid !important
}

.consents {
    display: flex;
    flex-direction: column;
    gap: 12px
}

.check {
    display: flex;
    gap: 10px;
    align-items: center;
    font-size: 14px;
    line-height: 1.45;
    cursor: pointer
}

.check a,
.src a,
.doc a {
    color: #8FB6D1
}

.trap {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden
}

button.btn {
    cursor: pointer
}

/* Код из письма: 4 поля, как в письме */
.code-row {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap
}

.code-boxes {
    display: flex;
    gap: 10px
}

.code-box {
    width: 56px;
    height: 64px;
    box-sizing: border-box;
    padding: 0;
    text-align: center;
    font: 600 30px/1 var(--f-mono);
    color: var(--fg);
    background: #0E1626;
    border: 1px solid #2C3C59;
    border-radius: 12px;
    caret-color: var(--accent)
}

.code-box:focus {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
    border-color: var(--accent)
}

.code-row .btn {
    height: 56px;
    cursor: pointer
}

.code-form .f-err {
    margin: 0
}

.photos {
    display: flex;
    gap: 10px;
    flex-wrap: wrap
}

.photos img {
    width: 140px;
    height: 140px;
    object-fit: cover;
    border-radius: 12px;
    display: block;
    border: 1px solid var(--line)
}

.note.lost {
    border-left-color: var(--err);
    color: var(--fg)
}

.doc {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 760px
}

.doc h2 {
    font-size: 19px;
    margin: 12px 0 0
}

.doc p,
.doc li {
    color: #C9D3E1;
    line-height: 1.6;
    margin: 0
}

.doc ul {
    margin: 0;
    padding-left: 20px
}

.reg-link {
    margin: 4px 0 0 20px;
    font-size: 15px
}

.reg-link a {
    color: #8FB6D1
}

/* Своя стрелка у селектов формы регистрации */
.f select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 40px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%238FA3C0' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 12px 8px;
}

.f select option {
    background: #0E1626;
    color: #E6EDF7;
}
/* ---- Форма регистрации: ошибки под полями, справочники, фото, кнопка ---- */
.is-hidden {
    display: none !important
}

.vh {
    position: absolute !important;
    left: 0;
    top: 0;
    width: 1px !important;          /* !important: иначе .f input { width: 100% } растягивает скрытое поле шире экрана */
    height: 1px !important;
    padding: 0 !important;
    border: 0 !important;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    opacity: 0
}

.f-note {
    font-size: 13px;
    color: #6F7E96
}

/* Строка под полем — одна: подсказка → ошибка → успех, один размер и место (f_msg в inc/layout.php, js/field-msg.js) */
.f .f-note,
.f .f-err,
.f .f-ok {
    margin: 0;
    font-size: 13px;
    line-height: 1.45
}

.f .f-note {
    color: #6F7E96
}

.f .f-err {
    color: var(--err)
}

.f .f-ok {
    color: var(--ok)
}

.f [aria-invalid="true"],
.f .ms.is-invalid .ms-box {
    border-color: var(--err)
}

.f > .check {
    color: var(--fg)
}

/* Поле выбора из справочника (порода — одна, окрас — до 3) */
.ms {
    position: relative
}

.ms-box {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    min-height: 46px;
    box-sizing: border-box;
    padding: 6px 40px 6px 8px;
    background: #0E1626 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%238FA3C0' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 14px center / 12px 8px;
    border: 1px solid #2C3C59;
    border-radius: 10px;
    cursor: text
}

.ms:focus-within .ms-box {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
    border-color: var(--accent)
}

.ms.is-off .ms-box {
    opacity: .5;
    cursor: default
}

.ms.is-off .ms-q {
    pointer-events: none
}

.ms-tags {
    display: contents
}

.ms-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    max-width: 100%;
    font-size: 15px;
    color: var(--fg);
    background: #1E3A52;
    border: 1px solid #2F5676;
    border-radius: 999px;
    padding: 3px 4px 3px 12px
}

.ms-tag span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap
}

.ms-tag button {
    border: 0;
    background: none;
    color: #9DB8CF;
    font: 18px/1 var(--f-body);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    flex: none
}

.ms-tag button:hover {
    background: #2A4A66;
    color: #fff
}

.f .ms-q {
    flex: 1;
    min-width: 120px;
    border: 0 !important;
    outline: none !important;
    background: transparent;
    padding: 5px 4px;
    width: auto
}

.f .ms-q:disabled {
    cursor: default
}

.ms-list {
    position: absolute;
    z-index: 20;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    max-height: 280px;
    overflow-y: auto;
    margin: 0;
    padding: 6px;
    list-style: none;
    background: #111A2B;
    border: 1px solid #2C3C59;
    border-radius: 12px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, .45)
}

.ms-list li {
    padding: 9px 12px;
    border-radius: 8px;
    font-size: 15px;
    color: var(--fg);
    cursor: pointer
}

.ms-list li[aria-selected="true"],
.ms-list li:hover {
    background: #1E3A52
}

.ms-list li.ms-empty {
    color: var(--muted);
    cursor: default;
    background: none
}

.ms-list mark {
    background: none;
    color: #8FB6D1;
    font-weight: 600
}

/* Фото: сетка плиток (inc/pet_form.php + js/reg-form.js) — крестик убирает, первое — основное, порядок перетаскиванием */
.ph-count {
    margin: 0 0 10px;
    font-size: 14px;
    color: var(--muted)
}

.ph-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
    gap: 30px 12px;
    max-width: 640px;
    padding: 8px 0 24px
}

.ph-tile,
.ph-add {
    position: relative;
    aspect-ratio: 1;
    border-radius: 12px
}

.ph-tile {
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none
}

.ph-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid var(--line);
    display: block;
    pointer-events: none
}

.ph-tile:first-child::after {
    content: "основное фото";
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    font-size: 13px;
    white-space: nowrap;
    line-height: 1.2;
    color: var(--muted);
    text-align: center
}

.ph-tile.is-dragging {
    z-index: 5;
    cursor: grabbing;
    transition: none
}

.ph-tile.is-dragging img {
    box-shadow: 0 10px 28px rgba(0, 0, 0, .5);
    border-color: var(--accent, #8FB6D1)
}

.ph-grid.is-sorting .ph-tile:not(.is-dragging) {
    opacity: .75
}

.ph-x {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 26px;
    height: 26px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #fff;
    color: #0E1626;
    display: grid;
    place-items: center;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .35)
}

.ph-x svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.4;
    stroke-linecap: round
}

.ph-x::before {          /* палец попадает легче, чем видно */
    content: "";
    position: absolute;
    inset: -8px
}

.ph-add {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 1px dashed #3A4D6E;
    background: #131D30;
    color: var(--fg);
    font-size: 14px;
    cursor: pointer
}

.ph-add[hidden] {
    display: none
}

.ph-add:hover {
    border-color: #8FB6D1
}

.ph-add svg {
    width: 30px;
    height: 30px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linejoin: round
}

/* скрытое поле файла стоит рядом с сеткой, а не в начале страницы — иначе при «Добавить» страница прыгает вверх */
.f[data-f="photos"] {
    position: relative
}

#f-photos {
    top: auto;
    left: auto
}

#f-photos:focus-visible ~ .ph-grid .ph-add {
    outline: 2px solid #fff;
    outline-offset: 2px
}

@media (max-width: 560px) {
    .ph-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 30px 10px
    }
}

/* Кнопка «Зарегистрировать», пока форма не заполнена */
.btn.primary.is-off {
    background: #1F2D44;
    border-color: #2C3C59;
    color: #6F7E96;
    cursor: default;
    filter: none
}

.submit-row {
    display: flex;
    flex-direction: column;
    gap: 10px
}

.submit-row .f-err {
    margin: 0;
    font-size: 15px
}

.ms.has-val[data-max="1"] .ms-q {
    min-width: 30px
}

.ms.has-val[data-max="1"] .ms-box {
    flex-wrap: nowrap
}

.ms.has-val[data-max="1"] .ms-tag {
    min-width: 0;
    flex: 0 1 auto
}

/* ---- FAQ на главной ---- */
.faq {
    position: relative;
    z-index: 1
}

.faq .wrap {
    padding-block: 8px 56px;
    display: flex;
    flex-direction: column;
    gap: 10px
}

.faq h2,
.sec-h {                                    /* .sec-h — тот же заголовок раздела вне блока FAQ (/partner) */
    font-family: var(--f-display);
    font-weight: 600;
    font-size: clamp(24px, 2.6vw, 32px);
    letter-spacing: -.01em;
    margin: 0 0 8px
}

.faq details {
    background: #111A2B;
    border: 1px solid var(--line);
    border-radius: 16px
}

.faq summary {
    list-style: none;
    cursor: pointer;
    padding: 18px 56px 18px 20px;
    font-size: 18px;
    font-weight: 600;
    position: relative
}

.faq summary::-webkit-details-marker {
    display: none
}

.faq summary::after {
    content: "";
    position: absolute;
    right: 22px;
    top: 50%;
    width: 12px;
    height: 8px;
    margin-top: -4px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%238FA3C0' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / 12px 8px;
    transition: transform .2s
}

.faq details[open] summary::after {
    transform: rotate(180deg)
}

.faq summary:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 16px
}

.faq details p {
    margin: 0;
    padding: 0 20px 20px;
    color: #C9D3E1;
    font-size: 16px;
    line-height: 1.6
}

.faq details a {
    color: #8FB6D1
}

/* ---- Меню (бургер) ----
   Десктоп: бургер справа, компактная панель под ним.
   До 850 px: шапка закреплена сверху, бургер слева, логотип по центру,
   полноэкранная панель выезжает сверху, полоски превращаются в крестик. */
header .wrap {
    position: relative
}

.burger {
    position: relative;
    width: 40px;
    height: 34px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    flex: none;
    border-radius: 8px;
    -webkit-tap-highlight-color: transparent
}

.burger span {
    position: absolute;
    left: 9px;
    width: 22px;
    height: 2px;
    border-radius: 2px;
    background: var(--fg);
    transition: transform .28s ease, opacity .2s ease, top .28s ease
}

.burger span:nth-child(1) { top: 7px }
.burger span:nth-child(2) { top: 16px }
.burger span:nth-child(3) { top: 25px }

.menu-open .burger span:nth-child(1) { top: 16px; transform: rotate(45deg) }
.menu-open .burger span:nth-child(2) { opacity: 0 }
.menu-open .burger span:nth-child(3) { top: 16px; transform: rotate(-45deg) }

.burger:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--fg);
    text-decoration: none
}

.mi-ic {
    flex: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #1A263C;
    color: #8FB6D1
}

.mi-ic svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round
}

.mi-t {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-weight: 600;
    font-size: 16px;
    line-height: 1.3
}

.mi-t small {
    font-weight: 400;
    font-size: 14px;
    color: var(--muted)
}

.menu-item.is-active .mi-ic {
    background: var(--accent);
    color: #fff
}

/* Десктоп: выпадающая панель под бургером */
@media (min-width: 851px) {
    .menu {
        position: absolute;
        z-index: 50;
        top: calc(100% - 10px);
        right: max(20px, env(safe-area-inset-right, 0px));
        width: 340px;
        padding: 8px;
        box-sizing: border-box;
        background: #111A2B;
        border: 1px solid #2C3C59;
        border-radius: 16px;
        box-shadow: 0 20px 50px rgba(0, 0, 0, .5);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-6px);
        transition: opacity .16s ease, transform .16s ease, visibility 0s linear .16s
    }

    .menu-open .menu {
        opacity: 1;
        visibility: visible;
        transform: none;
        transition: opacity .16s ease, transform .16s ease
    }

    .menu-in {
        display: flex;
        flex-direction: column;
        gap: 2px
    }

    .menu-item {
        padding: 10px 12px;
        border-radius: 12px
    }

    .menu-item:hover,
    .menu-item:focus-visible {
        background: #1A263C;
        outline: none
    }

    .menu-item:focus-visible {
        box-shadow: inset 0 0 0 2px var(--accent)
    }

    .menu-item:hover .mi-ic,
    .menu-item:focus-visible .mi-ic {
        background: #22324F
    }

    .menu-item.is-active:hover .mi-ic {
        background: var(--accent)
    }
}

/* Телефон: закреплённая шапка и полноэкранная панель */
@media (max-width: 850px) {
    body {
        padding-top: 76px
    }

    /* переход к блоку по #якорю (ошибка в форме удаления, розыска, сообщения) — не под закреплённой шапкой */
    html {
        scroll-padding-top: 130px
    }

    header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 60;
        transition: background-color .2s ease, border-color .2s ease;
        border-bottom: 1px solid transparent
    }

    header.is-scrolled {
        background: rgba(10, 16, 29, .92);
        -webkit-backdrop-filter: blur(10px);
        backdrop-filter: blur(10px);
        border-bottom-color: var(--line)
    }

    .menu-open header {
        background: #0A101D;
        border-bottom-color: transparent
    }

    header .wrap {
        height: 76px;
        padding-block: 0;
        justify-content: center
    }

    /* Мобильная шапка: знак по центру, под ним подпись; бургер слева — не пересекаются */
    header .logo {
        position: relative;
        z-index: 2;
        flex-direction: column;
        gap: 4px
    }

    header .logo img {
        width: 40px;
        height: 40px
    }

    header .logo span {
        font-size: 11px;
        line-height: 1;
        letter-spacing: .01em;
        white-space: nowrap
    }

    .burger {
        position: absolute;
        left: max(10px, env(safe-area-inset-left, 0px));
        top: 50%;
        margin-top: -17px;
        z-index: 2
    }

    .menu {
        position: fixed;
        z-index: 1;
        left: 0;
        right: 0;
        top: 0;
        height: 100vh;
        height: 100dvh;
        box-sizing: border-box;
        padding: 90px 0 32px;
        background: #0A101D;
        box-shadow: 0 6px 20px rgba(0, 0, 0, .35);
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        visibility: hidden;
        transform: translateY(-100%);
        transition: transform .34s ease, visibility 0s linear .34s
    }

    .menu::-webkit-scrollbar {
        display: none
    }

    .menu-open .menu {
        visibility: visible;
        transform: none;
        transition: transform .34s ease
    }

    .menu-item {
        padding: 15px 20px 15px 60px;
        border-bottom: 1px solid var(--line)
    }

    .menu-item:first-child {
        border-top: 1px solid var(--line)
    }

    .menu-item .mi-ic {
        display: none
    }

    .mi-t {
        font-size: 18px;
        font-weight: 400
    }

    .menu-item.is-active .mi-t {
        color: #8FB6D1
    }

    .menu-item:focus-visible {
        outline: 2px solid var(--accent);
        outline-offset: -2px
    }

    html.menu-open,
    html.menu-open body {
        overflow: hidden
    }
}

@media (prefers-reduced-motion: reduce) {
    .menu,
    .burger span {
        transition: none !important
    }
}

/* ---- «Расскажите о нас» рядом с FAQ ---- */
.faq-grid {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 40px;
    align-items: start
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 13px;
    min-width: 0
}

.share-card {
    text-align: center;
    padding: 63px 0 0 37px
}

.share-card img {
    display: block;
    width: 100%;
    max-width: 234px;
    height: auto;
    margin: 0 auto 18px;
    /* рукава плавно растворяются в фоне, без резкого среза */
    -webkit-mask-image: linear-gradient(to bottom, #000 72%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 72%, transparent 100%)
}

.share-card h2 {
    font-family: var(--f-display);
    font-weight: 600;
    font-size: 28px;
    letter-spacing: -.01em;
    margin: 0 0 12px
}

.share-card > p {
    margin: 0 auto 22px;
    max-width: 300px;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.55
}

.share-wrap {
    position: relative;
    display: inline-block
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: 0;
    border-radius: 999px;
    padding: 13px 26px;
    background: #EEF2F8;
    color: #0A101D;
    font: 600 16px var(--f-body);
    cursor: pointer
}

.share-btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor
}

.share-btn:hover {
    background: #FFFFFF
}

.share-btn:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px
}

.share-pop {
    position: absolute;
    z-index: 30;
    left: 50%;
    bottom: calc(100% + 10px);
    transform: translateX(-50%);
    min-width: 220px;
    padding: 6px;
    display: flex;
    flex-direction: column;
    text-align: left;
    background: #111A2B;
    border: 1px solid #2C3C59;
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, .5)
}

.share-pop[hidden] {
    display: none
}

.share-pop a,
.share-pop button {
    display: block;
    width: 100%;
    padding: 10px 12px;
    border: 0;
    border-radius: 10px;
    background: none;
    color: var(--fg);
    font: 15px var(--f-body);
    text-align: left;
    text-decoration: none;
    cursor: pointer
}

.share-pop a:hover,
.share-pop button:hover,
.share-pop a:focus-visible,
.share-pop button:focus-visible {
    background: #1A263C;
    outline: none
}

.share-note {
    margin: 10px 0 0;
    min-height: 1.4em;
    font-size: 14px;
    color: var(--ok)
}

@media (max-width: 880px) {
    .faq-grid {
        grid-template-columns: 1fr
    }

    .share-card {
        padding: 24px 0 0
    }
}

/* «Помогите найти» в блоке пропажи на странице питомца — та же карточка, что «Расскажите о нас», без картинки */
.share-card.pet-share {
    padding: 14px 0 0
}

.pet-share .share-note:empty {
    display: none
}

/* ---- Страница питомца: статус и инструменты владельца ---- */
.status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
    padding: 6px 14px 6px 12px;
    border-radius: 999px
}

.status::before {
    content: "";
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: currentColor
}

.status-home {
    background: rgba(52, 199, 123, .14);
    color: var(--ok)
}

.status-lost {
    background: rgba(255, 138, 122, .16);
    color: var(--err)
}

.owner-tools .ot-row {
    display: flex;
    gap: 20px;
    align-items: flex-start
}

.ot-qr {
    flex: none;
    width: 120px;
    height: 120px;
    border-radius: 10px;
    background: #fff;
    padding: 6px
}

.ot-text {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0
}

.ot-text p {
    margin: 0
}

.owner-tools button.btn {
    cursor: pointer
}

.owner-tools button.btn:disabled {
    opacity: .5;
    cursor: default
}

.owner-tools button.btn:disabled:hover {
    background: #1A263C
}

@media (max-width: 560px) {
    .owner-tools .ot-row {
        flex-direction: column
    }

    /* QR по центру, кнопок «Копировать ссылку» и «Скачать QR-код» нет — скачивают кликом по коду или «Скачать»,
       ссылку копируют иконкой в заголовке */
    .ot-qr-col {
        align-self: center
    }

    .ot-dl-btn {
        display: none
    }

    .ot-qr-h {
        display: flex;
        align-items: center;
        gap: 10px;
        height: 24px;
        white-space: nowrap
    }
}

/* «Для владельца»: иконка «Копировать ссылку» в заголовке — только на телефоне, вместо кнопки */
.ot-link-ico {
    display: none;
    padding: 0;
    border: 0;
    background: none;
    color: var(--muted);
    cursor: pointer;
    transition: color .15s
}

.ot-link-ico:hover {
    color: var(--fg)
}

.ot-link-ico .bi {
    width: 24px;
    height: 24px
}

.ot-copied {
    display: none
}

@media (max-width: 560px) {
    .ot-link-ico {
        display: flex;
        margin-left: auto
    }

    .ot-copied:not([hidden]) {
        display: inline;
        margin-left: auto;
        color: var(--ok, #34C77B);
        text-transform: none;
        letter-spacing: 0;
        font-size: 13px;
        white-space: nowrap
    }

    .ot-copied:not([hidden]) + .ot-link-ico {
        margin-left: 0
    }
}

.ot-text .actions {
    flex-wrap: wrap
}

/* ---- Карточка питомца: одно фото + галерея ---- */
.pet-card {
    display: grid;
    grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
    gap: 32px;
    align-items: start;
    padding: 20px                   /* как у остальных карточек — заголовки блоков на одной линии */
}

/* нет фото — заглушка по виду (img/pet-*.svg), как в списке питомцев */
.pet-photo.is-empty {
    cursor: default;
    background: #1A263C              /* фон заглушки — углы картинки не видны */
}

a.pet-photo.is-empty {
    cursor: pointer
}

.pet-photo.is-empty:hover img {
    transform: none;
    filter: none
}

a.pet-photo.is-empty:hover img {
    filter: brightness(.85)
}

.pet-info {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-width: 0
}

@media (max-width: 760px) {
    .pet-info {
        gap: 14px
    }
}

.pet-card .pet-head {
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
    gap: 4px
}

.pet-card .pet-head h2 {
    font-size: clamp(26px, 1.9vw, 32px);
    line-height: 1.1
}

.pet-card .pet-head .status {
    margin-top: 6px
}

.pet-photo {
    position: relative;
    display: block;
    aspect-ratio: 1 / 1;
    border-radius: 18px;
    overflow: hidden;
    background: #0E1626;
    border: 1px solid var(--line);
    cursor: zoom-in;
    isolation: isolate
}

.pet-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .45s cubic-bezier(.2, .7, .2, 1), filter .3s
}

.pet-photo:hover img,
.pet-photo:focus-visible img {
    transform: scale(1.06);
    filter: brightness(.85)
}

.pp-zoom {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 64px;
    height: 64px;
    margin: -32px 0 0 -32px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(10, 16, 29, .55);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    opacity: 0;
    transform: scale(.6);
    transition: opacity .25s, transform .3s cubic-bezier(.2, .7, .2, 1);
    pointer-events: none
}

.pp-zoom svg {
    width: 30px;
    height: 30px;
    fill: none;
    stroke: #fff;
    stroke-width: 2;
    stroke-linecap: round
}

.pet-photo:hover .pp-zoom,
.pet-photo:focus-visible .pp-zoom {
    opacity: 1;
    transform: scale(1)
}

.pp-hint {
    position: absolute;
    left: 0;
    bottom: 0;
    padding: 6px 11px 4px;
    border-radius: 0 8px 0 18px;
    background: rgba(10, 16, 29, .72);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    pointer-events: none
}

/* Статус в левом верхнем углу фото */
.pp-status {
    position: absolute;
    left: 0;
    top: 0;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 6px 11px 5px 10px;
    border-radius: 18px 0 8px 0;
    background: rgba(10, 16, 29, .72);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    pointer-events: none
}

.pp-status::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--ok)
}

.pp-status-lost {
    background: rgba(229, 72, 58, .9)
}

.pp-status-lost::before {
    background: #fff
}

.pp-more {
    position: absolute;
    right: 0;
    top: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #fff;
    font-size: 14px;
    line-height: 1.1;
    pointer-events: none;
    border-radius: 0 18px 0 8px;
    padding: 6px;
    background: rgba(10, 16, 29, .72)
}

.pp-more b {
    font-size: 30px;
    font-weight: 600
}

.pet-photo:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px
}

@media (max-width: 760px) {
    .pet-card {
        grid-template-columns: minmax(0, 1fr);
        padding: 16px;
        gap: 18px
    }

    .pet-card .pet-head {
        align-items: flex-start;
        text-align: left
    }

    .pp-hint,
    .pp-status {
        font-size: 13px
    }
}

@media (hover: none) {
    .pp-zoom {
        display: none
    }
}

/* Галерея: тёмный фон в цвет сайта */
.pswp {
    --pswp-bg: #05080F
}

/* ---- Блок «Для владельца»: QR и иконки скачивания под ним ---- */
.ot-qr-col {
    flex: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px
}

.ot-qr-btn {
    padding: 0;
    border: 0;
    background: none;
    border-radius: 12px;
    cursor: pointer;
    transition: transform .15s
}

.ot-qr-btn:hover {
    transform: scale(1.03)
}

.ot-qr-btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px
}

.ot-qr-btn .ot-qr {
    display: block
}

.ot-dl-label {
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    font-size: 13px;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--muted);
    cursor: pointer
}

.ot-dl-label:hover {
    color: var(--fg)
}

.ot-text .actions {
    margin-top: 4px
}

/* заголовок «Питомец» в карточке — как у остальных блоков, на всю ширину над фото */
.pet-card-h {
    grid-column: 1 / -1;
    margin-bottom: -20px !important
}

@media (max-width: 760px) {
    .pet-card-h {
        margin-bottom: -8px !important
    }
}

/* десктоп: «Питомец» — только над фото, кличка справа на той же высоте от верха карточки, что и заголовок.
   Вторая строка гибкая: высокий правый столбец (длинное описание пропажи) не сдвигает фото вниз */
@media (min-width: 761px) {
    .pet-card {
        grid-template-rows: auto 1fr
    }

    .pet-card-h {
        grid-column: 1
    }

    .pet-card .pet-info {
        grid-column: 2;
        grid-row: 1 / span 2
    }
}

.ot-dl {
    display: flex;
    gap: 8px
}

.ot-dl button {
    width: 60px;
    height: 35px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid #2C3C59;
    border-radius: 25px;
    background: #1A263C;
    color: var(--muted);
    cursor: pointer
}

.ot-dl button:hover {
    background: #22324F;
    color: var(--fg)
}

.ot-dl button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px
}

.ot-dl svg {
    width: 26px;
    height: 26px
}

/* ---- CheckID: микрочип необязателен, адрес с подсказками ---- */
.ac {
    position: relative
}

.checkid {
    font-family: var(--f-mono);
    letter-spacing: .02em;
    white-space: nowrap
}

h1 .checkid {
    font-family: inherit;
    letter-spacing: 0
}

/* Вход: карточка питомца с превью фото (или заглушкой по виду) */
.login-pet {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 16px
}

.lp-text {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
    flex: 1
}

.lp-open {
    flex: none;
    white-space: nowrap
}

/* Телефон: текст и превью в строку, кнопка на всю ширину под ними */
@media (max-width: 560px) {
    .login-pet {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 72px;
        align-items: start
    }

    .login-pet .lp-thumb {
        grid-column: 2;
        grid-row: 1;
        width: 72px;
        height: 72px
    }

    .lp-open {
        grid-column: 1 / -1;
        justify-content: center
    }
}

.lp-thumb {
    flex: none;
    display: block;
    width: 96px;
    height: 96px;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--line)
}

.lp-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block
}

/* Страница питомца: заголовок CheckID в две строки, подсказка к микрочипу, раздел «Особенности» */
.cid-h small {
    display: block;
    font-family: var(--f-body);
    font-size: 21px;
    font-weight: 500;
    color: var(--muted);
    margin-bottom: 7px
}

dl.facts dd.na {
    color: var(--muted)
}

.tip {
    position: relative;
    display: inline-flex;
    vertical-align: -3px;
    width: 18px;
    height: 18px;
    margin-left: 4px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--muted);
    cursor: help
}

.tip svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round
}

.tip:hover,
.tip:focus-visible {
    color: var(--fg)
}

/* сама подсказка у ⓘ — общая карточка .cid-tip (js/checkid-tip.js), как у CheckID */

.pet-notes {
    gap: 12px
}

/* блок как .note: тёмная подложка, акцентная полоса слева */
.pn {
    background: #0E1626;
    border-left: 3px solid var(--accent);
    border-radius: 12px;
    padding: 14px 18px
}

.pn h4 {
    margin: 0 0 6px;
    font-size: 17px;
    font-weight: 400;
    color: var(--muted)
}

.pn p {
    margin: 0;
    line-height: 1.5;
    color: var(--fg)
}

.pn p.na {
    color: var(--fg)
}

/* Для владельца: розыск */
.btn.danger {
    background: #A3322F;
    border-color: #A3322F;
    color: #fff
}

.btn.danger:hover {
    background: #B73B37
}

.ot-inline {
    display: contents
}

.ot-lost {
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #0E1626;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 16px
}

.ot-lost[hidden] {
    display: none
}

.ot-lost .row {
    display: grid;
    grid-template-columns: minmax(0, 200px) minmax(0, 1fr);
    gap: 12px
}

@media (max-width: 560px) {
    .ot-lost .row {
        grid-template-columns: 1fr
    }
}

.ok-note.lost-note {
    color: var(--err)
}

svg.ot-qr {
    display: block;
    box-sizing: border-box
}

/* Главная: регистрация — главное действие, поиск для нашедших — ниже */
.hero-cta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 18px
}

.btn.hero-reg {
    font-size: 17px;
    padding: 16px 30px
}

.hero-free {
    color: var(--muted);
    font-size: 18px                 /* как подзаголовок .lead */
}

.finder {
    display: flex;
    flex-direction: column;
    gap: 12px;
    border-top: 1px solid var(--line);
    padding-top: 20px;
    margin-top: 4px
}

.finder-t {
    margin: 0;
    font-weight: 600;
    font-size: 17px
}

/* FAQ: кнопка «Все вопросы и ответы» под вопросами на главной и /search */
.btn.faq-more {
    align-self: flex-start;
    margin-top: 8px
}

.btn.faq-more svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round
}

/* /faq: заголовок — общий шаблон страниц (main.res), вопросы сразу под ним в той же колонке */
main.res:has(+ .faq-all) {
    padding-bottom: 6px
}

.faq-all .faq-list {
    width: 100%;
    max-width: 760px;
    margin: 0 auto
}

/* CheckID с подсказкой: <span class="check-id-info">CheckID</span> (js/checkid-tip.js) */
.check-id-info {
    border-bottom: 1px dotted #fff;
    cursor: help
}

.check-id-info:hover {
    border-bottom: none
}

.check-id-info:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 2px
}

.cid-tip {
    position: fixed;
    z-index: 1000;
    box-sizing: border-box;
    max-width: min(360px, calc(100vw - 24px));
    padding: 14px 16px;
    border-radius: 12px;
    background: #EEF2F8;
    color: #0A101D;
    font: 400 14px/1.5 var(--f-body);
    letter-spacing: 0;
    text-transform: none;
    text-align: left;
    box-shadow: 0 16px 40px rgba(0, 0, 0, .45);
    opacity: 0;
    transform: translateY(4px);
    transition: opacity .15s, transform .15s;
    pointer-events: none
}

.cid-tip.is-on {
    opacity: 1;
    transform: none
}

.cid-tip p {
    margin: 0
}

.cid-tip .cid-tip-ex {
    margin-top: 8px;
    color: #3A4458
}

.cid-tip code {
    font: 500 14px var(--f-mono);
    color: #0A101D;
    background: #DCE3EE;
    padding: 2px 6px;
    border-radius: 6px;
    white-space: nowrap
}

/* стрелка к слову */
.cid-tip::after {
    content: "";
    position: absolute;
    left: var(--arrow, 50%);
    bottom: -6px;
    width: 12px;
    height: 12px;
    background: #EEF2F8;
    transform: translateX(-50%) rotate(45deg);
    border-radius: 2px
}

.cid-tip.is-below::after {
    bottom: auto;
    top: -6px
}

/* Фраза не разрывается на две строки: <span class="nowrap">…</span> */
.nowrap {
    white-space: nowrap
}

/* подсказка у ⓘ микрочипа: подпись + значение */
.cid-tip .cid-tip-label {
    color: #3A4458;
    font-size: 13px
}

.cid-tip .cid-tip-val {
    margin-top: 2px;
    font-weight: 600;
    font-size: 15px
}

/* ---- Сворачиваемые карточки страницы питомца: «Особенности», «Если потеряется», «Как искать» (по умолчанию закрыты) ---- */
.card.fold {
    display: block;
    padding: 0
}

.card.fold > summary {
    list-style: none;
    cursor: pointer;
    position: relative;
    padding: 20px 56px 20px 20px;
    border-radius: 16px
}

.card.fold > summary::-webkit-details-marker {
    display: none
}

.card.fold > summary h3 {
    margin: 0
}

.card.fold > summary::after {
    content: "";
    position: absolute;
    right: 22px;
    top: 50%;
    width: 14px;
    height: 9px;
    margin-top: -4px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%238FA3C0' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / 14px 9px;
    transition: transform .2s
}

.card.fold[open] > summary::after {
    transform: rotate(180deg)
}

.card.fold > summary:hover h3 {
    color: var(--fg)
}

.card.fold > summary:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px
}

.fold-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0 20px 20px
}

/* списки «Если потеряется» и «Как искать» */
.ot-steps {
    margin: 0;
    padding-left: 1.4em;
    display: grid;
    gap: 10px;
    line-height: 1.55;
    color: var(--fg)
}

.ot-steps b {
    font-weight: 600
}

.ot-warn {
    margin: 4px 0 0;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(229, 72, 58, .10);
    border-left: 3px solid var(--err);
    line-height: 1.55
}

/* «Потерялся <дата>» под карточкой питомца: место, карта (Яндекс Карты), обстоятельства */
.pet-lost-h {
    color: var(--err) !important
}

.pet-lost-place {
    margin: 0
}

.pet-lost-map {
    position: relative;
    height: 360px;
    border-radius: 12px;
    overflow: hidden;
    background: #E8E5DF
}

/* JS API: карта в своей подложке со своим z-index — плашка адреса всегда сверху */
.map-canvas {
    position: absolute;
    inset: 0;
    z-index: 0
}

/* виджет без ключа: нижняя панель виджета уходит за край блока */
.pet-lost-map iframe {
    display: block;
    width: 100%;
    height: calc(100% + 56px);
    border: 0
}

/* адрес на карте — как в карточке адреса на картах: белая плашка слева сверху, «Копировать» */
.map-addr {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    max-width: min(340px, calc(100% - 72px));
    padding: 14px 16px;
    border-radius: 12px;
    background: #fff;
    color: #0A101D;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .18);
    display: flex;
    flex-direction: column;
    gap: 8px
}

.map-addr b {
    font-weight: 600;
    line-height: 1.3
}

.map-copy {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    font-size: 14px;
    color: #0A101D;
    cursor: pointer
}

.map-copy .bi {
    width: 18px;
    height: 18px;
    color: var(--accent)
}

.map-copy:hover span {
    text-decoration: underline
}

/* окно у метки на карте (JS API): фото, кличка, вид, дата пропажи, обстоятельства — тёмный текст на белом окне Яндекса */
.map-pet {
    display: flex;
    gap: 12px;
    align-items: center;
    color: #0A101D;
    font-family: var(--f-body)
}

.map-pet img {
    flex: none;
    width: 64px;
    height: 64px;
    border-radius: 10px;
    object-fit: cover;
    background: #1A263C
}

.map-pet b {
    display: block;
    font-size: 16px
}

.map-pet span {
    display: block;
    font-size: 13px;
    color: #5B6B82
}

.map-pet em {
    display: block;
    margin-top: 4px;
    font-style: normal;
    font-size: 13px;
    font-weight: 600;
    color: #D2483A
}

.map-pet-note {
    margin: 10px 0 0;
    font-family: var(--f-body);
    font-size: 14px;
    line-height: 1.45;
    color: #0A101D
}

@media (max-width: 560px) {
    .pet-lost-map {
        height: 300px
    }

    .map-addr {
        top: 8px;
        left: 8px;
        padding: 10px 12px;
        font-size: 14px
    }
}

.ot-lost textarea {
    resize: vertical;
    min-height: 84px
}

.fold-body .ot-lost {
    align-self: stretch;
    max-width: none
}

.owner-lost button.btn {
    cursor: pointer
}

.owner-lost button.btn:disabled {
    opacity: .5;
    cursor: default
}

.owner-lost button.btn:disabled:hover {
    background: #1A263C
}

.ot-lost textarea {
    width: 100%;
    box-sizing: border-box
}

/* ---- «Сообщить владельцу» (inc/layout.php → render_report_form, js/pet-report.js) ---- */
.report-open {
    align-self: flex-start
}

.report-open[hidden] {
    display: none                   /* .btn — inline-flex, без этого hidden не прячет кнопку */
}

.report-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 6px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, .08)
}

.report-form[hidden] {
    display: none
}

.report-form h4 {
    margin: 0;
    font-size: 1.05rem
}

.report-form .src {
    margin: 0
}

.report-form textarea {
    width: 100%;
    box-sizing: border-box;
    resize: vertical;
    min-height: 96px
}

.report-form .actions {
    margin: 0
}

.report-geo-st:empty {
    display: none
}

.hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden
}

/* «Сообщения о питомце» у владельца */
.owner-reports .cnt {
    display: inline-block;
    min-width: 22px;
    padding: 0 7px;
    margin-left: 6px;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font-size: .8rem;
    line-height: 22px;
    text-align: center;
    vertical-align: 2px
}

.owner-reports .rep {
    position: relative;
    padding-right: 56px
}

/* корзина — справа вверху сообщения (та же кнопка, что у номеров в форме питомца) */
.rep-del {
    position: absolute;
    top: 6px;
    right: 6px;
    margin: 0
}

.owner-reports .rep p {
    margin: 6px 0 0
}

.owner-reports .rep-meta {
    color: var(--muted, #8FA3C0);
    font-size: .92rem
}

.owner-reports .rep-meta a {
    color: #8FC1E3
}

.owner-reports .rep-tel {
    font-weight: 600
}

/* «История сканирований адресника»: строки «дата · место» */
.scan-list p {
    color: var(--muted);
    padding: 3px 0
}

.scan-list .na {
    color: var(--muted)
}

.scan-list a {
    color: #8FC1E3
}

/* ---- Заголовки на телефонах: Unbounded широкий, длинные слова («Зарегистрируйте») не должны вылезать ---- */
@media (max-width: 560px) {
    h1 {
        font-size: clamp(22px, 7.4vw, 34px)
    }

    /* номер CheyChipID в заголовке страницы питомца: три группы, переносится между ними, если не влезает */
    .cid-h .checkid {
        font-size: .9em;
        white-space: normal
    }
}

/* ---- Кабинет /my (my.php) — на общих .card, .f, .status ---- */
.my-pet {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .03);
    border: 1px solid var(--line);
    color: var(--fg);
    text-decoration: none
}

.my-pet:hover {
    border-color: var(--accent)
}

.my-pet img {
    flex: none;
    width: 64px;
    height: 64px;
    border-radius: 10px;
    object-fit: cover;
    background: #0E1626
}

.mp-t {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px
}

.mp-t b {
    font-size: 17px
}

.mp-s {
    color: var(--muted);
    font-size: 14px
}

.mp-n {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 10px
}

.my-pet .status {
    font-size: 12px;
    padding: 3px 9px 3px 8px
}

.mp-s.checkid {
    font-size: 13px;
    white-space: nowrap
}

/* «Открыть карточку» справа в строке питомца (кабинет); на телефоне — под строкой на всю ширину */
.mp-cta {
    flex: none
}

.my-pet:hover .mp-cta {
    filter: brightness(1.1)
}

@media (max-width: 560px) {
    .my-pet {
        flex-wrap: wrap
    }

    .mp-cta {
        flex: 1 0 100%;
        box-sizing: border-box;      /* с отступами кнопки — не шире строки (и в кабинете, и в выборе питомца для адресника) */
        min-width: 0;
        justify-content: center
    }
}

/* «Удалить карточку» */
.owner-delete summary h3 {
    color: var(--err)
}

/* ---- Кнопки с иконками (страница питомца) ---- */
.btn .bi {
    flex: none;
    width: 24px;
    height: 24px
}

.actions-end {
    justify-content: flex-end
}

/* внизу карточки питомца у владельца: «Как выглядит карточка» слева, «Редактировать» справа — на всю ширину сетки */
.pet-card-act {
    grid-column: 1 / -1;
    margin-top: -8px;
    justify-content: space-between
}

/* иконка «Редактировать» в заголовке «Питомец» — только на телефоне, вместо кнопки внизу */
.pet-card-edit {
    display: none
}

@media (max-width: 760px) {
    .pet-card-h {
        display: flex;
        align-items: center;
        justify-content: space-between;
        height: 24px
    }

    .pet-card-edit {
        display: flex;
        color: var(--muted);
        transition: color .15s
    }

    .pet-card-edit:hover {
        color: var(--fg)
    }

    .pet-card-edit .bi {
        width: 24px;
        height: 24px
    }

    .pet-card-edit-btn {
        display: none !important
    }
}

/* имя владельца с иконкой */
.owner-name {
    display: flex;
    align-items: center;
    gap: 10px
}

.owner-name .bi {
    flex: none;
    width: 24px;
    height: 24px;
    color: var(--muted)
}

/* адрес в две строки на телефоне — иконка дома у первой строки */
.owner-addr {
    align-items: flex-start
}

.owner-delete form.fold-body {
    max-width: none
}

/* ---- Партнёр /partner: QR-коды для адресников ---- */
/* email партнёра и «Выйти» — в шапке вместо меню (site_header) */
.partner-bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    min-width: 0;
    font-size: 15px;
    color: var(--muted)
}

.res .sec-h {
    margin: 18px 0 0
}

@media (max-width: 850px) {
    header .partner-bar {
        position: absolute;
        z-index: 2;
        right: max(10px, env(safe-area-inset-right, 0px));
        top: 50%;
        margin-top: -20px;
        gap: 8px
    }

    /* на телефоне места хватает только на «Выйти»: обрезанный email («godum…») не читается */
    header .pb-mail {
        display: none
    }
}

.pb-mail {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap
}

.pb-out {
    flex: none;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--line);
    color: var(--fg)
}

.pb-out:hover {
    border-color: var(--accent)
}

.pb-out svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round
}

.partner-gen {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    text-align: center
}

.pg-qr {
    width: min(300px, 100%);
    aspect-ratio: 1;
    border-radius: 16px;
    background: #fff;
    overflow: hidden
}

.pg-qr img {
    width: 100%;
    height: 100%;
    display: block;
    transition: filter .35s ease
}

/* пока код создаётся — размыт (как QR оплаты при пересчёте) */
.pg-qr.is-busy img {
    filter: blur(9px)
}

.partner-gen .pg-fmt {
    justify-content: center
}

.partner-gen .pg-btn {
    width: min(300px, 100%);           /* по ширине QR, текст по центру — при смене надписи кнопка не прыгает */
    justify-content: center
}

.partner-gen .src,
.partner-gen .ok-note,
.partner-gen .f-err {
    max-width: 440px;
    margin: 0
}

@media (max-width: 560px) {
    .partner-gen .pg-btn {
        width: 100%
    }
}

/* ---- Адресник /q: выбор своего питомца — те же строки, что в кабинете, но кнопками ---- */
button.my-pet {
    width: 100%;
    font: inherit;
    text-align: left;
    cursor: pointer
}

.q-pick {
    display: flex;
    flex-direction: column;
    gap: 10px
}

/* ---- Форма питомца: номера (CheyChipID, микрочип, адресник) — inc/pet_form.php; .del-btn — красная корзина везде ----
   Сохранённый номер — текстом с корзиной той же высоты, что поле ввода (форма не прыгает при удалении). */
.ids {
    display: flex;
    flex-direction: column;
    gap: 14px
}

.ids .row {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr))
}

.id-edit {
    display: flex;
    flex-direction: column;
    gap: 6px
}

.id-edit[hidden],
.id-val[hidden] {
    display: none
}

/* Поле со своей кнопкой-стрелкой внутри (номера в редактировании) — как поле проверки на главной */
.f-go {
    position: relative
}

.f .f-go input {
    padding-right: 56px
}

.go-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    bottom: 4px;
    width: 44px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: var(--accent);
    color: var(--accent-ink);
    cursor: pointer
}

.go-btn svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round
}

.go-btn:hover {
    filter: brightness(1.12)
}

.go-btn:disabled {
    opacity: .6;
    cursor: wait
}

.go-btn:focus-visible {
    outline: 2px solid var(--fg);
    outline-offset: 1px
}

.f-ok {
    margin: 2px 0 0;
    font-size: 14px;
    color: var(--ok)
}

.id-val {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 46px
}

.id-num {
    font: clamp(15px, 4.6vw, 18px) var(--f-mono);   /* номер микрочипа с корзиной — в одну строку и на 320px */
    letter-spacing: .02em;
    color: var(--fg);
    white-space: nowrap
}

.id-num.is-ro {
    display: flex;
    align-items: center;
    min-height: 46px;
    color: var(--muted)
}

.del-btn {
    flex: none;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: none;
    color: var(--err);
    cursor: pointer
}

.del-btn svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round
}

.del-btn:hover {
    background: rgba(255, 138, 122, .12)
}

.del-btn:focus-visible {
    outline: 2px solid var(--err);
    outline-offset: 1px
}

/* ---- Регистрация: одно согласие в карточке, документы — стрелками (doc_link в inc/layout.php) ---- */
.consents .check {
    font-size: 16px;
    color: var(--fg)
}

.consents .check input {
    width: 20px;
    height: 20px
}

.doc-link,
.check .doc-link {
    display: inline-flex;
    vertical-align: -3px;
    margin: 0 1px 0 4px;
    color: var(--accent);
    border-radius: 4px
}

.doc-link svg {
    width: 18px;
    height: 18px
}

.check .doc-link:hover {
    color: var(--fg)
}

/* «Как выглядит карточка» — стрелка «в новой вкладке» после текста */
.btn .bi-end {
    width: 20px;
    height: 20px;
    margin-right: -4px
}

/* «Как выглядит карточка»: на месте пустых телефона и адреса — подсказка владельцу со ссылкой в кабинет */
.preview-miss {
    margin: 0;
    font-size: 15px;
    color: var(--muted)
}

.preview-miss a {
    color: #8FB6D1
}

/* Поле адреса с меткой «по местоположению» справа (js/addr-ac.js) */
.ac-row {
    display: flex;
    align-items: center;
    gap: 6px
}

.ac-row .ac {
    flex: 1;
    min-width: 0
}

.geo-btn {
    flex: none;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: none;
    color: var(--err);
    cursor: pointer
}

.geo-btn svg {
    width: 24px;
    height: 24px
}

.geo-btn:hover {
    background: rgba(255, 138, 122, .12)
}

.geo-btn:focus-visible {
    outline: 2px solid var(--err);
    outline-offset: 1px
}

.geo-btn.is-busy svg {
    animation: geo-pulse 1s ease-in-out infinite
}

@keyframes geo-pulse {
    50% { opacity: .35 }
}

/* «Уведомления» в кабинете пока скрыты */
#notify {
    display: none
}

/* ---------- Настройки: оповещения о пропавших животных рядом (settings.php) ---------- */
/* переключатель — общий компонент: <input class="switch" type="checkbox" role="switch"> */
.switch {
    appearance: none;
    -webkit-appearance: none;
    flex: none;
    position: relative;
    width: 48px;
    height: 28px;
    margin: 0;
    border-radius: 999px;
    background: var(--line);
    cursor: pointer;
    transition: background .2s
}

.switch::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--fg);
    transition: transform .2s
}

.switch:checked {
    background: var(--accent)
}

.switch:checked::after {
    transform: translateX(20px)
}

.switch:disabled {
    opacity: .45;
    cursor: not-allowed
}

.switch:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px
}

.switch-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    cursor: pointer
}

.switch-row .sw-t {
    font-weight: 600
}

/* ползунок радиуса — общий компонент: <input class="range" type="range">.
   Кружок — как у переключателя (22 px). Заливка до кружка: --p (0…1) ставит скрипт; шкала идёт от центра кружка
   в крайних положениях, поэтому ни слева, ни справа от кружка не торчат кусочки другого цвета */
.range {
    --p: 0;
    --th: 22px;
    -webkit-appearance: none;
    appearance: none;
    display: block;
    width: 100%;
    height: var(--th);
    margin: 4px 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    cursor: pointer
}

/* поверх общих стилей полей формы (рамка, фон, отступы у .f input) */
.f input.range,
.f input.range:focus {
    height: var(--th);
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    outline: none;
    box-shadow: none
}

.range:focus {
    outline: none;
    box-shadow: none
}

.range::-webkit-slider-runnable-track {
    height: 6px;
    border-radius: 999px;
    background: linear-gradient(to right, var(--accent) 0 calc(var(--th) / 2 + var(--p) * (100% - var(--th))), var(--line) 0)
}

.range::-moz-range-track {
    height: 6px;
    border-radius: 999px;
    background: linear-gradient(to right, var(--accent) 0 calc(var(--th) / 2 + var(--p) * (100% - var(--th))), var(--line) 0)
}

.range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: var(--th);
    height: var(--th);
    margin-top: calc((6px - var(--th)) / 2);
    border: 0;
    border-radius: 50%;
    background: var(--fg)
}

.range::-moz-range-thumb {
    width: var(--th);
    height: var(--th);
    border: 0;
    border-radius: 50%;
    background: var(--fg)
}

.range:focus-visible::-webkit-slider-thumb {
    outline: 2px solid var(--accent);
    outline-offset: 2px
}

.range:focus-visible::-moz-range-thumb {
    outline: 2px solid var(--accent);
    outline-offset: 2px
}

/* подписи шагов — под центром кружка в каждом положении (кружок 22 px); крайние — по краям шкалы */
.range-scale {
    position: relative;
    height: 18px;
    font-size: 13px;
    line-height: 18px;
    color: var(--muted)
}

.range-scale span {
    position: absolute;
    top: 0;
    left: calc(11px + (100% - 22px) * var(--i) / 4);
    transform: translateX(-50%);
    white-space: nowrap
}

.range-scale span:first-child {
    left: 0;
    transform: none
}

.range-scale span:last-child {
    left: auto;
    right: 0;
    transform: none
}

/* текст под шкалой — вровень с заголовком и шкалой (без бокового отступа .card p) */
.set-alerts > p {
    margin-left: 0;
    margin-right: 0
}

.set-radius[data-off] {
    opacity: .45
}

.set-radius[data-off] .range {
    cursor: not-allowed
}

/* «Оповестить жителей рядом» в форме розыска: неактивна — приглушена */
.ot-alert:has(input:disabled) {
    opacity: .6
}

/* вкладки в кабинете: «Мои данные» / «Настройки» */
.tabs {
    display: flex;
    gap: 24px;
    margin: 8px 0 -4px;
    border-bottom: 1px solid var(--line)
}

.tab {
    padding: 10px 0;
    margin-bottom: -1px;
    border-bottom: 2px solid transparent;
    color: var(--muted);
    font-weight: 600;
    text-decoration: none;
    transition: color .15s, border-color .15s
}

.tab:hover {
    color: var(--fg)
}

.tab[aria-selected="true"] {
    color: var(--fg);
    border-bottom-color: var(--accent)
}

.tab-panel[hidden] {
    display: none
}
