html,
body,
#pun,
.punbb {
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background-size: contain;
    -webkit-text-size-adjust: none;
    overflow-wrap: break-word;
    float: none;
    border: none;
}

body {
    position: relative;
    overflow: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    overflow-y: auto !important;
    z-index: 1;
    background-size: cover;
    background: #271e15;
    background-blend-mode: normal;
}

html td, html th {
        padding: 8px;
    }


::-webkit-scrollbar {
    width: 0px;
    height: 0px;}

body #pun {
    background: url(https://forumstatic.ru/files/001c/bf/08/60673.png) no-repeat top center, url(https://forumstatic.ru/files/001c/bf/08/38483.png) repeat;
}

.punbb .main td {
    padding: 0;
}

#pun-ulinks .container, 
body #pun #pun-navlinks .container {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    box-sizing: border-box;
    gap: 8px;
}

body #pun #pun-navlinks .container {
        position: fixed;
        z-index: 2000;
        justify-content: flex-end;
        border-radius: 0 0 var(--bd-radius-small) var(--bd-radius-small);
        box-sizing: border-box;
        width: 100%;
        gap: 16px;
        padding: 1em 1em;
        top: 0;
        border-width: 0 0 1px;
}

#toggle-mobile-style {
    position: fixed;
    z-index: 2001;
    top: 13px;
    left: 10px;
    background: var(--bg-gradient);
    border: none;
    font-size: 14px;
    border-radius: var(--bd-radius-micro);
    color: var(--text-main);
    font-weight: normal;
}

body #pun .custom-audio-player, 
body #pun .postopiscy, 
body #pun .best-post, 
body #pun .fludery, 
body #pun .best-ep {
    display: none;
}

body #pun #html-footer, 
body #pun #banners {
    width: 100%;
}

#html-footer .banners_wrap {
    width: 100%;
}

body #pun #pun-main .category > div > table {
    position: relative;
    margin-left: 0px;
    width: auto;
}

body #pun #pun-main .category > div > table::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: -152px;
    width: 0px;
}

body #pun #pun-main .category td.tcl {        padding: 16px 16px 0px 16px;}

body #pun .category td.tcl, 
body #pun #pun-searchtopics td.tcl {
    width: 100% !important;
}

#pun-index td.tcr {
    width: 100%;
}

.category tr {
    display: flex;
    align-items: center;
    border-bottom: 1px solid #D1CDC5;
    flex-direction: column;
}


.punbb div.icon, .fsbox {
    width: 16px;
    height: 16px;
    background-size: contain;
}

.forum .intd, .usertable .intd {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
}

.fs-box .intd {
        display: flex;
        align-items: flex-start;
        flex-direction: row;
    }
    
body #pun .fs-box .user-avatar,
body #pun  .avatar-image,
body #pun #pun-index .user-avatar {
    height: 24px !important;
    width: 24px !important;
}

body #pun #pun-index td.tcr {
    grid-template-columns: 24px minmax(0, 1fr) !important;
    gap: 0px 6px !important;
}

body #pun #pun-index td.tcr {
    gap:0px;
}

#pun-main .category, 
#pun-stats {
    padding: 8px 10px 10px 10px;
}

body #pun.category .forum-header-row td.tc2 {
    margin-right: 12px;
}

body #pun .forum .user-avatar {display:none;}
body #pun .forum .tcl{width:60%;}
body #pun .forum .tcr {width:40%; text-transform:uppercase; font-size: 10px;}

body #pun.punbb h2 span, 
body #pun #pun-stats > h2 > span:before {
    font-size: 20px;
}

.go-up, 
.go-down {
    display: none !important;
}

.punbb .post .container {
    display: flex;
    flex-direction: column;
}

body #pun .punbb .post .post-author {
    display: flex;
    width: 93%;
    margin-top: 0;
    margin: 12px;
}

body #pun .punbb .post-body {
    margin-left: 0 !important;
}

body #pun .punbb .post-box {
    padding: 1em 1em;
}

