
.transition-opacity {
    transition: opacity 0.3s ease;
}
.spoiler-block {
    margin: 0.5rem 0;
    border-radius: 6px;
    overflow: hidden;
    font-size: 0.95rem;
    border: 1px solid #ddd;
    max-width: max-content;
    background-color: #f9f9f9;
}
ol, ul {
    list-style-type: decimal !important;
    padding-left: 20px !important;
    line-height: 1.4;
}
.dark .spoiler-block, .bg-pop {
    border-color: rgba(98, 105, 149, 0.55);
    background-color: rgba(24, 30, 62, 0.37);
}
p,p+p{
    line-height: 1;
    margin: 0;
}
.spoiler-toggle {
    width: 100%;
    text-align: left;
    padding: 5px 10px;
    background-color: #ffffff;
    border: 1px solid rgba(34, 34, 34, 0.09);
    color: #221f1f;
    cursor: pointer;
    outline: none;
    transition: background-color 0.2s ease, color 0.2s ease;
    font-family: inherit;
}

.spoiler-toggle:hover {
    background-color: #ffffff;
    color: #181c2b;
}

.dark .spoiler-toggle {
    background-color: rgba(24, 30, 62, 0.3);
    border: 1px solid #393b43;
    color: #eee;
}

.dark .spoiler-toggle:hover {
    background-color: #181c2b;
}

.spoiler-content {
    display: none;
    padding: 10px 15px;
    border-top: 1px solid #ccc;
    animation: fadeIn 0.3s ease-in-out;
    color: #181c2b;
}

.dark .spoiler-content {
    border-top: 1px solid #181c2b;
    color: #eee;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@media (max-width: 600px) {
    .spoiler-toggle,
    .spoiler-content {
        padding: 8px 12px;
        font-size: 0.9rem;
    }
}

.my-spoiler-icon {
    background-color: #474545;
}
.dark .my-spoiler-icon {
    background-color: rgba(204, 204, 204, 0.11);
}
span, p {
    line-height: 1.5;
}
.icon svg {
    transition: transform 0.3s ease;
}
td {
    border: 1px solid rgba(113, 113, 113, 0.14);
}
tr {
    border-bottom: 1px solid rgba(113, 113, 113, 0.14);
}
tr>td {
    border-right: 1px solid rgba(113, 113, 113, 0.14);
    border-left: none;
    border-bottom: none;
    border-top: none;
}
.dark td {
    background: #26354e;
    /*border: 1px solid #fff;*/
}
.dark tr {
    border: 1px solid rgba(255, 255, 255, 0.04);
}
.table-responsive {
    width: calc(100%)!important;
}
caption {
    margin-bottom: 10px;
}
[data-popover]:hover,
[data-popover]:focus {
    opacity: 1 !important;
    visibility: visible !important;
}

[data-popover-target]:hover + [data-popover] {
    opacity: 1;
    visibility: visible;
}

[data-popover]:hover {
    opacity: 1;
    visibility: visible;
}
.menu, .menu-inner-item, .tabs-item {
    list-style: none;
    margin-bottom: 0 !important;
}
.menu:nth-child(1){
    margin-top: 10px!important;
}
.layout-menu .menu{
    gap: 0 !important;
}
.lis{
    padding: 2px 0 !important;
    list-style: none;
}
.dark .bg-pop {
    border-color: rgba(98, 105, 149, 0.55);
    background-color: #2a3851;
}
.p-t {
    border-bottom: 1px solid rgba(57, 57, 60, 0.16);
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
    background-color: #fdfdfd;
    box-shadow: 0 0 5px -3px;
}
.dark .p-t {
    border-bottom: 1px solid rgba(151, 155, 175, 0.18);
    background-color: #2a3851;
}
.p-b {
    background-color: #fbfbfb;
    box-shadow: 0 0 5px -3px;
}
.dark .p-b {
    border-color: rgba(98, 105, 149, 0.55);
    background-color: #2a3851;
}
.pp-h {
    padding: 2px 4px;
    border-radius: 3px;
    width: fit-content;
    border: 1px solid rgba(98, 105, 149, 0.29);
}
.dark .pp-h {
    border: 1px solid rgba(98, 105, 149, 0.55);
}
.menu-inner-dropdown, .layout-menu .menu-bottom > *:first-child {
    padding-left: 4px !important;
}
.menu-inner-dropdown {
    display: none;
    flex-direction: column;
}
.menu-inner-dropdown._open {
    display: flex !important;
}
.menu-inner-button._is-active {
    font-weight: bold;
    color: blue;
}
.menu-inner-item._is-active > .menu-inner-link {
    font-weight: bold;
    color: red;
}
img {
    cursor: pointer;
    box-shadow: 0 0 7px -2px;
    border: 1px solid #00000014;
    border-radius: 6px;
}
[x-cloak] { display: none !important; }
.layout-content {
    padding-top: 0;
}
.space-elements>:not([hidden],[type=hidden])~:not([hidden],[type=hidden]) {
    margin-top: 0;
}
/*ыфв*/
.menu-inner-link, .menu-inner-button {
    padding: 5px 5px !important;
    list-style: none !important;
}

