@import url(style_cs.1791056441.css);

/* =========================================================
   KONTON — СТРУКТУРА  (style.css)
   Здесь: размеры, позиции, шрифты, анимации.
   Цвета, арты и тексты — в style_cs.1791056441.css (переменные var(--...)).
   ========================================================= */

/* --- ШРИФТЫ --- */
@font-face {
    font-family: Romul;
    src: url(https://forumstatic.ru/files/0019/d0/45/85305.ttf);
    font-display: swap;
}

/* --- РАЗМЕРЫ ШАПКИ (меняйте здесь) --- */
:root {
    --header-h: 196px;  /* высота шпки */
    --nav-h: 34px;      /* высота тонкой панели ссылок */
    --art-w: 710px;     /* ширина панели с артом справа */

    /* ФОРМА БЛОКОВ: «лепесток» — две больших скруглённых и две острых вершины.
       Порядок: левый-верх, правый-верх, правый-низ, левый-низ */
    --shape-xl: 28px 6px 28px 6px;
    --shape-lg: 22px 5px 22px 5px;
    --shape-md: 15px 4px 15px 4px;
    --shape-sm: 9px 3px 9px 3px;
}

/* --- СБРОС --- */
html, body {
    margin: 0;
    padding: 0;
    background: transparent;
    /* якорные переходы не прячутся под закреплённой шапкой */
    scroll-padding-top: calc(var(--nav-h) + 20px);
}

#pun_wrap { background: transparent; }

.punbb * { margin: 0; }
.punbb ul, .punbb dl, .punbb li, .punbb dd, .punbb dt { padding: 0; list-style: none; }
.punbb img { border: none; }
.punbb .main table { table-layout: fixed; width: 100%; }

.checkfield input[type="checkbox"],
.radiofield input[type="radio"] { margin: 0 0.3em; }

body { font-size: 100.01%; }
.punbb { font: normal 68.75% verdana, arial, helvetica, sans-serif; float: left; width: 100%; height: auto; }
.punbb textarea, .punbb input, .punbb select, .punbb optgroup { font: 1em verdana, arial, helvetica, sans-serif; }
.punbb h1, .punbb h2, .punbb h3, .punbb h4, .punbb table { font-weight: normal; }

.punbb th, .punbb thead {
    font-size: 10px !important;
    font-family: Tahoma, Arial, sans-serif;
    font-weight: 400;
    text-transform: lowercase;
    background-color: transparent;
    opacity: 0.7;
}

.punbb pre { font: 1.1em/140% monaco, "bitstream vera sans mono", "courier new", courier, monospace; }
.punbb address, .punbb em { font-style: normal; }
.punbb .post-content em { font-style: italic; }
.punbb .post-content em.bbuline { font-style: normal; text-decoration: underline; }
.punbb a { text-decoration: none; }

/* --- СКРЫТИЕ СЛУЖЕБНЫХ ЭЛЕМЕНТОВ --- */
.acchide,
#pun-index #pun-main h1,
#pun-navlinks h2,
#pun-pagelinks h2,
#pun-status h2,
#pun-ulinks h2,
.punbb .forum h2,
.punbb .multipage .topic h2,
.punbb dl.post-sig dt span,
.punbb p.crumbs strong,
.punbb .divider hr,
.punbb .required label em,
.punbb .formsubmit label,
.punbb .submitfield label,
.punbb .modmenu label,
#pun-userlist .main h2 {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

#pun::after, .punbb .container::after, .punbb .post-links ul::after,
.punbb .main div.inline::after, .punbb .post-box::after, .punbb .linksb::after {
    content: "";
    display: table;
    clear: both;
}

/* --- КАРКАС --- */
#pun {
    width: 1180px;      /* ширина форума */
    max-width: calc(100vw - 24px);
    margin: 0 auto 30px auto;
    padding: 0 16px;
    box-sizing: border-box;
    background: transparent;
    position: relative;
    border-radius: var(--shape-xl);
}