body #pun .punbb .post h3 span {
    margin-left: 12px;
}

body #pun .linkst, .linksb {
    font-size: .9em;
}

/* 1. Главный контейнер автора */
.post-author ul { 
    display: grid !important;
    grid-template-columns: 110px 1fr 1fr;
    grid-template-rows: max-content max-content 1fr;
    grid-template-areas:
        "avatar author author"
        "avatar title title"
        "avatar posts respect"
        "avatar fld3 fld2";
    gap: 8px 12px;
    padding: 15px;
    border-radius: 12px;
    box-sizing: border-box;
    position: relative;
    list-style: none;
    margin: 0;
        width: 100%;
}

/* 2. Зоны авторов */
body #pun .pa-avatar {
    grid-area: avatar;
    align-self: center;
    min-width: 100px;
}

body #pun .pa-avatar img {
    max-width: 100px;
    max-height: 100px;
    height: auto;
    border-radius: 10px;
    display: block;
    object-fit: cover;
}

body #pun .pa-author {
    grid-area: author;
    background: transparent;
    border-radius: 20px;
    text-align: center;
    align-self: end;
    margin-top: 0;
    margin-bottom: 0;
    border: none;
    padding: 0 !important;
}

.pa-author a {
    color: #ffffff;
    font-weight: bold;
    text-transform: uppercase;
    text-decoration: none;
    font-size: 14px;
}

.pa-author .acchide {
    display: none;
}

.post-author .pa-fld5 {display:none;}

.pa-title {
    grid-area: title;
    text-align: center;
    font-size: 12px;
    color: #444;
    margin-top: 4px;
    align-self: start;
    padding: 0 !important;
}

.pa-posts { grid-area: posts; }
.pa-respect { grid-area: respect; }
.pa-fld3 { grid-area: fld3; }
.pa-fld2 { grid-area: fld2; }

.pa-posts, 
.pa-respect, 
.pa-fld3, 
.pa-fld2 {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    font-size: 13px;
    color: #333;
    width: 60px !important;
}

.fld-name {
    display: block;
    font-size: 0;
}

.pa-posts .fld-name::before {
    content: "&#9993;";
    font-size: 20px;
    color: #00796b; 
}

.pa-online {
    position: absolute;
    top: 9px;
    left: 12px;
    width: 10px;
    height: 10px;
    background-color: #3c3939;
    border-radius: 50%;
    font-size: 0 !important;
    z-index: 10;
}

.post-author .online .pa-online {
    background-color: #ebe8db;
    box-shadow: 0 0 3px 2px #a3906e;
}

body #pun .pa-fld1, 
body #pun .pa-fld2, 
body #pun .pa-fld4, 
body #pun .pa-ip {
    display: none;
}

/* Навигация */
#pun-navlinks .container > li > a > span {
    font-size: 0 !important;
    display: inline-block;
}

#pun-navlinks .container > li > a {
    text-align: center;
    font-size: 16px;
}

#navindex > a > span::before {
    content: "\f015";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 16px;
}

#navuserlist > a > span::before {
    content: "\f0c0";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 16px;
}

#navsearch > a > span::before {
    content: "\f002";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 16px;
}

#navprofile > a > span::before {
    content: "\f007";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 16px;
}

#navpm > a > span::before {
    content: "\f0e0";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 16px;
}

#navadmin > a > span::before {
    content: "\f013";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 16px;
}

#navprofiles > a > span::before {
    content: "\f2bd";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 16px;
}

#navlogout > a > span::before {
    content: "\f08b";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 16px;
}

#pun-navlinks li {
    display: inline;
    padding-right: 0;
}

#pun-ulinks .container {
    background: var(--bg-texture-dark);
    border: 1px solid var(--bd-main);
    border-radius: var(--bd-radius-small);
    margin-top: 221px;
    margin-left: auto;
    margin-right: auto;
}

#pun-ulinks li, 
#pun-ulinks li a {
    font-size: 10px;
    padding: 0;
}

