@charset "UTF-8";
*,
*::before,
*::after {
    box-sizing: border-box;
}
:root {
    /* Иконка «продолжатель рода» — используется как маска */
    --ancestor-icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path fill='black' d='M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z'/><path fill='black' d='M10.97 4.97a.235.235 0 0 0-.02.022L7.477 9.417 5.384 7.323a.75.75 0 0 0-1.06 1.06L6.97 11.03a.75.75 0 0 0 1.079-.02l3.992-4.99a.75.75 0 0 0-1.071-1.05z'/></svg>");
}
html {
    background-color: #fffbe7;
    min-height: 100vh;
    scroll-behavior: smooth;
}
body {
    margin: 0;
    padding: 0;
    font-family: sans-serif, verdana, arial, helvetica;
    font-size: 100%; /* по-умолчанию 16px */
    letter-spacing: 1px;
    color: #36220b;
    scrollbar-color: #d2691e #ffe09f;
    overflow-x: hidden;
}
@media (min-width: 681px) {
    body {
        min-height: 100vh;
    }
}
@media (max-width: 680px) {
    body {
        min-height: 95vh;
    }
}
a {
    display: inline-block;
    hyphens: none;
}
header a,
details a {
    display: inline;
}
p a {
    text-indent: 0;
    display: inline;
    /* line-height убрали — он и вызывал «выскакивание» */
}
/* Ссылки-предки в тексте: не разрываются, обрезаются при необходимости */
p a.ancestor {
    display: inline-block;
    max-width: calc(100% - 0.4em); /* вместо 100% */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: bottom;
}
a:link {
    color: #5c3317;
    text-decoration: underline;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
a:visited {
    color: #7b3f00;
}
a:active,
a:hover {
    color: #c34d0a;
    text-shadow: 2px 2px 2px rgba(0, 0, 0, 0.2);
    text-decoration: none;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0); /*сброс синей подсветки перехода по ссылке на тачэкранах*/
}
main {
    position: relative;
    background-color: #ffe09f;
    margin: 0;
}
@media (min-width: 681px) {
    main {
        padding: 10px 10px 50px;
    }
}
@media (min-width: 900px) {
    main {
        padding: 10px 20px 50px;
    }
}
@media (max-width: 680px) {
    main {
        padding: 70px 0 50px;
    }
}
/* настройка шапки */
@media (min-width: 681px) {
    header {
        position: relative;
        padding: 5px 0 1px;
    }
    header .sun img {
        position: absolute;
        left: 7px;
        top: 53%;
        transform: translateY(-50%);
        width: 85px;
        height: auto;
        margin: 0;
        display: block;
    }
}
@media (max-width: 680px) {
    header {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 62px;
        background: url(../img/tree-logo.png);
        background-repeat: no-repeat;
        background-position: right 5px top 9px;
        background-size: 50px;
        background-color: #fff7d9;
        transition: all 0.3s ease;
    }
    header.out {
        transform: translateY(-100%);
    }
}
/* настройка подвала */
a.imghref {
    text-decoration: none;
}
.imghref {
    display: inline-block;
    background: #fff7d9;
    font-weight: bold;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.4);
    border-radius: 7px;
}
p .imghref {
    text-align: center;
    padding: 1px 5px 1px 7px;
}
header,
footer {
    box-shadow: 0 0 5px 5px rgba(34, 60, 80, 0.2);
    z-index: 9999;
    background-color: #fff7d9;
}
.wrapper {
    margin: 0;
}
/* Центрирование и оформление на больших экранах */
@media (min-width: 1300px) {
    .wrapper {
        width: 1170px;
        margin: 0 auto;
    }
    main {
        box-shadow: 0 0 5px 5px rgba(34, 60, 80, 0.2);
    }
    header {
        margin: 5px 0;
    }
    footer,
    main,
    header {
        border-radius: 5px;
    }
}
/* ===== Главная страница с деревом ===== */
/* Фон всей страницы под цвет main */
html.tree-page {
    background-color: #ffe09f;
}
/* Страница с деревом — без прокрутки самого браузера
    Высоту ограничиваем ровно окном, а скролл живёт только внутри дерева */