.post-content td {
    border: 0;
    padding: 2px 5px;
}

/*img {*/
/*    width: 100%;*/
/*}*/

.layout-menu {
    margin-left: -11px;
}

.wiki-menu__button img {
    box-shadow: none !important;
}
.m-menu {
    display: none;
}

@media (max-width: 768px) {
    .m-menu {
        display: none;
    }
}
.layout-menu .menu._is-opened{
    padding-left: 10px;
    padding-right: 10px !important;
}
 .wiki-submenu .wiki-submenu {
     display: block !important;
 }

/* === ДОРАБОТАННЫЕ ЛИНИИ === */
.wiki-tree {
    position: relative;
    padding-left: 14px;
}

.wiki-tree::before {
    content: "";
    position: absolute;
    top: 0;
    left: 6px;
    bottom: 4px;
    border-left: 1px solid rgba(var(--dark-200), var(--tw-border-opacity, 1));
    z-index: 0;
}

.wiki-tree li {
    position: relative;
    padding-left: 5px;
    margin: 4px 0;
}

.wiki-tree li::before {
    content: "";
    position: absolute;
    top: 15px;
    left: -8px;
    width: 10px;
    border-top: 1px solid rgba(var(--dark-200), var(--tw-border-opacity, 1));
    z-index: 0;
}

/* === Исправление для активных пунктов === */
.wiki-menu__button.active,
.wiki-submenu a.active {
    position: relative;
    z-index: 1;
}

/* === Светлая подсветка линий при hover === */
.wiki-tree li:hover::before,
.wiki-tree li:hover > ul::before {
    border-color: #fff;
}
.dark .wiki-tree li:hover::before,
.dark .wiki-tree li:hover > ul::before {
    border-color: rgba(255, 255, 255, 0.56);
}

/* === Остальные стили (твой оригинал) === */
.wiki-menu {
    width: 260px;
    border-radius: 12px;
    overflow: hidden;
    font-family: "Inter", sans-serif;
    padding: 10px;
}

.wiki-menu__header {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 14px;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(var(--dark-200), var(--tw-border-opacity, 1));
    letter-spacing: 0.5px;
}

.wiki-menu__list {
    list-style: none;
    margin: 0;
    padding: 10px !important;
    overflow: auto;
    height: 96%;
}
.wiki-menu__list {
    scrollbar-width: thin;
    scrollbar-color: rgba(var(--dark-200), var(--tw-border-opacity, 1)) transparent;
}

/* Chrome, Edge, Safari */
.wiki-menu__list::-webkit-scrollbar {
    width: 2px; /* 1px фактически исчезает, поэтому ставим 2px */
    height: 2px;
}

.wiki-menu__list::-webkit-scrollbar-thumb {
    background-color: rgba(var(--dark-200), var(--tw-border-opacity, 1));
    border-radius: 10px;
    border: 0.5px solid transparent; /* уменьшает визуальную толщину */
}

.wiki-menu__list::-webkit-scrollbar-track {
    background: transparent;
}

.wiki-menu__item {
    margin-bottom: 6px;
    list-style: none;
}