body #pun #html-footer {
    position: absolute;
    bottom: -123px;
    margin-left: 0px;
}

.hello {
    font-size: 9px;
    top: 99px;
    width: 41%;
    text-align: center;
    left: 90px;
}

.shapka-logo {
    display: block;
    width: 100%;
    height: 113px;
    background: url(https://forumstatic.ru/files/001c/bf/08/73932.png) no-repeat top center;
    position: absolute;
    top: 100px !important;
    background-size: contain;
}

.forum tr .tc2, 
.forum tr .tc3 {
    display: none;
}


#pun-viewforum .punbb tbody.hasicon td.tcl,
#pun-searchtopics .punbb tbody.hasicon td.tcl {
    width: 100%;
    padding: 0px !important;
}

.forum tr {
    flex-direction: row;
    gap: 0px;
    margin: 8px;
    padding: 8px;
}

.punbb tbody.hasicon td.tcl {    
    width: 100%;
    padding: 6px;
}

body #pun .forum tr td.tcl, 
body #pun .forum tr .tcl span {
    min-width: 0;
    max-width: 100%;
    flex: 1;
    overflow: hidden;
}

.forum .icon,
#pun-searchtopics .icon {    
    flex-shrink: 0;
}

#viewprofile table {
    display: flex;
    grid-auto-flow: row;
    flex-direction: column;
}

#viewprofile table tr {
    width: 100%;
    display: flex;
    flex-direction: column;
}

#viewprofile #profile-left {
    display: flex;
    width: 100%;
    flex-direction: column;
    align-content: center;
    align-items: center;
}

#viewprofile #profile-right {
    gap: 6px;
    width: 100%;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
}

#viewprofile #profile-right li {
    background: var(--bg-tertiary);
    border-radius: var(--bd-radius-small);
}

#viewprofile li {
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
    padding: 6px;
    text-align: center;
    flex-grow: 1;
    justify-content: center;
}

#viewprofile li span,
#viewprofile li strong {
    width: auto;
    padding: 0 !important;
}

#profile-right li strong {
    padding-left: 1em;
}

#viewprofile .container {
    padding: 0;
}

#viewprofile li span {
    margin-left: 0;
}

body #pun #profilenav {
    margin: 0;
    width: 100%;
}

body #pun #profile form.container {
    padding: 0;
    display: flex;
    flex-direction: column;
    margin-top: 10px;
}

#profilenav ul {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

#profilenav li {
    display: flex;
    background: var(--bg-tertiary);
    border-radius: var(--bd-radius-micro);
    padding: 4px;
    flex-grow: 1;
    text-align: center;
    justify-content: center;
}

#profilenav li.isactive {
    background: var(--bg-quaternary);
}

.punbb fieldset legend {
    margin: 0 0 11px -2px;
}

.punbb fieldset legend span {
    margin: 0;
}

#profile p.formsubmit {
    align-items: flex-start;
    flex-direction: column;
    justify-content: space-between;
    width: 90%;
}

body #pun #pun-status .item3, 
body #pun #pun-status .item4, 
body #pun #pun-status .item2 {
    display: none;
}

#pun-stats .container {
    padding: 12px;        font-size: 11px;
}

body #pun #pun-about {
    height: unset;
}

.banners_wrap {
    height: 69px;
    overflow-y: scroll;
}

.punbb .formal .container {
    padding: 0;
}

.editor-top-row-wrapper {
    flex-wrap: wrap;
    width: 100%;
    justify-content: flex-end;
}

#form-buttons table tr {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}

#post-form .formsubmit {
    padding: 0 1em;
    margin: 1em 0 0 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    width: unset;
}