.punbb-admin #pun-admain .adcontainer, #pun-admain { background-color: transparent; }
#pun-navlinks li#navadmin a span { display: none; }
#pun-navlinks li#navadmin a::before { content: 'Админка'; }

body.redirect-page #pun { margin-top: 15%; overflow: hidden; text-align: center; }
body.redirect-page h1 { margin: 1em auto auto !important; }

.punbb .section, .punbb .main { margin-bottom: 0.7em; }
.punbb .category { margin-top: 0.4em; padding-bottom: 0.4em; }
.punbb .post { padding-top: 0; background: transparent; }
.punbb #pun-category1, .punbb .toppost, .punbb .topicpost { margin-top: 0; }
#pun-post .topic { margin-top: 1em; }

.punbb .section, .punbb .forum, .punbb .formal, .punbb .modmenu, .punbb .info,
.punbb .category, .punbb .post, .punbb .container { border: none; }

/* =========================================================
   ШАПКА — обычная (уезжает при прокрутке), собрана из HTML-блока #kn-header
   Раскладка:  [ фон-картинка слева: орб + KONTON + меню ] [ скошенная панель с артом ]
   ========================================================= */

#pun-title { display: none !important; } /* родную шапку заменяет #kn-header */
#html-header { margin: 0; padding: 0; }

#kn-header {
    position: relative;
    z-index: 210;
    height: var(--header-h);
    margin: 0 -16px;
    font-family: 'Comfortaa', Verdana, Arial, sans-serif;
}

#kn-header .kn-bg,
#kn-header .kn-art-wrap { position: absolute; top: 0; bottom: 0; overflow: hidden; }

#kn-header .kn-bg { left: 0; right: 0; border-radius: 28px 6px 0 0; }

#kn-header .kn-art-wrap {
    right: 0;
    width: var(--art-w);
    border-radius: 0 6px 0 0;
    filter: drop-shadow(-3px 0 7px var(--art-edge-glow));
}
#kn-header .kn-bg-img {
    position: absolute; inset: 0; width: 100%; height: 100%;
    object-fit: cover; object-position: center;
}
#kn-header .kn-bg::after {            /* затемнение и искры поверх левой картинки */
    content: ""; position: absolute; inset: 0; pointer-events: none;
}
#kn-header .kn-bg::before {            /* вторая картинка шапки: проявляется при наведении */
    content: ""; position: absolute; inset: 0; pointer-events: none;
    opacity: 0; transition: opacity .35s ease;   /* .35s — плавная смена; поставьте 0s для мгновенной */
}
#kn-header:hover .kn-bg::before { opacity: 1; }
#kn-header .kn-art-img {
    position: absolute; bottom: 0; left: 50%;
    height: 106%; width: auto; max-width: none;
    transform: translateX(-50%);
}
#kn-header .kn-art-img[src=""] { display: none; }

#kn-header .kn-art-wrap::before {
    content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none;
    clip-path: polygon(0 0, 3px 0, calc(11% + 3px) 100%, 11% 100%);
}
#kn-header .kn-art {
    position: absolute;
    inset: 0;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 11% 100%); /* скошенная граница */
}

#kn-header .kn-left {
    position: relative;
    z-index: 5;
    box-sizing: border-box;
    width: calc(100% - var(--art-w) + 70px);
    height: 100%;
    padding: 20px 34px 18px 38px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* --- Орб с живой луной и логотип --- */
#kn-header .kn-brand { display: flex; align-items: center; gap: 22px; }

#kn-header .kn-orb { position: relative; flex: none; width: 96px; height: 96px; }
#kn-header .kn-ring {
    position: absolute; inset: 0; border-radius: 50%;
    border: 2px dashed;
    animation: kn-spin 26s linear infinite;
}
#kn-header .kn-ring-in { inset: 9px; border-style: dotted; animation-duration: 18s; animation-direction: reverse; }
#kn-header .kn-moon {
    position: absolute; inset: 20px; width: 56px; height: 56px;
    animation: kn-pulse 4.2s ease-in-out infinite;
}

