html {
    margin: 0;
    padding: 0;
    background: #efe4b8;
}

body {
    margin: 0 !important;
    padding: 0 !important;
    min-width: 1040px;
    background: #f2e5b1;
    color: #1f2933;
}

.site-header {
    margin: 0;
    background: #222820;
    color: #f7f3d8;
    box-shadow: 0 2px 10px rgba(29, 38, 25, 0.22);
    position: relative;
    z-index: 200;
}

.site-header-hero {
    min-height: 74px;
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 10px 24px;
    background:
        linear-gradient(90deg, rgba(34, 40, 32, 0.94), rgba(46, 55, 35, 0.90)),
        url('/img/header_right_v2.png') right center / auto 100% no-repeat;
    border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}

.site-logo {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
}

.site-logo img {
    display: block;
    max-height: 58px;
    width: auto;
}

.site-header-title {
    min-width: 0;
    flex: 1 1 auto;
}

.site-header-name {
    font: 700 22px/1.2 Georgia, "Times New Roman", serif;
    color: #fff8c9;
}

.site-header-sub {
    margin-top: 4px;
    font: 12px/1.35 Verdana, Arial, sans-serif;
    color: #d6dfbb;
}

.site-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    font: 12px/1.2 Verdana, Arial, sans-serif;
}

.site-admin-badge,
.site-admin-link {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 10px;
    border-radius: 6px;
    text-decoration: none;
    white-space: nowrap;
}

.site-admin-badge {
    background: rgba(138, 180, 4, 0.22);
    border: 1px solid rgba(180, 210, 84, 0.44);
    color: #eef7c7;
}

.site-admin-link {
    background: #f1c46b;
    color: #202418;
    border: 1px solid #f4d58c;
    font-weight: 700;
}

.site-admin-link:hover {
    background: #ffe199;
    color: #11150e;
}

.site-admin-link.muted {
    background: rgba(255, 255, 255, 0.10);
    border-color: rgba(255, 255, 255, 0.18);
    color: #f6f1d0;
}

.site-nav-wrap {
    background: linear-gradient(to bottom, #0f0c08 0%, #1a140e 100%);
    border-top: 0;
    box-shadow:
        inset 0 1px 0 rgba(255,210,130,.04),
        inset 0 -1px 0 rgba(0,0,0,.6);
}

.site-nav {
    position: relative;
    z-index: 240;
    padding: 0 18px;
}

.site-nav-list,
.site-nav-list ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-nav-list {
    display: flex;
    align-items: stretch;
    gap: 2px;
    min-height: 46px;
}

.site-nav-item {
    position: relative;
    padding-bottom: 0;
}

.site-nav-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    height: 46px;
    padding: 0 18px;
    color: #fffceb;
    text-decoration: none;
    font: 700 13px/1.2 Verdana, Arial, sans-serif;
    letter-spacing: .2px;
    border-left: 1px solid rgba(135, 248, 58, .12);
    border-right: 1px solid rgba(0, 0, 0, .5);
    box-sizing: border-box;
    transition: background-color .15s ease, color .15s ease;
}

.site-nav-item:first-child > .site-nav-link {
    border-left: 0;
}

.site-nav-item:last-child > .site-nav-link {
    border-right: 0;
}

.site-nav-link:hover,
.site-nav-item:hover > .site-nav-link {
    background: #2a3a1a;
    color: #d6ffb5;
}