/* Ссылки в посте */
.post-links ul {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.post-links .pl-email.profile { order: 1; }
.post-links .pl-email.pm { order: 2; }
.post-links .pl-email.email { 
    order: 3; 
    margin-right: auto; 
}

.post-links .pl-delete { order: 4; }
.post-links .pl-edit { order: 5; }
.post-links .pl-quote { order: 6; }
.post-links .pl-reports { order: 7; }

.post-links ul li a {
    font-size: 0 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    background-color: transparent;
    transition: background-color 0.2s ease;
}

.post-links ul li a:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.post-links ul li a::before {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 14px;
    color: #555;
}

.post-links .pl-email.profile a::before { content: "\f007"; }
.post-links .pl-email.pm a::before { content: "\f0e0"; }
.post-links .pl-email.email a::before,
#pun-messages .post-links .pl-email.email a::before { content: "\f1fa"; }
.post-links .pl-delete a::before { content: "\f2ed"; }
.post-links .pl-edit a::before { content: "\f044"; }
.post-links .pl-quote a::before { content: "\f10e"; }
.post-links .pl-reports a::before { content: "\f071"; }

.punbb .post-links li {
    padding-left: 0 !important;
    background: #aaa4988a;
    border-radius: var(--bd-radius-small);
}

.online-list table {    font-size: 11px;}
body #pun .online-list table,
body #pun .online-list tbody {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
body #pun .online-list table {   padding: 6px;}
body #pun .online-list .tcl {    width: 20%;}

#pun-modviewforum tr, 
#pun-searchtopics tr, 
#pun-userlist tr, 
#pun-statistic tr, 
#pun-respect tr, 
#pun-positive tr {
    display: flex;
    flex-wrap: wrap;
    background: var(--bg-tertiary);
    margin-bottom: 8px;
    border-radius: var(--bd-radius-small);
    gap: 0px;
}

#pun-userlist tr {padding:12px;} 
#pun-userlist tr td,
#pun-userlist tr th {
        box-sizing: border-box;
    }
body #pun #pun-userlist tr .username {
        width: 40%;
    }
body #pun #pun-userlist tr .title,
body #pun #pun-userlist tr .user_title {
        width: 60%;
    }
body #pun #pun-userlist tr .relation,
body #pun #pun-userlist tr .posts,
body #pun #pun-userlist tr .num_posts {
        width: 20%;
        flex-grow: 1;
    }
body #pun #pun-userlist tr .registered,
body #pun #pun-userlist tr .last_visit {
        width: 30%;
        flex-grow: 1;
        text-align: left;
    }
body #pun #pun-userlist tr .relation,
body #pun #pun-userlist tr .posts,
body #pun #pun-userlist tr .num_posts {
        text-align: left;
    }

body #pun #pun-modviewforum td, 
body #pun #pun-searchtopics td, 
body #pun #pun-userlist td, 
body #pun #pun-statistic td, 
body #pun #pun-respect td, 
body #pun #pun-positive td {
    width: unset;
}

body #pun #pun-respect table {
    margin: 12px;
    width: unset;
}

#pun-respect .tc4, 
html #pun-positive .tc4 {
    flex-basis: 50%;
}

body #pun #pun-userlist tr .title, 
html body #pun #pun-userlist tr .user_title {
    width: 60%;
}

#pun-userlist .usertable .container {
    padding: 12px;
}

body #pun ft {
    text-align: justify;
    line-height: 140%;
    display: block;
    font-weight: 300;
    margin-top: 3px;
    font-size: 8px;
}

.category .forum-header-row h3 a {
    font-size: 16px;
}

body #pun .hasicon tr:first-child td.tcl {
    border-top-left-radius: var(--bd-radius-small);
    border-top-right-radius: var(--bd-radius-small);
    overflow: hidden;
}

body #pun .hasicon tr:last-child td.tcr {
    border-bottom-left-radius: var(--bd-radius-small);
    border-bottom-right-radius: var(--bd-radius-small);
    overflow: hidden;
}

#pun-main .category table {
    border-radius: var(--bd-radius-small);
}

html #pun-messages div:not(#form-buttons) > table tr {
    display: flex;
    align-items: center;
    flex-flow: wrap;
    background: var(--bg-tertiary);
    margin-bottom: 8px;
    padding: 8px;
    border-radius: var(--bd-radius-small);
}