#kn-header .kn-title { display: flex; flex-direction: column; align-items: flex-start; }

#kn-header a.kn-logo {
    display: inline-block;
    font-family: 'Pacifico', cursive;
    font-size: 58px;
    line-height: 1.12;
    transform-origin: left center;
    transition: transform .35s ease, color .35s ease, text-shadow .35s ease;
}
#kn-header a.kn-logo:hover { transform: scale(1.05) translateY(-2px); }

#kn-header .kn-sub {
    margin: 2px 0 0 4px;
    font-size: 11px; font-weight: 700; letter-spacing: .22em;
}
#kn-header .kn-sub::before { content: "\2726\00a0\00a0"; }
#kn-header .kn-sub::after  { content: "\00a0\00a0\2726"; }

#kn-header .kn-moon-label { margin: 6px 0 0 4px; font-size: 10px; letter-spacing: .06em; }

/* --- Меню-«свитки» с выпадающими ссылками --- */
#kn-header .kn-menus { display: flex; gap: 12px; }
#kn-header .kn-menu { position: relative; outline: none; }
#kn-header .kn-menu:hover, #kn-header .kn-menu:focus-within { z-index: 20; }

#kn-header .kn-menu-btn {
    display: inline-block;
    padding: 8px 16px;
    border: 1px solid;
    border-radius: var(--shape-md);
    font-size: 12px; font-weight: 700; letter-spacing: .04em;
    -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
    transition: background .25s ease, box-shadow .25s ease;
}
#kn-header .kn-menu-btn::before { content: "\2726\00a0\00a0"; }
#kn-header .kn-menu-btn::after  { content: "\00a0\00a0\25BE"; font-size: 10px; }

#kn-header .kn-menu ul {
    position: absolute; left: 0; top: calc(100% + 6px);
    min-width: 250px;
    margin: 0; padding: 8px;
    border: 1px solid; border-radius: var(--shape-md);
    opacity: 0; visibility: hidden; transform: translateY(-6px);
    transition: opacity .22s ease, transform .22s ease, visibility .22s;
}
#kn-header .kn-menu ul::before { content: ""; position: absolute; left: 0; right: 0; top: -8px; height: 8px; }
#kn-header .kn-menu:hover ul,
#kn-header .kn-menu:focus-within ul { opacity: 1; visibility: visible; transform: none; }

#kn-header .kn-menu li a {
    display: block; padding: 8px 12px; border-radius: var(--shape-sm);
    font-size: 12px; font-weight: 700; line-height: 1.3;
    transition: background .2s ease, padding-left .2s ease;
}
#kn-header .kn-menu li a:hover { padding-left: 17px; }
#kn-header .kn-menu li small { display: block; font-size: 10px; font-weight: 400; }

/* --- Анимации --- */
@keyframes kn-spin  { to { transform: rotate(360deg); } }
@keyframes kn-pulse { 0%, 100% { transform: scale(.94); } 50% { transform: scale(1.06); } }