html.tree-page,
body.tree-page {
    height: 100vh;
    height: 100dvh; /* современные браузеры возьмут это значение, старые — оставят 100vh */
    overflow: hidden;
}
body.tree-page .wrapper {
    height: 100%;
    display: flex;
    flex-direction: column;
}
body.tree-page main {
    flex: 1 1 auto;
    min-height: 0; /* без этого flex-ребёнок не даст сжаться */
    display: flex;
    flex-direction: column;
    padding: 0; /* убираем padding у main, чтобы не считалось дважды */
}
body.tree-page #tree-main {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 10px 20px 0; /* то, что раньше было у main */
}
body.tree-page .tree-viewport-wrap {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}
body.tree-page .tree-viewport {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none; /* снимаем фиксированную 65vh — высота теперь динамическая */
}
@media (max-width: 680px) {
    body.tree-page #tree-main {
        padding: 70px 5px 0; /* то, что раньше было у main на мобильных */
    }
    body.tree-page .tree-viewport {
        max-height: none;
    }
}
@media (min-width: 1300px) {
    /* Обёртка перестаёт ограничивать ширину,
    чтобы main мог «вырваться» на всю ширину окна */
    body.tree-page .wrapper {
        width: 100%;
        max-width: 100%;
    }
    /* Шапка и подвал остаются компактными — 1170px по центру */
    body.tree-page header,
    body.tree-page footer {
        width: 1170px;
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
    }
    /* Main — на всю ширину окна, но не шире дерева
    Убираем тень, радиус и свой фон — он совпадает с фоном страницы */
    body.tree-page main {
        width: 100%;
        max-width: 2300px;
        margin-left: auto;
        margin-right: auto;
        box-shadow: none;
        border-radius: 0;
        background-color: transparent;
    }
}
/* кнопка канала в Максе */
.max-btn {
    order: 1;
}
.max-btn img {
    width: 50px;
    vertical-align: top;
}
.copyright {
    order: 2;
    background-color: #ffe09f;
    padding: 7px 10px;
    border-radius: 10px;
}
.footer-flex {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    padding: 10px 0;
}
.footer-flex .imghref {
    color: #36220b;
    padding: 5px 10px;
    font-size: 17px;
}
.max-btn:active,
.max-btn:hover {
    transform: scale(1.2);
    transition: transform 1s;
}
@media (min-width: 681px) {
    footer {
        margin: 5px 0;
    }
    .imghref {
        margin-left: 10px;
    }
}
@media (max-width: 680px) {
    footer {
        margin-bottom: 10px;
    }
    .footer-flex {
        gap: 3px;
    }
    .copyright {
        font-size: 13px;
        padding: 5px 8px;
        white-space: nowrap; /* ЗАПРЕЩАЕМ перенос строки внутри блока */
    }
    .footer-flex .imghref {
        font-size: 13px;
        margin-left: 3px;
        padding: 2px 5px;
    }
    .max-btn img,
    .family-tree img {
        width: 38px;
        height: auto;
    }
}
/* Стили заголовков */
h1 {
    color: #ff8c00;
    margin: 0;
    padding: 10px 20px;
    font-weight: bold;
    line-height: 1.4;
    letter-spacing: 4px;
    text-shadow:
        2px 2px 2px rgba(0, 0, 0, 0.2),
        1px 0 1px #36220b,
        0 0 8px white,
        0 0 8px white,
        0 0 8px white;
}
@media (min-width: 681px) {
    h1 {
        font-size: 1.8rem;
    }
}
@media (max-width: 680px) {
    h1 {
        font-size: 1.6rem;
        letter-spacing: 1.7px;
    }
}
/* другие заголовки */
h2 {
    color: #7b3f00;
    font-size: 1.6rem;
    text-align: left;
    line-height: 1.4;
    letter-spacing: 3px;
    margin: 0;
    padding: 0 20px;
    text-shadow: 2px 2px 2px rgba(0, 0, 0, 0.2);
}
.family-title {
    padding: 10px 20px;
}
.photo-pages-title {
    padding: 40px 20px 10px;
}
@media (min-width: 681px) {
    h2 {
        line-height: 1.4;
        letter-spacing: 3px;
    }
}
@media (max-width: 680px) {
    h2 {
        text-indent: 0;
        letter-spacing: 2px;
        line-height: 1.3;
    }
}
h3 {
    color: #7b3f00;
    font-size: 1.4rem;
    margin: 0;
    padding: 30px 20px 10px;
}
/* Стили текста */
p {
    text-align: justify;
    hyphens: auto;
    hyphenate-limit-chars: 6 3 3;
    hyphenate-limit-lines: 2;
    hyphenate-limit-last: always;
    hyphenate-limit-zone: 8%;
}
@media (min-width: 681px) {
    p {
        font-size: 1.2rem;
        line-height: 1.5;
        text-indent: 30px;
        letter-spacing: 1.2px;
    }
}
@media (max-width: 680px) {
    p {
        font-size: 1.3rem;
        line-height: 1.6;
        text-indent: 20px;
    }
}
/* отступ при переходе к якорю - страховка при переходе по ссылке URL с #hash,
    при навигации за скролл отвечат скрипт*/