.wiki-menu__button {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    background: linear-gradient(135deg, #ffffff17, #1f345463);
    color: #fff;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.dark .wiki-menu__button {
    background: linear-gradient(135deg, #303d5e, #111e30);
}

.wiki-menu__button div span {
    display: inline-block;
    transition: transform 0.25s ease;
}

.wiki-menu__button:hover div span {
    transform: translateX(4px);
}

.dark .wiki-menu__button:hover {
}


.wiki-menu__button img {
    width: 22px;
    height: 22px;
    object-fit: cover;
    border-radius: 4px;
    opacity: .9;
    box-shadow: none !important;
    border: none!important;
}

.wiki-menu__button.active {
    background: #fff;
    color: #000;
}
.dark .wiki-menu__button.active {
    background-color: rgba(var(--dark-300), var(--tw-bg-opacity, 1)) !important;
    color: #fff;
}

.arrow {
    border: solid #a3a3c5;
    border-width: 0 2px 2px 0;
    display: inline-block;
    padding: 3px;
    transform: rotate(45deg);
    transition: transform .25s ease;
}

.wiki-menu__button.open .arrow {
    transform: rotate(-135deg);
    border-color: #b29eff;
}

.wiki-submenu {
    display: none;
    list-style: none;
    animation: slideDown .25s ease forwards;
}

.wiki-submenu:nth-of-type(1) {
}

.wiki-submenu li a {
    display: block;
    padding: 6px 10px;
    border-radius: 6px;
    transition: all .25s ease;
    color: rgba(255, 255, 255, 0.8);
}

.wiki-submenu li {
    list-style: none;
}

.wiki-submenu li a:hover {
    transform: translateX(2px);
}

.wiki-submenu li a.active {
    background: rgba(0, 0, 0, 0.16);
    color: #fff;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.layout-content {
    padding-top: 15px;
}
.layout-menu .menu-heading, .layout-menu .menu {
    margin-right: 0!important;
    padding-right: 0!important;
}
.menu-inner {
    padding-left: 0!important;
}
/* Подсветка линий у активных пунктов */
.wiki-submenu li a.active::before,
.wiki-submenu li a.active ~ ul::before,
.wiki-tree li:has(> a.active)::before,
.wiki-tree li:has(> a.active) > ul::before {
    border-color: #fff;
}

.dark .wiki-submenu li a.active::before,
.dark .wiki-submenu li a.active ~ ul::before,
.dark .wiki-tree li:has(> a.active)::before,
.dark .wiki-tree li:has(> a.active) > ul::before {
    border-color: rgba(255, 255, 255, 0.56);
}
/*навигация по страничке*/
.wiki-content-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 25px;
    position: relative;
}

/* Контент — занимает всё место слева */
.wiki-content-wrapper .post-content {
    flex: 1 1 auto;
    min-width: 0;
}

/* Плавающее меню справа */
/* Список */
.wiki-page-nav__list {
    padding-left: 0!important;
}
.wiki-page-nav__list li {
    padding-left: 0!important;
}
/**/
.wiki-page-nav {
    position: sticky;
    top: 90px;
    flex: 0 0 240px;
    align-self: flex-start;
    padding: 18px 10px 22px;
    font-family: "Inter", sans-serif;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    border-radius: 14px;
    backdrop-filter: blur(16px);
    --tw-bg-opacity: 1;
    background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1));
    --tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);
    box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
    --tw-shadow-color: #e5e7eb;
    --tw-shadow: var(--tw-shadow-colored);
    transition: all 0.3s ease;
}

.dark .wiki-page-nav {
    background: linear-gradient(145deg, rgba(10,15,30,0.8), rgba(20,30,50,0.9));
    border: 1px solid rgba(120,150,255,0.15);
    border-right: 3px solid rgba(120,150,255,0.3);
    box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000);
}

.wiki-page-nav__header {
    font-size: 13px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-align: center;
    color: #252525;
    border-bottom: 1px solid  rgb(229 231 235 / var(--tw-border-opacity, 1));
    text-shadow: 0 0 3px rgba(190, 207, 248, 0.3);
    padding-bottom: 8px;
    margin-bottom: 16px;
}
.dark .wiki-page-nav__header {
    color: #c4d4ff;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    text-shadow: 0 0 3px rgba(160,190,255,0.3);
}

.wiki-page-nav__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.wiki-page-nav__list a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px 9px 16px;
    color: rgba(41, 40, 40, 0.78);
    border-radius: 8px;
    text-decoration: none;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.25s ease;
    border-right: 2px solid transparent;
    position: relative;
}
.dark .wiki-page-nav__list a {
    color: rgba(255,255,255,0.78);
}

.wiki-page-nav__list a:hover {
    color: #2b2929;
    border-right-color: rgba(84, 119, 223, 0.65);
}
.dark .wiki-page-nav__list a:hover {
    color: #fff;
    background: rgba(155,180,255,0.08);
    border-right-color: rgba(155,180,255,0.45);
}
.wiki-page-nav__list a.active {
    font-weight: 600;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.43), rgba(255,255,255,0.06));
    border-right-color: rgba(155,180,255,0.75);
    backdrop-filter: blur(20px);
}

.wiki-page-nav__list a.active {
    color: #3e3e3e;
    background: transparent;
    --tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);
    box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
    --tw-shadow-color: #e5e7eb;
    --tw-shadow: var(--tw-shadow-colored);
    border-right-color: rgba(93, 125, 221, 0.75);
}

.dark .wiki-page-nav__list a.active {
    background: linear-gradient(90deg, rgba(120,150,255,0.18), rgba(40,60,120,0.12));
    color: #bcd3ff;
    border-right-color: rgba(140,160,255,0.75);
    box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000);
}

@media (max-width: 1024px) {
    .wiki-page-nav {
        display: none;
    }
}