/* --- Звёздная пыль за курсором (создаётся скриптом) --- */
.kn-spark {
    position: fixed; z-index: 9999; pointer-events: none;
    width: var(--s, 10px); height: var(--s, 10px); margin: -5px 0 0 -5px;
    clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
    animation: kn-fall .95s ease-out forwards;
}
@keyframes kn-fall {
    to { transform: translate(var(--dx, 0px), 38px) rotate(200deg) scale(.15); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    #kn-header .kn-ring, #kn-header .kn-moon { animation: none; }
    .kn-spark { display: none; }
}

/* =========================================================
   ИКОНКИ ПОДФОРУМОВ
   ========================================================= */

.punbb div.icon {
    font-family: 'Cinzel', 'Comfortaa', sans-serif !important;
    font-size: 18px !important;
    line-height: 1 !important;
    text-align: center !important;
}
.punbb div.icon * { display: none !important; }

/* --- ПОСТЫ И ПРОФИЛЬ --- */
.punbb .post { clear: both; margin-bottom: 1em; }

.post-author {
    float: left !important;
    width: 190px !important;
    margin: 0 15px 10px 0 !important;
    padding: 12px 10px !important;
    box-sizing: border-box !important;
    text-align: center !important;
    border-radius: var(--shape-lg) !important;
}

.pa-author, .pa-author a {
    font-family: 'Comfortaa', serif !important;
    font-weight: 700 !important;
    font-size: 12px !important;
}

.punbb .post h3 { border-radius: var(--shape-md) !important; }

.punbb .post-content {
    margin-left: 205px !important;
    padding: 10px 5px !important;
    overflow: hidden !important;
}

.pa-avatar, .pa-avatar img {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
    margin: 0 auto !important;
    border-radius: var(--shape-md) !important;
}

.punbb .post-sig dt { display: block; width: 70%; height: 1px; margin: 10px auto; border: 0; }
.punbb .post-content p { margin: 0; padding: 0 0.7em 0.8em 0; line-height: 150%; font-size: 1.1em; }
.punbb .post-content img { vertical-align: text-bottom; }
.punbb .post-content img.postimg { margin: 0.2em 0 !important; vertical-align: middle; width: auto; max-width: 100%; height: auto; }

.punbb .post-content .blockcode, .punbb .post-content blockquote { width: 100%; overflow: hidden; }
.punbb .post-content .scrollbox { width: 100%; max-height: 190px; overflow: auto; }
.punbb .post-content .quote-box, .punbb .post-content .code-box { margin: 0.5em 0.8em 0.9em 0.8em; padding: 1em 1.2em; }

.punbb .quote-box, .punbb .code-box { border-radius: var(--shape-md) !important; }
.punbb textarea, .punbb input, .punbb select { border-radius: var(--shape-sm) !important; }
input[class="button"], input[type="button"] { border-radius: var(--shape-md) !important; cursor: pointer; }
*::-webkit-scrollbar-thumb { border-radius: 6px !important; }

.punbb .quote-box cite, .punbb .code-box strong.legend {
    display: block;
    margin: auto auto 8px auto;
    padding: 0 1.05em 0.5em 1.05em;
    font-weight: 600;
    font-style: normal;
    font-size: 1.1em;
    text-align: left;
}

.post-box { text-align: justify; }

/* --- ИНФОБОКСЫ И ПАГИНАЦИЯ --- */
.punbb .info-box { margin: 0 0 1.1em 0; padding: 1.1em 1.7em 1em 1.7em; border: none; }
.punbb .info-box * { padding: 0 0 0.7em 0; }
.punbb #pun-main .info-box .legend { font-size: 1.1em; font-weight: bold; }

.multipage { background: transparent; }
#pun-main .linkst, .punbb .linksb { width: 100%; font-family: Tahoma, sans-serif; }

.linkst .pagelink, .linksb .pagelink { display: inline-block; width: 20em; margin: 0.2em auto; padding: 0.5em; font-size: 1.1em; }
.linkst .postlink, .linksb .postlink { float: right; display: inline-block; width: 18em; margin: 0.2em auto; padding: 0.5em; font-weight: 700; font-size: 1.1em; text-align: right; }
.linkst .pagelink strong, .linksb .pagelink strong { padding: 0 0.2em; font-weight: 700; }

.subscribelink { clear: both; padding: 0.3em 0 0.5em 0; }
.punbb .linksb .subscribelink { font-size: 11px !important; text-align: center; }

/* --- ТАБЛИЦЫ --- */
.punbb .main .tcl { overflow: hidden; width: 56%; vertical-align: middle; text-align: left; }
#pun-online .main .tcl { padding: 6px 0 6px 30px; text-align: left; }
.punbb .main .tc2, .punbb .main .tc3, .punbb .main .tcmod { text-align: center; width: 8%; font-family: Tahoma, Verdana, sans-serif; }
.punbb .main .tcr { overflow: hidden; width: 28% !important; text-align: center; }

#pun-index #pun-main .tcl { width: 54% !important; padding-right: 0; overflow: hidden; text-align: left; }
#pun-index #pun-main .tcr { width: 30% !important; vertical-align: middle; text-align: center; }
#pun-index #pun-main thead { display: none; }

.punbb .main td { padding: 0.8em 0.6em; border: none; }
.punbb .main th { padding: 0.4em 1em; border: none; }
.punbb div.icon { float: left; display: block; width: 22px; }

/* =========================================================
   НАВИГАЦИЯ — ЕДИНСТВЕННАЯ ЗАКРЕПЛЁННАЯ ЧАСТЬ (тонкая полоса)
   ========================================================= */

#pun-navlinks {
    position: sticky;
    top: 0;
    z-index: 190;
    box-sizing: border-box;
    width: calc(100% + 32px);
    margin: 0 -16px;
    padding: 0 0 8px 0;
    text-align: center;
}