section {
    scroll-margin-top: 40px;
}
@media (max-width: 680px) {
    section {
        scroll-margin-top: 50px;
    }
}
h1,
h2,
div {
    scroll-margin-top: 50px;
}
@media (max-width: 680px) {
    h1,
    h2,
    div {
        scroll-margin-top: 75px;
    }
}
/* имя сайта */
.sitetitle {
    color: #ff8c00;
    font-size: 2.3rem;
    letter-spacing: 7px;
    text-align: center;
    font-weight: bold;
    text-indent: 0;
    z-index: 9999;
    text-shadow:
        2px 2px 2px rgba(0, 0, 0, 0.2),
        1px 0 1px #36220b,
        0 0 8px white,
        0 0 8px white,
        0 0 8px white;
}
@media (min-width: 681px) {
    .sitetitle {
        letter-spacing: 7px;
        font-size: 2.2rem;
        text-indent: 0;
        z-index: 9999;
    }
}
@media (max-width: 680px) {
    .sitetitle {
        line-height: 62px;
        text-align: center;
        padding: 0;
        width: auto;
        max-width: calc(100% - 110px);
        margin: 0 auto;
        white-space: nowrap;
        font-size: 1.6rem;
        letter-spacing: 1px;
    }
}
@media (max-width: 420px) {
    .sitetitle {
        font-size: 1.5rem;
        letter-spacing: 0.8px;
    }
}
@media (max-width: 390px) {
    .sitetitle {
        font-size: 1.4rem;
        letter-spacing: 0.5px;
    }
}
@media (max-width: 370px) {
    .sitetitle {
        font-size: 1.3rem;
    }
}
@media (max-width: 330px) {
    .sitetitle {
        font-size: 1.2rem;
    }
}
/*оформление всплывающих подсказок у ссылок*/
.tooltip-left,
.tooltip-right,
.tooltip-top {
    background: #d2691e;
    color: #ffffff;
    position: absolute;
    z-index: 9999;
    display: none;
    border-radius: 3px;
    box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.3);
    padding: 5px 8px;
    font-size: 0.8rem;
    text-shadow: none;
    text-align: justify;
    line-height: 1.5;
    hyphens: auto;
    hyphenate-limit-chars: 6 3 2;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.tooltip-left:before {
    position: absolute;
    width: 0;
    height: 0;
    line-height: 0;
    border: 6px dashed #d2691e;
    top: -6px;
    left: 25px;
    border-bottom-style: solid;
    border-top: none;
    border-left-color: transparent;
    border-right-color: transparent;
    content: "";
}
.tooltip-right:before {
    position: absolute;
    width: 0;
    height: 0;
    line-height: 0;
    border: 6px dashed #d2691e;
    top: -6px;
    left: 135px;
    border-bottom-style: solid;
    border-top: none;
    border-left-color: transparent;
    border-right-color: transparent;
    content: "";
}
@media (min-width: 681px) {
    .tooltip-left,
    .tooltip-right,
    .tooltip-top {
        max-width: 200px;
    }
}
@media (max-width: 680px) {
    .tooltip-left,
    .tooltip-right,
    .tooltip-top {
        max-width: 300px;
    }
}
/* ошибка 404 */
.oshibka-404-main #main-title,
.oshibka-404-main h1 {
    text-align: center;
    margin: 40px auto 20px;
    padding: 0;
    text-indent: 0;
    float: none;
    max-width: 100%;
}
.oshibka-404-flex {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 35px 30px;
}
.oshibka-404-flex p {
    text-indent: 0;
}
.oshibka-404-pic {
    display: flex;
    align-items: center;
    justify-content: center;
}
.oshibka-desc {
    margin: 0;
    line-height: 2;
}
.oshibka {
    margin: 10px 0;
    font-size: 120px;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1;
    transform: scaleX(1.5);
    color: #ffe09f;
    text-shadow:
        0 1px 0 #ccc,
        0 2px 0 #c9c9c9,
        0 3px 0 #bbb,
        0 4px 0 #b9b9b9,
        0 5px 0 #aaa,
        0 6px 1px rgba(0, 0, 0, 0.1),
        0 0 5px rgba(0, 0, 0, 0.1),
        0 1px 3px rgba(0, 0, 0, 0.3),
        0 3px 5px rgba(0, 0, 0, 0.2),
        0 5px 10px rgba(0, 0, 0, 0.25),
        0 10px 10px rgba(0, 0, 0, 0.2),
        0 20px 20px rgba(0, 0, 0, 0.15);
}
.oshibka-404-main {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
.oshibka-404 {
    display: flex;
    justify-content: center;
    gap: 50px;
}
.oshibka-404 .imghref {
    padding: 5px 10px;
}
@media (max-width: 750px) {
    .oshibka-404 {
        gap: 15px;
    }
}
@media (min-width: 681px) {
    .oshibka-404 {
        flex-wrap: wrap;
    }
}
@media (max-width: 680px) {
    .oshibka-404-main {
        padding-top: 20px;
    }
    .oshibka-404 {
        flex-direction: column;
    }
    .oshibka-404-pic {
        order: 2;
        padding-bottom: 50px;
    }
}
/* меню сайта - Десктопная версия */
@media (min-width: 681px) {
    .glavmenu ul {
        display: flex;
        flex-wrap: nowrap;
        gap: 7px;
        margin: 7px 30px 10px;
        padding-left: 0; /* Убираем стандартный отступ у списка */
        list-style: none;
        max-width: 100%;
    }
    .glavmenu ul li a {
        display: inline-block;
        text-align: center;
        font-size: 20px;
        color: #36220b;
        font-weight: bold;
        padding: 5px 10px;
        text-decoration: none;
        word-wrap: break-word;
        overflow-wrap: break-word; /* современный стандарт */
        white-space: normal; /* разрешаем перенос строк */
        background-color: #ffd894;
        box-shadow: 0 2px 2px rgba(0, 0, 0, 0.4);
        border-radius: 5px;
        width: 100%;
    }
}
@media (max-width: 850px) {
    .glavmenu ul li a {
        font-size: 19px;
        padding: 3px 7px;
    }
}
@media (max-width: 750px) {
    .glavmenu ul li a {
        font-size: 18px;
        letter-spacing: normal;
    }
}
@media (min-width: 681px) and (max-width: 990px) {
    .glavmenu ul {
        justify-content: flex-end;
    }
}
@media (min-width: 681px) and (max-width: 900px) {
    .glavmenu ul {
        margin: 7px 10px 10px;
    }
}
@media (min-width: 991px) {
    .glavmenu ul {
        justify-content: center;
    }
}
/* фиксация меню сайта в Десктопной версии */
@media (min-width: 681px) {
    .glavmenu.navfix {
        position: fixed;
        top: 0;
        left: 50%;
        transform: translate(-50%, 0);
        width: 100%;
        z-index: 9999;
        background-color: #fff7d9;
        box-shadow: 0 0 5px 5px rgba(34, 60, 80, 0.2);
    }
    body.menu-fixed main {
        margin-top: 68px; /* подставь реальную высоту меню */
    }
    .menuscroll {
        position: relative;
        z-index: 1000;
        transition: all 0.3s ease;
    }
    .menuscroll.out {
        transform: translateY(-100%);
    }
}
@media (min-width: 1300px) {
    .glavmenu.navfix {
        width: 1170px;
    }
    .glavmenu {
        border-radius: 5px;
    }
}
/* меню сайта - Мобильная версия */
@media (max-width: 680px) {
    .openmenu {
        position: absolute;
        width: 100%;
        height: 100%;
        left: 0;
        top: 0;
    }
    .glavmenu {
        display: none;
        background: #fff7d9;
        position: relative;
        z-index: 800;
        left: 0;
        right: 0;
        top: 0;
        box-shadow: 0 2px 2px rgba(0, 0, 0, 0.4);
    }
    .glavmenu ul {
        list-style: none;
        margin: 0;
        padding: 2px;
    }
    .glavmenu ul li a {
        display: block;
        font-size: 1.5rem;
        font-weight: bold;
        color: #36220b;
        line-height: 1.4;
        text-decoration: none;
        padding: 5px 20px;
        margin: 5px;
        word-wrap: break-word;
        background-color: #fff7d9;
        border-radius: 5px;
        box-shadow: 0 0 5px 5px rgba(34, 60, 80, 0.2);
    }
    .body_pointer * {
        cursor: pointer;
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    }
    /* иконка-гамбургер */
    #nav-icon {
        width: 35px;
        height: 20px;
        position: relative;
        margin-top: 14px;
        margin-left: 10px;
        transform: rotate(0deg);
        transition: 0.5s ease-in-out;
        cursor: pointer;
    }
    #nav-icon span {
        display: block;
        position: absolute;
        height: 6px;
        width: 100%;
        background: #ff8c00;
        border-radius: 9px;
        opacity: 1;
        left: 0;
        transform: rotate(0deg);
        transition: 0.25s ease-in-out;
    }
    #nav-icon span:nth-child(1) {
        top: 0px;
    }
    #nav-icon span:nth-child(2),
    #nav-icon span:nth-child(3) {
        top: 13px;
    }
    #nav-icon span:nth-child(4) {
        top: 26px;
    }
    #nav-icon.open span:nth-child(1) {
        top: 13px;
        width: 0%;
        left: 50%;
    }
    #nav-icon.open span:nth-child(2) {
        transform: rotate(45deg);
    }
    #nav-icon.open span:nth-child(3) {
        transform: rotate(-45deg);
    }
    #nav-icon.open span:nth-child(4) {
        top: 18px;
        width: 0%;
        left: 50%;
    }
}
/* общие стили активных пунктов на меню сайта */
.glavmenu ul li a:active,
.glavmenu ul li a:hover {
    text-decoration: none;
    background-color: #ffa343;
    color: #ffffff;
}
.glavmenu ul .currentsection a {
    position: relative;
    background-color: #ffa343; /*когда пользователь на странице подпункта меню*/
}
/* --- Кнопка «Наверх» (слева) --- */
#topbutton {
    position: fixed;
    bottom: 15px;
    left: 20px;
    z-index: 300;
    border: none;
    outline: none;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background-color: #ffa343;
    background-image: url("../img/buttontop.svg");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 40px 40px;
    cursor: pointer;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    opacity: 0;
    pointer-events: none;
    transition:
        opacity 0.3s ease,
        bottom 0.1s ease,
        left 0.1s ease;
}
#topbutton.visible {
    opacity: 0.7;
    pointer-events: auto;
}
#topbutton.visible:hover {
    opacity: 1;
}
/* --- Кнопка «Копировать ссылку» (справа) --- */
.copy-link-btn {
    position: fixed;
    bottom: 15px;
    right: 20px;
    z-index: 9999;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: none;
    background-color: #fff7d9;
    background-image: url("../img/link-copy.svg");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 26px 26px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 0;
    transition:
        background-color 0.2s ease,
        bottom 0.1s ease,
        right 0.1s ease;
}
.copy-link-btn:hover {
    background-color: #ffa343;
}
.copy-link-btn.copied {
    background-color: #4caf50;
    background-image: url("../img/check.svg");
    background-size: 28px 28px;
    background-repeat: no-repeat;
    background-position: center;
}
/* --- Подсказка --- */
.copy-toast {
    position: fixed;
    bottom: 80px;
    right: 20px;
    z-index: 9998;
    background: #d2691e;
    color: #ffffff;
    padding: 5px 8px;
    border-radius: 6px;
    font-size: 14px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition:
        opacity 0.2s ease,
        transform 0.2s ease,
        visibility 0.2s step-end,
        bottom 0.1s ease,
        right 0.1s ease;
    pointer-events: none;
}
.copy-toast.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
/* --- Разное --- */
::selection {
    background-color: #ffd800;
}
.noshow {
    display: none;
}
@media (min-width: 681px) {
    .noshowmain {
        display: none;
    }
}
@media (max-width: 680px) {
    .noshowmobile {
        display: none;
    }
}
/* ======== Личные страницы ========= */
/* Личные страницы - Основная информация */
.person-info {
    margin-top: 1rem;
    margin-bottom: 2rem;
    background-color: rgb(255, 247, 217, 0.5);
    box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.3);
    padding: 10px 0 20px;
}
.person-name {
    padding-top: 0;
}
@media (max-width: 680px) {
    .person-name {
        font-size: 1.5rem;
        letter-spacing: 1.4px;
    }
}
.person-header {
    display: flex;
    align-items: stretch;
    gap: 0.1rem;
    flex-wrap: wrap;
    margin-top: 5px;
    box-shadow: 0 0 5px 5px rgba(34, 60, 80, 0.2);
}
@media (min-width: 681px) {
    .person-info,
    .person-header {
        border-radius: 10px;
    }
    .person-info {
        padding: 10px 15px 20px;
    }
}
/* На мобильных: если картинка и текст помещаются рядом,
    даём блоку боковые отступы как на десктопе. */
