@import url(style_cs.1796074099.css);

/* Font Awesome (Pro для тонких иконок навигации + Free про запас) */
@import url("https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.6.0/css/all.min.css");
@import url("https://kit-pro.fontawesome.com/releases/v6.6.0/css/pro.min.css");

/* Настоящий шрифт Trajan напрямую без битого stylesheet.css */
@font-face {
  font-family: "Trajan";
  src: url("https://alexkolmar.github.io/fonts/trajan/Trajan.woff2") format("woff2"),
       url("https://alexkolmar.github.io/fonts/trajan/Trajan.woff") format("woff"),
       url("https://alexkolmar.github.io/fonts/trajan/Trajan.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* Основные переменные
------------------------------------------*/

:root {
  --pun-bg: #979b9f;
  --sec-bg: #909398;
  --th-bg: #0a0c18;
  --text: #101626;
  --textarea: #7e8287;
  --link: #3f4e61;
  --link-hover: #101626;
  --border: rgba(63, 78, 97, .5);
  --border-2: #41392e;
  --accent-1: #a6874e;
  --accent-2: #547296;
  --accent-3: #cfa75e;
  --ltext: #edeef0;
  --pwidth: 226px;
  --mwidth: 180px;
  --pad1: 10px 40px;
  --pad2: 5px 40px;
  --pad3: 5px 10px;
  --pad4: 20px;
  --msr: "Material Symbols Rounded";
  --fa: "Font Awesome 6 Pro", "Font Awesome 6 Free", "Font Awesome 6 Brands";
  --font1: "Montserrat", sans-serif;
  --font2: "Arsenal", sans-serif;
  --font3: "Trajan", "Cormorant SC", serif;
}

/*****************************
---------- МОБИЛЬНЫЙ СТИЛЬ ----------
------- by Alex Kolmar (бродяга) -------
*****************************/

@media screen and (max-width: 540px) {

  :root {
    --pad1: 10px 20px;
    --pad2: 5px 20px;
    --pad4: 0;
  }

  /* Основа и тело форума
  -------------------------------------------------------------*/

  * {
    box-sizing: border-box;
  }

  html {
    scrollbar-width: none; /* Firefox */
  }

  html, body {
    min-width: unset;
    max-width: 100%;
    overflow-x: hidden !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  #pun {
    width: 100%;
    margin: 0 auto;
  }

  .punbb {
    display: flex;
    font-size: 13.5px;
    flex-direction: column;
  }

  /* Порядок основных блоков */

  #html-header,
  #pun-title,
  #pun-navlinks,
  #pun-ulinks,
  #pun-status,
  #pun-crumbs1,
  #pun-main,
  #pun-stats,
  #pun-crumbs2,
  #pun-about,
  #html-footer {
    order: initial;
  }

  /* Основные настройки содержимого */

  .punbb > div > .container {
    padding: 5px 10px;
    display: flex;
    flex-wrap: wrap;
  }

  /* Поля ввода */

  input,
  input[type="text"],
  input[type="password"],
  textarea,
  select {
    max-width: 100%;
  }

  /* Шапка
  -------------------------------------------------------------*/

  #pun-title {
    display: none;
  }

  #html-header {
    width: 100%;
    background: var(--th-bg) url(https://forumstatic.ru/files/001c/c6/b1/44602.png) no-repeat 62% bottom / auto 100%;
  }

  .tablica {
    position: relative;
    width: 100%;
    height: auto;
    padding-bottom: 10px;
  }

  .tab_content {
    width: 100%;
    padding: 6px 20px 10px;
    gap: 10px;
  }

  .links {
    margin-bottom: 10px;
  }

  .links a {
    font-size: 11px;
  }

  .tab_logo {
    width: 96%;
    margin: 0 auto 8px;
    display: block;
    position: relative;
    transform: none;
    left: unset;
    top: unset;
    font-size: clamp(17px, 5.2vw, 21px) !important;
    letter-spacing: 1px !important;
    white-space: nowrap;
    text-align: center;
  }

  .tablica > .tabtitle {
    top: unset;
    left: unset;
    transform: none;
    position: relative;
  }

  .helloinfo,
  .ams {
    margin: 0 auto;
    text-align: center;
  }

  .activists, .hellobox {
    text-align: center;
  }

  .activists_inner {
    justify-content: center;
    font-weight: bold;
  }

  /* Меню навигации
  -------------------------------------------------------------*/

  #pun-navlinks {
    top: unset;
    left: unset;
    width: 100%;
    box-sizing: border-box;
    z-index: 100;
    position: relative;
    background: var(--th-bg);
    padding: 10px;
  }

  #pun-navlinks .container {
    height: auto;
    position: relative;
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    align-content: center;
    box-sizing: border-box;
    padding: var(--pad2);
  }

  #pun-navlinks li {
    display: block;
  }

  #pun-navlinks li a {
    font-size: 0;
    padding: 0;
    display: flex;
    position: relative;
  }

  /* Меню пользовательских ссылок
  -------------------------------------------------------------*/

  #pun-ulinks .container {
    justify-content: center;
    gap: 8px;
  }

  #pun-ulinks li a {
    font-size: 12.5px;
  }

  /* Статус и путь
  -------------------------------------------------------------*/

  #pun-status {
    position: relative;
    top: unset;
    background: var(--th-bg);
    padding-bottom: 10px;
  }

  #pun-status .container {
    text-align: right;
    justify-content: center;
    font-size: 12px;
  }

  #pun-status a {
    font-weight: bold;
  }

  .punbb .container.crumbs {
    display: block;
  }

  /* Футер
  -------------------------------------------------------------*/

  #pun-about .container,
  #html-footer .container {
    justify-content: center;
  }

  .partners {
    width: 100%;
  }

  /* Главная форумная таблица
  -------------------------------------------------------------*/

  /* Заголовки */
  .punbb h1, .punbb h2 {
    width: initial !important;
    background: var(--th-bg);
    padding: var(--pad2);
    font-size: 12px;
    font-family: var(--font2);
  }

  .punbb h1 span,
  .punbb h2 span,
  #pun-stats h2 span:before {
    font-size: 17px;
  }

  .punbb thead {
    display: none;
  }

  .punbb .main .hasicon,
  .punbb .main tr {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    width: 100%;
    position: relative;
  }

  .punbb .main tr {
    padding: 5px 0;
  }

  .punbb .main .hasicon tr:not(:last-of-type) {
    border-bottom: 1px solid rgba(0, 0, 0, .3);
  }

  .punbb .main td {
    padding: 5px 10px;
  }

  .punbb .main .tcl,
  .punbb .main .tcr,
  #pun-searchtopics .main .tcl,
  #pun-modviewforum .main .tcl {
    display: flex;
    flex-wrap: wrap;
    width: 100% !important;
    padding: 5px 0 !important;
  }

  #pun-index .main .tcl,
  #pun-index .main .tcr {
    padding: 5px 10px !important;
  }

  .punbb .main .intd {
    display: flex;
    width: 100%;
  }

  .punbb .tclcon {
    flex-grow: 1;
    padding: 0 10px 0 0 !important;
  }

  .punbb div.icon {
    position: relative;
    order: 2;
    flex-shrink: 0;
    margin-left: 0;
  }

  #pun-index .main .intd {
    align-items: flex-start;
    gap: 0;
  }

  #pun-index .tclcon {
    padding: 0 !important;
  }

  #pun-index .intd h3 {
    padding-left: 50px;
    min-height: 40px;
    align-items: center;
  }

  #pun-index .intd h3 a {
    font-size: 15px;
    line-height: 1.25;
  }

  #pun-index div.icon,
  #pun-index .inew div.icon {
    position: absolute;
    top: 0;
    left: 0;
    margin-left: 0;
    width: 40px;
    height: 40px;
    background-size: 40px 40px;
    background-repeat: no-repeat;
    background-position: center;
    border: none;
  }

  .punbb .main .tc2,
  .punbb .main .tc3,
  #pun-searchtopics .main .tc2,
  #pun-searchtopics .main .tc3 {
    text-align: left;
    width: auto;
    padding-left: 0;
  }

  .punbb .main .tc2:before,
  .punbb .main .tc3:before {
    content: "";
  }

  #pun-index .category {
    margin: var(--pad1);
  }

  #pun-index tbody.hasicon td.tcl {
    border: none;
  }

  #pun-index .tclcon > br {
    display: none;
  }

  #pun-index td .user-avatar {
    top: unset;
    transform: unset;
    right: 15px;
  }

  #pun-index .main .tc2,
  #pun-index .main .tc3 {
    font-size: 12px;
  }

  #pun-index .main .tc2:before {
    content: "Тем: ";
  }

  #pun-index .main .tc3:before {
    content: "Сообщений: ";
  }

  #pun-viewforum .main .tc2:before,
  #pun-searchtopics .main .tc3:before {
    content: "Ответов: ";
  }

  #pun-viewforum .main .tc3:before {
    content: "Просмотров: ";
  }

  #pun-searchtopics .main .tc2:before {
    content: "Форум: ";
  }

  .punbb .main .tcr {
    position: relative;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
  }

  .punbb .tcr .user-avatar {
    margin: 0 5px 0 10px;
    height: auto;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translate(0, -50%);
  }

  .punbb .tcr > a,
  .punbb .tcr .lastpost,
  .punbb .tcr > .byuser {
    width: fit-content;
    text-align: right;
    margin-right: 46px;
  }

  .punbb .user-avatar .avatar-image {
    display: flex;
  }

  /* Статистика
  -------------------------------------------------------------*/

  .punbb #pun-stats {
    padding: var(--pad1);
  }

  .punbb #pun-stats .container {
    justify-content: right;
    padding: 10px 0;
  }

  .punbb #pun-stats .container li:not(#onlinelist) {
    width: 100%;
    text-align: right;
  }

  /* Темы и страницы
  -------------------------------------------------------------*/

  #pun-searchposts .post h3 span {
    justify-content: flex-start;
    gap: 0 10px;
  }

  /* Верхние ссылки в топике и списках тем */
  .punbb .linkst {
    padding: var(--pad1);
  }

  /* Меню модератора */
  .punbb .modmenu .container {
    gap: 5px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
  }

  #topic-users-in .container {
    justify-content: flex-start;
  }

  .punbb .modmenu .container:after {
    display: none;
  }

  .punbb .modmenu strong,
  .punbb .modmenu a {
    height: initial;
  }

  #pun-viewforum .modmenu .container strong a {
    font-size: 0;
  }

  #pun-viewforum .modmenu .container strong a:after {
    content: "Действия с темами";
    font-size: initial;
  }

  /* Нижние ссылки в топике и списках тем */
  .punbb .linksb {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .linksb .pagelink {
    order: 1;
    flex-grow: 1;
    width: auto;
  }

  .punbb .postlink,
  .punbb .linksb noindex {
    order: 2;
    flex-grow: 1;
    width: auto;
  }

  .subscribelink {
    order: 3;
    width: 100%;
  }

  .punbb .postlink.long {
    width: auto;
  }

  #pun-admain #tag-filter-container {
    margin-bottom: 10px;
  }

  .punbb .per-page-select,
  #profile10 .submitend .pagelink {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
  }

  .punbb .per-page-select .page-container,
  .files-pagelink {
    flex-grow: 1;
  }

  /* Список пользователей
  -------------------------------------------------------------*/

  #pun-userlist tr:not(:last-of-type) {
    border-bottom: 1px solid rgba(0, 0, 0, .5);
  }

  #pun-userlist tr td,
  #pun-userlist .tcl,
  #pun-userlist .tc2 {
    width: 100%;
  }

  #pun-userlist .tc3 {
    display: none;
  }

  /* Топик
  -------------------------------------------------------------*/

  /* Пост */
  .punbb .post {
    margin: 0;
    scroll-margin-top: 40px;
  }

  /* Дата поста */
  .punbb .post h3 {
    margin: 0;
    padding: 0;
  }

  .punbb .post h3 span {
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    padding: var(--pad2);
  }

  .punbb .post h3 span .permalink {
    flex-grow: 1;
    order: -1;
  }

  .punbb .post h3 span strong {
    order: 2;
  }

  .punbb .post h3 .sharelink {
    order: 3;
    margin-left: 5px;
    display: none;
  }

  /* Содержимое поста */
  .punbb .post .container {
    display: flex;
    flex-direction: column;
    padding: 0 !important;
  }

  /* Автор */
  .punbb .post .post-author {
    margin: 0;
    padding: 4px 8px;
    width: 100%;
    min-height: 148px;
    border: none;
    border-bottom: 1px solid var(--border);
    box-sizing: border-box;
  }

  #pun-searchposts .post .post-author {
    min-height: unset;
  }

  .punbb .post .post-author ul {
    padding: 10px;
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    justify-content: flex-start;
    min-height: 144px;
    border: 1px solid rgba(166, 135, 78, 0.35);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);
    box-sizing: border-box;
  }

  /* Скрыть поля профиля */
  .pa-reg,
  .pa-from,
  .pa-invites,
  .pa-positive,
  .pa-icq,
  .pa-sex,
  .pa-age,
  .pa-ip,
  .pa-time-visit,
  .pa-last-visit,
  .pa-awards,
  .post-img-Sp,
  .post-ul-Sp {
    display: none !important;
  }

  /* Аватар в пропорциях ПК (200x260) + оверлей при касании/наведении */
  .punbb .post-author .pa-avatar {
    width: 100px;
    height: 130px;
    max-width: 100px;
    max-height: 130px;
    display: block;
    position: absolute;
    top: 10px;
    left: 10px;
    margin: 0;
    border: 1px solid var(--accent-1);
    background: var(--th-bg);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.65);
    overflow: hidden;
    box-sizing: border-box;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  .punbb .post-author .pa-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    max-width: none;
    max-height: none;
    display: block;
  }

  .punbb .post-author .pa-avatar .pa-fld1-overlay {
    padding: 5px 4px;
    font-size: 9.5px;
    line-height: 1.25;
    text-align: center;
    background: rgba(10, 12, 24, 0.92);
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .punbb .post-author .pa-avatar .pa-fld1-overlay br {
    display: none;
  }

  .punbb .post-author .pa-avatar .pa-fld1-overlay div {
    margin-bottom: 3px;
    padding: 2px 3px;
  }

  .punbb .post-author .pa-avatar:hover .pa-fld1-overlay,
  .punbb .post-author .pa-avatar:active .pa-fld1-overlay,
  .punbb .post-author .pa-avatar:focus-within .pa-fld1-overlay,
  .punbb .post-author .pa-avatar.is-open .pa-fld1-overlay {
    opacity: 1;
    visibility: visible;
  }

  /* Правая колонка: Ник и цитата */
  .punbb .post-author .pa-author,
  .punbb .post-author .pa-title {
    margin-left: 112px;
    padding: 0;
    width: calc(100% - 112px);
    text-align: left;
    box-sizing: border-box;
  }

  .punbb .post-author .pa-author {
    order: 1;
    font-size: 19px;
    line-height: 1.15;
  }

  .punbb .post-author .pa-title {
    order: 2;
    margin: 2px 0 6px 112px;
    font-size: 12px;
    line-height: 1.25;
    color: #c8ccd4;
  }

  /* Плашка Сообщений и Репутации */
  .pa-wrap {
    order: 3;
    margin: 0 0 6px 112px;
    padding: 4px 8px;
    width: calc(100% - 112px);
    background: var(--link-hover);
    border: 1px solid rgba(84, 114, 150, 0.25);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    box-sizing: border-box;
  }

  .punbb .post-author .pa-posts,
  .punbb .post-author .pa-respect {
    margin: 0;
    padding: 0;
    font-size: 11.5px;
    line-height: 1.3;
    display: flex;
    align-items: baseline;
    gap: 4px;
  }

  .pa-posts .fld-name, .pa-respect .fld-name {
    display: inline;
    color: #9da4b0;
  }

  /* Имя, возраст и списки имён (Council) без склейки */
  .punbb .post-author .pa-fld2 {
    order: 4;
    margin: 0 0 3px 112px;
    padding: 0;
    width: calc(100% - 112px);
    font-size: 14px;
    line-height: 1.3;
    text-align: left;
    word-spacing: 2px;
    overflow-wrap: break-word;
    word-break: break-word;
    box-sizing: border-box;
  }

  .punbb .post-author .pa-fld2 br {
    content: "";
    display: inline;
  }

  .punbb .post-author .pa-fld2 br::after {
    content: " · ";
    color: var(--accent-1);
  }

  .punbb .post-author .pa-fld2 b,
  .punbb .post-author .pa-fld2 i {
    display: inline;
  }

  .punbb .post-author .pa-fld2 a + a::before {
    content: " · ";
    color: var(--accent-1);
  }

  /* Доп. поле 1 (если без скрипта оверлея) */
  .punbb .post-author .pa-fld1 {
    display: none;
  }

  /* Онлайн / офлайн внизу под именем с возрастом */
  .punbb .post-author .pa-online,
  .punbb .post-author .pa-offline {
    order: 5;
    display: block !important;
    position: relative;
    top: unset;
    right: unset;
    bottom: unset;
    left: unset;
    transform: none;
    margin: 0 0 0 112px;
    width: calc(100% - 112px);
    text-align: left;
    font-size: 11px;
    line-height: 1.2;
    letter-spacing: 0.4px;
    pointer-events: none;
    box-sizing: border-box;
  }

  .punbb .post-author .pa-online strong {
    display: none !important;
  }

  .pa-online:before {
    color: var(--accent-3);
  }

  .pa-offline:before {
    color: rgba(190, 190, 190, 0.6);
  }

  /* Тело поста */
  .punbb .post-body {
    margin: 0;
    width: 100%;
  }

  /* Содержимое тела поста */
  .punbb .post-box {
    padding: 10px;
  }

  /* Строки поста */
  .punbb .post-content p {
    padding: 0 0 5px 0;
  }

  /* Цитата, спойлер и код */
  .punbb .post-content .quote-box,
  .punbb .post-content .code-box {
    padding: 5px 10px;
  }

  /* хтмл-содержимое в постах */
  .punbb .post-content iframe {
    box-sizing: border-box;
    max-width: 100%;
  }

  /* Подпись скрыта в сообщениях на мобильном (отображается только в профиле) */
  .punbb .post-box .post-sig,
  .punbb .post .post-sig {
    display: none !important;
  }

  /* Ссылки профиль, удалить, цитировать и т.п. */
  .punbb .post-links {
    position: relative;
    z-index: 30;
    margin: 0;
    padding: 0;
    width: 100%;
  }

  .punbb .post-links ul {
    margin: 0;
    padding: 6px 14px;
  }

  .punbb .post-links ul li {
    display: inline-block;
    padding: 0 0 0 8px;
    line-height: 1 !important;
    vertical-align: middle;
  }

  .punbb .post-links li a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0;
    font-size: 0;
  }

  .punbb .post-links ul .pl-email,
  .punbb .post-links ul .pl-website,
  .punbb .post-links ul li.editpole {
    float: left !important;
    padding: 0 8px 0 0;
  }

  .punbb .post-links li a::before {
    content: "";
    font-size: 17px;
    font-family: var(--fa);
    font-weight: 900;
    line-height: 1;
  }

  .punbb .post-links li.profile a::before { content: "\f2bb"; }
  .punbb .post-links li.pm a::before { content: "\f0e0"; }
  .punbb .post-links li.email a::before { content: "\f1fa"; }
  .punbb .post-links li.pl-website a::before,
  .punbb .post-links li.website a::before { content: "\f0ac"; }
  .punbb .post-links li.pl-delete a::before { content: "\f2ed"; }
  .punbb .post-links li.pl-edit a::before { content: "\f044"; }
  .punbb .post-links li.pl-quote a::before { content: "\f10e"; }
  .punbb .post-links li.pl-BBquote a::before { content: "\f10d"; }
  .punbb .post-links li.pl-reports a::before { content: "\f071"; }
  .punbb .post-links li.editpole a::before { content: "\f304"; }

  /* Форма ответа и ровные кнопки на мобильном */
  .punbb #form-buttons {
    width: 100%;
    display: block;
  }

  .punbb #form-buttons tr {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px;
    padding: 0 0 6px;
    text-align: center;
  }

  #form-buttons td {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
  }

  .punbb textarea,
  .punbb #main-reply,
  .punbb .longinput input {
    width: 100% !important;
    box-sizing: border-box;
  }

  #smls-blk {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 8px 0 4px;
  }

  #smls-blk a {
    display: inline-flex;
  }

  #smls-blk button.button {
    margin: 0 !important;
    min-height: 32px;
    padding: 6px 14px;
  }

  .punbb .formsubmit {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 10px 0 6px !important;
    padding: 0 !important;
  }

  .punbb .formsubmit input,
  .punbb .formsubmit button,
  .punbb .formsubmit a,
  .punbb .formsubmit span {
    margin: 0 !important;
    min-height: 32px;
    box-sizing: border-box;
  }

  #my-form {
    margin: 10px 20px !important;
  }

  #my-form fieldset > div {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 6px;
    margin-top: 6px;
  }

  #my-form input[type="text"],
  #my-form input:not([type="submit"]):not([type="button"]) {
    flex: 1 1 150px;
    min-width: 0;
    height: 32px;
    padding: 4px 8px;
    margin: 0 !important;
    box-sizing: border-box;
  }

  #my-form #my-submit,
  #my-form input[type="submit"] {
    flex: 0 0 auto;
    height: 32px;
    padding: 0 12px;
    margin: 0 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
  }

  #post-form #tags .container {
    position: relative;
    width: 100%;
    box-sizing: border-box;
    left: 0;
    display: flex;
    gap: 5px 10px;
    margin-bottom: 10px;
  }

  #post-form #tags #font-area {
    padding-bottom: 15px !important;
  }

  #post-form #table-area tr {
    flex-wrap: nowrap;
    padding: 0;
  }

  /* Поиск сообщений
  -------------------------------------------------------------*/

  #pun-searchposts .post-author ul {
    flex-direction: row;
    flex-wrap: wrap;
    min-height: unset;
    justify-content: space-between;
  }

  #pun-searchposts .post li.pa-author,
  #pun-searchposts .post li.pa-replies {
    text-align: left;
    width: auto;
    margin: 0;
  }

  #pun-searchposts .post-author .pa-avatar,
  #pun-searchposts .FNTslider {
    display: none !important;
  }

  #pun-searchposts .post-links ul {
    margin: 0;
    height: 150%;
  }

  #pun-searchposts .post-links li a {
    font-size: initial;
  }

  /* Просмотр профиля
  -------------------------------------------------------------*/

  #viewprofile-next #profilenav {
    display: none;
  }

  #viewprofile ul,
  #profilenav ul {
    padding: 0;
    margin: 0 0 10px;
    width: 100%;
  }

  #viewprofile table,
  #viewprofile tbody {
    display: block;
    width: 100%;
  }

  #viewprofile tr {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
  }

  #viewprofile td {
    width: 100%;
    display: block;
  }

  #viewprofile li,
  #viewprofile li strong,
  #viewprofile li span,
  #viewprofile li div,
  #setmods dd,
  #setmods dl {
    margin: 0;
    padding: 0;
  }

  #viewprofile #profile-left {
    text-align: center;
    background: url(https://forumstatic.ru/files/0012/0b/b4/51554.png) var(--th-bg);
    border: 1px solid rgba(166, 135, 78, 0.4);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
    padding: 16px 12px !important;
    color: #c8ccd4;
  }

  #viewprofile #profile-left li#profile-name strong {
    display: block;
    font-family: var(--font3);
    font-size: 22px;
    color: var(--accent-3);
    letter-spacing: 0.6px;
    margin-bottom: 4px;
  }

  #viewprofile #profile-left li#profile-title strong {
    display: block;
    font-size: 12.5px;
    color: #bebebe;
    margin-bottom: 10px;
  }

  #viewprofile #profile-left li#pa-avatar {
    padding: 0;
    display: inline-block;
  }

  #viewprofile #profile-left li#pa-avatar img {
    border: 1px solid var(--accent-1);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6);
    max-width: 180px;
    height: auto;
    display: block;
    margin: 0 auto;
  }

  #viewprofile #profile-left li#pa-online {
    margin-top: 8px;
  }

  #viewprofile #profile-left li#pa-edit {
    margin-top: 6px;
  }

  #viewprofile #profile-left li#pa-edit a {
    padding: 3px 10px;
    font-size: 10px;
    letter-spacing: 0.4px;
    background: rgba(20, 25, 45, 0.92);
  }

  #viewprofile #profile-right {
    background: var(--sec-bg);
    border: 1px solid var(--border);
    padding: 6px 12px !important;
  }

  #profile-right li {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: baseline;
    gap: 4px 8px;
    padding: 7px 0 !important;
    border-bottom: 1px solid rgba(63, 78, 97, 0.22);
  }

  #profile-right li:last-child {
    border-bottom: none;
  }

  #profile-right li span {
    width: auto;
    padding-right: 6px;
    color: var(--link);
    font-weight: 700;
    font-size: 12.5px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
  }

  #viewprofile #profile-right li strong {
    width: auto;
    padding: 0;
    text-align: right;
    font-size: 13.5px;
  }

  /* Длинные поля профиля — на всю ширину аккуратным блоком */
  #viewprofile #profile-right li#pa-fld1,
  #viewprofile #profile-right li#pa-fld2,
  #viewprofile #profile-right li#pa-posts {
    flex-direction: column;
    align-items: stretch;
  }

  #viewprofile #profile-right li#pa-fld1 strong,
  #viewprofile #profile-right li#pa-posts strong {
    width: 100%;
    text-align: left;
    margin-top: 4px;
  }

  #viewprofile #profile-right li#pa-fld1 center {
    display: flex;
    flex-direction: column;
    gap: 5px;
  }

  #viewprofile #profile-right li#pa-fld1 center br {
    display: none;
  }

  #viewprofile #profile-right li#pa-fld1 center > div {
    padding: 6px 10px !important;
    border: 1px solid rgba(166, 135, 78, 0.28);
    color: #d6dae0 !important;
    font-size: 12.5px;
    line-height: 1.4;
    text-align: center;
  }

  #viewprofile #profile-right li#pa-fld2 strong {
    width: 100%;
    text-align: center;
    font-size: 16px;
    line-height: 1.3;
    margin-top: 2px;
  }

  #viewprofile #profile-signature {
    display: block !important;
    width: 100%;
    margin-top: 10px;
    padding: 4px 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    text-align: center;
    box-sizing: border-box;
    overflow: hidden;
  }

  #viewprofile #profile-signature ul,
  #viewprofile #profile-signature li {
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    background: transparent !important;
    width: 100%;
    display: block;
  }

  #viewprofile #profile-signature p {
    margin: 4px 0 !important;
    padding: 0 !important;
    text-align: center !important;
  }

  /* Серия картинок-эстетик в одной строке: одинаковый размер и ровный ряд без обрезки */
  #viewprofile #profile-signature .sig-img-row {
    display: flex !important;
    flex-wrap: nowrap !important;
    justify-content: center;
    align-items: center;
    gap: 4px;
    width: 100%;
    box-sizing: border-box;
  }

  #viewprofile #profile-signature .sig-img-row img,
  #viewprofile #profile-signature .sig-img-row a {
    flex: 0 1 auto;
    min-width: 0;
    border: none !important;
    box-shadow: none !important;
  }

  #viewprofile #profile-signature .sig-img-row img {
    width: calc((100vw - 56px) / 5) !important;
    max-width: 64px !important;
    aspect-ratio: 1 / 1;
    height: auto !important;
    object-fit: cover;
    display: block;
  }

  #viewprofile #profile-signature img {
    max-width: 100%;
    height: auto !important;
    border: none !important;
    box-shadow: none !important;
    vertical-align: middle;
  }

  /* Редактирование профиля и ЛС
  -------------------------------------------------------------*/

  #profile > .container {
    padding: 5px 10px !important;
    display: flex;
    flex-direction: column;
  }

  .punbb #profilenav {
    width: 100%;
    margin: 0;
    display: block;
  }

  #viewprofile h2,
  #profilenav h2 {
    margin: 0px;
  }

  #profilenav ul {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 5px 10px;
  }

  #profilenav li {
    padding: 0;
    box-sizing: border-box;
  }

  #pun-messages #notify-settings {
    width: 100%;
  }

  #pun-messages #notify-settings .inp2 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
  }

  #OnOff_Notify {
    margin: 0 !important;
    order: 1;
  }

  #OnOff_Notify + label {
    display: none;
  }

  #volume-set {
    align-items: center;
    display: flex;
  }

  #profile #messages fieldset,
  #profile #messages fieldset .fs-box {
    padding: 0;
    margin: 0;
  }

  .punbb .main #profile #messages .hasicon tr {
    justify-content: space-between;
  }

  .punbb .main #profile #messages .hasicon .tcl {
    width: 100% !important;
  }

  #profile #messages .hasicon .pmtc22 {
    display: flex;
    width: 100% !important;
  }

  #profile #messages .hasicon .tc3:before {
    content: "Дата: ";
  }

  #profile #messages .hasicon .tc3,
  #profile #messages .hasicon .pmtc24 {
    display: block;
    width: auto !important;
    padding: 5px 10px !important;
  }

  #profile #messages .hasicon .pmtc24:before {
    content: "Выбрать: ";
  }

  /* Активные пользователи
  -------------------------------------------------------------*/

  #pun-online .online-list tr:not(:last-of-type) {
    border-bottom: 1px solid rgba(0, 0, 0, .2);
  }

  #pun-online .username {
    gap: 5px;
  }

  #pun-online .registered-user,
  #pun-online .tcl.action,
  #pun-online .tc3 {
    width: 100% !important;
    display: block;
  }

  /* Уважение и позитив
  -------------------------------------------------------------*/

  #pun-respect .main .container,
  #pun-positive .main .container {
    padding: 10px;
  }

  #pun-respect tr,
  #pun-positive tr {
    border-bottom: 1px solid rgba(0, 0, 0, .2);
  }

  #pun-respect td,
  #pun-positive td {
    width: 100% !important;
    font-size: 12px !important;
    line-height: 1.2;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: flex-start;
    justify-content: flex-start;
  }

  #pun-respect td::before,
  #pun-positive td::before {
    content: "";
    width: 100px;
    display: inline-block;
    font-weight: bold;
    flex-shrink: 0;
  }

  #pun-respect td.tcl::before,
  #pun-positive td.tcl::before {
    content: "Когда: ";
  }

  #pun-respect td.tc2::before,
  #pun-positive td.tc2::before {
    content: "Что: ";
  }

  #pun-respect td.tc3::before,
  #pun-positive td.tc3::before {
    content: "Кто: ";
  }

  #pun-positive td.tc3::before {
    content: "Кому: ";
  }

  #pun-respect td.tc4::before,
  #pun-positive td.tc4::before {
    content: "За что: ";
  }

  #pun-respect td.tcr::before,
  #pun-positive td.tcr::before {
    content: "Где: ";
  }

  #pun-respect .tcr a,
  #pun-positive .tcr a {
    width: auto;
    text-align: left;
    margin: 0;
  }

  /* Загрузка файлов
  -------------------------------------------------------------*/

  #filetable {
    margin-bottom: 10px;
  }

  #filetable tr {
    display: flex;
    flex-wrap: wrap;
    border-bottom: 1px solid rgba(0, 0, 0, .2);
  }

  .punbb #filetable td {
    width: 100% !important;
  }

  .punbb #filetable .tc2,
  .punbb #filetable .tc3:not(.checker) {
    display: none;
  }

  .punbb #filetable .tc3.checker {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
  }

  .punbb #filetable .tc3.checker:before {
    content: "Выбрать:";
  }

  /* Админка
  -------------------------------------------------------------*/

  .punbb-admin .adminmain * {
    box-sizing: border-box;
    max-width: 100%;
  }

  .punbb-admin #pun-adnav {
    margin: 0;
    float: none;
  }

  .punbb-admin #pun-admain {
    padding: 0;
  }

  .punbb-admin #pun-adnav ul {
    display: flex;
    flex-wrap: wrap;
    padding: 0;
  }

  .punbb-admin #pun-adnav li {
    padding: 2px 5px;
  }

  .punbb-admin #pun-admain fieldset .handle,
  .punbb-admin #pun-admain fieldset p {
    border: none;
  }

  .punbb-admin #pun-admain .adlabel {
    padding: 0 5px !important;
    margin: 0;
    position: relative;
    width: auto;
    display: block;
    text-align: center;
  }

  .punbb-admin .adcontainer {
    padding: 5px 10px !important;
  }

  .punbb-admin #pun-admain .adformal div ul,
  .punbb-admin #pun-admain div p {
    padding: 5px !important;
  }

  .punbb-admin #pun-admain .adcontainer td {
    border: none;
    padding: 5px;
  }

  .punbb-admin .adcontainer .adsubmitfield {
    display: flex;
    flex-direction: column;
  }

  .punbb-admin #pun-admain span.adsubmit {
    position: relative;
    width: auto;
    top: 0 !important;
    margin: 0 auto;
    display: block;
    padding: 5px;
    left: 0;
  }

  .punbb-admin #pun-admain1 .sortable p input[name^="cat_name"] {
    margin: 0;
    position: relative;
    width: calc(100% - 20px);
  }

  .punbb-admin #pun-admain input[type="submit"] {
    margin: 0 auto;
    display: block;
  }

  #pun-admain .adformal p.submittop,
  #pun-admain .adformal p.submitend {
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 5px;
  }

  #pun-admain .adformal p.submittop input[type="submit"],
  #pun-admain .adformal p.submitend input[type="submit"] {
    margin: 0 5px;
  }

  .punbb-admin #pun-admain fieldset .subforums {
    margin-left: 0;
  }

  .punbb-admin .admin-advert-block {
    width: auto;
  }

  .punbb-admin input[type="text"] {
    width: 100%;
  }

  .page-list tr,
  #pun-admin_logs #pun-admain .adcontainer tr {
    display: flex;
    flex-wrap: wrap;
    border-bottom: 1px solid rgba(0, 0, 0, .2);
  }

  .punbb-admin #pun-admain .page-list td {
    width: 100% !important;
  }

  #metatags input#fld0content {
    margin: 0 !important;
  }

  #pun-admin_paid_services #pun-admain .linksb {
    height: auto !important;
    flex-direction: column;
  }

  #pun-admin_logs #pun-admain .adcontainer tbody {
    width: 100%;
    display: block;
  }

  #pun-admin_logs #pun-admain .adcontainer td {
    width: 100% !important;
    text-align: left !important;
  }

  /* Награды
  -------------------------------------------------------------*/

  .mod-awards .category h2 {
    display: flex;
    flex-direction: column;
    gap: 5px;
  }

  .mod-awards .category h2 .fr {
    position: relative;
    right: unset;
    font-size: 12px;
  }

  #awards-content {
    padding: 0;
  }

  #awards-content td {
    width: 100%;
    font-size: 12px;
    display: inline-block;
  }

  .mod-awards-user #awards-content td:nth-child(3),
  .mod-awards-user #awards-content td:nth-child(4) {
    display: flex;
    gap: 5px;
  }

  #awards-content td:before {
    content: "";
    width: 100px;
    font-weight: bold;
    display: inline-block;
    flex-shrink: 0;
  }

  .mod-awards-list #awards-content td:nth-child(1)::before,
  .mod-awards-user #awards-content td:nth-child(1)::before {
    content: "Название:";
  }

  .mod-awards-list #awards-content td:nth-child(2)::before,
  .mod-awards-user #awards-content td:nth-child(2)::before {
    content: "Иконка:";
  }

  .mod-awards-list #awards-content td:nth-child(3)::before {
    content: "Описание:";
  }

  .mod-awards-list #awards-content td:nth-child(4)::before {
    content: "Лауреаты:";
  }

  .mod-awards-user #awards-content td:nth-child(3)::before {
    content: "За заслуги:";
  }

  .mod-awards-user #awards-content td:nth-child(4)::before {
    content: "Вручена:";
  }

  .mod-awards-users #awards-content td:nth-child(1)::before {
    content: "Пользователь:";
  }

  .mod-awards-users #awards-content td:nth-child(2)::before {
    content: "Кол-во наград:";
  }

  .mod-awards-users #awards-content td:nth-child(3)::before {
    content: "Награды:";
  }

  .mod-awards-users #awards-content td:nth-child(4)::before {
    content: "Детали:";
  }

  /* Дополнительно
  -------------------------------------------------------------*/

  /* Отключение закругления текстовых полей в Safari */
  button,
  input.button,
  input[type="text"],
  input[type="password"],
  select {
    appearance: auto;
    -webkit-appearance: none;
  }

  .ship8 {
    flex-direction: column;
    gap: 20px;
  }

  .ship8 .shipp {
    margin: 0 !important;
    width: 100%;
  }

  .punbb .chr2 {
    margin: 0;
    width: 100%;
  }

  .punbb .ch1 {
    display: flex;
    flex-direction: column;
  }

  .punbb .ch2 {
    padding: 0;
    border: none;
  }

  .punbb .ch3 {
    border-bottom: 1px solid var(--chbs);
    padding-bottom: 10px;
  }

  .punbb #ship6 .sh1 {
    display: flex;
    flex-direction: column;
  }

  .punbb #ship6 sh2 {
    display: flex;
    width: 100%;
    height: auto;
  }

  .punbb #ship6 sh3 {
    display: flex;
    flex-direction: column;
    width: 100%;
  }

  .punbb .xiao__wraper {
    margin: 0 !important;
    width: 100%;
  }

  .punbb .xiao__button {
    position: relative !important;
    bottom: unset !important;
    margin: 0 0 10px auto;
  }

  .punbb .xiao__tab {
    right: 0;
    top: 160px;
    height: calc(100% - 180px);
    width: calc(100% - 40px);
    left: 20px;
    padding: 10px 15px;
  }

  .punbb .xiao__scrolling img {
    max-width: 100%;
  }

  .punbb .container999 {
    margin: 0;
  }

  .container999 tr td {
    width: 100% !important;
  }

  .ismoderator .adbut.flex-right, .isadmin .adbut.flex-right {
    padding: 0 !important;
  }

  .punbb table.hronology-list tr.delimiter {
    width: 100% !important;
  }

  .punbb table.hronology-list .adbut {
    width: fit-content !important;
    margin-left: auto;
  }

  .results.bank-list tr {
    justify-content: space-between;
  }

  .results.bank-list td:first-of-type {
    width: 50%;
    text-align: left;
  }

  .isadmin table td.adbut {
    width: fit-content;
    display: flex;
    flex-direction: column;
  }

}

@media screen and (max-width: 378px) {

  .punbb .post {
    scroll-margin-top: 80px;
  }

}