.site-nav-link.is-current {
    background: linear-gradient(to bottom, #0a0805 0%, #14100a 50%, #080604 100%);
    color: #d6ffb5;
    text-shadow: 0 0 10px rgba(135,248,58,.6);
    box-shadow:
        inset 1px 0 0 rgba(0,0,0,.5),
        inset -1px 0 0 rgba(0,0,0,.5);
}

.site-nav-link.is-current::after {
    content: "";
    position: absolute;
    left: 14%;
    right: 14%;
    bottom: 0;
    height: 2px;
    background: linear-gradient(to right,
        rgba(135,248,58,0) 0%,
        rgba(135,248,58,.95) 50%,
        rgba(135,248,58,0) 100%);
    box-shadow: 0 0 8px rgba(135,248,58,.55);
    pointer-events: none;
}

.site-nav-link.is-current:hover {
    background: linear-gradient(to bottom, #0d0a07 0%, #18130d 50%, #0a0805 100%);
    color: #e8ffc8;
}

.site-nav-caret {
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 6px solid currentColor;
    opacity: 0.9;
}

.site-nav-submenu {
    display: none;
    position: absolute;
    top: 46px;
    left: 0;
    min-width: 210px;
    background: #14110c;
    border: 1px solid rgba(135, 248, 58, .35);
    border-top: 0;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.55);
}

body:not(.site-nav-hover-suppressed) .site-nav-item:hover > .site-nav-submenu {
    display: block;
}

.site-nav-submenu .site-nav-item {
    display: block;
}

.site-nav-submenu .site-nav-link {
    height: auto;
    min-height: 34px;
    padding: 9px 14px;
    color: #f0e9c8;
    font-weight: 700;
    border: 0;
    border-bottom: 1px solid rgba(135, 248, 58, .14);
    justify-content: space-between;
}

.site-nav-submenu .site-nav-link:hover {
    background: linear-gradient(to bottom, #0d0a07 0%, #18130d 50%, #0a0805 100%);
    color: #e8ffc8;
    text-shadow: 0 0 10px rgba(135,248,58,.6);
    box-shadow:
        inset 1px 0 0 rgba(0,0,0,.5),
        inset -1px 0 0 rgba(0,0,0,.5);
}

.site-nav-submenu .site-nav-link.is-current {
    background: linear-gradient(to bottom, #0a0805 0%, #14100a 50%, #080604 100%);
    color: #d6ffb5;
    text-shadow: 0 0 10px rgba(135,248,58,.6);
    box-shadow:
        inset 1px 0 0 rgba(0,0,0,.5),
        inset -1px 0 0 rgba(0,0,0,.5);
}

.site-nav-submenu .site-nav-link.is-current:hover {
    background: linear-gradient(to bottom, #0d0a07 0%, #18130d 50%, #0a0805 100%);
    color: #e8ffc8;
}

.site-nav-submenu .site-nav-submenu {
    top: 0;
    left: 100%;
    border-top: 1px solid rgba(135, 248, 58, .35);
}

.site-content-wrap {
    width: 100%;
    border-collapse: separate;
}

#site-content {
    max-width:  100%;
    margin: 0 auto;
}

.site-footer {
    margin-top: 0;
    background: #14110c;
    color: #e8efd6;
    border-top: 0;
    clear: both;
    width: 100%;
    box-sizing: border-box;
}

/* ====== УНИВЕРСАЛЬНЫЙ СЕПАРАТОР ======
   Тонкая аккуратная полоса с мягким зелёным свечением.
   Используется под шапкой и над футером — единый стиль на всех страницах. */
.libbk-divider {
    position: relative;
    width: 100%;
    height: 3px;
    background:
        linear-gradient(to right,
            rgba(135,248,58,0) 0%,
            rgba(135,248,58,.55) 15%,
            rgba(135,248,58,.85) 50%,
            rgba(135,248,58,.55) 85%,
            rgba(135,248,58,0) 100%);
    box-shadow:
        0 0 10px rgba(135,248,58,.35),
        0 0 2px rgba(135,248,58,.55);
    pointer-events: none;
}

.libbk-divider::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -6px;
    width: 60%;
    height: 6px;
    transform: translateX(-50%);
    background: radial-gradient(ellipse at center top,
        rgba(135,248,58,.18) 0%,
        rgba(135,248,58,0) 70%);
    pointer-events: none;
}

/* Перевёрнутый вариант — для сепаратора над футером (свечение вверх). */
.libbk-divider--up::after {
    bottom: auto;
    top: -6px;
    background: radial-gradient(ellipse at center bottom,
        rgba(135,248,58,.18) 0%,
        rgba(135,248,58,0) 70%);
}

/* ====== СТРАНИЦЫ КОНТЕНТА (новости и т.п.) — мягкая полировка ======
   База стилей .quote_forum/.legend_forum в style_main.css не трогается —
   здесь только улучшения вокруг: отступы, заголовок раздела, пагинация. */
.lib-page {
    width: 100%;
    max-width: none;
    margin: 22px 0 32px;
    padding: 0 32px;
    box-sizing: border-box;
}

/* Заголовок раздела — раньше синий #d9f1fc/#007fff, не вписывался в тему.
   Делаем тёплую «золотую» плашку, как и карточки новостей. */
.lib-page #razdel,
.lib-page #razdel_first {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    margin: 0 0 16px 0;
    padding: 4px 18px;
    background: linear-gradient(to bottom, #f4e3a2 0%, #e6cf78 100%);
    border: 1px solid #c9a647;
    border-radius: 4px;
    box-shadow:
        0 2px 6px rgba(60, 40, 8, .22),
        inset 0 1px 0 rgba(255, 248, 210, .55),
        inset 0 -1px 0 rgba(140, 100, 28, .25);
    text-align: center;
}

.lib-page p.razdel_menu,
.lib-page p.razdel {
    margin: 0 !important;
    padding: 0 !important;
    color: #4a3608 !important;
    font: 700 17px/1.2 Georgia, "Times New Roman", serif !important;
    letter-spacing: .25px;
    text-align: center;
    text-shadow: 0 1px 0 rgba(255, 250, 220, .55);
}

/* Декоративные орнаменты по бокам заголовка раздела */
.lib-page p.razdel_menu::before,
.lib-page p.razdel_menu::after,
.lib-page p.razdel::before,
.lib-page p.razdel::after {
    content: "❖";
    display: inline-block;
    margin: 0 14px;
    color: #8a6620;
    font-size: 12px;
    vertical-align: middle;
    opacity: .55;
}

.lib-page .razdel_menu a {
    color: #2b6b00;
    text-decoration: none;
}

.lib-page .razdel_menu a:hover {
    color: #1a4a00;
    text-decoration: underline;
}

.lib-page .razdel_sep {
    margin: 0 6px;
    color: rgba(74, 54, 8, .45);
    font-weight: 400;
}

.lib-page .razdel_current {
    color: #2a2410;
    font-weight: 700;
}

/* Лёгкая полировка карточек новостей: убираем уродливый IE-фильтр
   (выглядит как чёрная полоса в Chrome), оставляем box-shadow.
   Базовый .quote_forum имеет margin: 15px 15px 50px 15px — поджимаем
   нижний отступ, чтобы карточки не «болтались» далеко друг от друга. */
.lib-page .quote_forum,
.lib-page .quote_forum_clip {
    margin: 15px 15px 28px 15px;
    filter: none;
    -ms-filter: none;
    position: relative;
    z-index: 1;
}


.lib-page .legend_forum {
    display: flex !important;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 0;
    padding: 3px 16px !important;
    filter: none;
    -ms-filter: none;
    line-height: 1.2 !important;
}

/* Заголовок внутри карточки чуть «продышан» */
.lib-page .legend_forum b {
    font-size: 14px;
    letter-spacing: .2px;
    line-height: 1.2;
}

/* Картинка-«кавычка» в начале заголовка — выровнять по центру */
.lib-page .legend_forum > img {
    vertical-align: middle;
    align-self: center;
    margin-right: 4px;
}

/* Дата в скобках — была <font color="#007000">. Чуть приглушаем. */
.lib-page .legend_forum font[color] {
    color: #2b6b00 !important;
    font-weight: 700;
}

/* Ссылки в тексте новости — должны явно читаться как ссылки на кремовом фоне.
   Глубокий синий + подчёркивание + жирность, как в a.map_link / a.drop_link. */
.lib-page .quote_forum a {
    color: #0052ae;
    text-decoration: none;
    border-bottom: 1px solid rgba(0, 82, 174, .45);
    font-weight: 700;
    transition: color .15s ease, border-color .15s ease, background .15s ease;
    padding: 0 1px;
    border-radius: 2px;
}

.lib-page .quote_forum a:hover,
.lib-page .quote_forum a:focus-visible {
    color: #8f0000;
    border-bottom: 1px dashed #8f0000;
    background: rgba(143, 0, 0, .05);
    outline: none;
}

.lib-page .quote_forum a:visited {
    color: #5f2c8a;
    border-bottom-color: rgba(95, 44, 138, .45);
}

/* Внешние ссылки (на therebk.net и другие домены) — подсветим стрелочкой. */
.lib-page .quote_forum a[href^="http://"]::after,
.lib-page .quote_forum a[href^="https://"]::after {
    content: "\2197";
    font-size: 0.82em;
    margin-left: 2px;
    vertical-align: super;
    line-height: 0;
    opacity: 0.75;
}

/* Жирный/полужирный в теле новости должен бросаться в глаза.
   Verdana 700 на чёрном поверх кремового фона почти не отличается от 400 —
   подкрашиваем в насыщенный бордовый цвета темы. */
.lib-page .quote_forum b,
.lib-page .quote_forum strong {
    font-weight: 700;
    color: #8f0000;
}

/* Если жирный — внутри ссылки, не перебиваем цвет ссылки. */
.lib-page .quote_forum a b,
.lib-page .quote_forum a strong,
.lib-page .quote_forum b a,
.lib-page .quote_forum strong a {
    color: inherit;
}

/* <em>/<i> — лёгкое подкрашивание, чтобы курсив не терялся. */
.lib-page .quote_forum em,
.lib-page .quote_forum i {
    color: #4a3a08;
    font-style: italic;
}

/* --- Базовая типографика тела новости --- */

.lib-page .quote_forum h1,
.lib-page .quote_forum h2,
.lib-page .quote_forum h3,
.lib-page .quote_forum h4 {
    margin: 22px 0 8px;
    color: #6f1a00;
    font-family: Verdana, "trebuchet ms", Arial, sans-serif;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: .1px;
}

.lib-page .quote_forum h1 { font-size: 18px; }
.lib-page .quote_forum h2 { font-size: 16px; }
.lib-page .quote_forum h3 {
    font-size: 14px;
    padding-bottom: 4px;
    border-bottom: 1px solid rgba(143, 0, 0, .18);
}
.lib-page .quote_forum h4 { font-size: 13px; color: #4a2d00; }

.lib-page .quote_forum h1:first-child,
.lib-page .quote_forum h2:first-child,
.lib-page .quote_forum h3:first-child,
.lib-page .quote_forum h4:first-child {
    margin-top: 6px;
}

.lib-page .quote_forum p {
    margin: 0 0 10px;
    line-height: 1.55;
}

.lib-page .quote_forum ul,
.lib-page .quote_forum ol {
    margin: 6px 0 12px;
    padding-left: 26px;
    line-height: 1.55;
}

.lib-page .quote_forum li { margin: 3px 0; }

.lib-page .quote_forum ul li::marker { color: #8f0000; }

.lib-page .quote_forum hr {
    border: 0;
    border-top: 1px dashed rgba(143, 0, 0, .25);
    margin: 14px 0;
}

.lib-page .quote_forum code {
    font-family: "Courier New", Consolas, monospace;
    font-size: 0.95em;
    padding: 1px 5px;
    background: rgba(143, 0, 0, .06);
    border: 1px solid rgba(143, 0, 0, .15);
    border-radius: 3px;
    color: #6f1a00;
}

.lib-page .quote_forum img {
    max-width: 100%;
    height: auto;
}

/* Пустое состояние «Новостей пока нет» */
.lib-page .quote_forum .therebk-news-image {
    margin: 12px 0 14px;
    text-align: center;
}

.lib-page .quote_forum .therebk-news-image img {
    display: block;
    max-width: 350px;
    height: auto;
    margin: 0 auto;
    float: none !important;
    border: 1px solid rgba(120, 88, 20, .24);
    box-shadow: 0 2px 6px rgba(70, 48, 8, .18);
}

.lib-news-empty {
    margin: 0 auto 22px;
    padding: 32px 24px;
    text-align: center;
    background: linear-gradient(to bottom, #faf0c8 0%, #ecd896 100%);
    border: 1px solid #d8c688;
    border-radius: 4px;
    color: #5a4618;
    box-shadow: 0 3px 10px rgba(40, 24, 4, .18);
}

.lib-news-empty h2 {
    margin: 0 0 8px;
    font: 700 20px/1.3 Georgia, "Times New Roman", serif;
    color: #2a2410;
}

.lib-news-empty p {
    margin: 0;
    color: #6a5a28;
}

/* Пагинация новостей */
.lib-news-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    justify-content: center;
    align-items: center;
    margin: 20px 0 0;
}

.lib-news-pagination a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    height: 24px;
    padding: 0 9px;
    background: linear-gradient(to bottom, #faecbc 0%, #ead07a 100%);
    border: 1px solid #b8932f;
    border-radius: 12px;
    color: #4a3608;
    font: 700 11px/1 "Trebuchet MS", Verdana, Arial, sans-serif;
    letter-spacing: .15px;
    text-decoration: none;
    box-shadow:
        0 1px 2px rgba(60, 40, 8, .22),
        inset 0 1px 0 rgba(255, 252, 220, .65),
        inset 0 -1px 0 rgba(140, 100, 28, .16);
    transition: transform .12s ease, box-shadow .15s ease, background .15s ease, color .15s ease;
    user-select: none;
}

.lib-news-pagination a:hover {
    background: linear-gradient(to bottom, #fff4cb 0%, #f1d986 100%);
    color: #2a1f04;
    border-color: #a07c1c;
    box-shadow:
        0 3px 8px rgba(60, 40, 8, .32),
        inset 0 1px 0 rgba(255, 252, 220, .85);
    transform: translateY(-1px);
}

.lib-news-pagination a:active {
    transform: translateY(0);
    box-shadow:
        inset 0 1px 3px rgba(60, 40, 8, .35);
}

.lib-news-pagination a.is-active {
    background: linear-gradient(to bottom, #4a8a1f 0%, #2e6a0e 55%, #1f5008 100%);
    border-color: #2e6a0e;
    color: #f6ffd5;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .25),
        inset 0 -1px 0 rgba(0, 0, 0, .25),
        0 0 0 1px rgba(135, 248, 58, .2),
        0 0 8px rgba(135, 248, 58, .3),
        0 1px 3px rgba(0, 0, 0, .22);
    cursor: default;
    pointer-events: none;
    text-shadow: 0 1px 0 rgba(0, 0, 0, .35);
    transform: none;
}

/* «Назад» / «Вперёд» — чуть шире */
.lib-news-pagination a:first-child,
.lib-news-pagination a:last-child {
    padding: 0 11px;
}


.site-footer-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 22px 24px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px 24px;
    font: 12px/1.45 Verdana, Arial, sans-serif;
    box-sizing: border-box;
}

.site-footer a {
    color: #c9ff8a;
}

.site-footer a:hover {
    color: #87f83a;
}

.site-footer-links {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.site-footer-links a {
    text-decoration: none;
    font-weight: 700;
}

.site-footer-links a:hover {
    text-decoration: underline;
}

.site-footer-note {
    grid-column: 1 / -1;
    color: #a8b39a;
}

.dressroom-page .site-footer {
    margin-top: 0;
}

.dressroom-page .site-footer-inner {
    max-width: none;
    margin: 0;
    padding: 22px 28px;
}
