/*** MOBILE ***/
@media screen and (max-width: 660px) {
body {font-size:18px;}
#pun {width:100%; max-width: 660px; min-width:320px;}
.punbb input, .punbb optgroup {width:100%; min-width: 10px;}
.punbb select, .checkfield input[type="checkbox"], .radiofield input[type="radio"] {width:auto;}
#viewprofile-next #pa-edit a, input[class="button"], input[class="button submit"], input[type="button"], input[type="submit"], .button {width:auto;}
#pun #pun-status .status-right, .punbb .main thead {display:none !important;}
.linkst .pagelink, .linksb .pagelink {width:auto;}
.linkst .pagelink a, .linksb .pagelink a {margin:auto 6px;}
legend {line-height:140%;}

/* шапка */
#pun-title table {width:100%;}
#pun_wrap:before {display:none;}
.circav {letter-spacing:10px; top:-108px; margin-left:128px !important; font-size:34px;}
.circav em {margin-left:0px; text-align: right;}
#on_OfMobile {top: 16px; left: 10px;}

/* навигация */
#pun-navlinks {margin: -2px -12px 6px 104px;}
#pun-navlinks .container {justify-content: space-evenly;}
#pun-navlinks li a span {font-size:0px;}
#pun-navlinks li a:before {font-size:18px;}
#pun-navlinks li#navadmin a:before {content: "\f013"; font-family: 'icomoon', 'fontawesome';}

#pun-ulinks {text-align:center; padding:6px 0 0; margin: auto; width: auto; height:18px;}
#pun-ulinks .container {flex-direction: column; flex-wrap: nowrap; position: relative; border: 1px solid #70583f; box-shadow: 0px 2px 6px 1px #000; background: url(//forumstatic.ru/files/001b/c3/51/59311.png) 50% 0% repeat; background-color: var(--main-bg-color);}
#pun-ulinks:before {content: ' '; margin: auto; font-size: 14px; font-family: Trajan, Tahoma, sans-serif; font-weight: 400; text-transform: lowercase; color: var(--bgpuna); text-shadow: 0 0 1px var(--main-bg-color); cursor: pointer;}
#pun-ulinks ul {position: absolute; top: 4px; width:92%; margin-left:4%; z-index: 10; padding: 6px 8px; text-align:center;
-webkit-transition: 0.3s ease-in-out; -moz-transition: 0.3s ease-in-out; transition: 0.3s ease-in-out; -webkit-transform: scaleY(0); -ms-transform: scaleY(0); transform: scaleY(0); -webkit-transform-origin: 0 0; -ms-transform-origin: 0 0; transform-origin: 0 0;
}
#pun-ulinks:hover ul {-webkit-transform: scaleY(1); -ms-transform: scaleY(1); transform: scaleY(1);}
#pun-ulinks li {padding-right: 0; margin:auto 0px;}
#pun-ulinks ul li a {border-bottom: 1px solid var(--brd2); padding: 6px 0px; margin: 3px 0px 0px; display: block; font-size: 14px; font-weight:600;}
#pun-ulinks ul li:last-child a {margin-bottom: 0px; border-bottom:0px solid transparent;}
#pun-ulinks li:nth-child(3), #pun-ulinks li.item5 {display: none;}

/* объявление */
blok2 {display:none;}
#cherdak {grid-template-columns: 1fr; grid-template-rows: auto auto; row-gap: 10px; margin: 10px 0px;}
blok1 {grid-row: 1 / 2;}
blok3 {grid-column:1 / 2; grid-row: 2 / 3;}
.dropdown {margin-top: 10px;}
novosti {max-height: 60px;}

/* убираем сообщения и темы */
#pun-index #pun-main .tc2, #pun-index #pun-main .tc3 {display:none !important;}

#pun-index .category table tr {display:grid; grid-template-columns: 1fr; grid-template-rows: auto auto;}
#pun-index #pun-main .tcl, #pun-index #pun-main .tcr {width:100% !important; grid-column:1 / -1;}
#pun-index #pun-main .tcl {grid-row:1 / 2;}
#pun-index #pun-main .tcr {grid-row:2 / 3; padding: 0 0 10px;}

#pun-searchtopics .main .tc2, #pun-searchtopics .main .tc3 {display:none;}
#pun-searchtopics .main .tcl, #pun-searchtopics .main .tcr {width:100% !important; display:block; box-sizing: border-box;}
#pun-searchtopics .main .tcr {padding-left: 42px; padding:0 0.6em 14px 0.4em; text-align: right;}
#pun-searchtopics .user-avatar {float:right; margin:-4px 0px 2px 12px !important;}

#pun-online .tcl.username, #pun-online .tcl.action {padding-left:4px;}
#pun-online .tcl.action {width:36% !important;}
#pun-online .main .tc3 {width:18% !important;}

/* статистика */
#pun-stats .container {padding:0.8em 4px 0;}

/* участники */
.punbb .formal .container {padding: 1em 0em;}
#pun-userlist .usertable .container {padding:1em 0.3em 1.3em 0.3em;}
#pun-userlist td.tc3 {width:10%;}

/* подвал, закладки */
td.user_title, #pun-userlist .relation, #pun-userlist .posts, #pun-userlist .num_posts, #podval, #BookmCntToggle, #MyBookmarks {display:none  !important;}

/* посты */
.punbb .post .container {margin:auto;}
.punbb .post-body {margin-left: 0em;}
.punbb .post-box {padding:12px 0em 0.8em 0em;}