/* Линия прогресса прокрутки (Chrome, Edge, Safari; в остальных просто не видна) */
#pun-navlinks::after {
    content: "";
    position: absolute; left: 14px; right: 30px; bottom: 10px;
    height: 2px; border-radius: 2px;
    background: var(--progress);
    transform: scaleX(0); transform-origin: left center;
    pointer-events: none;
}
@supports (animation-timeline: scroll()) {
    #pun-navlinks::after { animation: kn-progress linear both; animation-timeline: scroll(root); }
}
@keyframes kn-progress { to { transform: scaleX(1); } }


#pun-ulinks { width: 100%; margin: auto; padding: 0 1em 20px 1em; text-align: center; background: transparent; }

#pun-navlinks .container, #pun-ulinks .container {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap;
    margin: auto;
    background-color: transparent;
}

#pun-navlinks .container {
    height: var(--nav-h);
    border-radius: 0 0 28px 6px;
    font-family: Romul, Arial, sans-serif;
    font-size: 14px;
}
#pun-ulinks .container { font-size: 11px; font-family: Tahoma, Arial, sans-serif; }

#pun-navlinks li { padding-right: 1.5em; }
#pun-navlinks li:last-child { padding-right: 0; }
#pun-navlinks li a { letter-spacing: 0.03em; }

#pun-ulinks li, #pun-ulinks li a { border: none; white-space: nowrap; }
#pun-ulinks li a { padding: 0 0.9em 0 0; }

/* УБИРАЕМ ЛИШНЕЕ */
.lastedit, li#navawards, .pl-share, .sharelink, .pa-invites, #pun-live-rusff, .pa-gifts, #pun-main div.catleft, #pun-main div.catright { display: none; }