body #pun #pun-messages .tcl.pmtcl1 {
    box-sizing: border-box;
    width: 100% !important;
    text-align: left;
    padding: 0;
}

body #pun #pun-messages .tc2.pmtc22 {
    box-sizing: border-box;
    width: 50% !important;
    text-align: left;
}

body #pun #pun-messages .tc3.pmtc33 {
    box-sizing: border-box;
    width: 40% !important;
    text-align: left;
    padding: 4px;
}

body #pun #pun-messages .post-links ul li a {
    font-size: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
}

body #pun #pun-messages .post-links ul li a::before {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 14px;
    color: inherit;
}

body #pun #pun-messages .post-links .pl-email a::before,
body #pun #pun-messages .post-links .email a::before {
    content: "\f1fa";
}

#pun-messages .post-links .pl-email {
    margin-right: auto;
}

body #pun #pun-messages .post-box {
    padding: 0;
}

body #pun #pun-messages .post-author {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
}

body #pun .category .forum-header-row .tc2,
body #pun .category .forum-header-row .tc3 {
    display: none;
}

body #pun .formal #image-area,
body #pun .formal #spoiler-area,
body #pun .formal #table-area,
body #pun .formal #video-area {
    padding: 1.5em;
    box-sizing: border-box;
    position: absolute;
    right: unset;
    top: 80px;
    z-index: 2;
    width: 99%;
}

body #pun .formal #keyboard-area {
    padding: 1.5em;
    box-sizing: border-box;
    position: absolute;
    right: unset;
    top: 118px;
    z-index: 2;
    width: 99%;
    display: flex;
    flex-wrap: wrap;
}

body #pun .hotkeys_help {
    display: none;
}

#announcements {
        width: 100%;
}

/*новости*/

.novosti:before {
    width: 63px;
    height: 83px;
    background-size: cover;
}

body #pun .novosti {
    padding: 13px 15px 13px 15px;
}

body #pun .targ-title {
    left: 0;
    top: 0;
    margin-left: 57px;
    margin-bottom: 14px;
}

body #pun .targ-title p{
    font-size: 9px !important;
}

body #pun .targ-body {
    margin: 16px 0px;
    padding: 16px;
    font-size: 11px;
    height: 450px;
    overflow-y: scroll;
}

body #pun .news-episode {
    margin: 0px;
    padding: 16px;
    font-size: 11px;
    height: 250px;
    overflow-y: scroll;
}

body #pun .news-activists {margin:0;}

.news-flood a, .news-posts a {
    font-size: 13px;
}

/*сюжет*/
body #pun .plot-body {
    font-size: 1.1em;
    height: 500px;
    overflow-y: scroll;
    padding: calc(100% - 95%);
}

/* гостевая*/
.guest-template-container {
    width: 100%;
    height: auto;
    padding: 16px;
}

.guest-column-container {
    display: flex;
    height: auto;
    flex-direction: column;
}

.guest-description {
    height: auto;
}

body #pun .guest-template-image {
    margin-left: 18px;
    margin-top: -7px;
}

body #pun .guest-description {
    margin-top: 95px;
}

/*список ролей*/
body #pun .role-section-box.full-width-section::before {
    width: 60px;
    height: 80px;
    background-size: contain;
}

body #pun .roles-list-grid {
    display: flex;
    flex-direction: column;
    gap:8px;
}

body #pun .role-section-box.full-width-section h2 {
    font-size: 17px;
    width: auto;
    margin-left: 53px;
    margin-bottom: 0px;
}

body #pun .role-two-columns {
    display: flex;
    flex-direction: column;
    margin-left: 0;
    width:auto;
}

body #pun .roles-list-king {
    margin-left: 0;
    width: auto;
}

.role-section-box {
    padding: 16px;
}

.role-section-box .role-section-title {
    margin-bottom:12px;
}


html, body {
    overflow-x: hidden;
    max-width: 100%;
}