@media (max-width: 680px) {
    .person-info.has-padding {
        padding-left: 10px;
        padding-right: 10px;
    }
    .person-info.has-padding .person-header {
        border-radius: 10px;
    }
}
.hidden-term {
    display: none;
}
.story {
    display: flow-root;
}
.story p {
    margin-bottom: 10px;
    margin-top: 0;
}
.story .signature {
    margin-top: 20px;
    opacity: 0.7;
}
.story .story-title {
    color: #301c0c;
    font-size: 1.25rem;
    margin-top: 20px;
    font-weight: 600;
}
.story {
    padding-bottom: 20px;
}
@media (max-width: 680px) {
    .story {
        padding-left: 10px;
        padding-right: 10px;
    }
}
.snapshot {
    display: flex;
}
.person-header.snapshot-wrapped {
    flex-direction: column;
}
.person-header.snapshot-wrapped .snapshot {
    justify-content: center;
}
.thumbnail-img {
    display: block;
    width: 100%;
    min-width: 100px;
    max-width: 200px;
    max-height: 70vh;
    height: 100%;
    object-fit: cover;
    aspect-ratio: auto;
    border-radius: 10px;
}
.info-list,
.info-list-evt {
    display: grid;
    grid-template-columns: 1fr;
    row-gap: 5px;
    align-content: start;
    margin: 0;
}
.info-list {
    padding: 20px;
}
.info-list-evt {
    padding: 20px 20px 0;
}
.info-label,
.info-value,
.info-value-name {
    margin: 0;
}
.info-label {
    align-self: baseline;
    font-size: 1.1rem;
    opacity: 0.6;
    text-shadow: 2px 2px 2px rgba(0, 0, 0, 0.2);
}
.info-value,
.info-value-name {
    align-self: baseline;
    font-weight: 600;
    color: #7b3f00;
    margin: 0 10px 10px;
}
.info-value:last-of-type {
    margin-bottom: 0;
}
.info-value {
    font-size: 1.2rem;
}
.info-value-name {
    line-height: 1.4;
    font-size: 1.4rem;
    text-shadow: 2px 2px 2px rgba(0, 0, 0, 0.2);
}
.info-list-evt .info-value {
    font-size: 1.2rem;
    font-weight: normal;
    color: #5c3317;
}
@media (max-width: 680px) {
    .info-label {
        font-size: 1.3rem;
    }
    .info-value {
        font-size: 1.4rem;
    }
    .info-list-evt .info-value {
        font-size: 1.3rem;
    }
    .info-value-name {
        font-size: 1.5rem;
    }
}
.person-relations {
    text-indent: 0;
    hyphens: none;
    font-weight: 600;
    text-align: left;
    margin: 0;
    padding: 20px 20px 10px;
    color: #7b3f00;
    text-shadow: 2px 2px 2px rgba(0, 0, 0, 0.2);
}
/* Личные страницы - Семьи */
.family-members {
    list-style: none;
    padding: 10px 20px 1px;
    margin: 0;
    line-height: 1.2;
    font-size: 1.1rem;
    text-shadow: 2px 2px 2px rgba(0, 0, 0, 0.2);
}
@media (max-width: 680px) {
    .family-members {
        font-size: 1.4rem;
    }
}
.family-member,
.child-item {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 1rem;
}
/* Выделение текущей персоны */
.family-member.current-person {
    display: inline-flex;
    background-color: #ffe09f;
    border-left: 4px solid #7b3f00;
    padding: 12px 20px 12px 15px;
    border-radius: 4px;
}
.family-member.current-person .tit-left {
    text-decoration: none;
    text-shadow: 2px 2px 2px rgba(0, 0, 0, 0.2);
}
.member-role {
    flex-shrink: 0;
    color: #7b3f00;
    font-weight: 600;
    letter-spacing: 3px;
}
.children-list {
    list-style: none;
    padding: 0;
}
.child-item {
    margin-top: 0.8rem;
    margin-left: 1.2rem;
}
.member-dates {
    display: block;
    white-space: normal;
    opacity: 0.6;
    margin-left: 0.5rem;
}
@media (max-width: 680px) {
    .family-member,
    .child-item {
        display: flex;
        flex-direction: column; /* элементы друг под другом */
        align-items: flex-start; /* прижать влево */
    }
}
/* ======== Страницы с фотографиями ========= */
/* Основная информация */
.photo-detail {
    padding: 0 15px 30px;
}
.photo-detail p {
    margin-bottom: 0;
    margin-top: 7px;
    text-indent: 0;
}
/* Обычные абзацы — по ширине, как раньше */
.photo-detail p {
    text-align: justify;
}
/* Абзацы, где есть ссылки — по левому краю */
.photo-detail p:has(a) {
    text-align: left;
}
.photo-detail .photo-date {
    opacity: 0.7;
    text-shadow: 2px 2px 2px rgba(0, 0, 0, 0.2);
    margin-bottom: 10px;
    margin-left: 40px;
}
.photo-detail .signature {
    margin-top: 20px;
    margin-left: 20px;
    opacity: 0.7;
}
.note {
    color: #555;
}
/* для оформления стихов */
.photo-detail .song {
    text-indent: 0;
    line-height: 1.6;
    font-style: italic;
    margin: 20px 50px 30px;
}
/* flex блок с фотографией */
.flex-center-foto {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 30px;
}
.ffoto {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}
/* фотографии */
.foto-post {
    max-width: 100%;
    object-fit: cover;
    border-radius: 15px;
    box-shadow: 0 0 5px 5px rgba(34, 60, 80, 0.2);
}
@media (min-width: 681px) {
    .foto-post {
        max-height: 70vh;
        margin-bottom: 20px;
    }
}
@media (max-width: 680px) {
    .foto-post {
        max-height: 60vh;
        margin: 0 3px;
    }
}
/* подписи к фоткам */
.ffoto p {
    text-indent: 0;
    text-align: left;
    line-height: 1.3;
    background-color: #ffe09f;
    box-shadow: 0 0 5px 5px rgba(34, 60, 80, 0.2);
    width: fit-content;
    border-radius: 7px;
    padding: 5px 10px 23px;
    margin-bottom: -17px;
}
.ffoto p,
.slider-me p {
    hyphens: none;
}
@media (min-width: 681px) {
    .ffoto p {
        font-size: 1.1rem;
        line-height: 1.3;
        letter-spacing: 2px;
    }
}
@media (max-width: 680px) {
    .ffoto p {
        font-size: 1.15rem;
        line-height: 1.2;
        letter-spacing: 1px;
    }
}
/* выпадающий блок details с картинкой в тексте */
.det-p {
    margin: 10px 20px 25px;
    width: fit-content;
}
.det-p .foto-post {
    margin: 0;
}
.det-p summary {
    cursor: pointer;
    display: inline-block;
    background-color: #ffe09f;
    box-shadow: 0 2px 2px rgba(0, 0, 0, 0.4);
    border-radius: 5px;
    padding: 4px 8px;
    font-size: 1.15rem;
    line-height: 1.5;
    letter-spacing: 1.2px;
}
.det-p summary:before,
.det-p summary:after {
    content: " ▼ ";
    transform: scale(1.4, 1);
    display: inline-block;
    transition: transform 0.5s;
    color: #7b3f00;
}
.flex-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
.det-p[open] > summary:before,
.det-p[open] > summary:after {
    transform: scale(1.4, -1);
}
.det-p[open] summary ~ * {
    animation: sweep 1s ease-in-out;
}
.det-p summary:before,
.det-p[open] summary:before {
    margin-right: 5px;
}
.det-p summary:after,
.det-p[open] summary:after {
    margin-left: 5px;
}
.det-p[open] summary {
    background-color: #ffa343;
    color: #ffffff;
}
.det-p summary:active,
.det-p summary:hover {
    background-color: #d2691e;
    color: #ffffff;
    opacity: 1;
}
.det-p[open] summary:active,
.det-p[open] summary:hover {
    background-color: #fff7d9;
    color: #7b3f00;
}
/* ======== Блок навигации по странице ========= */
.navarticle {
    margin: 5px 0;
    overflow-y: auto; /* Прокрутка активируется при необходимости */
    max-height: 60vh;
}
.navarticle ul {
    font-size: 1.1rem;
    line-height: 1.4;
    margin: 5px 0;
}
.navarticle ul li {
    margin: 7px 0;
    list-style-type: none;
}
.navarticle ul li a {
    color: #36220b;
    text-decoration: none;
    border-radius: 5px;
    padding: 3px 10px;
    box-shadow: 0 2px 2px rgba(0, 0, 0, 0.4);
    background-color: #ffe09f;
}
.navarticle ul li a:active,
.navarticle ul li a:hover {
    background-color: #d2691e;
    color: #ffffff;
    text-decoration: none;
}
.page-nav li a {
    display: inline-block;
}
@media (min-width: 681px) {
    .navarticle ul {
        padding: 0 25px;
    }
}
@media (max-width: 680px) {
    .navarticle ul {
        padding: 0 15px;
    }
}
/* раскрытие блока навигации по странице */
.page-nav {
    position: sticky;
    width: fit-content;
    z-index: 999;
    top: 70px;
    margin-bottom: -5px;
}
@media (max-width: 1649px) {
    .page-nav {
        right: 20px;
        left: auto;
        margin-left: auto;
        display: flex;
        flex-direction: column-reverse;
        align-items: flex-end;
    }
    .page-nav .navarticle {
        order: 1;
    }
    .page-nav > summary {
        order: 2;
        margin: 0;
    }
}
.page-nav[open] {
    background-color: rgb(255, 247, 217, 0.7);
    padding: 5px 0;
    border-radius: 10px;
}
.page-nav summary {
    cursor: pointer;
    display: inline-block;
    background-color: #fff7d9;
    box-shadow: 0 2px 2px rgba(0, 0, 0, 0.4);
    border-radius: 5px;
    font-weight: 700;
    color: #7b3f00;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    opacity: 0.7;
}
.page-nav[open] summary {
    background-color: #ffa343;
    color: #ffffff;
}
.page-nav summary:active,
.page-nav summary:hover {
    background-color: #d2691e;
    color: #ffffff;
    opacity: 1;
}
.page-nav[open] summary:active,
.page-nav[open] summary:hover {
    background-color: #fff7d9;
    color: #7b3f00;
}
.page-nav summary:before,
.page-nav summary:after {
    content: " ▼ ";
    transform: scale(1.4, 1);
    display: inline-block;
    transition: transform 0.5s;
}
.page-nav[open] > summary:before,
.page-nav[open] > summary:after {
    transform: scale(1.4, -1);
}
.page-nav[open] summary ~ * {
    animation: sweep 1s ease-in-out;
}
@keyframes sweep {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}
.page-nav summary:before,
.page-nav[open] summary:before {
    margin-right: 5px;
}
.page-nav summary:after,
.page-nav[open] summary:after {
    margin-left: 5px;
}
@media (min-width: 681px) {
    .page-nav summary {
        font-size: 1.45rem;
        letter-spacing: 1.3px;
        padding: 6px 11px;
        margin: 2px 7px;
    }
}
@media (max-width: 680px) {
    .page-nav summary {
        font-size: 1.4rem;
        letter-spacing: 1.2px;
        padding: 5px 10px;
        margin: 5px 10px;
    }
}
@media (min-width: 1650px) {
    .page-nav {
        position: fixed;
        top: 40px;
        margin-left: calc((98.6% - 1170px) / -2 - 27px);
        width: calc((98.6% - 1170px) / 2);
    }
    .navarticle {
        max-height: 85vh;
    }
    .navarticle ul {
        padding: 0 7px;
    }
    .navarticle ul li a {
        background-color: #fff7d9;
    }
    .page-nav summary {
        display: none;
    }
    .page-nav[open] {
        background-color: #ffe09f;
    }
}
@media (min-width: 1900px) {
    .page-nav {
        margin-left: -380px;
        width: 350px;
    }
    .navarticle ul {
        padding: 0 13px;
    }
}
@media (min-width: 1650px) and (max-height: 600px) {
    .page-nav {
        top: 10px;
    }
    .navarticle {
        max-height: 92vh;
    }
}
/* ======== Страница со списком лиц по фамилиям ========= */
.content-list {
    padding: 0 20px;
}
.individual-list {
    display: block;
    width: 100%;
}
.surname-group {
    display: block;
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 1px dashed rgba(123, 63, 0, 0.3);
}
.surname-group:last-child {
    margin-bottom: 0;
}
.surname-cell {
    display: block;
    font-size: 1.35rem;
    font-weight: 700;
    color: #7b3f00;
    margin-bottom: 12px;
    padding: 3px 0;
    white-space: normal;
    letter-spacing: 2px;
    text-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15);
}
.names-cell {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
}
.name-row {
    display: flex;
    align-items: baseline;
    column-gap: 20px;
    row-gap: 7px;
    padding-left: 1.5em; /* ← отступ для перенесённой даты */
    white-space: nowrap;
}
.name-row > a {
    margin-left: -1.5em; /* ← вытягиваем первую ссылку к левому краю */
    font-size: 1.25rem;
}
.name-row .birth-date {
    opacity: 0.65;
    font-size: 1.25rem;
    padding-left: 0.6em;
    letter-spacing: normal;
    border-left: 2px solid rgba(0, 0, 0, 0.15);
}
@media (max-width: 680px) {
    .names-cell {
        gap: 10px;
    }
    .name-row {
        row-gap: 1px;
    }
}
/* Все даты переносятся на новую строку, если хотя бы одна перенеслась */
.names-cell.dates-wrapped .name-row {
    flex-wrap: wrap;
}
.names-cell.dates-wrapped .name-row .birth-date {
    flex-basis: 100%;
    margin-left: -1em; /* компенсируем padding-left у .name-row */
    padding-left: 0;
    padding-top: 4px;
    border-left: none;
    opacity: 0.55;
}
/* Навигация по фамилиям */
.surname-nav {
    margin: 5px 0 25px;
}
.surname-nav-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.surname-nav-list a {
    display: inline-block;
    padding: 5px 10px;
    text-decoration: none;
    color: #7b3f00;
    background-color: #fff7d9;
    text-shadow: 2px 2px 2px rgba(0, 0, 0, 0.2);
    box-shadow: 0 2px 2px rgba(0, 0, 0, 0.4);
    border-radius: 5px;
    font-weight: 600;
    font-size: 1.05rem;
    letter-spacing: 0.5px;
    transition:
        background-color 0.15s ease,
        color 0.15s ease;
}
.surname-nav-list a:hover,
.surname-nav-list a:active {
    color: #ffffff;
    background-color: #d2691e;
}
/* Desktop: summary скрыт, содержимое всегда видно (details всегда open) */
@media (min-width: 681px) {
    .surname-nav > summary {
        display: none;
    }
}
/* Mobile: стилизация summary и раскрытие */
@media (max-width: 680px) {
    .surname-nav {
        margin: 5px 0 20px;
    }
    .surname-nav > summary {
        display: inline-block;
        cursor: pointer;
        padding: 6px 12px;
        background-color: #fff7d9;
        color: #7b3f00;
        border-radius: 5px;
        box-shadow: 0 2px 2px rgba(0, 0, 0, 0.4);
        font-weight: 600;
        font-size: 1.2rem;
        list-style: none;
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    }
    .surname-nav > summary::-webkit-details-marker {
        display: none;
    }
    .surname-nav > summary::before,
    .surname-nav > summary::after {
        content: " ▼ ";
        transform: scale(1.4, 1);
        display: inline-block;
        transition: transform 0.5s;
        color: #7b3f00;
    }
    .surname-nav[open] > summary::before,
    .surname-nav[open] > summary::after {
        transform: scale(1.4, -1);
    }
    .surname-nav > summary::before,
    .surname-nav[open] > summary::before {
        margin-right: 5px;
    }
    .surname-nav > summary::after,
    .surname-nav[open] > summary::after {
        margin-left: 5px;
    }
    .surname-nav[open] > summary {
        background-color: #ffa343;
        color: #ffffff;
    }
    .surname-nav[open] > summary::before,
    .surname-nav[open] > summary::after {
        color: #ffffff;
    }
    .surname-nav[open] > .surname-nav-list {
        margin-top: 10px;
    }
    .surname-nav-list {
        gap: 5px;
    }
    .surname-nav-list a {
        padding: 4px 8px;
    }
}
/* Две колонки с фамилиями */
/* Базовый вид (мобильные и узкие экраны): блоки друг под другом */
.individual-columns {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    align-items: flex-start;
}
.individual-section {
    min-width: 0;
}
/* Разрешаем сжатие и перенос */
.individual-section .individual-list {
    width: 100%;
    max-width: 100%;
    grid-template-columns: max-content minmax(0, 1fr);
}
.individual-section .name-row {
    white-space: normal;
    flex-wrap: wrap;
}
/* Широкие экраны: два блока рядом, каждый ровно 50% */
@media (min-width: 901px) {
    .individual-columns {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 50px;
        align-items: start;
    }
    .individual-section {
        min-width: 0; /* обязательно: не даёт колонке раздуться по содержимому */
    }
    .hide {
        visibility: hidden;
    }
}
@media (max-width: 900px) {
    .hide {
        display: none;
    }
}
.individual-columns .individual-section-title {
    color: #7b3f00;
    font-size: 1.6rem;
    font-weight: normal;
    text-align: left;
    line-height: 1.4;
    letter-spacing: 3px;
    margin: 0 0 15px;
    padding: 0;
    text-shadow: 2px 2px 2px rgba(0, 0, 0, 0.2);
}
@media (max-width: 680px) {
    .individual-columns .individual-section-title {
        font-size: 1.5rem;
        letter-spacing: 2px;
    }
}
/* =============== Продолжатель рода ================ */
.ancestor {
    text-shadow: 2px 2px 2px rgba(0, 0, 0, 0.2);
}
.ancestor::before {
    display: none;
}
.ancestor a::before,
a.ancestor::before,
h2.ancestor::before,
.info-value-name.ancestor::before {
    content: "";
    display: inline-block;
    -webkit-mask: var(--ancestor-icon) center / contain no-repeat;
    mask: var(--ancestor-icon) center / contain no-repeat;
    background-color: #5c3317;
    transition: background-color 0.15s ease;
}
/* на страницах /photos-pages/ */
.photo-detail .ancestor a::before,
.photo-detail a.ancestor::before {
    width: 19px;
    height: 19px;
    margin-right: 3px;
    vertical-align: -0.2em;
}
/* на страницах /persons/ */
.child-item .ancestor a::before,
.child-item a.ancestor::before,
.family-member .ancestor a::before,
.family-member a.ancestor::before {
    width: 20px;
    height: 20px;
    margin-right: 5px;
    vertical-align: -0.21em;
}
/* на странице individuals.html */
.name-row .ancestor a::before,
.name-row a.ancestor::before {
    width: 17px;
    height: 17px;
    margin-right: 5px;
    vertical-align: -0.1em;
}
h2.ancestor::before,
.info-value-name.ancestor::before {
    width: 20px;
    height: 20px;
    margin-right: 5px;
    vertical-align: -0.1em;
}
/* состояния ссылок ancestor */
.ancestor a:visited::before,
a.ancestor:visited::before {
    background-color: #7b3f00;
}
.ancestor a:hover::before,
a.ancestor:hover::before {
    background-color: #c34d0a;
}
/* ===================== Родовое древо ===================== */
/* Прокручиваемый контейнер — ключевая адаптация под мобильные */
/* Внешний контейнер: только тень и радиус, без скролла */
.tree-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin: -10px 0 -3px;
}
.tree-header .page-title {
    margin: 0;
    flex: 0 1 auto;
    min-width: 0;
}
@media (max-width: 680px) {
    .tree-header {
        flex-wrap: wrap;
        gap: 0;
        margin-right: 10px;
    }
    .tree-zoom-out,
    .tree-zoom-in {
        display: none;
    }
}
.tree-viewport-wrap {
    margin-bottom: 10px;
    border-radius: 10px;
    box-shadow: inset 0 0 8px rgba(34, 60, 80, 0.22);
    overflow: hidden; /* скругления «работают» на детях */
    background-color: #ffe09f;
    padding: 10px;
}
/* Внутренний контейнер: прокрутка, без своей тени */
.tree-viewport {
    display: flex;
    justify-content: center;
    justify-content: safe center; /* центр, но при переполнении — к началу */
    align-items: center;
    align-items: safe center; /* то же по вертикали */
    position: relative;
    overflow: auto;
    padding: 10px 10px 0 5px;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    border-radius: 10px;
    /* --- Скрываем скроллбары --- */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE и Edge */
}
/* Скрываем скроллбары в Chrome, Safari, Opera */
.tree-viewport::-webkit-scrollbar {
    display: none;
}
.tree-viewport:focus-visible {
    outline: 2px solid #ffa343;
    outline-offset: -2px; /* контур внутри, чтобы не спорить с тенью */
}
.tree-zoom-box {
    /* Размеры задаёт JS — под текущий масштаб */
    position: relative;
    flex: 0 0 auto; /* ← новое: item не сжимается и не растягивается */
    /* margin: auto — УБРАН, центрирование теперь делает контейнер */
}
.tree-canvas {
    position: relative;
    transform-origin: 0 0; /* можно продублировать, чтобы совпадало с JS */
}
/* ---------- Карточка персоны ---------- */
.person {
    display: flex;
    flex-direction: column;
    position: absolute;
    width: 280px;
    min-height: 90px;
    background: #fff7d9;
    border-radius: 8px;
    box-shadow: 4px 4px 8px rgba(34, 60, 80, 0.2);
    overflow: hidden;
    z-index: 2;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        z-index 0s;
}
.person:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 14px rgba(34, 60, 80, 0.35);
    z-index: 10;
}
.person-male {
    background: linear-gradient(180deg, #e6f0ff 0%, #f0f7ff 100%);
}
.person-female {
    background: linear-gradient(180deg, #ffe6f0 0%, #fff0f6 100%);
}
.person-link {
    display: flex;
    align-items: stretch; /* растягиваем детей на всю высоту */
    flex: 1 1 auto;
    gap: 0; /* отступ даёт padding внутри info-блока */
    padding: 0; /* никаких отступов у самой ссылки */
    color: #36220b;
    font-size: 0.85rem;
    line-height: 1.25;
}
.person a {
    text-decoration: none;
}
.person-link:hover {
    text-shadow: none;
}
.person-photo {
    width: 70px;
    flex-shrink: 0;
    align-self: stretch; /* фото тянется по высоте info-блока */
    object-fit: cover; /* сохраняем пропорции, обрезаем по бокам */
    object-position: top center; /* «якорь» — верх и центр */
    background: #eee;
}
.person-info-block {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
    gap: 10px;
    padding: 10px;
}
.person-name-index {
    font-size: 1.05rem;
    overflow-wrap: break-word;
    hyphens: none;
    letter-spacing: 0.4px;
    text-shadow:
        2px 2px 4px rgba(0, 0, 0, 0.2),
        0 0 8px white,
        0 0 8px white,
        0 0 8px white;
}
.person-dates {
    font-size: 0.9rem;
    letter-spacing: 0.7px;
    opacity: 0.85;
}
/* Карточки без фотографии (только текст) */
.person-no-photo .person-info-block {
    padding: 10px 15px;
}
/* ---------- Соединительные линии ---------- */
.line {
    position: absolute;
    pointer-events: none;
    z-index: 1;
}
/* горизонтальный отрезок */
.line-h {
    height: 2px;
    background: #7b3f00;
    border-radius: 1px;
}
/* вертикальный отрезок */
.line-v {
    width: 2px;
    background: #7b3f00;
    border-radius: 1px;
}
/* ---------- Мобильная адаптация ---------- */
@media (max-width: 680px) {
    .tree-viewport-wrap {
        border-radius: 0;
        padding: 10px;
        background-color: transparent;
        box-shadow:
            inset 0 8px 8px -8px rgba(34, 60, 80, 0.28),
            inset 0 -8px 8px -8px rgba(34, 60, 80, 0.28);
    }
    .tree-viewport {
        border-radius: 0;
    }
}
/* Панель управления масштабом над деревом */
.tree-toolbar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 5px;
    margin: 0;
}
.tree-zoom-btn {
    min-width: 34px;
    height: 34px;
    padding: 0 5px;
    border: none;
    border-radius: 8px;
    background-color: #fff7d9;
    color: #7b3f00;
    font-family: inherit;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition:
        background-color 0.15s ease,
        transform 0.1s ease;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    letter-spacing: 0;
}
.tree-zoom-btn:hover {
    background-color: #ffa343;
    color: #ffffff;
}
.tree-zoom-btn:active {
    transform: scale(0.95);
}
.tree-zoom-reset {
    min-width: 62px;
    font-size: 0.92rem;
}
@media (max-width: 680px) {
    .tree-toolbar {
        gap: 4px;
    }
    .tree-zoom-btn {
        min-width: 30px;
        height: 30px;
        padding: 0 8px;
        font-size: 1rem;
    }
    .tree-zoom-reset {
        min-width: 56px;
        font-size: 0.85rem;
    }
}