/* СКРОЛЛБАР */
*::-webkit-scrollbar { width: 8px; height: 8px; background: rgba(0,0,0, 0.1); }
*::-webkit-scrollbar-thumb { background: #44585d; }

/* =========================================================
   РАЗДЕЛИТЕЛИ И УКРАШЕНИЯ
   ========================================================= */

/* Между разделами: ряд звёзд и широкая лента-заголовок */
.punbb .category { position: relative; margin-top: 1.9em; }
.punbb .category::before {
    content: "\2726\00a0\00a0\2727\00a0\00a0\2726";
    display: block; margin: 0 0 .7em;
    font-size: 11px; letter-spacing: .4em; text-align: center;
}
.punbb #pun-category1::before { display: none; }

.punbb .category > h2 {
    margin: 0 0 .5em; padding: .6em 1.4em;
    border-radius: var(--shape-md);
    font-size: 1.25em; font-weight: 700; letter-spacing: .04em;
}

/* Между форумами и темами: тонкая линия с жемчужиной посередине */
.punbb .main tbody tr {
    background-size: 100% 9px, 100% 1px;
    background-position: center bottom, center bottom;
    background-repeat: no-repeat;
}

/* Уголки-искры на блоках */
.post-author, .punbb .quote-box, .punbb .code-box, .punbb .info-box { position: relative; }
.post-author::after, .punbb .quote-box::after, .punbb .code-box::after, .punbb .info-box::after {
    content: "\2726";
    position: absolute; top: -8px; right: -4px;
    font-size: 16px; line-height: 1; pointer-events: none;
}
#tags > [id$="-area"] {
    z-index: 500 !important;   /* поверх шапки и верхней панели */
    box-sizing: border-box;
    padding: 8px;
    border-radius: var(--shape-md);
}

/* =========================================================
   KONTON v8 
   (стоит в конце, чтобы перекрывать прежние правила)
   ========================================================= */

/* --- Шрифт логотипа: прямой, не курсивный --- */
#kn-header a.kn-logo {
    font-family: 'Cinzel', 'Comfortaa', serif;
    font-weight: 700;
    font-size: 52px;
    letter-spacing: .06em;
}

/* --- Шрифт верхней панели (Форум, Участники, Поиск…): как на всём форуме --- */
#pun-navlinks .container {
    font-family: 'Comfortaa', Verdana, Arial, sans-serif;
    font-size: 13px;
    font-weight: 700;
}

/* --- Якорные переходы не прячутся под двумя закреплёнными панелями --- */
html, body { scroll-padding-top: calc(var(--nav-h) + 64px); }

/* =========================================================
   ВТОРАЯ ЗАКРЕПЛЁННАЯ ПАНЕЛЬ: Активные темы, Ответы, Мои сообщения…
   Прилипает сразу под первой. Если между панелями видна щель или
   нахлёст — подправьте число 7px (высота первой панели = --nav-h + 8px).
   ========================================================= */
#pun-ulinks {
    position: sticky;
    top: calc(var(--nav-h) + 7px);
    z-index: 189;
    box-sizing: border-box;
    width: calc(100% + 32px);
    margin: 0 -16px;
    padding: 2px 16px 10px;
    background: var(--c-nav-backdrop);
}

#pun-ulinks .container {
    flex-wrap: wrap;
    gap: 6px;
    padding: 5px 8px;
    border: 1px solid var(--c-border);
    border-radius: var(--shape-md);
    background: linear-gradient(90deg, #f6ecff, #ffeaf5 50%, #f6ecff) !important;
    box-shadow: 0 2px 8px rgba(160, 110, 220, .15);
    font: 700 11px/1.2 'Comfortaa', Tahoma, Arial, sans-serif;
}

#pun-ulinks li { margin: 0; padding: 0; }

#pun-ulinks li a {
    display: inline-block;
    padding: 5px 11px;
    border: 1px solid #ecd3ee;
    border-radius: var(--shape-sm);
    background: rgba(255, 255, 255, .88);
    letter-spacing: .02em;
    transition: background .2s ease, border-color .2s ease;
}

#pun-ulinks li a:hover {
    color: #ffffff !important;
    border-color: #ffffff;
    background: linear-gradient(90deg, #b88ae8, #ef7fbd);
}

/* KONTON v9 — верхние закреплённые панели компактнее */
#pun-navlinks { padding-bottom: 4px; }
#pun-navlinks::after { bottom: 6px; }
#pun-ulinks { top: calc(var(--nav-h) + 3px); padding: 0 16px 6px; }
#pun-ulinks .container { padding: 3px 8px; gap: 5px; }
#pun-ulinks li a { padding: 3px 10px; }
html, body { scroll-padding-top: calc(var(--nav-h) + 50px); }