/* фикс для таблиц в постах */
#pun .post .post-content td {display:block; width:100% !important;}
#pun .post .post-content dl.post-sig td {display:table-cell;}

.post-author {--authp:14px; width:100%; float:none !important; text-align:left;}
.post-author li {display:none;}
.post-author li.pa-author, .post-author li.pa-title, .post-author li.pa-avatar, .post-author li.pa-respect {display:block;}
.post-author ul:hover li.pa-fld1 {display:block;}
.post-author li.pa-author {padding: 9px 76px 7px var(--authp) !important;}
.post-author li.pa-title {padding-right:60px !important;}
.post-author li.pa-respect {width: 100%;}
.pa-posts .fld-name, .pa-respect .fld-name {display:inline-block; margin-bottom:0px; margin-right:6px;}

.post-author li.pa-avatar {margin: auto; padding-right: 0px; position: absolute; top: 10px; right:8px; width:auto;}
.post-author li.pa-avatar img {object-fit: cover; width: 60px; height: 60px;}
#pun-messages .post-author li.pa-avatar img {object-fit:cover; width:50px; height:50px; margin-top:6px;}

/* индикатор онлайн */
.post-author.online .pa-author:before {display:inline-block; content:''; width: 8px; height: 8px; border-radius:50%; background:#5d9234; box-shadow: inset 0 -1px 2px #000; transform: translateY(-25%); margin-right:8px;}

/* ссылки редактирования поста */
.punbb .post-links ul {padding:0px;}
.punbb .post-links li {padding-left: 0em;}
.post-links li {padding: 0px 6px;}
#pun .post-links li a {font-size:0px; text-shadow:none !important;}
.post-links li a:before {overflow: hidden; display: inline; font-family: 'icomoon', 'fontawesome'; font-size: 16px;}
.post-links li.pl-email.profile a:before {content: "\e91b";}
.post-links li.pl-email.pm a:before {content: "\f0e0";}
.post-links li.pl-email.email a:before {content: "\f003";}
.post-links li.pl-website.website a:before {content: "\f0c1";}
.post-links li.pl-delete a:before {content:"\f1f8";}
.post-links li.pl-edit a:before {content:"\f040";}
.post-links li.pl-quote a:before {content:"\f0e5";}
.post-links li.pl-reports a:before {content:"\f188";}

/* теги поля ответа */
#form-buttons tr {display: grid; grid-template-columns: repeat(auto-fit, minmax(26px, 1fr)); grid-template-rows: auto; gap: 6px 6px;}
#tags .container {position:static !important;}
#smilies-area, #image-area, #video-area, #spoiler-area, #pun_wrap #post .container[id$="-area"], #tags .container {width: 100%;}

#profile-right, #profile-left {display:block; width:100% !important;}
#viewprofile li, #setmods dl {padding:0;}
#setmods dt {float: none; display: block; width: auto; margin-left: 1.8em; padding: 0.2em 1em;}
#viewprofile li span {margin-left:0em; width: auto; display: block; float: none; text-align: left;}
#profile .container {padding-left: 0em;}
#profilenav {float: none; display: block; width: 100%; margin-left:0em; margin-bottom:8px;}
#profilenav li {display:inline-block;}

#pun-messages #profile fieldset {padding:0 4px;}
#pun-messages Div.icon {margin: 0px;}
#pun-messages .main .tcl .tclcon {margin-left: 28px;}
#pun-messages .main td.pmtc33 {display:none}
#pun-messages .main td {display: block; width: 100% !important;}
#pun-messages .main td.pmtcl1 {padding:6px 0 0 0; border-top:1px solid rgba(139, 108, 78, 0.2); }
#pun-messages .main td.pmtc22 {display:inline-block; width:calc(100% - 30px) !important; text-align:right; padding:6px 0 12px 0;}
#pun-messages .user-avatar {float:right; margin: -4px 4px 2px 12px !important;}
#pun-messages .main td.pmtc24 {display:inline-block; width:20px !important; float: right;}

#pun-viewforum .main td.tc2, #pun-viewforum .main td.tc3 {display:none;}
#pun-viewforum .main .tcl, #pun-viewforum .main .tcr {width:100% !important; display:block; box-sizing: border-box;}
#pun-viewforum .main .tcr {padding-left: 42px; padding:0 0.6em 14px 0.4em; text-align: right;}
#pun-viewforum .user-avatar {float:right; margin:-4px 0px 2px 12px !important;}
#pun-viewforum Div.icon {margin-left:4px;}
#pun-viewforum .main .tcl .tclcon {margin-left:30px;}
.go-up, .go-down {margin-left:calc(100% - 36px) !important;}
}

@media screen and (max-width: 540px) {
#OnOff_Notify {width:auto;}

/*** mobile админка ***/
div#pun-adnav {clear:both; width:100%; margin-left: auto; display:block; float:none;}
#pun-adnav ul {display: flex; flex-wrap: wrap; flex-direction: row; background:var(--lightpun);}
div.adcontainer {background-color: var(--lightpun); padding:0 16px;}
div.adminmain {padding-left: 0; margin: auto -30px 1em;}
.punbb-admin #pun-navlinks a, .punbb-admin #pun-navlinks li#navadmin span:before {font-size:0px; margin: 0px;}
.punbb-admin #pun-navlinks li {padding:0;}
#pun-admain span[class="adinput"] input, #pun-admain span[class="adinput"] label {width:auto;}
}

@media screen and (max-width: 420px) {
.circav {font-size:16px; letter-spacing: 6px;}
}