/*************************************************************
A - SETUP
**************************************************************/

/* A1 Import the colour scheme
-------------------------------------------------------------*/

/* A1.1 */
  @import url(style_cs.1786786948.css);

:root {
  --forum-width: 1000px;
  --header-height: 430px;
  --forum-side-gap: 18px;
  --section-gap: 13px;
  --section-radius: 7px;
  --footer-radius: 10px;
  --footer-crumbs-height: 24px;
  --footer-crumbs-bottom-gap: 5px;
  --page-bottom-gap: 25px;

  --service-panel-radius: 10px;
  --service-panel-inset: 10px;
  --service-panel-top-gap: 10px;
  --service-panel-side-padding: 18px;
  --service-panel-bottom-height: 32px;
  --quick-link-gap: 14px;
  --quick-link-radius: 10px;

  --profile-details-background-image: url("https://upforme.ru/uploads/001c/bf/60/4/608776.jpg");
  --profile-details-frame-image: url("https://forumstatic.ru/files/001c/c3/b0/15007.png");

  --category-icon-1: url("https://forumstatic.ru/files/001c/c3/b0/32844.png");
  --category-icon-2: url("https://forumstatic.ru/files/001c/c3/b0/13274.png");
  --category-icon-3: url("https://forumstatic.ru/files/001c/c3/b0/70832.png");
  --category-icon-4: url("https://forumstatic.ru/files/001c/c3/b0/20151.png");
  --category-icon-5: url("https://forumstatic.ru/files/001c/c3/b0/86684.png");
  --category-icon-6: url("https://forumstatic.ru/files/001c/c3/b0/87118.png");
  --category-icon-7: url("https://forumstatic.ru/files/001c/c3/b0/83694.png");
  --category-icon-8: url("https://forumstatic.ru/files/001c/c3/b0/10615.png");
  --category-icon-default: var(--category-icon-1);
  --category-icon-width: 56px;
  --category-title-offset: 82px;
  --category-edge-padding: 24px;
  --topic-icon-default: url("https://forumstatic.ru/files/001c/c3/b0/94870.png");
  --topic-icon-new: url("https://forumstatic.ru/files/001c/c3/b0/81372.png");
  --topic-icon-closed: url("https://forumstatic.ru/files/001c/c3/b0/52391.png?v=1");

  --forum-content-width: 80%;
  --forum-content-indent: 20px;
  --forum-link-gap: 5px;
  --forum-link-radius: 6px;
  --forum-link-min-width: 68px;
  --lastpost-text-shift: -23px;

  --footer-decor-image: url("https://forumstatic.ru/files/001c/c3/b0/76641.png");
  --footer-paper-image: url("https://forumstatic.ru/files/001c/c3/b0/71932.png");
  --footer-texture-image: url("https://forumstatic.ru/files/001c/c3/b0/31793.jpg?v=1");
  --ui-dark-texture: var(--color-dark) var(--footer-texture-image) repeat;

  /* Shared action-button recipe: reply links and editor actions use one visual source. */
  --ui-action-border: 1px solid transparent;
  --ui-action-radius: var(--forum-link-radius);
  --ui-action-padding: 0 12px 2px;
  --ui-action-background:
    linear-gradient(var(--color-quick-link), var(--color-quick-link)) padding-box,
    linear-gradient(90deg, var(--color-accent), var(--color-accent-soft)) border-box;
  --ui-action-light-background:
    linear-gradient(var(--color-surface), var(--color-surface)) padding-box,
    linear-gradient(90deg, var(--color-accent), var(--color-accent-soft)) border-box;
  --ui-action-font: normal var(--font-size-xs)/11px var(--font-forum-ui);
  --ui-action-hover-color: var(--color-accent);
  --footer-height: 150px;
  --footer-content-width: 560px;
  --footer-title-width: 155px;
  --footer-banner-width: 88px;
  --footer-banner-height: 31px;
  --footer-banner-gap: 6px;
  --footer-banner-track-width: 304px;
  --footer-banner-track-height: 117px;
  --footer-banner-track-right: 125px;

  --scroll-control-width: 97px;
  --scroll-control-side-gap: 18px;

  --font-main: Verdana, Arial, Helvetica, sans-serif;
  --font-forum-ui: Verdana, Arial, Helvetica, sans-serif;
  --font-forum-title: Georgia, "Times New Roman", serif;
  --font-size-xs: 9px;
  --font-size-sm: 10px;
  --font-size-base: 11px;
  --font-size-md: 11px;
  --font-size-lg: 12px;

  --font-size-category-title: 10px;
  --line-height-category-title: 14px;
  --letter-spacing-category-title: 1.1px;
  --font-size-forum-title: 15px;
  --line-height-forum-title: 19px;
  --font-size-forum-description: 10px;
  --line-height-forum-description: 15px;

  --bbcode-surface: #d7d0ce;
  --bbcode-spoiler-icon: url("https://forumstatic.ru/files/001c/c3/b0/58129.png");

  --quickplus-rating-icon: url("https://forumstatic.ru/files/001c/c3/b0/27781.png?v=1");
  --quickplus-rating-active-icon: url("https://forumstatic.ru/files/001c/c3/b0/68238.png?v=1");
  --quickplus-comment-icon: url("https://forumstatic.ru/files/001c/c3/b0/17801.png");
}

/* A2 Deal with browser defaults and wonkiness
-------------------------------------------------------------*/

/* A2.1 */
html,
body {
    width: 100%;
    min-height: 100%;
    margin: 0;
    padding: 0;
}

body {
    min-height: 100vh;
    padding: 46px 0 var(--page-bottom-gap);
    font-family: var(--font-main);
    font-size: 100.01%;
}

/* A2.2 */
.punbb * {
  box-sizing: border-box;
  margin: 0
  }

.punbb *::before, .punbb *::after {
  box-sizing: border-box
  }

/* A2.3 */
.punbb ul, .punbb dl, .punbb li, .punbb dd, .punbb dt {
  padding: 0;
  list-style: none;
  }

/* A2.4 */
.punbb img {
  border:none
  }

/* A2.5 */
.punbb .main table {
  table-layout: fixed;
  width: 100%;
  }

/* A2.6 */
.checkfield input[type="checkbox"], .radiofield input[type="radio"] {margin: 0 0.3em;}

/* A2.7 */
p[class="checkfield"] *,
div[class="checkfield"] *,
fieldset[class="radiofield"] * {
  height: 1.8em;
  vertical-align: middle
  }


 /* A3 Text setup
-------------------------------------------------------------*/

/* A3.1 — body typography is defined in the browser-reset block above. */

/* A3.2 */
.punbb {
  float: none;
  width: 100%;
  min-height: 100vh;
  font: normal var(--font-size-base)/1.4 var(--font-main);
  line-height: 1.35;
  }

/* 3.3 */
.punbb textarea, .punbb input, .punbb select, .punbb optgroup, .punbb button {
  font: 1em var(--font-main)
  }

.punbb :is(
  button,
  input.button,
  input[type="button"],
  input[type="submit"],
  input[type="reset"]
):is(:hover, :focus) {
  color: var(--ui-action-hover-color);
  }

/* A3.4 */
.punbb h1, .punbb h2, .punbb h3, .punbb h4, .punbb table, .punbb th {
  font-size: 1em;
  font-weight: normal;
  }

/* A3.5 */
.punbb h1 span, .punbb h2 span, .punbb legend span {
  font-size: 1.1em;
  }

/* A3.6 */
.punbb pre {
  font: 1.1em/140% monaco, "bitstream vera sans mono", "courier new", courier, monospace
  }

/* A3.7 */
.punbb address, .punbb em {
  font-style: normal
  }

/* A3.8 */
.punbb .post-content em {
  font-style: italic
  }

/* A3.9 */
.punbb .post-content em.bbuline {
  font-style: normal;
  text-decoration: none;
  }

/* A3.10 */
.punbb a {
  text-decoration: none
  }

/* A3.11 */
.punbb optgroup {
  font-weight: bold;
  }


/* A4 Float clearing and hidden items
-------------------------------------------------------------*/

/* A4.1 */
#pun:after,
.punbb .container:after,
.punbb .post-links ul:after,
.punbb .main div.inline:after,
.punbb .post-box:after,
.punbb .linksb:after {
  clear: both;
  content: ".";
  display: block;
  height: 0;
  visibility: hidden;
  overflow:hidden;
  line-height: 0.0;
  font-size: 0;
  }

/* A4.2 */
.acchide,
#pun-index #pun-main h1,
#pun-navlinks h2,
#pun-pagelinks h2,
#pun-status h2,
#pun-ulinks h2,
#pun-announcement 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 {
  font-size: 0;
  height: 0;
  width: 0;
  line-height: 0.0;
  position:absolute;
  left: -9999px;
  overflow: hidden
  }


/* A5 Basic page layout and borders
-------------------------------------------------------------*/

/* A5.1 */
#pun {
  position: relative;
  width: var(--forum-width);
  max-width: calc(100% - (var(--forum-side-gap) * 2));
  margin: 0 auto;
  }

/* A5.2 */
#pun-redirect, #pun-maint {
  margin: 50px 20% 12px 20%;
  width: auto;
  float: none;
  }

/* A5.3 */
.punbb .section, .punbb .main {
  margin-bottom: var(--section-gap);
  }

/* A5.4 */
.punbb .category, .punbb .post {
  margin-top: var(--section-gap);
  }

/* A5.5 */
.punbb #pun-category1, .punbb .toppost, .punbb .topicpost {
  margin-top: 0;
  }

/* A5.7 */
.punbb .section, .punbb .forum, .punbb .formal, .punbb .modmenu, .punbb .info,
.punbb .category, .punbb .post {
  border: 0
  }

/* A5.8 — EMO baseline: no legacy PunBB frames */
.punbb .container {
  border: 0;
  }

/* A5.9 — EMO baseline: headings are unframed by default */
.punbb .section h2,
#pun-main h1,
#pun-main h2,
#pun-stats h2,
#pun-debug h2 {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  }

/* A5.10 Index category layout */
#pun-main {
  width: 100%;
}

#pun-index #pun-main {
  --category-icon: var(--category-icon-default);

  width: 100%;
  margin-bottom: 0;
  padding: 0 10px 10px;
  background: #2f3030 url("https://forumstatic.ru/files/001c/c3/b0/31793.jpg") repeat;
  border-radius: 0;
}

#pun-index #pun-main .category {
  width: 100%;
  margin: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
}

#pun-index #pun-category1 { --category-icon: var(--category-icon-1); }
#pun-index #pun-category2 { --category-icon: var(--category-icon-2); }
#pun-index #pun-category3 { --category-icon: var(--category-icon-3); }
#pun-index #pun-category4 { --category-icon: var(--category-icon-4); }
#pun-index #pun-category5 { --category-icon: var(--category-icon-5); }
#pun-index #pun-category6 { --category-icon: var(--category-icon-6); }
#pun-index #pun-category7 { --category-icon: var(--category-icon-7); }
#pun-index #pun-category8 { --category-icon: var(--category-icon-8); }

#pun-index #pun-main .category + .category {
  margin-top: 0;
}

#pun-index #pun-main .category > h2 {
  position: relative;
  min-height: 38px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

#pun-index #pun-main .category > h2 span {
  position: relative;
  z-index: 1;
  display: block;
  padding: 11px var(--category-title-offset) 10px;
  font-family: var(--font-forum-ui);
  font-size: var(--font-size-category-title);
  line-height: var(--line-height-category-title);
  font-weight: normal;
  letter-spacing: var(--letter-spacing-category-title);
  text-align: center;
}

#pun-index #pun-main .category > h2::before {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 18px;
  width: var(--category-icon-width);
  aspect-ratio: 76 / 107;
  content: "";
  background: var(--category-icon) no-repeat center / contain;
  transform: translateY(-50%);
  pointer-events: none;
}

#pun-index #pun-main .category > .container {
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
}

#pun-index #pun-main #pun-category1 > .container {
  border-radius: var(--section-radius);
}

#pun-index #pun-main #pun-category8 > .container {
  border-radius: 0 0 var(--section-radius) var(--section-radius);
}

#pun-index #pun-category1 tbody tr:first-child td:first-child {
  border-top-left-radius: var(--section-radius);
}

#pun-index #pun-category1 tbody tr:first-child td:last-child {
  border-top-right-radius: var(--section-radius);
}

#pun-index #pun-category8 tbody tr:last-child td:first-child {
  border-bottom-left-radius: var(--section-radius);
}

#pun-index #pun-category8 tbody tr:last-child td:last-child {
  border-bottom-right-radius: var(--section-radius);
}

#pun-index #pun-main .category table {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
}

#pun-index #pun-main .category th,
#pun-index #pun-main .category td {
  vertical-align: middle;
}

#pun-index .main thead {
  display: none;
}


/*************************************************************
B - MAIN CONTENT - GENERAL
**************************************************************/

/* B1 Parsed Content, Signatures and Scroll Boxes
-------------------------------------------------------------*/

/* B1.1 */
.punbb .post-content {
  width: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  font-size: var(--font-size-base);
  line-height: 1.5;
  }

/* B1.2 */
.punbb .post-sig dt {
  display: block;
  border-top: 1px solid #888;
  width: 250px;
  margin: 5px 0;
  }

/* B1.3 */
.punbb .post-content p {
  margin: 0;
  padding: 0 0 1em 0;
  line-height: 1.5;
  }

/* B1.4 */
.punbb .post-content img {
  vertical-align: text-bottom
  }

/* B1.5 */
.punbb .post-content img.postimg {
  vertical-align: middle;
  }

/* B1.6 */
.punbb .post-content .blockcode, .punbb .post-content blockquote {
  width: 100%;
  overflow: hidden;
  }

/* B1.7 */
.punbb .post-content .scrollbox {
  width: 100%;
  overflow: auto;
  }

/* B1.8 */
.punbb .post-content .quote-box, .punbb .post-content .code-box {
  margin: 0.4em 1.8em 1.4em 1.8em;
  padding: 1em;
  border-style: solid;
  border-width: 1px;
  }

/* B1.9 */
.punbb .quote-box cite, .punbb .code-box strong.legend {
  display: block;
  padding-bottom: 0.7em;
  font-size: 1.1em;
  font-weight: bold;
  font-style: normal;
  margin: 0;
  }

/* B2 Information boxes
-------------------------------------------------------------*/

/* B2.1 */
.punbb .info-box {
  padding: 1.1em 1.7em 1em 1.7em;
  border-style: solid;
  border-width: 1px;
  margin: 0 0 1.1em 0;
  }

/* B2.2 */
.punbb .info-box * {
  padding: 0 0 0.7em 0;
  }

/* B2.3 */
.punbb #pun-main .info-box .legend {
  font-size: 1.1em;
  font-weight: bold;
  }


/* B3 Pagination and posting links
-------------------------------------------------------------*/

/* Current inner-page pagination is the base layout.
   Keep the legacy absolute-positioned PunBB pagination out of the cascade. */
#pun > .punbb:not(#pun-index) #pun-main > .linkst,
#pun > .punbb:not(#pun-index) #pun-main > .linksb {
  box-sizing: border-box;
  float: none;
  width: 100%;
  min-height: 38px;
  padding: 8px 18px;
  color: var(--color-footer-text);
  font: normal var(--font-size-xs)/22px var(--font-forum-ui);
  }

#pun > .punbb:not(#pun-index) #pun-main > .linkst .pagelink,
#pun > .punbb:not(#pun-index) #pun-main > .linksb .pagelink {
  position: static;
  float: left;
  width: auto;
  font-size: var(--font-size-xs);
  line-height: 22px;
  text-transform: uppercase;
  letter-spacing: .8px;
  }

#pun > .punbb:not(#pun-index) #pun-main > .linkst .postlink,
#pun > .punbb:not(#pun-index) #pun-main > .linksb .postlink {
  position: static;
  float: right;
  width: auto;
  text-align: right;
  font-weight: normal;
  }

#pun > .punbb:not(#pun-index) #pun-main > .linkst .postlink a,
#pun > .punbb:not(#pun-index) #pun-main > .linksb .postlink a,
#pun-searchposts #pun-main > .topic .post-links a,
#pun-profile #viewprofile .emo-profile-page-edit a {
  display: inline-block;
  border: var(--ui-action-border);
  border-radius: var(--ui-action-radius);
  text-transform: uppercase;
  }

#pun > .punbb:not(#pun-index) #pun-main > .linkst .postlink a,
#pun > .punbb:not(#pun-index) #pun-main > .linksb .postlink a,
#pun-searchposts #pun-main > .topic .post-links a {
  min-height: 15px;
  margin-left: 8px;
  padding: var(--ui-action-padding);
  font: var(--ui-action-font);
  }

#pun > .punbb:not(#pun-index) #pun-main > .linkst .postlink a,
#pun > .punbb:not(#pun-index) #pun-main > .linksb .postlink a {
  color: var(--color-footer-text);
  background: var(--ui-action-background);
  }

#pun-searchposts #pun-main > .topic .post-links a,
#pun-profile #viewprofile .emo-profile-page-edit a {
  color: var(--color-text);
  background: var(--ui-action-light-background);
  }

#pun > .punbb:not(#pun-index) #pun-main > .linkst .postlink a:is(:hover, :focus),
#pun > .punbb:not(#pun-index) #pun-main > .linksb .postlink a:is(:hover, :focus),
#pun-searchposts #pun-main > .topic .post-links a:is(:hover, :focus),
#pun-profile #viewprofile .emo-profile-page-edit a:is(:hover, :focus) {
  color: var(--ui-action-hover-color);
  }

#pun-profile #viewprofile .emo-profile-page-edit a {
  padding: 5px 20px 6px;
  font: normal var(--font-size-sm)/14px var(--font-forum-ui);
  }

#pun > .punbb:not(#pun-index) #pun-main > .linksb {
  background: transparent;
  border: 0;
  }

.multipage {
  margin-top: 3em;
  }

.subscribelink {
  clear: both;
  padding-top: 0.3em;
  padding-bottom: 0.5em;
  }


/*************************************************************
C - MAIN CONTENT - SPECIFIC
**************************************************************/

/* C1 Form layout
-------------------------------------------------------------*/

/* C1.1 */
.punbb .formal .container {
  padding: 1.7em 2.3em 1.1em 2.3em;
  }

/* C1.2 */
.punbb .formsubmit {
  padding: 0 0 0 1.7em;
  margin: 1em 0 0 0;
  }

/* C1.3 */
.punbb .formsubmit input, .punbb .formsubmit a, .punbb .formsubmit span {
  margin: 0 0.6em 0 0
  }

/* C1.4 — EMO baseline: forms do not inherit the old PunBB frame */
.punbb fieldset,
.punbb fieldset fieldset {
  margin: 0;
  padding: 0;
  border: 0;
  }

/* C1.5 — legends are neutral until a component styles them explicitly */
.punbb fieldset legend,
.punbb fieldset legend span {
  margin: 0;
  padding: 0;
  border: 0;
  }

/* C1.8 */
.punbb .fs-box {
  padding: 1em 0 0.8em 0;
  }

/* C1.9 */
.punbb .fs-box p, .punbb .fs-box fieldset {
  padding: 0 0 0.8em 0
  }

/* C1.10 */
.punbb .inline .inputfield, .punbb .inline .selectfield, .punbb .inline .passfield {
  float: left;
  margin-right: 1em;
  }

/* C1.11 */
.punbb .inline .infofield {
  clear:both
  }

/* C1.12 */
.punbb .datafield br {
  display: none
  }

/* C1.13 */
.punbb .required label, .punbb .datafield span.input {
  font-weight: bold
  }

/* C1.14 */
.punbb .datafield span.input a {
  font-weight: normal;
  }

/* C1.15 */
.punbb .areafield span.input, .punbb p.longinput span.input {
  display: block;
  padding: 0 12em 0 0;
  height: 100%; /* For IE */
  }

/* C1.16 */
.punbb textarea, .punbb .longinput input {
  width: 64%;
  margin: 0;
  }

/* C1.17 */
.punbb .hashelp {
  position: relative;
  }

/* C1.18 */
.punbb .helplinks {
  display: block;
  position: absolute;
  top: 1em;
  right: 0;
  font-weight: normal;
  width: 36%;
  }

/* c1.19 */
.punbb #profile .helplinks {
  top: 1.5em;
  }

/* C1.20 */
.punbb .helplinks span {
  display: block;
  padding-bottom: 0.2em;
  }

/* C1.21 */
#pun-post .formal .info-box li {
  padding-left: 4px;
  list-style-type: square;
  list-style-position: inside;
  line-height: 1.5;
  margin: 0;
  }

/* C2 Table layout
-------------------------------------------------------------*/

/* C2.1 */
.punbb .main .tcl {
  overflow: hidden;
  text-align: left;
  width: 50%;
  border-left-style: none;
  border-left-width: 0;
}

/* C2.2 */
.punbb .main .tc2,
.punbb .main .tc3,
.punbb .main .tcmod {
  text-align: center;
  width: 10%;
}

/* C2.3 */
.punbb .main .tcr {
  overflow: hidden;
  text-align: left;
  width: 30%;
}


/* INDEX — columns */

#pun-index .main .tcl {
  width: auto;
}

#pun-index .main .tc2,
#pun-index .main .tc3 {
  display: none;
}

#pun-index .main .tcr {
  position: relative;
  width: 290px;
  overflow: visible;
  font-family: var(--font-forum-ui);
  font-size: var(--font-size-xs);
  line-height: 1.45;
}

#pun-index .main .tcr a {
  font-size: var(--font-size-sm);
}


/* INDEX — last post */

#pun-index .main tbody td.tcr {
  padding: 11px 16px 11px 71px;
  vertical-align: middle;
  border-left: 0;
}

#pun-index .main .tcr .user-avatar {
  position: absolute;
  left: -52px;
  top: 50%;
  margin: 0;
  float: none;
  transform: translateY(-50%);
}

#pun-index .main .tcr .user-avatar a {
  display: block;
  width: 35px;
  height: 35px;
}

#pun-index .main .tcr .avatar-image {
  display: block;
  width: 35px;
  height: 35px;
  margin: 0;
  border-radius: 50%;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

#pun-index .main .tcr .lastpost-link,
#pun-index .main .tcr .lastpost {
  position: relative;
  left: var(--lastpost-text-shift);
}


/* C2.4 */
#pun-userlist .main .tcl,
#pun-searchtopics .main .tcl,
#pun-modviewforum .main .tcl {
  width: 40%;
}

/* C2.5 */
#pun-userlist .main .tc2,
#pun-searchtopics .main .tc2 {
  text-align: left;
  width: 20%;
}

/* C2.6 */
#pun-debug table .tcl {
  width: 15%;
  white-space: normal;
}

/* C2.7 */
#pun-debug .tcr {
  width: 85%;
  white-space: normal;
}


/* C2.8 — forum content */

#pun-index .tcl .tclcon {
  width: var(--forum-content-width);
  margin-left: var(--forum-content-indent);
}

#pun-index .tcl h3 {
  margin: 0 0 7px;
  font-family: var(--font-forum-title);
  font-size: var(--font-size-forum-title);
  line-height: var(--line-height-forum-title);
  font-weight: 500;
  letter-spacing: .2px;
  text-transform: uppercase;
}

#pun-index .tcl h3 a {
  font-size: inherit;
  line-height: inherit;
  font-weight: inherit;
  text-decoration: none;
}

#pun-index .tcl .forumdesc,
#pun-index .bb-forum-about {
  font: normal var(--font-size-forum-description)/var(--line-height-forum-description) var(--font-forum-ui);
}

#pun-index .bb-forum-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--forum-link-gap);
  margin-top: 7px;
}

#pun-index .bb-forum-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: var(--forum-link-min-width);
  min-height: 15px;
  padding: 0 12px 2px;
  border: 1px solid transparent;
  border-radius: var(--forum-link-radius);
  font: normal var(--font-size-xs)/11px var(--font-forum-ui);
  text-align: center;
  text-decoration: none;
  text-transform: lowercase;
}

#pun-index .tcl .modlist {
  font-size: var(--font-size-xs);
  line-height: 1.4;
}


/* C2.9 */
.punbb td span.youposted {
  position: absolute;
  margin-left: -1em;
  font-weight: bold;
}

/* C2.10 */
.punbb td .modlist {
  display: block;
  padding-top: 0.3em;
}

/* C2.11 */
.punbb .main td {
  padding: 0.8em 1em;
  border-style: solid none none solid;
  border-width: 1px 0 0 1px;
}

/* C2.12 */
.punbb .main th {
  padding: 0.4em 1em;
  border-style: none none none solid;
  border-width: 0 0 0 1px;
}

/* C2.13 */
.punbb tbody.hasicon td.tcl {
  padding-left: 3.2em;
}

/* C2.14 */
.punbb div.icon {
  width: 0;
  height: 0;
  margin-top: 0.1em;
  border-style: solid;
  border-width: 0.6em;
  line-height: 0;
}

/* C2.15 */
.punbb table div.icon {
  position: absolute;
  margin-left: -2.2em;
  font-size: 1.05em;
}


/* INDEX — rows */

#pun-index .main tbody td {
  height: 78px;
  padding-top: 11px;
  padding-bottom: 11px;
  border-top: 0;
  border-left: 0;
  vertical-align: middle;
}

#pun-index .category tbody tr:first-child td {
  padding-top: var(--category-edge-padding);
}

#pun-index .category tbody tr:last-child td {
  padding-bottom: var(--category-edge-padding);
}

#pun-index .main tbody td.tcl {
  position: relative;
  padding-left: 65px;
  padding-right: 20px;
}

#pun-index .main tbody.hasicon td.tcl {
  padding-left: 65px;
}


/* INDEX — forum status icons */

#pun-index .main table div.icon {
  position: absolute;
  top: 50%;
  left: 25px;
  width: 31px;
  height: 31px;
  margin: -15.5px 0 0;
  border: 0;
  background: var(--topic-icon-default) no-repeat center;
  background-size: contain;
}

#pun-index .main table div.icon.inew {
  background-image: var(--topic-icon-new);
}

#pun-index .main table tr.iredirect div.icon {
  background-image: var(--topic-icon-default);
}

/* C3 Topics — EMO baseline
-------------------------------------------------------------*/

/*
 * The old PunBB 19em post layout, borders and dashed separators are not
 * global defaults anymore. Redesigned message surfaces define their own
 * geometry in the page/component sections below.
 */
.punbb .post .container,
.punbb .post h3,
.punbb .post h3 span,
.punbb .post-body,
.punbb .post-links {
  border: 0;
  }

.punbb .post .container {
  margin-top: 0;
  padding-bottom: 0;
  }

.punbb .post h3 span,
.punbb .post-body,
.punbb .post-links,
.punbb .post-links ul {
  margin-left: 0;
  }

.punbb .post .post-author {
  float: none;
  width: auto;
  margin-top: 0;
  overflow: visible;
  }

.punbb .post .post-author ul,
.punbb .post .post-author p {
  padding: 0;
  }

.punbb .post-box {
  padding: 0;
  }

.punbb .post-links ul {
  height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  line-height: inherit;
  }

.punbb .post-links li {
  padding-left: 0;
  }

/* Profile typography is intentional, not part of the legacy post geometry. */
.pa-author {
  font-size: 1.1em;
  font-weight: bold;
  }

li.pa-title {
  padding-bottom: 0.4em;
  font-weight: bold;
  }

li.pa-online {
  line-height: 0.8em;
  padding-left: 0.4em;
  margin-top: 0.7em;
  }

.punbb .clearer {
  clear: both;
  height: 0;
  font-size: 0;
  }


/* C4 Moderator menu
-------------------------------------------------------------*/

/* C4.1 */
.punbb .modmenu .container {
  padding: 0.5em 1em;
  text-align: right;
  }

/* C4.2 */
.punbb .modmenu strong, .punbb .modmenu a {
  height: 1.8em;
  line-height: 1.8em;
  }

/* C4.3 */
.punbb .modmenu .container strong {
  float: left;
  }

/* C4.4 */
.punbb .modmenu input {
  margin-left: 1em;
  }


/* C5 Message boxes
-------------------------------------------------------------*/

/* C5.1 */
.punbb .info .container {
  padding: 0.8em 1em
  }

/* C5.2 */
.punbb .info .container .backlink {
  padding-top: 0.8em;
  }


/* C6 Profile
-------------------------------------------------------------*/

/* C6.1 */
#profile .container {
  padding-left: 18.6em;
  }

/* C6.2 */
#profilenav {
  float: left;
  width: 14em;
  margin-left: -16.3em;
  display: inline;
  }

/* C6.3 */
#profilenav li {
  padding-bottom: 0.8em;
  font-weight: bold;
  }

/* C6.4 */
#viewprofile ul, #profilenav ul {
  border-style: solid;
  border-width: 1px;
  padding: 1.5em 18px 0.8em 18px;
  margin: 0 0 1em 0;
  }

/* C6.5 */
#viewprofile h2, #profilenav h2 {
  background: transparent;
  border: none;
  padding: 0 0 0 0;
  margin: 0 14px -0.6em 14px;
  }

/* C6.6 */
#viewprofile h2 span, #profilenav h2 span {
  padding: 0 5px;
  position: relative;
  }

/* C6.7 */
#viewprofile li, #setmods dl {
  padding: 0 0 0 16em;
  margin-bottom: 0.2em;
  }

/* C6.8 */
#viewprofile li span {
  float: left;
  width: 14em;
  margin-left: -16em;
  padding: 0.5em 1em;
  font-weight: bold;
  }

/*C6.9 */
#setmods dt {
  float: left;
  width: 14em;
  margin-left: -16em;
  padding: 0.8em 1em;
  font-weight: bold;
  display: inline;
  }

/* C6.10 */
#viewprofile li strong, #viewprofile li div, #setmods dd {
  display: block;
  padding: 0.5em 1em;
  font-weight: normal;
  }

/* C6.11 */
.punbb img.avatardemo {
  float: right;
  margin: 0 0 0.8em 1.8em
  }


/* C6.12 Additional profile fields editor
-------------------------------------------------------------*/

#pun-profile #profile8.emo-profile-field-editor {
  display: flow-root;
  }

.emo-profile-editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  align-items: start;
  gap: 18px;
  }

.emo-profile-editor-fields {
  min-width: 0;
  }

#pun-profile #profile8 .emo-profile-editor-fields > .emo-profile-field-card {
  position: relative;
  overflow: hidden;
  margin-bottom: var(--section-gap);
  border: 1px solid var(--color-border);
  border-radius: var(--section-radius);
  background: var(--color-surface-soft);
  }

.emo-profile-editor-preview {
  width: 220px;
  margin: 0;
  }

.emo-profile-editor-preview__title {
  min-height: 27px;
  padding: 7px 16px;
  border-bottom: 1px solid var(--color-border);
  margin: 0;
  color: var(--color-text-muted);
  font: 700 var(--font-size-xs)/12px var(--font-forum-ui);
  letter-spacing: .8px;
  text-align: center;
  text-transform: uppercase;
  }

#pun-profile .emo-profile-editor-preview .emo-profile-page-card-host,
#pun-profile .emo-profile-editor-preview .emo-profile-card {
  width: 220px;
  }

#pun-profile .emo-profile-editor-preview .emo-profile-page-card-host {
  padding: 0;
  }

#pun-profile .emo-profile-editor-preview .emo-profile-editor-preview__badge {
  cursor: default;
  }

#pun-profile .emo-profile-editor-preview .emo-profile-editor-preview__badge:is(:hover, :focus-visible) {
  transform: translateX(-50%);
  }

#pun-profile #profile8 .emo-profile-field-card > legend {
  float: left;
  width: 100%;
  padding: 7px 16px;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface-alt);
  text-align: center;
  }

#pun-profile #profile8 .emo-profile-field-card > legend span {
  font-weight: 700;
  text-transform: uppercase;
  }

#pun-profile #profile8 .emo-profile-field-card > .fs-box {
  clear: both;
  padding: 16px;
  }

#pun-profile #profile8 .emo-profile-field-card :is(
  input[type="text"],
  input[type="url"],
  textarea,
  select
) {
  width: 100%;
  max-width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--color-border-soft);
  border-radius: var(--section-radius);
  background: var(--color-surface);
  color: var(--color-text);
  }

#pun-profile #profile8 .emo-profile-field-card textarea {
  min-height: 82px;
  resize: vertical;
  }

#pun-profile #profile8 .emo-profile-field-card--choice > .fs-box {
  display: flex;
  align-items: center;
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  scrollbar-width: thin;
  scrollbar-color: var(--color-dark) transparent;
  }

#pun-profile #profile8 .emo-profile-field-card--choice > .fs-box br {
  display: none;
  }

#pun-profile #profile8 .emo-profile-field-card--choice p:has(input[type="radio"]) {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px 4px 0;
  vertical-align: middle;
  }

#pun-profile #profile8 .emo-profile-field-card--choice p:has(input[type="radio"]) img {
  max-width: 96px;
  max-height: 62px;
  object-fit: cover;
  }

#pun-profile #profile8 .emo-profile-field-card--technical {
  background: var(--color-surface-alt);
  }

#pun-profile #profile8 .emo-profile-editor-fields > .formsubmit {
  clear: both;
  }

#pun-profile #profile8 .emo-profile-editor-fields > .formsubmit input.button {
  min-height: 25px;
  padding: var(--ui-action-padding);
  border: var(--ui-action-border);
  border-radius: var(--ui-action-radius);
  background: var(--ui-action-light-background);
  color: var(--color-text);
  font: var(--ui-action-font);
  text-transform: uppercase;
  }

#pun-profile #profile8 .emo-profile-editor-fields > .formsubmit input.button:is(:hover, :focus) {
  color: var(--ui-action-hover-color);
  }

@media (max-width: 900px) {
  .emo-profile-editor-layout {
    grid-template-columns: minmax(0, 1fr);
    }

  .emo-profile-editor-preview {
    grid-row: 1;
    margin: 0 auto;
    }
  }


/* C7 User list
-------------------------------------------------------------*/

/* C7.1 */
#pun-userlist .formal, #pun-userlist .formal .container {
  border-bottom: none;
  margin-bottom: 0;
  }

/* C7.2 */
#pun-userlist .usertable .container {
  padding: 0 2.3em 2.3em 2.3em;
  border-top: none;
  }

/*************************************************************
D - PUNBB SECTIONS OTHER THAN MAIN CONTENT
**************************************************************/
/* D1 Logo and description
-------------------------------------------------------------*/

/* D1.1 */
#pun-title {
    position: relative;
    width: var(--forum-width);
    height: var(--header-height);
    margin: 0;
    border: 0;

    background-image: url("https://forumstatic.ru/files/001c/c3/b0/32564.jpg");
    background-repeat: no-repeat;
    background-position: center top;
    background-size: 100% auto;
}

/* Hide standard forum title */
#pun-title h1 {
    display: none;
}

#pun-title table {
    display: none;
}


/* Header selector */
.header-selector {
    position: absolute;
    top: 30px;
    left: -28px;

    display: flex;
    flex-direction: column;
    gap: 5px;

    z-index: 10;
}

.header-selector button {
    display: block;

    width: 25px;
    height: 25px;

    margin: 0;
    padding: 0;

    border: 0;
    outline: 0;

    background-color: transparent;
    background-image: url("https://forumstatic.ru/files/001c/c3/b0/59145.png");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;

    cursor: pointer;
}

.header-selector button.is-active {
    background-image: url("https://forumstatic.ru/files/001c/c3/b0/37392.png");
}

.header-selector button:hover {
    transform: scale(1.08);
}

/* D1.2 Header overlay
-------------------------------------------------------------*/

#pun-title .header-overlay {
    position: absolute;
    inset: 0;
    z-index: 6;
    pointer-events: none;
}

#pun-title .header-overlay a {
    pointer-events: auto;
}


/* =========================================================
   WANTED — LEFT SIDE
   ========================================================= */

/* screaming mouth */

#pun-title .header-wanted-decorate {
    position: absolute;
    top: -44px;
    left: -4px;

    display: block;
    width: 80px;
    height: auto;
}


/* three wanted circles */

#pun-title .header-wanted-list {
    position: absolute;
    top: -18px;
    left: 74px;

    display: flex;
    gap: 8px;
}

#pun-title .header-wanted {
    position: relative;
    display: block;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    overflow: hidden;
    text-decoration: none;
    background: url("https://forumstatic.ru/files/001c/c3/b0/14019.png") no-repeat center;
    background-size: contain;
}

#pun-title .header-wanted__photo {
    position: absolute;
    top: 4px;
    left: 4px;
    display: block;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center;
    filter: grayscale(100%);
}

/* =========================================================
   ADMINS — RIGHT SIDE
   ========================================================= */

/* three eyes */

#pun-title .header-admin-decorate {
    position: absolute;

    top: -40px;
    right: -30px;

    display: block;
    width: 105px;
    height: auto;
}


/* admin labels area */

#pun-title .header-admin-links {
    position: absolute;

    top: -20px;
    right: -30px;

    width: 185px;
    height: 145px;
}


/* common label */

#pun-title .header-admin-link {
    position: absolute;
    display: block;
    text-decoration: none;
}

#pun-title .header-admin-link img {
    display: block;
    width: auto;
    height: 23px;
}


/* Sirius */

#pun-title .header-admin-link--sirius {
    top: 7px;
    right: 112px;
}


/* Edgar */

#pun-title .header-admin-link--edgar {
    top: 47px;
    right: 116px;
}


/* James */

#pun-title .header-admin-link--james {
    top: 87px;
    right: 110px;
}

/* =========================================================
   BEST PLAYER / BEST EPISODE
   ========================================================= */

#pun-title .header-best {
    position: absolute;
    top: 105px;
    left: 45px;
    width: 245px;
    height: 150px;
}

#pun-title .header-best-item {
    position: absolute;
    display: flex;
    align-items: center;

    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;

    color: #343232;
    font-size: 8px;
    font-weight: bold;
    text-decoration: none;

    z-index: 2;
}

/* episode — lower/left */

#pun-title .header-best-episode {
    left: -25px;
    top: 15px;

    width: 150px;
    height: 96px;

    transform: rotate(-8deg);
    padding: 5px 15px 0 22px;
}

/* player — upper/right */

#pun-title .header-best-player {
    left: 108px;
    top: -40px;

    width: 136px;
    height: 76px;

    transform: rotate(-5deg);
    padding: 3px 13px 0 20px;
}

/* rocker hand */

#pun-title .header-best-icon {
    position: absolute;
    left: 105px;
    top: 12px;

    width: 72px;
    height: auto;
    transform: rotate(-2deg);

    z-index: 3;
}

/* =========================================================
   STORY / FAQ / QUENTA
   ========================================================= */

#pun-title .header-menu-links {
    position: absolute;
    top: 145px;
    right: -20px;

    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;

    z-index: 7;
}

#pun-title .header-menu-link {
    display: block;
    margin: 0;
    padding: 0;
    text-decoration: none;
}

#pun-title .header-menu-link img {
    display: block;
    width: 155px;
    height: auto;
}

#pun-title .header-timer {
    position: absolute;
    left: -5px;
    bottom: 18px;

    width: 210px;
    height: 55px;
}

#pun-title .header-timer-plate {
    position: absolute;
    left: 38px;
    top: 20px;

    width: 170px;
    height: auto;
}

#pun-title .header-timer-icon {
    position: absolute;
    left: 0;
    top: 0;

    width: 55px;
    height: auto;

    z-index: 2;
}

#pun-title .header-timer-value {
    position: absolute;
    left: 73px;
    top: 24px;

    z-index: 3;

    color: #eee9e7;
    font-family: Verdana, Arial, sans-serif;
    font-size: 10px;
    font-weight: bold;
    letter-spacing: 1px;
}


/* =========================================================
   BOTTOM RIGHT STICKER
   ========================================================= */

#pun-title .header-sticker-decorate {
    position: absolute;
    right: -18px;
    bottom: 80px;

    display: block;
    width: 160px;
    height: auto;
}


/* D2 Page navigation
-------------------------------------------------------------*/

/* D2.1 */
#pun-pagelinks {
  position: absolute;
  top: -15px;
  left: 0;
  margin: 0;
  border: none;
  padding: 0;
  width: 100%;
  }

/* D2.2 */
#pun-pagelinks .container {
  background: transparent;
  border: none;
  padding: 0}

/* D2.3 */
#pun-pagelinks .container li {
  display: inline
  }

/* D2.4 */
#pun-pagelinks li a, #pun-pagelinks a:link, #pun-pagelinks a:hover {
  height: 2em;
  line-height: 2em;
  padding: 0;
  font-size: 1.2em;
  margin-left: -9999px;
  display: block;
  float:left;
  width: 100%;
  }

/* D2.5 */
#pun-pagelinks a:active, #pun-pagelinks a:focus {
  position:relative;
  margin: 0;
  }

#pun-pagelinks li a span {
  display:block;
  margin: 0 1em
  }

/* D3 Forum navigation
-------------------------------------------------------------*/

/* D3.1 */
#pun-navlinks,
#pun-navlinks .container {
  border: 0;
  }

#pun-navlinks {
  position: relative;
  width: calc(100% - (var(--service-panel-inset) * 2));
  margin: var(--service-panel-top-gap) auto 0;
  }

#pun-navlinks::before {
  position: absolute;
  top: calc(0px - var(--service-panel-top-gap));
  left: calc(0px - var(--service-panel-inset));
  width: calc(100% + var(--service-panel-inset) + var(--service-panel-inset));
  height: var(--service-panel-top-gap);
  content: "";
  pointer-events: none;
  }

/* D3.2 */
#pun-navlinks .container {
  display: flex;
  width: 100%;
  margin: 0;
  justify-content: center;
  align-items: center;
  min-height: 34px;
  padding: 7px var(--service-panel-side-padding) 4px;
  border-radius: var(--service-panel-radius) var(--service-panel-radius) 0 0;
  }

#pun-navlinks ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 7px 20px;
  }

/* D.3 */
#pun-navlinks li {
  display: block;
  padding: 0;
  }

/* D3.4 */
#pun-navlinks li a {
  display: block;
  font-size: var(--font-size-lg);
  line-height: 1.2;
  font-weight: bold;
  }

/* D4 User links
-------------------------------------------------------------*/

/* D4.1 */
#pun-ulinks {
  width: calc(100% - (var(--service-panel-inset) * 2));
  margin: 0 auto;
  border: 0;
  font-size: var(--font-size-xs);
  line-height: 1.3;
  }

/* D4.2 */
#pun-ulinks .container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 24px;
  padding: 0 var(--service-panel-side-padding) 6px;
  border: 0;
  }

#pun-ulinks ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 5px 11px;
  }

/* D4.3 */
#pun-ulinks li, #pun-ulinks li a {
  display: block;
  padding: 0;
  border: 0;
  white-space: nowrap;
  }

/* D4.4 */
#pun-ulinks li a {
  font-size: inherit;
  line-height: inherit;
  }

/* D4.5 */
#pun-ulinks li.item1, #pun-ulinks li.item1 a {
  border-left-style: none;
  border-left-width: 0;
  padding-left: 0
  }

/* D5 Welcome box and Top Breadcrumbs
-------------------------------------------------------------*/

/* D5.1 */
#pun-status {
  position: absolute;
  z-index: 7;
  top: calc(var(--header-height) - 60px);
  right: var(--service-panel-side-padding);
  float: none;
  width: 480px;
  max-width: calc(100% - (var(--service-panel-side-padding) * 2));
  margin: 0;
  border: 0;
  }

/* D5.2 */
#pun-status .container {
  display: flex;
  width: 100%;
  min-height: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  padding: 0;
  text-align: right;
  font-size: var(--font-size-sm);
  line-height: 1.3;
  }

/* D5.3 */
#pun-status span {
  white-space: nowrap;
  margin-right: 0.5em;
  }

#pun-status span.item1 {
  flex-basis: 100%;
  margin-right: 0;
  }

/* D5.4 */
#pun-crumbs1 {
  position: relative;
  left: auto;
  float: none;
  width: calc(100% - (var(--service-panel-inset) * 2));
  margin: 0 auto;
  overflow: visible;
  border: 0;
  border-radius: 0 0 var(--service-panel-radius) var(--service-panel-radius);
  font-size: var(--font-size-sm);
  font-weight: bold;
  }

/* D5.5 */
#pun-crumbs1 p.container {
  position: relative;
  top: -12px;
  display: flex;
  align-items: center;
  min-height: var(--service-panel-bottom-height);
  padding: 5px var(--service-panel-side-padding) 7px;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  font-size: inherit;
  white-space: nowrap;
  }

/* D5.6 */
#pun-break1 {
  display: none;
  }

#pun-break2 {
  clear: both;
  height: 0;
  margin: 0;
  border: 0;
  }

#pun-index #pun-break2 + .section {
  margin-bottom: 0;
  }

/* D6 Announcement
-------------------------------------------------------------*/

/* D6.1 */
#pun-announcement {
  width: calc(100% - (var(--service-panel-inset) * 2));
  margin: 0 auto;
  border: 0;
  }

/* D6.2 */
#pun-announcement .container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 49px;
  padding: 7px var(--service-panel-side-padding) 15px;
  border: 0;
  }

/* D6.3 */
#pun-announcement .html-box {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px var(--quick-link-gap);
  width: 100%;
  }

#pun-announcement .quick-link {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 26px;
  padding: 6px 14px;
  border-radius: var(--quick-link-radius);
  font: normal var(--font-size-md)/1.2 var(--font-main);
  white-space: nowrap;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
  }

/* D7 Statistics
-------------------------------------------------------------*/

/* D7.1 */
#pun-stats {
  position: relative;
  min-height: var(--footer-height);
  margin: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0 0 var(--footer-radius) var(--footer-radius);
  background-image: var(--footer-texture-image);
  background-repeat: repeat;
  isolation: isolate;
  }

#pun-stats::before,
#pun-stats::after {
  position: absolute;
  content: "";
  pointer-events: none;
  }

#pun-stats::before {
  z-index: 0;
  inset: 0;
  background: var(--footer-decor-image) no-repeat right center / auto 100%;
  }

#pun-stats::after {
  z-index: 3;
  top: 0;
  right: 0;
  width: 254px;
  height: 100%;
  background-image: var(--footer-paper-image);
  background-repeat: no-repeat;
  background-position: right 8px;
  background-size: auto 130%;
  }

#pun-stats h2 {
  position: absolute;
  z-index: 2;
  top: 18px;
  left: 24px;
  width: var(--footer-title-width);
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  }

#pun-stats .statscon {
  position: relative;
  z-index: 2;
  width: var(--footer-content-width);
  }

#pun-stats .container {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, max-content);
  align-items: start;
  justify-content: space-between;
  gap: 0 12px;
  width: 100%;
  min-height: var(--footer-height);
  padding: 18px 20px 10px calc(var(--footer-title-width) + 20px);
  border: 0;
  background: transparent;
  font-size: var(--font-size-sm);
  line-height: 1.5;
  }

#pun-stats h2, #pun-stats h2 span {
  font-family: var(--font-forum-ui);
  font-size: var(--font-size-category-title);
  line-height: var(--line-height-category-title);
  font-weight: normal;
  letter-spacing: var(--letter-spacing-category-title);
  text-transform: uppercase;
  }

/* D7.2 */
#pun-stats li.item1,
#pun-stats li.item2,
#pun-stats li.item3,
#pun-stats li.item4 {
  display: flex;
  float: none;
  clear: none;
  min-width: 0;
  min-height: var(--line-height-category-title);
  flex-direction: row;
  align-items: baseline;
  gap: 4px;
  text-align: center;
  line-height: var(--line-height-category-title);
  white-space: nowrap;
  }

#pun-stats li.item1 span,
#pun-stats li.item2 span,
#pun-stats li.item3 span,
#pun-stats li.item4 span {
  min-height: 0;
  font-size: 0;
  line-height: 0;
  text-transform: none;
  white-space: nowrap;
  }

#pun-stats li.item1 span::before,
#pun-stats li.item2 span::before,
#pun-stats li.item3 span::before,
#pun-stats li.item4 span::before {
  font: normal 7px/var(--line-height-category-title) var(--font-forum-ui);
  letter-spacing: var(--letter-spacing-category-title);
  text-transform: uppercase;
  }

#pun-stats li.item1 span::before { content: "Тем:"; }
#pun-stats li.item2 span::before { content: "Сообщений:"; }
#pun-stats li.item3 span::before { content: "Пользователей:"; }
#pun-stats li.item4 span::before { content: "Новичок:"; }

#pun-stats li.item1 strong,
#pun-stats li.item2 strong,
#pun-stats li.item3 strong,
#pun-stats li.item4 strong {
  font-size: 7px;
  line-height: var(--line-height-category-title);
  font-weight: normal;
  letter-spacing: var(--letter-spacing-category-title);
  text-transform: uppercase;
  }

/* D7.4 */
li#onlinelist {
  position: absolute;
  top: 52px;
  bottom: calc(var(--footer-crumbs-height) + var(--footer-crumbs-bottom-gap) + 8px);
  left: 24px;
  float: none;
  width: calc(var(--footer-content-width) - 48px);
  margin: 0;
  border: 0;
  max-height: none;
  padding-right: 6px;
  overflow-x: hidden;
  overflow-y: auto;
  font-size: var(--font-size-sm);
  line-height: 15px;
  scrollbar-width: thin;
  }

/* D7.5 */
li#onlinelist div {
  padding: 0;
  border: 0;
  }

#pun-index #pun-stats + .section {
  margin-bottom: 0;
  background: transparent;
  }

#pun-index #pun-break3,
#pun-index #pun-break4,
#pun-index #pun-about {
  display: none;
  }

#pun-index #pun-crumbs2 {
  position: relative;
  z-index: 4;
  display: block;
  width: 100%;
  height: var(--footer-crumbs-height);
  margin: calc(0px - var(--footer-crumbs-height) - var(--footer-crumbs-bottom-gap)) 0 var(--footer-crumbs-bottom-gap);
  overflow: hidden;
  border-radius: 0;
  color: var(--color-footer-text);
  font: normal var(--font-size-sm)/var(--footer-crumbs-height) var(--font-forum-ui);
  }

#pun-index #pun-crumbs2 .container {
  height: 100%;
  padding: 0 24px;
  overflow: hidden;
  color: inherit;
  font: inherit;
  white-space: nowrap;
  text-overflow: ellipsis;
  }

#pun-index #pun-crumbs2 strong {
  font-weight: normal;
  }

#pun-index #pun-crumbs2 a,
#pun-index #pun-crumbs2 a:link,
#pun-index #pun-crumbs2 a:visited {
  color: var(--color-footer-text);
  text-decoration: none;
  }

#pun-index #pun-crumbs2 a:hover,
#pun-index #pun-crumbs2 a:focus {
  color: var(--color-accent-soft);
  }

#pun-index #html-footer {
  position: relative;
  z-index: 4;
  display: block;
  width: 0;
  height: 0;
  margin: 0;
  border: 0;
  background: transparent;
  }

#pun-index #html-footer:has(.container > a img) {
  width: var(--footer-banner-track-width);
  height: var(--footer-height);
  margin-top: calc(0px - var(--footer-height));
  margin-right: var(--footer-banner-track-right);
  margin-bottom: 0;
  margin-left: auto;
  }

#pun-index #html-footer .container {
  position: absolute;
  top: 50%;
  left: 0;
  display: grid;
  grid-template-columns: repeat(3, var(--footer-banner-width));
  grid-auto-rows: var(--footer-banner-height);
  align-content: start;
  justify-content: start;
  gap: var(--footer-banner-gap);
  width: 100%;
  height: var(--footer-banner-track-height);
  padding: 6px 10px 6px 0;
  overflow-x: hidden;
  overflow-y: auto;
  border: 0;
  background: transparent;
  scrollbar-width: thin;
  scrollbar-gutter: stable;
  transform: translateY(-50%);
  }

#pun-index #html-footer .container > a {
  position: relative;
  z-index: 1;
  display: block;
  }

#html-footer .footer-banner {
  display: none;
  }

#pun-index #html-footer .footer-banner {
  display: block;
  }

#pun-index #html-footer .container > a img {
  display: block;
  width: var(--footer-banner-width);
  height: var(--footer-banner-height);
  object-fit: cover;
  }

#pun-index #html-footer .container::after {
  position: absolute;
  z-index: 0;
  top: 6px;
  left: 0;
  width: 276px;
  height: 105px;
  content: "";
  background-image: linear-gradient(
    var(--color-footer-banner-placeholder),
    var(--color-footer-banner-placeholder)
    );
  background-repeat: space;
  background-size: var(--footer-banner-width) var(--footer-banner-height);
  pointer-events: none;
  }

/* D7.6 Page scroll controls */
.scroll-controls {
  position: fixed;
  z-index: 9999;
  top: 50%;
  right: max(
    10px,
    calc(
      (100vw - var(--forum-width)) / 2 -
      var(--scroll-control-width) -
      var(--scroll-control-side-gap)
    )
  );
  display: flex;
  width: var(--scroll-control-width);
  flex-direction: column;
  align-items: center;
  gap: 0;
  transform: translateY(-50%);
  pointer-events: none;
  box-sizing: border-box;
  }

.scroll-control {
  display: block;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  overflow: visible;
  border: 0;
  outline: 0;
  background: transparent;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateX(8px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
  pointer-events: none;
  }

.scroll-control.is-visible {
  opacity: .84;
  visibility: visible;
  transform: translateX(0);
  pointer-events: auto;
  }

.scroll-control.is-visible:hover,
.scroll-control.is-visible:focus-visible {
  opacity: 1;
  transform: translateX(-3px);
  }

.scroll-control img {
  display: block;
  width: auto;
  max-width: var(--scroll-control-width);
  height: auto;
  margin: 0 auto;
  }

@media (max-width: 1100px) {
  .scroll-controls {
    display: none;
    }
}

/* D8 Quick Jump - About - Bottom Breadcrumbs
-------------------------------------------------------------*/

/* D8.1 */
#pun-qjump {
  margin: 0;
  border: none;
  width: 50%;
  position: relative;
  float: left;
  }

/* D8.2 */
#pun-qjump .container {
  border: none;
  background: transparent;
  padding: 0.8em 1em;
  }

/* D8.3 */
#pun-about {
  margin-top: 0;
  }

/* D8.4 */
#pun-about .container {
  border-top-style: none;
  text-align: right;
  line-height: 150%;
  padding: 0.8em 1em;
  }

/* D8.5 */
#pun-about p span {
  display:block;
  padding-left: 50%;
  }

/* D8.6 */
#pun-crumbs2 {
  width: 100%;
  margin: 0;
  overflow: hidden;
  border: 0;
  font-size: var(--font-size-sm);
  font-weight: bold;
  }

/* D8.7 */
#pun-crumbs2 .container {
  padding: 9px 15px;
  border: 0;
  font-size: inherit;
  }

/* D8.8 */
#pun-break4 {
  margin: -2px 1em;
  border-style: solid none;
  border-width: 1px 0;
  position: relative;
  height: 0;
  z-index: 1;
  }

/* D8.9 */
div.punbb-admin #pun-about .container {
  border-top-style: solid;
  border-top-width: 1px;
  }


/* D9 Help file
-------------------------------------------------------------*/

/* D9.1 */
#pun-help .formal .info-box h3.legend {
  border-bottom-style: solid;
  border-bottom-width: 1px;
  padding-bottom: 0;
  margin-bottom: 0.8em;
  }

/* D9.2 */
#pun-help .formal .info-box h3.legend span {
  padding-bottom: 0.6em;
  display: block;
  border-bottom-style: solid;
  border-bottom-width: 1px;
  font-size: 1.1em;
  }

/* D9.3 */
#pun-help .formal p, #pun-help .formal dd {
  margin-bottom: 1em
  }

/* D9.4 */
#pun-help .formal ul, #pun-help .formal dl {
  padding: 0 0 0 1em
  }

/* D9.5 */
#pun-help .formal li {
  padding: 0;
  line-height: 130%
  }

/* D9.6 */
#pun-help .formal li * {
  vertical-align: text-top
  }

/* D9.7 */
#pun-help .formal dt span {
  font: 1.4em/120% monaco, "bitstream vera sans mono", "courier new", courier, monospace
  }

/* D9.8 */
#pun-help .formal .parsedmsg, #pun-help .formal .parsedmsg .incode {
  padding-bottom: 0;
  }


/*************************************************************
E - RESPONSIVE
**************************************************************/

@media (max-width: 1140px) {
  #pun {
    width: calc(100% - 24px);
    max-width: none;
    }
}

@media (max-width: 760px) {
  :root {
    --forum-side-gap: 12px;
    --section-radius: 6px;
    }

  #pun {
    width: calc(100% - 16px);
    }

  #pun-index .category > h2 span {
    padding: 10px var(--category-title-offset);
    font-size: var(--font-size-category-title);
    line-height: var(--line-height-category-title);
    }

  #pun-index .main .tcr {
    width: 190px;
    }

  #pun-index .main tbody td.tcl, #pun-index .main tbody.hasicon td.tcl {
    padding-left: 68px;
    }

  #pun-index .main table div.icon {
    left: 18px;
    width: 32px;
    height: 32px;
    margin-top: -16px;
    }

  #pun-crumbs1 {
    position: static;
    float: none;
    width: calc(100% - (var(--service-panel-inset) * 2));
    margin-right: auto;
    margin-left: auto;
    }

  #pun-stats {
    min-height: 220px;
    }

  #pun-stats::before {
    opacity: .45;
    background-size: cover;
    }

  #pun-stats::after {
    opacity: .5;
    }

  #pun-stats h2,
  #pun-stats .statscon {
    width: 100%;
    }

  #pun-stats h2 {
    position: relative;
    top: auto;
    left: auto;
    padding: 16px 18px 0;
    }

  #pun-stats .container {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 12px;
    min-height: 0;
    padding: 14px 18px 18px;
    }

  li#onlinelist {
    position: static;
    grid-column: 1 / -1;
    width: 100%;
    margin-top: 4px;
    }

  #pun-index #html-footer:has(.container > a img) {
    width: calc(100% - 36px);
    height: var(--footer-banner-track-height);
    margin: 0 auto;
    }

  #pun-index #html-footer .container {
    position: relative;
    top: auto;
    height: var(--footer-banner-track-height);
    transform: none;
    }

  #pun-crumbs1 p.container {
    min-height: 36px;
    padding: 6px var(--service-panel-side-padding) 9px;
    }
}

/* The platform mobile stylesheet turns both link lists into 48px sprite
   buttons and a black dropdown. EMO keeps their text and scales the existing
   navigation component down instead. These declarations are protected because
   /style/mobile.css is loaded after the theme and uses !important itself. */
@media screen and (max-width: 540px) {
  #pun #pun-navlinks,
  #pun #pun-ulinks {
    width: calc(100% - 20px) !important;
    height: auto !important;
    margin-right: auto !important;
    margin-left: auto !important;
    border: 0 !important;
    background-color: transparent;
    background-image: none !important;
    box-shadow: none;
  }

  #pun #pun-navlinks {
    margin-top: var(--service-panel-top-gap) !important;
  }

  #pun #pun-ulinks {
    position: static !important;
    top: auto !important;
    right: auto !important;
    line-height: 1.2 !important;
  }

  #pun #pun-navlinks .container,
  #pun #pun-ulinks .container {
    position: static;
    display: flex;
    height: auto !important;
    margin: 0 !important;
    border: 0 !important;
    background-color: var(--color-surface) !important;
    background-image: none !important;
    box-shadow: none;
    text-align: center !important;
  }

  #pun #pun-navlinks .container {
    gap: 6px clamp(5px, 1.6vw, 9px);
    padding: 8px 10px 4px !important;
  }

  #pun #pun-ulinks .container {
    gap: 4px clamp(4px, 1.4vw, 8px);
    padding: 2px 10px 8px !important;
  }

  #pun #pun-navlinks li,
  #pun #pun-ulinks li {
    display: block !important;
    float: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: none !important;
    line-height: inherit !important;
  }

  #pun #pun-navlinks li a,
  #pun #pun-ulinks li a {
    display: block !important;
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    padding: 2px 0 !important;
    border: 0 !important;
    border-radius: 0;
    background: none !important;
    box-shadow: none;
    color: var(--color-text) !important;
    line-height: 1.2;
    text-decoration: none !important;
    white-space: nowrap;
  }

  #pun #pun-navlinks li a {
    font-size: clamp(8px, 2.35vw, 10px) !important;
    font-weight: bold;
  }

  #pun #pun-ulinks li a {
    font-size: clamp(7px, 2vw, 9px) !important;
    font-weight: normal;
  }

  #pun #pun-navlinks li a span {
    font-size: inherit !important;
  }

  #pun #pun-navlinks li a:is(:hover, :focus, :active),
  #pun #pun-ulinks li a:is(:hover, :focus, :active) {
    color: var(--color-accent) !important;
  }
}

/* Secondary pages: one dark canvas with 980px inner surfaces. */
#pun:not(#pun-index) {
  background: var(--color-dark) url("https://forumstatic.ru/files/001c/c3/b0/31793.jpg") repeat;
  }

#pun > .punbb:not(#pun-index) #pun-main,
#pun > .punbb:not(#pun-index) #pun-crumbs2,
#pun > .punbb:not(#pun-index) #pun-about {
  box-sizing: border-box;
  width: calc(100% - (var(--service-panel-inset) * 2));
  margin-right: var(--service-panel-inset);
  margin-left: var(--service-panel-inset);
  }

/* Viewforum: keep the list page on the same dark canvas as the home page. */
#pun-viewforum #pun-main > h1 {
  display: none;
  }

#pun-viewforum #pun-main > .forum {
  width: 100%;
  margin: 0;
  font-size: var(--font-size-sm);
  line-height: 14px;
  }

#pun-viewforum #pun-main > .forum > h2 {
  display: none;
  }

#pun-viewforum #pun-main > .forum > .container {
  padding: 0;
  overflow: hidden;
  }

#pun-viewforum #pun-main > .forum tbody td {
  min-height: 126px;
  padding: 30px 18px;
  vertical-align: middle;
  }

#pun-viewforum #pun-main > .forum tbody td.tcl {
  position: relative;
  width: auto;
  padding-left: 82px;
  }

#pun-viewforum #pun-main > .forum tbody td.tcl .intd {
  position: static;
  }

#pun-viewforum #pun-main > .forum tbody td.tcl div.icon {
  position: absolute;
  top: 50%;
  left: 28px;
  width: 36px;
  height: 36px;
  margin: -18px 0 0;
  border: 0;
  background: var(--topic-icon-default) center / contain no-repeat;
  }

#pun-viewforum #pun-main > .forum tbody td.tc2,
#pun-viewforum #pun-main > .forum tbody td.tc3 {
  width: 10%;
  text-align: center;
  }

#pun-viewforum #pun-main > .forum tbody td.tcr {
  position: relative;
  width: 30%;
  padding-left: 70px;
  }

#pun-viewforum #pun-main > .forum tbody td.tcr .user-avatar {
  float: none;
  }

#pun-viewforum #pun-main > .modmenu,
#pun-viewforum #pun-main > .modmenu .container {
  border: 0;
  background: transparent;
  color: var(--color-footer-text);
  font-size: var(--font-size-xs);
  }

#pun-viewforum #pun-main > .linkst {
  height: 38px;
  }

#pun-viewforum #pun-main > .linksb {
  border-radius: 0;
  background: transparent;
  }

#pun-viewforum #pun-about {
  margin-bottom: 0;
  }

/* Keep the home-page crumbs transparent even when the base MyBB skin adds a surface. */
#pun-index #pun-crumbs2,
#pun-index #pun-crumbs2 .container {
  border: 0;
  background: transparent;
  }

#pun-viewforum {
  border-radius: 0 0 var(--section-radius) var(--section-radius);
  }

/* =========================================================
   INNER PAGES — shared shell
   ========================================================= */

#pun > .punbb:not(#pun-index) #pun-main {
  margin-top: 0;
  margin-bottom: 0;
  background: transparent;
  }

#pun > .punbb:not(#pun-index) #pun-crumbs2 a,
#pun > .punbb:not(#pun-index) #pun-about a {
  color: var(--color-footer-text);
  }

#pun > .punbb:not(#pun-index) #pun-crumbs2,
#pun > .punbb:not(#pun-index) #pun-crumbs2 .container,
#pun > .punbb:not(#pun-index) #pun-about,
#pun > .punbb:not(#pun-index) #pun-about .container {
  box-sizing: border-box;
  border: 0;
  background: transparent;
  color: var(--color-footer-text);
  font-size: var(--font-size-sm);
  font-weight: normal;
  }

#pun > .punbb:not(#pun-index) #pun-crumbs2 .container,
#pun > .punbb:not(#pun-index) #pun-about .container {
  padding: 4px 18px;
  }

#pun > .punbb:not(#pun-index) #pun-break4 {
  display: none;
  }

#pun > .punbb:not(#pun-index) #html-footer,
#pun > .punbb:not(#pun-index) #html-footer .container {
  height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: transparent;
  }

/* =========================================================
   INNER PAGES — shared visual components
   Appearance lives here; page sections below mostly control layout.
   ========================================================= */

/* Dark utility surfaces share one texture source across navigation and actions. */
#pun > .punbb:not(#pun-index) #pun-main > .linkst,
#pun-online #pun-main > h1,
#pun-userlist #pun-main .usertable > h2,
#pun-viewtopic #pun-main > .topic > .post .post-links li {
  background: var(--ui-dark-texture);
  }

/* Text and links in utility blocks must stay legible wherever those blocks
   sit on the dark inner-page canvas, including transparent utility rows. */
#pun > .punbb:not(#pun-index) #pun-main > .linkst,
#pun > .punbb:not(#pun-index) #pun-main > .linksb,
#pun-online #pun-main > h1,
#pun-userlist #pun-main .usertable > h2,
#pun-viewtopic #pun-main > #topic-users-in,
#pun-viewtopic #pun-main > #topic-modmenu,
#pun-viewtopic #pun-main > .topic > .post .post-links li {
  color: var(--color-footer-text);
  }

#pun > .punbb:not(#pun-index) #pun-main > .linkst :is(a, strong, span),
#pun > .punbb:not(#pun-index) #pun-main > .linksb :is(a, strong, span),
#pun-viewtopic #pun-main > #topic-users-in :is(a, strong, span),
#pun-viewtopic #pun-main > .topic > .post .post-links li :is(a, strong, span) {
  color: inherit;
  }

#pun > .punbb:not(#pun-index) #pun-main > .linkst a:is(:hover, :focus, :active),
#pun > .punbb:not(#pun-index) #pun-main > .linksb a:is(:hover, :focus, :active),
#pun-viewtopic #pun-main > #topic-users-in a:is(:hover, :focus, :active),
#pun-viewtopic #pun-main > .topic > .post .post-links li a:is(:hover, :focus, :active) {
  color: var(--ui-action-hover-color);
  }

/* Light rounded surfaces used by redesigned inner-page cards. */
#pun-viewforum #pun-main > .forum > .container,
#pun-searchtopics #pun-main .forum > .container,
#pun-userlist #pun-main .formal > .container,
#pun-userlist #pun-main .usertable > .container,
#pun-message #pun-main .info > .container,
#pun-viewtopic #pun-main > .topic > .post > .container {
  border-radius: var(--section-radius);
  background: var(--color-surface);
  }

#pun-viewforum #pun-main > .forum > .container,
#pun-searchtopics #pun-main .forum > .container,
#pun-userlist #pun-main .formal > .container,
#pun-userlist #pun-main .usertable > .container,
#pun-message #pun-main .info > .container {
  border: 0;
  }

/* Redesigned list tables share one neutral surface language. */
#pun-viewforum #pun-main > .forum table,
#pun-searchtopics #pun-main .forum table,
#pun-userlist #pun-main .usertable table {
  border-collapse: separate;
  border-spacing: 0;
  }

#pun-viewforum #pun-main > .forum thead,
#pun-searchtopics #pun-main .forum thead,
#pun-userlist #pun-main .usertable thead {
  display: none;
  }

#pun-viewforum #pun-main > .forum tbody td,
#pun-searchtopics #pun-main .forum tbody td,
#pun-userlist #pun-main .usertable td {
  border: 0;
  background: var(--color-surface);
  }

#pun-viewforum #pun-main > .forum tbody tr:nth-child(even) td,
#pun-searchtopics #pun-main .forum tbody tr:nth-child(even) td,
#pun-userlist #pun-main .usertable tr:nth-child(even) td {
  background: var(--color-surface-alt);
  }

/* Last-post avatars are the same component on forum and search lists. */
#pun-viewforum #pun-main > .forum tbody td.tcr .user-avatar,
#pun-searchtopics #pun-main .forum tbody td.tcr .user-avatar,
#pun-userlist #pun-main .usertable td.username .user-avatar {
  position: absolute;
  top: 50%;
  left: 18px;
  margin: 0;
  transform: translateY(-50%);
  }

#pun-viewforum #pun-main > .forum tbody td.tcr .avatar-image,
#pun-viewforum #pun-main > .forum tbody td.tcr .user-avatar a,
#pun-searchtopics #pun-main .forum tbody td.tcr .avatar-image,
#pun-searchtopics #pun-main .forum tbody td.tcr .user-avatar a {
  display: block;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  }

#pun-viewforum #pun-main > .forum tbody td.tcr .avatar-image,
#pun-searchtopics #pun-main .forum tbody td.tcr .avatar-image {
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  }

/* Compact post cards are shared by search results and the full-reply topic
   review. Their page sections below only control placement. */
:is(#pun-searchposts, #pun-post) #pun-main > .topic > .post {
  margin: 0 0 var(--section-gap);
  border: 0;
  background: transparent;
  }

:is(#pun-searchposts, #pun-post) #pun-main > .topic > .post:last-child {
  margin-bottom: 0;
  }

:is(#pun-searchposts, #pun-post) #pun-main > .topic > .post > h3 {
  margin: 0;
  padding: 10px 18px;
  border: 0;
  border-radius: var(--section-radius) var(--section-radius) 0 0;
  background: var(--ui-dark-texture);
  color: var(--color-footer-text);
  font: normal var(--font-size-xs)/16px var(--font-forum-ui);
  }

:is(#pun-searchposts, #pun-post) #pun-main > .topic > .post > h3 span {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  }

:is(#pun-searchposts, #pun-post) #pun-main > .topic > .post > h3 a,
:is(#pun-searchposts, #pun-post) #pun-main > .topic > .post > h3 a:visited {
  color: inherit;
  }

:is(#pun-searchposts, #pun-post) #pun-main > .topic > .post > h3 a:hover {
  color: var(--color-accent);
  }

:is(#pun-searchposts, #pun-post) #pun-main > .topic > .post > h3 strong {
  flex: 0 0 auto;
  font-weight: normal;
  }

:is(#pun-searchposts, #pun-post) #pun-main > .topic > .post > .container {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  min-height: 96px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: var(--section-radius);
  background: var(--color-surface);
  }

:is(#pun-searchposts, #pun-post) #pun-main > .topic > .post > .container::after {
  display: none;
  }

:is(#pun-searchposts, #pun-post) #pun-main > .topic > .post .post-author {
  float: none;
  width: auto;
  margin: 0;
  padding: 16px 18px;
  border: 0;
  background: var(--color-surface);
  color: var(--color-text);
  }

:is(#pun-searchposts, #pun-post) #pun-main > .topic > .post .post-author ul,
:is(#pun-searchposts, #pun-post) #pun-main > .topic > .post .post-author p {
  margin: 0;
  padding: 0;
  }

:is(#pun-searchposts, #pun-post) #pun-main > .topic > .post .post-author li + li {
  margin-top: 5px;
  }

:is(#pun-searchposts, #pun-post) #pun-main > .topic > .post .post-body {
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 16px 18px;
  border: 0;
  background: var(--color-surface);
  color: var(--color-text);
  }

:is(#pun-searchposts, #pun-post) #pun-main > .topic > .post .post-box {
  min-height: 0;
  margin: 0;
  padding: 0;
  }

:is(#pun-searchposts, #pun-post) #pun-main > .topic > .post .post-content {
  overflow: visible;
  font-size: var(--font-size-base);
  line-height: 1.5;
  }

:is(#pun-searchposts, #pun-post) #pun-main > .topic > .post .post-content > p:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  }

#pun-searchposts #pun-main > .topic > .post .post-links {
  grid-column: 1 / -1;
  margin: 0;
  border: 0;
  background: var(--color-surface);
  }

#pun-searchposts #pun-main > .topic > .post .post-links ul {
  display: flex;
  justify-content: flex-end;
  height: auto;
  margin: 0;
  padding: 0 18px 14px;
  border: 0;
  background: transparent;
  line-height: inherit;
  }

#pun-searchposts #pun-main > .topic > .post .post-links li {
  padding: 0;
  }

@media (max-width: 760px) {
  :is(#pun-searchposts, #pun-post) #pun-main > .topic > .post > .container {
    display: block;
    }

  :is(#pun-searchposts, #pun-post) #pun-main > .topic > .post .post-author {
    padding-bottom: 10px;
    }

  :is(#pun-searchposts, #pun-post) #pun-main > .topic > .post .post-body {
    padding-top: 10px;
    }
  }

/* Search results align their cards with the pagination content. */
#pun-searchposts #pun-main > .topic {
  padding: var(--section-gap) 18px 0;
  }

/* The full-reply topic review uses the same compact heading language as the
   surrounding inner-page utilities. */
#pun-post #pun-main > .topic {
  margin-top: var(--section-gap);
  padding: 0 18px;
  }

#pun-post #pun-main > .topic > h2 {
  margin: 0 0 8px;
  padding: 0 2px;
  border: 0;
  background: transparent;
  color: var(--color-footer-text);
  font: normal var(--font-size-sm)/16px var(--font-forum-ui);
  letter-spacing: .8px;
  text-transform: uppercase;
  }

#pun-post #pun-main > .topic > h2 span {
  color: inherit;
  font: inherit;
  }

/* =========================================================
   VIEWTOPIC — page order
   The actual message-card styling lives in the single VIEWTOPIC block below.
   ========================================================= */

#pun-viewtopic #pun-main,
#pun-searchtopics #pun-main,
#pun-userlist #pun-main {
  display: flex;
  flex-direction: column;
  }

#pun-viewtopic #pun-main > .linkst,
#pun-searchtopics #pun-main > .linkst,
#pun-userlist #pun-main > .linkst { order: 1; }

#pun-searchtopics #pun-main > h1,
#pun-userlist #pun-main > h1 { order: 2; }

#pun-viewtopic #pun-main > .topic { order: 4; }
#pun-viewtopic #pun-main > .linksb { order: 5; }

#pun-viewtopic #topic_t2 {
  margin: 0;
  }

#pun-viewtopic #topic_t2 > h2 {
  display: none;
  }

/* Preserve the manually tuned offset on the forum list after the shared rules. */
#pun > .punbb#pun-viewforum #pun-main {
  margin-top: -10px;
  }

/* =========================================================
   SEARCH / ACTIVE TOPICS
   ========================================================= */

#pun-searchtopics #pun-main > .forum,
#pun-userlist #pun-main > .formal { order: 3; }

#pun-searchtopics #pun-main > .linksb,
#pun-userlist #pun-main > .usertable,
#pun-userlist #pun-main > .linksb { order: 4; }

#pun-searchtopics #pun-main .forum > h2 {
  display: none;
  }

#pun-searchtopics #pun-main .forum {
  width: 100%;
  margin: 0;
  }

#pun-searchtopics #pun-main .forum > .container {
  padding: 0;
  overflow: hidden;
  }

#pun-searchtopics #pun-main .forum tbody td {
  min-height: 72px;
  padding: 22px 18px;
  vertical-align: middle;
  }

#pun-searchtopics #pun-main .forum tbody td.tcl {
  position: relative;
  width: auto;
  padding-left: 68px;
  }

#pun-searchtopics #pun-main .forum tbody td.tcl div.icon {
  position: absolute;
  top: 50%;
  left: 24px;
  width: 32px;
  height: 32px;
  margin: -16px 0 0;
  border: 0;
  background: var(--topic-icon-default) center / contain no-repeat;
  }

#pun-viewforum #pun-main .forum tbody :is(tr.isticky, tr.inew) td.tcl div.icon,
#pun-viewforum #pun-main .forum tbody td.tcl div.icon.inew,
#pun-searchtopics #pun-main .forum tbody :is(tr.isticky, tr.inew) td.tcl div.icon,
#pun-searchtopics #pun-main .forum tbody td.tcl div.icon.inew {
  background-image: var(--topic-icon-new);
  }

#pun-viewforum #pun-main .forum tbody tr.iclosed td.tcl div.icon,
#pun-searchtopics #pun-main .forum tbody tr.iclosed td.tcl div.icon {
  background-image: var(--topic-icon-closed);
  }

#pun-searchtopics #pun-main .forum tbody td.tc2 {
  width: 20%;
  text-align: center;
  }

#pun-searchtopics #pun-main .forum tbody td.tc3 {
  width: 10%;
  text-align: center;
  }

#pun-searchtopics #pun-main .forum tbody td.tcr {
  position: relative;
  width: 30%;
  padding-left: 68px;
  }


/* =========================================================
   PARTICIPANTS
   ========================================================= */

#pun-userlist #pun-main .formal,
#pun-userlist #pun-main .usertable {
  margin: 0 0 var(--section-gap);
  }

#pun-userlist #pun-main .formal > .container {
  padding: 14px 18px;
  }

#pun-userlist #pun-main .usertable > h2 {
  min-height: 38px;
  padding: 8px 18px;
  border: 0;
  color: var(--color-footer-text);
  font: normal var(--font-size-lg)/22px var(--font-forum-ui);
  }

#pun-userlist #pun-main .usertable > h2 span {
  font-size: inherit;
  }

#pun-userlist #pun-main .usertable td {
  padding: 14px 18px;
  }

#pun-userlist #pun-main .usertable td.username {
  position: relative;
  padding-left: 68px;
  }

/* online.php has no pagination strip for the shared floating page title.
   Keep its heading in normal flow so the users table starts below it. */
#pun-online #pun-main > h1 {
  min-height: 38px;
  margin: 0;
  padding: 11px 18px 10px;
  border: 0;
  color: var(--color-footer-text);
  font: normal var(--font-size-category-title)/var(--line-height-category-title)
    var(--font-forum-ui);
  letter-spacing: var(--letter-spacing-category-title);
  text-align: right;
  text-transform: uppercase;
}

#pun-online #pun-main > h1 span {
  color: inherit;
  font: inherit;
}

#pun-message #pun-main .info > .container {
  padding: 18px;
  }

/* =========================================================
   INNER-PAGE HEADINGS / FEEDS / QUICK REPLY
   ========================================================= */

/*
 * All secondary-page titles use the same compact category-label treatment
 * as the index.  They sit on the right side of the pagination strip, so the
 * page title and page number share one line without adding another block.
 */
#pun > .punbb:not(#pun-index):not(#pun-viewforum) #pun-main {
  position: relative;
  }

#pun > .punbb:not(#pun-index):not(#pun-viewforum):not(#pun-online) #pun-main > h1 {
  position: absolute;
  z-index: 3;
  top: 0;
  right: 18px;
  min-height: 38px;
  margin: 0;
  padding: 11px 0 10px;
  color: var(--color-category-title);
  font-family: var(--font-forum-ui);
  font-size: var(--font-size-category-title);
  line-height: var(--line-height-category-title);
  font-weight: normal;
  letter-spacing: var(--letter-spacing-category-title);
  text-align: right;
  text-transform: uppercase;
  border: 0;
  outline: 0;
  box-shadow: none;
  background: transparent;
  }

/* RSS/Atom are platform utilities, not part of the visual footer.  Hide the
   utility links and their empty wrapper wherever a page provides them. */
#pun > .punbb:not(#pun-index) #pun-main :is(a[href*="rss" i], a[href*="atom" i]),
#pun > .punbb:not(#pun-index) #pun-about :is(a[href*="rss" i], a[href*="atom" i]),
#pun > .punbb:not(#pun-index) :is([class*="rss" i], [class*="atom" i]) {
  display: none !important;
  }

#pun > .punbb:not(#pun-index) #pun-main :is(.postlink, .feed-links):has(a[href*="rss" i]),
#pun > .punbb:not(#pun-index) #pun-main :is(.postlink, .feed-links):has(a[href*="atom" i]) {
  display: none !important;
  }

#pun > .punbb:not(#pun-index) #pun-main > :is(.linkst, .linksb):not(:has(.pagelink)):has(a[href*="rss" i]),
#pun > .punbb:not(#pun-index) #pun-main > :is(.linkst, .linksb):not(:has(.pagelink)):has(a[href*="atom" i]) {
  display: none !important;
  }

/* MyBB renders the RSS/Atom links in a separate moderator menu.  Remove the
   whole wrapper so its border and empty dark strip do not remain. */
#pun > .punbb#pun-searchtopics #pun-main > .modmenu,
#pun > .punbb#pun-searchtopics #pun-main > .modmenu .container {
  display: none !important;
  }

/* The native quick-reply form is a direct child of #pun-main.  The shared
   page layout uses flex ordering; give the form an explicit final position
   so it remains below the posts and pagination, as in the default forum. */
#pun > .punbb#pun-viewtopic #pun-main > #post-form,
#pun > .punbb#pun-viewtopic #pun-main > form#post,
#pun > .punbb#pun-viewtopic #pun-main > .quickpost,
#pun > .punbb#pun-viewtopic #pun-main > .formal:has(form#post) {
  order: 6;
  margin-top: var(--section-gap);
  }

#pun > .punbb#pun-viewtopic #pun-main > #pun-graffiti-rusff,
#pun > .punbb#pun-viewtopic #pun-main > .section {
  order: 7;
  }

/* Secondary pages keep the same visible header overflow as the index.  The
   decorative header elements intentionally extend beyond #pun-title. */
#pun:has(> .punbb:not(#pun-index)) {
  overflow: visible;
  border-radius: 0 0 var(--section-radius) var(--section-radius);
  }

/* Child span can still inherit the native plate from the base skin. */
#pun > .punbb:not(#pun-index):not(#pun-viewforum):not(#pun-online) #pun-main > h1 span {
  border: 0;
  outline: 0;
  box-shadow: none;
  background: transparent;
  }

/* =========================================================
   VIEWTOPIC — message window layout
   ========================================================= */

/* The topic name is already present in the breadcrumbs; keep the content
   area focused on the messages themselves. */
#pun-viewtopic #pun-main > h1,
#pun-viewtopic #pun-main > h1 span {
  display: none !important;
  }

/* Rusff.LIVE recommendation is an external utility and is not part of the
   forum message layout. */
#pun-viewtopic #pun-live-rusff,
#pun-viewtopic #pun-main > #pun-live-rusff {
  display: none !important;
  }

/* Keep the two utility blocks at the end of the topic: viewers immediately
   above the pagination line, moderation after the quick-reply form. */
#pun-viewtopic #pun-main > #topic-users-in,
#pun-viewtopic #pun-main > #topic-modmenu {
  margin: 0;
  border: 0;
  background: transparent;
  color: var(--color-footer-text);
  font-size: var(--font-size-xs);
  line-height: 20px;
  }

#pun-viewtopic #pun-main > #topic-users-in {
  order: 4;
  padding: 4px 18px;
  }

#pun-viewtopic #pun-main > #topic-users-in .container,
#pun-viewtopic #pun-main > #topic-modmenu .container {
  padding: 0;
  border: 0;
  background: transparent;
  }

#pun-viewtopic #pun-main > #topic-modmenu {
  order: 8;
  padding: 0 18px 5px;
  }

#pun-viewtopic #pun-main > #topic-modmenu select {
  min-height: 22px;
  font-size: var(--font-size-xs);
  }

/* Each post is a light, rounded card.  The timestamp and post number sit
   above the card on the dark page texture. */
#pun-viewtopic #pun-main > .topic > .post {
  position: relative;
  margin: 28px 0 var(--section-gap);
  border: 0;
  background: transparent;
  }

#pun-viewtopic #pun-main > .topic > .post > h3,
#pun-viewtopic #pun-main > .topic > .post > h3 span {
  border: 0;
  background: transparent;
  color: var(--color-footer-text);
  }

#pun-viewtopic #pun-main > .topic > .post > h3 {
  position: absolute;
  z-index: 2;
  top: -25px;
  left: 0;
  width: 100%;
  min-height: 20px;
  font-size: var(--font-size-xs);
  line-height: 20px;
  }

#pun-viewtopic #pun-main > .topic > .post > h3 span {
  display: flex;
  align-items: center;
  min-height: 20px;
  margin: 0;
  padding: 0 8px;
  font-size: var(--font-size-sm);
  line-height: 16px;
  }

#pun-viewtopic #pun-main > .topic > .post > h3 .sharelink {
  display: none;
  }

#pun-viewtopic #pun-main > .topic > .post > h3 .permalink {
  order: 1;
  color: var(--color-footer-text);
  }

#pun-viewtopic #pun-main > .topic > .post > h3 strong {
  order: 2;
  width: auto;
  margin-left: auto;
  color: var(--color-footer-text);
  font-weight: normal;
  }

#pun-viewtopic #pun-main > .topic > .post > .container {
  position: relative;
  display: flow-root;
  overflow: visible;
  margin: 0;
  padding: 0;
  border: 0;
  }

#pun-viewtopic #pun-main > .topic > .post .post-body {
  min-height: 170px;
  margin-left: 240px;
  padding: 0 0 1px;
  border: 0;
  border-radius: 0 var(--section-radius) 0 0;
  background: var(--color-surface);
  }

#pun-viewtopic #pun-main > .topic > .post .post-box {
  min-height: 140px;
  padding: 16px 18px 64px;
  font-size: var(--font-size-sm);
  line-height: 1.45;
  overflow: visible;
  }

#pun-viewtopic #pun-main > .topic > .post .post-content {
  overflow: visible;
  }

#pun-viewtopic #pun-main > .topic > .post .post-links {
  margin-left: 240px;
  border: 0;
  border-radius: 0 0 var(--section-radius) 0;
  background: transparent;
  }

#pun-viewtopic #pun-main > .topic > .post .post-links ul {
  display: flex;
  align-items: stretch;
  justify-content: flex-start;
  height: 30px;
  margin-left: -240px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--color-footer-text);
  line-height: 30px;
  }

#pun-viewtopic #pun-main > .topic > .post .post-links li {
  display: block;
  padding: 0 12px;
  }

#pun-viewtopic #pun-main > .topic > .post .post-links li.pl-email {
  float: none;
  }

/* The last profile link pushes the moderation/action group to the right;
   hidden profile links therefore do not leave an empty dark strip. */
#pun-viewtopic #pun-main > .topic > .post .post-links li.pl-email:not(:has(~ li.pl-email)) {
  margin-right: auto;
  border-radius: 0 var(--section-radius) 0 0;
  }

#pun-viewtopic #pun-main > .topic > .post .post-links li.pl-email:first-child,
#pun-viewtopic #pun-main > .topic > .post .post-links li:not(.pl-email):not(:has(~ li:not(.pl-email))) {
  border-radius: 0;
  }

#pun-viewtopic #pun-main > .topic > .post .post-links li.pl-delete {
  border-radius: var(--section-radius) 0 0 0;
  }

/* =========================================================
   START: SHARED PLAYER PROFILE CARD

   Этот блок отвечает за карточку игрока в сообщении и на странице профиля.
   Если в будущем меняем карточку целиком — заменяем CSS от
   START: SHARED PLAYER PROFILE CARD
   до
   END: SHARED PLAYER PROFILE CARD.

   Связанный JS: profile-fields.js

   Поля профиля:
   fld1 — текстура тёмной рамки
   fld2 — иконка в круглом бейдже снизу
   fld3 — ссылка под аватаром
   fld4 — свободная HTML-подпись
   fld5 — третья статистика в нижней строке
   ========================================================= */

/* ---------------------------------------------------------
   PROFILE 1 — OUTER WRAPPER
   Внешний контейнер. Он прозрачный, чтобы online-status можно
   было вынести НИЖЕ чёрной рамки.
   --------------------------------------------------------- */

#pun-viewtopic #pun-main > .topic > .post .post-author {
  float: left;
  width: 220px;
  min-height: 0;
  margin: 12px 10px;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
}

#pun-profile #viewprofile #profile-left.emo-profile-page-card-host {
  width: 257px;
  padding: 0 18px 18px;
  vertical-align: top;
  background: transparent;
}

#pun-profile #pun-main:has(#viewprofile) > h1 {
  display: none;
}

#pun-profile #viewprofile #profile-left.emo-profile-page-card-host
  > .emo-profile-card {
  width: 220px;
  margin: 0 auto;
}

#pun-profile #viewprofile.emo-profile-page-has-edit > .container > ul {
  position: relative;
  padding-bottom: 54px;
}

#pun-profile #viewprofile .emo-profile-page-edit {
  position: absolute;
  right: 18px;
  bottom: 16px;
  margin: 0;
  padding: 0;
  background: transparent;
  text-align: right;
}

#pun-profile #viewprofile .emo-profile-page-edit strong {
  display: inline;
  padding: 0;
  background: transparent;
}

/* The native profile list paints and offsets every li/span. Inside the shared
   player card those platform styles must not alter the viewtopic component. */
#pun-profile .emo-profile-page-card-host .emo-profile-card > ul
  > :is(.pa-author, .pa-title, .pa-avatar, .pa-fld3) {
  background: transparent;
}

#pun-profile .emo-profile-page-card-host .emo-profile-card > ul > li span {
  float: none;
  width: auto;
  margin: 0;
  padding: 0;
  font-weight: inherit;
}

:is(#pun-viewtopic #pun-main > .topic > .post .post-author, #pun-profile .emo-profile-page-card-host) ul,
:is(#pun-viewtopic #pun-main > .topic > .post .post-author, #pun-profile .emo-profile-page-card-host) p {
  margin: 0;
  padding: 0;
  line-height: 1.4;
}

/* ---------------------------------------------------------
   PROFILE 2 — BLACK CARD / fld1
   Непосредственно чёрная рамка карточки.
   fld1 используется как её текстура.
   --------------------------------------------------------- */

:is(#pun-viewtopic #pun-main > .topic > .post .post-author, #pun-profile .emo-profile-page-card-host) .emo-profile-card {
  position: relative;
  width: 100%;
  padding: 18px;
  overflow: visible;
  border: 0;
  border-radius: var(--section-radius);
  background-color: var(--color-dark);
  background-image: var(--emo-profile-background, none);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

/* Guest posts have no custom profile texture. Keep the shared card frame and
   use the standard dark texture as its fallback. */
#pun-viewtopic #pun-main > .topic > .post[data-group-id="3"]
  .post-author .emo-profile-card {
  background: var(--ui-dark-texture);
}

/* Country flags and technical user-agent data are not part of the player-card
   design. Keep them available elsewhere, but hide them inside post authors. */
#pun-viewtopic #pun-main > .topic > .post .post-author :is(.flag-i, .pa-ua) {
  display: none;
}

:is(#pun-viewtopic #pun-main > .topic > .post .post-author, #pun-profile .emo-profile-page-card-host) .emo-profile-card::before {
  position: absolute;
  z-index: 0;
  content: "";

  top: 52px;
  right: 12px;
  bottom: 70px;
  left: 12px;

  border-radius: var(--section-radius);

  background: var(--color-surface) !important;
}

:is(#pun-viewtopic #pun-main > .topic > .post .post-author, #pun-profile .emo-profile-page-card-host)
  .emo-profile-card:not(:has(.pa-fld4))::before {
  bottom: 68px;
  border-radius: var(--section-radius) var(--section-radius) 0 0;
}

/* Guests have no lower profile fields: keep their avatar inside the complete
   light inset, followed by the card's dark outer frame. */
#pun-viewtopic #pun-main > .topic > .post[data-group-id="3"]
  .post-author .emo-profile-card::before {
  bottom: 18px;
  border-radius: var(--section-radius);
}

:is(#pun-viewtopic #pun-main > .topic > .post .post-author, #pun-profile .emo-profile-page-card-host) .emo-profile-card > ul,
:is(#pun-viewtopic #pun-main > .topic > .post .post-author, #pun-profile .emo-profile-page-card-host) .emo-profile-card > p {
  position: relative;
  z-index: 1;
  background: transparent !important;
} 

:is(#pun-viewtopic #pun-main > .topic > .post .post-author, #pun-profile .emo-profile-page-card-host) .emo-profile-card > ul {
  border: 0;
  list-style: none;
}

/* Offline marker is used in post cards only. */
#pun-viewtopic #pun-main > .topic > .post .post-author .emo-profile-offline-sticker {
  position: absolute;
  z-index: 4;
  top: -5px;
  left: -7px;
  display: block;
  width: 100px;
  height: auto;
  margin: 0;
  pointer-events: none;
}

/* Универсальный класс для исходных полей, которые JS заменил
   нашей кастомной разметкой. */
:is(#pun-viewtopic #pun-main > .topic > .post .post-author, #pun-profile .emo-profile-page-card-host) .emo-profile-source-hidden {
  display: none !important;
}

/* ---------------------------------------------------------
   PROFILE 3 — PLAYER NAME
   Имя игрока находится на тёмной верхней части карточки.
   --------------------------------------------------------- */

:is(#pun-viewtopic #pun-main > .topic > .post .post-author, #pun-profile .emo-profile-page-card-host) .pa-author {
  margin: 0;
  padding: 0 0 16px;
  text-align: center;
}

:is(#pun-viewtopic #pun-main > .topic > .post .post-author, #pun-profile .emo-profile-page-card-host) .pa-author :is(a, strong) {
  display: inline;
  padding: 0;
  background: transparent;
  color: var(--color-footer-text);
  font-weight: normal;
  text-decoration: none;
  text-shadow: none;
}

/* ---------------------------------------------------------
   PROFILE 4 — PLAYER STATUS / TITLE
   Например: «Администратор».
   --------------------------------------------------------- */

:is(#pun-viewtopic #pun-main > .topic > .post .post-author, #pun-profile .emo-profile-page-card-host) .pa-title {
  margin: 0;
  padding: 12px 0 10px;
  color: var(--color-text);
  font-size: 9px;
  line-height: 1.3;
  font-weight: normal;
  text-align: center;
  text-shadow: none;
}

:is(#pun-viewtopic #pun-main > .topic > .post .post-author, #pun-profile .emo-profile-page-card-host) .pa-title strong {
  display: inline;
  padding: 0;
  background: transparent;
  color: inherit;
  font: inherit;
}

/* ---------------------------------------------------------
   PROFILE 5 — AVATAR
   --------------------------------------------------------- */

:is(#pun-viewtopic #pun-main > .topic > .post .post-author, #pun-profile .emo-profile-page-card-host) .pa-avatar {
  margin: 0;
  padding: 0;
  text-align: center;
}

:is(#pun-viewtopic #pun-main > .topic > .post .post-author, #pun-profile .emo-profile-page-card-host) .pa-avatar > div {
  padding: 0;
  background: transparent;
}

:is(#pun-viewtopic #pun-main > .topic > .post .post-author, #pun-profile .emo-profile-page-card-host) .pa-avatar img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}

#pun-viewtopic #pun-main > .topic > .post[data-group-id="3"]
  .post-author .pa-avatar {
  padding-bottom: 8px;
  background: var(--color-surface);
}

/* ---------------------------------------------------------
   PROFILE 6 — CUSTOM FIELD LABELS
   Названия fld2–fld5 не показываем внутри карточки.
   --------------------------------------------------------- */

:is(#pun-viewtopic #pun-main > .topic > .post .post-author, #pun-profile .emo-profile-page-card-host)
:is(.pa-fld2, .pa-fld3, .pa-fld4, .pa-fld5) .fld-name {
  display: none;
}

:is(#pun-viewtopic #pun-main > .topic > .post .post-author, #pun-profile .emo-profile-page-card-host) .emo-profile-value-field {
  display: block;
  overflow-wrap: anywhere;
}

/* ---------------------------------------------------------
   PROFILE 7 — fld3: LINK UNDER AVATAR
   Пример: ВАЛЕРА.
   Шрифт повторяет стиль кнопок форума: uppercase + spacing.
   --------------------------------------------------------- */

:is(#pun-viewtopic #pun-main > .topic > .post .post-author, #pun-profile .emo-profile-page-card-host) .pa-fld3 {
  margin: 0;
  padding: 14px 0 6px;
  text-align: center;
  text-shadow: none;
}

:is(#pun-viewtopic #pun-main > .topic > .post .post-author, #pun-profile .emo-profile-page-card-host) .pa-fld3 a {
  color: var(--color-text);
  font: normal var(--font-size-xs)/11px var(--font-forum-ui);
  font-weight: normal;
  letter-spacing: .8px;
  text-transform: uppercase;
  text-decoration: none;
  text-shadow: none;
}

:is(#pun-viewtopic #pun-main > .topic > .post .post-author, #pun-profile .emo-profile-page-card-host) .pa-fld3 a:hover {
  color: var(--color-accent);
}

/* ---------------------------------------------------------
   PROFILE 8 — fld4: FREE HTML SIGNATURE
   Горизонтальная плашка с бордером сверху и снизу.
   Высота автоматическая и зависит от количества текста.
   --------------------------------------------------------- */

:is(#pun-viewtopic #pun-main > .topic > .post .post-author, #pun-profile .emo-profile-page-card-host) .pa-fld4 {
  width: calc(100% + 36px);
  height: auto;
  min-height: 0;
  margin: 4px -18px 0;
  padding: 13px 18px;
  border-top: 1px solid var(--color-border);
  border-right: 0;
  border-bottom: 1px solid var(--color-border);
  border-left: 0;
  background: var(--color-surface-alt);
  color: var(--color-text);
  font-size: var(--font-size-xs);
  line-height: 1.45;
  font-weight: normal;
  text-align: center;
  text-shadow: none;
  white-space: normal;
  overflow-wrap: anywhere;
}

:is(#pun-viewtopic #pun-main > .topic > .post .post-author, #pun-profile .emo-profile-page-card-host) .pa-fld4 b,
:is(#pun-viewtopic #pun-main > .topic > .post .post-author, #pun-profile .emo-profile-page-card-host) .pa-fld4 strong {
  display: inline;
  padding: 0;
  background: transparent;
  font-weight: bold;
}

:is(#pun-viewtopic #pun-main > .topic > .post .post-author, #pun-profile .emo-profile-page-card-host) .pa-fld4 i,
:is(#pun-viewtopic #pun-main > .topic > .post .post-author, #pun-profile .emo-profile-page-card-host) .pa-fld4 em {
  font-style: italic;
}

:is(#pun-viewtopic #pun-main > .topic > .post .post-author, #pun-profile .emo-profile-page-card-host) .pa-fld4 u {
  text-decoration: underline;
}

:is(#pun-viewtopic #pun-main > .topic > .post .post-author, #pun-profile .emo-profile-page-card-host) .pa-fld4 a {
  color: var(--color-text);
  text-decoration: underline;
  text-shadow: none;
}

:is(#pun-viewtopic #pun-main > .topic > .post .post-author, #pun-profile .emo-profile-page-card-host) .pa-fld4 a:hover {
  color: var(--color-accent);
}

/* ---------------------------------------------------------
   PROFILE 9 — BOTTOM STATS BAR

   Светлая полоска статистики начинается СРАЗУ после fld4.
   По бокам остаётся виден чёрный фон карточки.

   ВАЖНО:
   здесь специально нет верхнего padding —
   на мокапе между fld4 и полоской иконок нет
   отдельной чёрной полосы.
   --------------------------------------------------------- */

:is(#pun-viewtopic #pun-main > .topic > .post .post-author, #pun-profile .emo-profile-page-card-host) .emo-profile-bottom {
  position: relative;
  z-index: 2;

  display: block;

  width: calc(100% + 36px);

  margin: 0 -18px -18px;
  padding: 0 12px 18px;

  list-style: none;
  border-radius: 0 0 12px 12px;
  background-color: var(--color-dark);
  background-image: var(--emo-profile-background, none);
  background-position: center bottom;
  background-size: cover;
  background-repeat: no-repeat;

  text-shadow: none;
}

:is(#pun-viewtopic #pun-main > .topic > .post .post-author, #pun-profile .emo-profile-page-card-host) .emo-profile-stats {
  display: flex;

  align-items: center;
  justify-content: center;

  gap: 18px;

  width: 100%;
  min-height: 50px;

  margin: 0;
  padding: 8px 10px;

  border-radius: inherit;
  background: var(--color-surface) !important;
  text-shadow: none; 
}

:is(#pun-viewtopic #pun-main > .topic > .post .post-author, #pun-profile .emo-profile-page-card-host) .emo-profile-stat {
  display: inline-flex;

  align-items: center;
  justify-content: center;

  gap: 4px;

  min-width: 0;
  padding: 0;

  background: transparent;
  white-space: nowrap;
}

:is(#pun-viewtopic #pun-main > .topic > .post .post-author, #pun-profile .emo-profile-page-card-host) .emo-profile-stat-icon {
  display: block;

  width: auto;
  max-width: 21px;

  height: auto;
  max-height: 18px;

  margin: 0;

  object-fit: contain;
}

:is(#pun-viewtopic #pun-main > .topic > .post .post-author, #pun-profile .emo-profile-page-card-host) .emo-profile-stat-value {
  color: var(--color-text);

  font: normal 7px/1 var(--font-forum-ui);
  letter-spacing: 0;

  text-shadow: none;
}

/* ---------------------------------------------------------
   PROFILE 10 — fld2: ROUND BOTTOM BADGE

   Машинка находится ниже полосы статистики.
   Круг сидит непосредственно у нижней границы
   чёрной карточки, как на мокапе.
   --------------------------------------------------------- */

:is(#pun-viewtopic #pun-main > .topic > .post .post-author, #pun-profile .emo-profile-page-card-host) .emo-profile-bottom-badge {
  position: absolute;
  z-index: 3;

  left: 50%;
  bottom: -13px;

  display: flex;

  align-items: center;
  justify-content: center;

  width: 39px;
  height: 39px;
  padding: 0;

  border: 1px solid var(--color-border);
  border-radius: 50%;

  background: var(--color-surface);

  color: inherit;
  font: inherit;
  cursor: pointer;
  appearance: none;
  transform: translateX(-50%);
  transition: transform .18s ease;
}

:is(#pun-viewtopic #pun-main > .topic > .post .post-author, #pun-profile .emo-profile-page-card-host) .emo-profile-bottom-badge:is(:hover, :focus-visible) {
  transform: translateX(-50%) scale(1.08);
}

:is(#pun-viewtopic #pun-main > .topic > .post .post-author, #pun-profile .emo-profile-page-card-host) .emo-profile-bottom-badge:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

:is(#pun-viewtopic #pun-main > .topic > .post .post-author, #pun-profile .emo-profile-page-card-host) .emo-profile-bottom-badge-image {
  display: block;

  width: auto;
  max-width: 25px;

  height: auto;
  max-height: 25px;

  margin: 0;
}

/* fld2 profile details modal */

.emo-profile-details-modal {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, .68);
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity .24s ease, visibility .24s ease;
}

.emo-profile-details-modal.is-open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.emo-profile-details-dialog {
  position: relative;
  width: min(720px, calc(100vw - 32px), calc((100vh - 32px) * 1.333));
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 10px solid transparent;
  border-radius: 14px;
  outline: 0;
  background:
    var(--profile-details-background-image) center / 100% 100% no-repeat padding-box,
    var(--ui-dark-texture) border-box;
  filter: drop-shadow(0 12px 26px rgba(0, 0, 0, .35));
  opacity: 0;
  transform: translate(
      var(--emo-profile-details-from-x, -120px),
      var(--emo-profile-details-from-y, 0)
    ) scale(.82);
  transform-origin:
    var(--emo-profile-details-origin-x, left)
    var(--emo-profile-details-origin-y, center);
  transition: opacity .24s ease, transform .38s cubic-bezier(.2, .8, .2, 1);
}

.emo-profile-details-modal.is-open .emo-profile-details-dialog {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.emo-profile-details-close {
  position: absolute;
  z-index: 8;
  top: 10px;
  right: 10px;
  display: flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  padding: 0 0 2px;
  border: 1px solid rgba(227, 223, 222, .58);
  border-radius: 50%;
  background: rgba(37, 38, 38, .72);
  color: var(--color-text-light);
  font: normal 22px/1 var(--font-main);
  cursor: pointer;
  opacity: .76;
  transition: color .16s ease, opacity .16s ease, transform .16s ease;
}

.emo-profile-details-close:is(:hover, :focus-visible) {
  color: var(--color-accent-soft);
  opacity: 1;
  transform: rotate(7deg) scale(1.05);
}

.emo-profile-details-close::before {
  content: "\00d7";
}

/* Technical IDs stay in profile fields; scripts render their public UI. */
.bb-game-topic-field-source,
.emo-profile-role-ids-source {
  display: none;
}

.emo-profile-details-dialog > .game-topics {
  position: absolute;
  z-index: 3;
  top: 9%;
  right: 19%;
  display: flex;
  flex-direction: column;
  gap: 3px;
  box-sizing: border-box;
  width: 31%;
  height: 25%;
  padding: 8px 10px 10px;
  overflow-y: auto;
  border: 0;
  background: transparent;
  scrollbar-width: thin;
  scrollbar-color: rgba(46, 48, 47, .58) transparent;
}

.emo-profile-details-dialog > .game-topics::-webkit-scrollbar {
  width: 4px;
}

.emo-profile-details-dialog > .game-topics::-webkit-scrollbar-thumb {
  border-radius: 2px;
  background: rgba(46, 48, 47, .58);
}

.emo-profile-details-dialog .game-topic {
  display: grid;
  gap: 1px;
  padding: 5px 6px 6px;
  border-bottom: 1px solid rgba(46, 48, 47, .2);
  color: var(--color-text);
  font-family: var(--font-forum-ui);
  text-decoration: none;
}

.emo-profile-details-dialog .game-topic__title {
  overflow: hidden;
  font-size: clamp(8px, 1.35vw, 11px);
  font-weight: 700;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.emo-profile-details-dialog .game-topic__meta {
  grid-column: 1 / -1;
  color: var(--color-text-muted);
  font-size: clamp(6px, 1.05vw, 8px);
  line-height: 1.3;
}

.emo-profile-details-dialog .game-topics__state {
  margin: auto 0;
  padding: 8px 4px;
  color: var(--color-text-muted);
  font: normal clamp(7px, 1.2vw, 10px)/1.35 var(--font-forum-ui);
  letter-spacing: .4px;
  text-align: center;
}

.emo-profile-details-roles {
  position: absolute;
  z-index: 3;
  top: 1.5%;
  left: 3%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: min-content;
  align-items: start;
  gap: clamp(4px, .8vw, 7px);
  width: 43%;
  max-height: 53%;
  padding: 1% 2% 3%;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(46, 48, 47, .48) transparent;
}

.emo-profile-details-roles::-webkit-scrollbar {
  width: 4px;
}

.emo-profile-details-role {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-self: center;
  width: min(100%, 84px);
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--color-text);
  text-decoration: none;
}

.emo-profile-details-role-portrait {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 169 / 175;
  filter: drop-shadow(2px 4px 3px rgba(37, 38, 38, .22));
}

.emo-profile-details-role-portrait::after {
  position: absolute;
  z-index: 2;
  inset: 0;
  content: "";
  background: var(--profile-details-frame-image) center / 100% 100% no-repeat;
  pointer-events: none;
}

.emo-profile-details-role-name {
  display: block;
  width: calc(100% - 12px);
  margin-top: 3px;
  padding: 5px 8px 6px;
  overflow: hidden;
  border: 1px solid rgba(227, 223, 222, .18);
  border-radius: 8px;
  background: var(--ui-dark-texture);
  color: var(--color-quick-link-text);
  font: normal var(--font-size-category-title)/var(--line-height-category-title)
    var(--font-forum-ui);
  letter-spacing: var(--letter-spacing-category-title);
  text-align: center;
  text-transform: uppercase;
  box-shadow: 2px 3px 0 rgba(37, 38, 38, .18);
  overflow-wrap: anywhere;
  white-space: normal;
}

.emo-profile-details-role-avatar {
  position: absolute;
  z-index: 1;
  inset: 13% 14% 14%;
  display: block;
  width: 72%;
  height: 73%;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: var(--color-dark);
  object-fit: cover;
  filter: sepia(.14) saturate(.86) contrast(.96);
  transition: filter .18s ease, transform .18s ease;
}

.emo-profile-details-role:is(:hover, :focus-visible) .emo-profile-details-role-avatar {
  filter: sepia(0) saturate(1) contrast(1);
  transform: scale(1.03);
}

.emo-profile-details-role:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.emo-profile-details-awards {
  position: absolute;
  z-index: 5;
  right: calc(5% + 10px);
  bottom: 4%;
  left: calc(4% + 10px);
  display: flex;
  box-sizing: border-box;
  height: 48%;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 0;
  padding: 0 26px 4px 56px;
  overflow-x: auto;
  overflow-y: hidden;
  background: transparent;
  pointer-events: auto;
  scrollbar-color: rgba(227, 223, 222, .42) transparent;
  scrollbar-width: thin;
}

.emo-profile-details-awards::-webkit-scrollbar {
  height: 4px;
}

.emo-profile-details-awards::-webkit-scrollbar-thumb {
  border-radius: 2px;
  background: rgba(227, 223, 222, .42);
}

.emo-profile-details-awards[hidden] {
  display: none;
}

.emo-profile-details-award {
  position: relative;
  display: block;
  flex: 0 0 auto;
  width: auto;
  min-width: 0;
  height: 48%;
  aspect-ratio: 1;
  margin: 0 0 0 -30px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: help;
  transform: rotate(var(--emo-award-rotation, 0deg));
  transform-origin: 50% 100%;
  transition: filter .16s ease, transform .16s ease;
}

.emo-profile-details-award-cover {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(3px 5px 4px rgba(20, 17, 14, .45));
  pointer-events: none;
}

.emo-profile-details-award:is(:hover, :focus-visible) {
  z-index: 7;
  outline: 0;
  filter: brightness(1.2);
  transform: translateY(-6px) rotate(0) scale(1.03);
}

.emo-profile-details-award-tooltip {
  position: absolute;
  z-index: 9;
  bottom: calc(100% + 8px);
  left: 0;
  display: grid;
  grid-template-columns: 56px minmax(120px, 1fr);
  gap: 10px;
  width: max-content;
  max-width: min(280px, 68vw);
  padding: 12px;
  border: 1px solid rgba(227, 223, 222, .2);
  border-radius: 8px;
  background: var(--ui-dark-texture);
  color: var(--color-text-light);
  box-shadow: 4px 6px 12px rgba(37, 38, 38, .28);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(0, 8px);
  transition: opacity .16s ease, transform .16s ease, visibility .16s ease;
}

.emo-profile-details-award-tooltip > img {
  width: 56px;
  height: 56px;
  object-fit: contain;
}

.emo-profile-details-award-tooltip-text {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  color: var(--color-footer-text);
  font: normal clamp(8px, 1.15vw, 10px)/1.4 var(--font-forum-ui);
  text-align: left;
}

.emo-profile-details-award-tooltip-text strong {
  color: var(--color-text-light);
  font: normal var(--font-size-category-title)/var(--line-height-category-title)
    var(--font-forum-ui);
  letter-spacing: var(--letter-spacing-category-title);
  text-transform: uppercase;
}

.emo-profile-details-award-tooltip-text > span {
  color: var(--color-category-title);
}

.emo-profile-details-award:is(:hover, :focus-visible)
  .emo-profile-details-award-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translate(0, 0);
}

.emo-profile-details-award:last-child .emo-profile-details-award-tooltip {
  right: 0;
  left: auto;
}

@media screen and (max-width: 540px) {
  .emo-profile-details-modal {
    padding: 8px;
  }

  .emo-profile-details-dialog {
    width: min(calc(100vw - 16px), calc((100vh - 16px) * 1.333));
    border-width: 5px;
    border-radius: 9px;
  }

  .emo-profile-details-close {
    top: 5px;
    right: 5px;
    width: 22px;
    height: 22px;
    font-size: 18px;
  }

  .emo-profile-details-dialog > .game-topics {
    padding: 5px 6px;
  }

  .emo-profile-details-role-name {
    width: 100%;
  }

  .emo-profile-details-award-tooltip {
    grid-template-columns: 40px minmax(72px, 1fr);
    gap: 6px;
    padding: 6px;
  }

  .emo-profile-details-award-tooltip > img {
    width: 40px;
    height: 40px;
  }
}

/* Mobile post card: compact two-column layout inside the existing component.
   Rusff's later /style/mobile.css hides fld3 and limits avatars to 50px, so
   only those conflicting declarations need protected values here. */
@media screen and (max-width: 540px) {
  #pun #pun-viewtopic #pun-main > .topic > .post .post-author {
    border-bottom: 0 !important;
    background: transparent !important;
  }

  #pun #pun-viewtopic #pun-main > .topic > .post .post-author .emo-profile-card {
    box-sizing: border-box;
    padding: 14px 14px 32px;
  }

  #pun #pun-viewtopic #pun-main > .topic > .post .post-author
    .emo-profile-card::before {
    top: 14px;
    right: 14px;
    bottom: 32px;
    left: 14px;
    border-radius: 10px;
  }

  #pun #pun-viewtopic #pun-main > .topic > .post .post-author
    .emo-profile-card > ul {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(105px, 38%);
    grid-template-rows: auto auto auto auto;
    column-gap: 10px;
    row-gap: 2px;
    box-sizing: border-box;
    min-height: 145px;
    padding: 10px 12px 12px;
  }

  #pun #pun-viewtopic #pun-main > .topic > .post .post-author .pa-author {
    grid-column: 2;
    grid-row: 1;
    align-self: end;
    min-width: 0;
    padding: 0 0 6px !important;
    overflow: hidden;
    color: var(--color-text);
    font-size: clamp(11px, 3.5vw, 14px);
    line-height: 1.2;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  #pun #pun-viewtopic #pun-main > .topic > .post .post-author
    .pa-author :is(a, strong) {
    color: inherit;
  }

  #pun #pun-viewtopic #pun-main > .topic > .post .post-author .pa-title {
    grid-column: 1;
    grid-row: 2;
    align-self: end;
    padding: 4px 0 !important;
    font-size: clamp(9px, 2.8vw, 12px);
    line-height: 1.25;
    text-align: center;
  }

  #pun #pun-viewtopic #pun-main > .topic > .post .post-author .pa-avatar {
    grid-column: 2;
    grid-row: 2 / 5;
    align-self: start;
    float: none;
    min-width: 0;
    margin: 0;
    padding: 0;
  }

  #pun #pun-viewtopic #pun-main > .topic > .post .post-author .pa-avatar img {
    width: 100%;
    max-width: 145px;
    height: auto;
    max-height: none;
    aspect-ratio: 1;
    margin: 0 auto;
    border-radius: 0;
    object-fit: cover;
  }

  #pun #pun-viewtopic #pun-main > .topic > .post .post-author .pa-fld3 {
    display: block !important;
    grid-column: 1;
    grid-row: 3;
    align-self: center;
    min-width: 0;
    padding: 4px 0;
    text-align: center;
  }

  #pun #pun-viewtopic #pun-main > .topic > .post .post-author .pa-fld3 a {
    font-size: clamp(9px, 2.8vw, 12px);
    line-height: 1.25;
  }

  #pun #pun-viewtopic #pun-main > .topic > .post .post-author .pa-fld4 {
    display: none !important;
  }

  #pun #pun-viewtopic #pun-main > .topic > .post .post-author
    .emo-profile-bottom {
    position: static;
    grid-column: 1;
    grid-row: 4;
    align-self: start;
    width: auto;
    margin: 0;
    padding: 0;
    border-radius: 0;
    background: transparent;
  }

  #pun #pun-viewtopic #pun-main > .topic > .post .post-author
    .emo-profile-stats {
    flex-wrap: nowrap;
    justify-content: center;
    gap: clamp(7px, 2.5vw, 12px);
    min-height: 0;
    padding: 8px 0 0;
    border-radius: 0;
    background: transparent !important;
  }

  #pun #pun-viewtopic #pun-main > .topic > .post .post-author
    .emo-profile-stat {
    gap: 3px;
  }

  #pun #pun-viewtopic #pun-main > .topic > .post .post-author
    .emo-profile-stat-icon {
    max-width: 21px;
    max-height: 18px;
  }

  #pun #pun-viewtopic #pun-main > .topic > .post .post-author
    .emo-profile-bottom-badge {
    bottom: -26px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .emo-profile-bottom-badge,
  .emo-profile-details-modal,
  .emo-profile-details-dialog,
  .emo-profile-details-role-avatar {
    transition: none;
  }
}

/* =========================================================
   END: SHARED PLAYER PROFILE CARD
   ========================================================= */

/* The reactions plugin injects its button styles after the theme. Keep its
   native 26px control, but replace the plus icon and remove the native ring. */
#pun-viewtopic .reaction-picker-button {
  border: 0;
  outline: 0;
  box-shadow: none;
  background: transparent url("https://forumstatic.ru/files/001c/c3/b0/90176.png")
    no-repeat center / auto 24px !important;
}

#pun-viewtopic .reaction-picker-button > svg {
  display: none;
}

#pun-viewtopic .reaction-counter {
  border: 0;
  background: transparent;
  color: var(--color-text);
}

#pun-viewtopic .reaction-counter.reaction-chip--clicked,
#pun-viewtopic .reaction-counter:is(:hover, :focus) {
  color: var(--ui-action-hover-color);
}

/* The reactions module orders counters by count and then by recency.
   Keep the five most relevant reaction types visible in the post footer. */
#pun-viewtopic .reaction-counters-container > :nth-child(n + 6) {
  display: none;
}

/* =========================================================
   VIEWTOPIC — quote, spoiler and code blocks
   ========================================================= */

.punbb .post-content :is(.quote-box, .spoiler-box, .code-box),
#pun-post #post-preview :is(.quote-box, .spoiler-box, .code-box) {
  position: relative;
  box-sizing: border-box;
  width: auto;
  margin: .55em 0 1.2em;
  padding: 1.1em 1.25em;
  border: 1px solid transparent !important;
  border-radius: 0 0 10px 10px !important;
  background:
    linear-gradient(var(--bbcode-surface), var(--bbcode-surface)) padding-box,
    linear-gradient(90deg, var(--color-accent), var(--color-accent-soft)) border-box !important;
  color: var(--color-text);
  }

.punbb .post-content :is(.quote-box, .spoiler-box, .code-box) > blockquote,
.punbb .post-content .code-box .scrollbox,
#pun-post #post-preview :is(.quote-box, .spoiler-box) > blockquote,
#pun-post #post-preview .code-box .scrollbox {
  width: 100%;
  margin: 0;
  padding: 0;
  }

.punbb .post-content .quote-box cite,
.punbb .post-content .code-box strong.legend,
#pun-post #post-preview .quote-box cite,
#pun-post #post-preview .code-box strong.legend {
  display: block;
  margin: 0;
  padding: 0 0 .7em;
  color: var(--color-text);
  font: var(--ui-action-font);
  text-transform: uppercase;
  }

.punbb .post-content .spoiler-box > div:first-child,
#pun-post #post-preview .spoiler-box > div:first-child {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 20px;
  margin: 0;
  padding: 0;
  color: var(--color-text);
  font: var(--ui-action-font);
  cursor: pointer;
  text-align: center;
  text-transform: uppercase;
  }

/* Cite/code legends sit over the upper border, like a fieldset label. */
.punbb .post-content :is(.quote-box:has(> cite), .code-box:has(> strong.legend)),
#pun-post #post-preview :is(.quote-box:has(> cite), .code-box:has(> strong.legend)) {
  padding-top: 1.35em;
  }

.punbb .post-content :is(.quote-box > cite, .code-box > strong.legend),
#pun-post #post-preview :is(.quote-box > cite, .code-box > strong.legend) {
  position: absolute;
  z-index: 1;
  top: -.72em;
  left: 1em;
  padding: 0 .55em;
  background: var(--color-surface);
  color: var(--color-text);
  font-weight: normal;
  }

.punbb .post-content .code-box > strong.legend::after,
#pun-post #post-preview .code-box > strong.legend::after {
  content: "CTRL + C";
  font: var(--ui-action-font);
  }

.punbb .post-content .code-box > strong.legend,
#pun-post #post-preview .code-box > strong.legend {
  top: calc(-1em - 10px);
  font-size: 0;
  left: calc(1em + 20px);
  padding-right: .9em;
  padding-left: .9em;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  }

/* Keep the custom sticker as the only spoiler control. */
.punbb .post-content .spoiler-box > div:first-child img,
.punbb .post-content .spoiler-box > div:first-child button,
.punbb .post-content .spoiler-box > div:first-child input,
.punbb .post-content .spoiler-box > div:first-child [class*="spoiler-toggle"],
.punbb .post-content .spoiler-box > div:first-child [class*="spoiler-button"],
#pun-post #post-preview .spoiler-box > div:first-child img,
#pun-post #post-preview .spoiler-box > div:first-child button,
#pun-post #post-preview .spoiler-box > div:first-child input,
#pun-post #post-preview .spoiler-box > div:first-child [class*="spoiler-toggle"],
#pun-post #post-preview .spoiler-box > div:first-child [class*="spoiler-button"] {
  display: none !important;
  }

.punbb .post-content .spoiler-box > blockquote:not(.visible),
#pun-post #post-preview .spoiler-box > blockquote:not(.visible) {
  display: none;
  }

.punbb .post-content .spoiler-box:not(:has(> blockquote.visible)),
#pun-post #post-preview .spoiler-box:not(:has(> blockquote.visible)) {
  padding-top: .55em;
  padding-bottom: .55em;
  }

/* Keep the top spacing identical when the spoiler is open or closed. */
.punbb .post-content .spoiler-box,
#pun-post #post-preview .spoiler-box {
  z-index: 2;
  padding-top: .55em;
  }

.punbb .post-content .spoiler-box > div:first-child::before,
#pun-post #post-preview .spoiler-box > div:first-child::before {
  content: "";
  position: absolute;
  top: -15px;
  right: auto;
  left: -15px;
  width: 52px;
  height: 52px;
  background: var(--bbcode-spoiler-icon) center / contain no-repeat;
  z-index: 20;
  pointer-events: auto;
  cursor: pointer;
  }

/* The shared stylesheet also draws a native plus/minus pseudo-control.
   Give the custom sticker rule the same page specificity so that control
   cannot reappear over it. */
:is(#pun-viewtopic, #pun-messages, #pun-post) #pun-main .post-content .spoiler-box > div:first-child::before,
#pun-post #post-preview .spoiler-box > div:first-child::before,
:is(#pun-viewtopic, #pun-messages, #pun-post) #pun-main .post-content .spoiler-box > div:first-child.visible::before,
#pun-post #post-preview .spoiler-box > div:first-child.visible::before {
  top: -15px;
  right: auto;
  left: -15px;
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 0;
  background: var(--bbcode-spoiler-icon) center / contain no-repeat;
  transform: none;
  pointer-events: auto;
  cursor: pointer;
  }


.punbb .post-content :is(.code-box pre, .code-box code),
#pun-post #post-preview :is(.code-box pre, .code-box code) {
  color: var(--color-text);
  font-family: var(--font-main);
  font-size: inherit;
  line-height: inherit;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  }

.punbb .post-content :is(.quote-box, .spoiler-box, .code-box) p:last-child,
#pun-post #post-preview :is(.quote-box, .spoiler-box, .code-box) p:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  }

/* =========================================================
   EMO — reply editor
   Keep the native BBCode toolbar, but remove the platform captions and
   bring the editor controls into the light/gradient EMO language.
   ========================================================= */

/* The quick-reply heading and the native fieldset instruction are redundant
   with the page breadcrumbs, so leave the editor itself as the first visible
   element. */
#pun-viewtopic #pun-main #post-form > h2,
#pun-viewtopic #pun-main #post-form fieldset > legend,
#pun-post #pun-main #post-form > h2,
#pun-post #pun-main #post-form fieldset > legend,
#pun-messages form#post #post-form > h2,
#pun-messages form#post #post-form fieldset > legend,
#pun-messages form#post > fieldset > legend {
  display: none !important;
}

/* Some MyBB builds put the quick-reply caption on the wrapper rather than
   inside #post-form; hide that wrapper caption only when it contains the
   reply form. */
#pun-viewtopic #pun-main > .quickpost > h2,
#pun-viewtopic #pun-main > .formal:has(form#post) > h2,
#pun-viewtopic #pun-main > form#post > h2 {
  display: none !important;
}

/* The BB toolbar remains light; only give its frame the same compact EMO
   radius and neutral surface as the rest of the editor. */
#pun-viewtopic #pun-main #post-form #form-buttons,
#pun-post #pun-main #post-form #form-buttons,
#pun-messages form#post #form-buttons {
  min-height: 38px !important;
  padding: 6px 12px !important;
  border: 1px solid transparent !important;
  border-radius: var(--section-radius) !important;
  background:
    linear-gradient(var(--color-surface-alt), var(--color-surface-alt)) padding-box,
    linear-gradient(90deg, var(--color-accent), var(--color-accent-soft)) border-box !important;
  overflow: hidden !important;
}

/* All native BBCode popovers share the editor's light gradient frame. */
.punbb #tags > .container {
  border: var(--ui-action-border);
  border-radius: var(--section-radius);
  background: var(--ui-action-light-background);
  overflow: hidden;
}

/* The platform sizes the outer smile popover separately from its contents.
   Keep both layers on the same width so the grid cannot continue behind the
   clipped right edge. */
.punbb #tags > #smilies-area {
  box-sizing: border-box;
  width: 650px !important;
  max-width: calc(100vw - 40px) !important;
}

.punbb #smilies-block.emo-smilies-ready {
  box-sizing: border-box;
  width: 100% !important;
  max-width: 100% !important;
  padding: 10px;
  overflow-x: hidden;
}

.emo-smilie-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 8px;
}

.emo-smilie-tab {
  min-height: 26px;
  padding: 5px 8px;
  border: var(--ui-action-border);
  border-radius: var(--ui-action-radius);
  background: var(--ui-action-light-background);
  color: var(--color-text);
  font: var(--ui-action-font);
  letter-spacing: .5px;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
}

.emo-smilie-tab:is(:hover, :focus-visible, .is-active) {
  background: var(--ui-action-background);
  color: var(--ui-action-hover-color);
  outline: 0;
}

.emo-smilie-panel {
  display: none;
  grid-template-columns: repeat(10, 54px);
  gap: 3px;
  align-items: center;
  justify-content: start;
  box-sizing: border-box;
  width: 100%;
  max-height: 205px;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-color: var(--color-border) transparent;
  scrollbar-width: thin;
}

.emo-smilie-panel::-webkit-scrollbar {
  width: 6px;
}

.emo-smilie-panel::-webkit-scrollbar-track {
  background: transparent;
}

.emo-smilie-panel::-webkit-scrollbar-thumb {
  border-radius: 6px;
  background: var(--color-border);
}

.emo-smilie-panel::-webkit-scrollbar-thumb:hover {
  background: var(--color-accent-soft);
}

.emo-smilie-panel.is-active {
  display: grid;
}

.emo-smilie-item {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-width: 0;
  height: 46px;
  padding: 2px;
  border: 0;
  border-radius: var(--forum-link-radius);
  background: transparent;
  box-shadow: none;
  cursor: pointer;
}

.emo-smilie-item:is(:hover, :focus-visible) {
  background: var(--color-surface-alt);
  outline: 1px solid var(--color-border-soft);
}

.emo-smilie-item img {
  display: block;
  max-width: 100%;
  max-height: 42px;
  object-fit: contain;
}

#emo-mention-suggest {
  position: absolute;
  z-index: 100000;
  display: none;
  box-sizing: border-box;
  width: 260px;
  max-width: calc(100vw - 24px);
  max-height: 220px;
  padding: 6px;
  overflow-y: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--section-radius);
  background: var(--ui-dark-texture);
  color: var(--color-text-light);
  box-shadow: 6px 8px 18px rgba(37, 38, 38, .28);
}

.emo-mention-item {
  display: block;
  width: 100%;
  padding: 7px 10px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: inherit;
  font: normal var(--font-size-sm)/1.3 var(--font-forum-ui);
  text-align: left;
  cursor: pointer;
}

.emo-mention-item:is(:hover, :focus-visible, .is-active) {
  background: var(--color-surface-alt);
  color: var(--color-accent);
  outline: 0;
}

.emo-mention-empty {
  padding: 8px 10px;
  color: var(--color-text-light);
  font: normal var(--font-size-xs)/1.3 var(--font-forum-ui);
  letter-spacing: .7px;
  text-transform: uppercase;
}

.emo-guest-mention-link {
  cursor: pointer;
}

/* Toolbar icons are individual transparent PNGs. The native blank image stays
   in place because its inline handler owns the editor action; the visible icon
   is drawn once on the parent cell. */
.punbb #form-buttons table {
  width: 100%;
  table-layout: fixed;
}

.punbb #form-buttons td:is(
  #button-font,
  #button-size,
  #button-bold,
  #button-italic,
  #button-underline,
  #button-strike,
  #button-indent,
  #button-left,
  #button-center,
  #button-right,
  #button-link,
  #button-spoiler,
  #button-image,
  #button-video,
  #button-hide,
  #button-quote,
  #button-code,
  #button-color,
  #button-table,
  #button-smile,
  #button-addition,
  #button-hideprofile,
  #button-mask
) {
  position: relative;
  height: 26px;
  padding: 0;
  background-image: var(--emo-editor-icon, none);
  background-position: center;
  background-repeat: no-repeat;
  background-size: auto 12px;
  cursor: pointer;
  opacity: .78;
  transition: opacity .15s ease;
}

.punbb #form-buttons td:is(
  #button-font,
  #button-size,
  #button-bold,
  #button-italic,
  #button-underline,
  #button-strike,
  #button-indent,
  #button-left,
  #button-center,
  #button-right,
  #button-link,
  #button-spoiler,
  #button-image,
  #button-video,
  #button-hide,
  #button-quote,
  #button-code,
  #button-color,
  #button-table,
  #button-smile,
  #button-addition,
  #button-hideprofile,
  #button-mask
):is(:hover, :focus-visible) {
  opacity: 1;
}

.punbb #form-buttons td:is(
  #button-font,
  #button-size,
  #button-bold,
  #button-italic,
  #button-underline,
  #button-strike,
  #button-indent,
  #button-left,
  #button-center,
  #button-right,
  #button-link,
  #button-spoiler,
  #button-image,
  #button-video,
  #button-hide,
  #button-quote,
  #button-code,
  #button-color,
  #button-table,
  #button-smile,
  #button-addition,
  #button-hideprofile,
  #button-mask
) > img {
  display: block;
  width: 100%;
  height: 26px;
  opacity: 0;
}

#button-font { --emo-editor-icon: url("https://forumstatic.ru/files/001c/c3/b0/76797.png"); }
#button-size { --emo-editor-icon: url("https://forumstatic.ru/files/001c/c3/b0/25318.png"); }
#button-bold { --emo-editor-icon: url("https://forumstatic.ru/files/001c/c3/b0/99193.png"); }
#button-italic { --emo-editor-icon: url("https://forumstatic.ru/files/001c/c3/b0/80935.png"); }
#button-underline { --emo-editor-icon: url("https://forumstatic.ru/files/001c/c3/b0/32218.png"); }
#button-strike { --emo-editor-icon: url("https://forumstatic.ru/files/001c/c3/b0/48499.png"); }
#button-indent { --emo-editor-icon: url("https://forumstatic.ru/files/001c/c3/b0/60492.png"); }
#button-left { --emo-editor-icon: url("https://forumstatic.ru/files/001c/c3/b0/34120.png"); }
#button-center { --emo-editor-icon: url("https://forumstatic.ru/files/001c/c3/b0/52927.png"); }
#button-right { --emo-editor-icon: url("https://forumstatic.ru/files/001c/c3/b0/95834.png"); }
#button-link { --emo-editor-icon: url("https://forumstatic.ru/files/001c/c3/b0/58899.png"); }
#button-spoiler { --emo-editor-icon: url("https://forumstatic.ru/files/001c/c3/b0/13993.png"); }
#button-image { --emo-editor-icon: url("https://forumstatic.ru/files/001c/c3/b0/99477.png"); }
#button-video { --emo-editor-icon: url("https://forumstatic.ru/files/001c/c3/b0/98554.png"); }
#button-hide { --emo-editor-icon: url("https://forumstatic.ru/files/001c/c3/b0/95604.png"); }
#button-quote { --emo-editor-icon: url("https://forumstatic.ru/files/001c/c3/b0/13818.png"); }
#button-code { --emo-editor-icon: url("https://forumstatic.ru/files/001c/c3/b0/64556.png"); }
#button-color { --emo-editor-icon: url("https://forumstatic.ru/files/001c/c3/b0/52609.png"); }
#button-table { --emo-editor-icon: url("https://forumstatic.ru/files/001c/c3/b0/70873.png"); }
#button-smile { --emo-editor-icon: url("https://forumstatic.ru/files/001c/c3/b0/46273.png"); }
#button-addition { --emo-editor-icon: url("https://forumstatic.ru/files/001c/c3/b0/64873.png"); }
#button-hideprofile { --emo-editor-icon: url("https://forumstatic.ru/files/001c/c3/b0/14715.png"); }

/* The currently published editor-extras module hides every control appended
   after its service buttons with an inline display:none. Keep the separately
   loaded mask action visible until that module is re-uploaded. */
.punbb #form-buttons #button-mask {
  display: table-cell !important;
}

.punbb #form-buttons #button-keyboard,
.punbb #form-buttons #button-attach,
.punbb #form-buttons #button-attachment,
.punbb #form-buttons #button-file,
.punbb #form-buttons #button-files,
.punbb #form-buttons #button-graffiti,
.punbb #form-buttons td:has(
  [title*="влож" i],
  [alt*="влож" i],
  [title*="графф" i],
  [alt*="графф" i]
),
.punbb #form-buttons :is(
  [title*="влож" i],
  [alt*="влож" i],
  [title*="графф" i],
  [alt*="графф" i]
) {
  display: none;
}

/* Profile-mask editor: the third-party component keeps its functional DOM,
   while EMO supplies the same light surfaces, compact fields and actions as
   the rest of the editor. */
#mask_dialog .hv-bg {
  box-sizing: border-box;
  padding: 16px;
  background: rgba(37, 38, 38, .68);
}

#mask_dialog .inner {
  box-sizing: border-box;
  width: 760px;
  max-width: calc(100vw - 32px);
  max-height: 90vh;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--section-radius);
  background: var(--color-surface);
  color: var(--color-text);
  box-shadow: 8px 10px 0 rgba(37, 38, 38, .22);
  font-family: var(--font-main);
}

#mask_dialog .hv-mask-dialog-title {
  box-sizing: border-box;
  margin: 0;
  padding: 14px 18px;
  border-bottom: 1px solid var(--color-border-soft);
  background: var(--color-surface);
  color: var(--color-text);
  font: normal var(--font-size-base)/16px var(--font-forum-ui);
  letter-spacing: .8px;
  text-align: left;
  text-transform: uppercase;
}

#mask_dialog .hv-mask-block {
  gap: 14px;
  padding: 16px;
  overflow: auto;
  background: var(--color-surface);
}

#mask_dialog :is(.hv-preview-block, .hv-form-block, .hv-masks-storage) {
  color: var(--color-text);
  background: transparent;
}

#mask_dialog .hv-preview-block {
  padding: 4px 8px;
}

#mask_dialog .hv-form-block :is(label, b) {
  color: var(--color-text);
  font-family: var(--font-main);
}

#mask_dialog .hv-form-block .description {
  color: var(--color-text-muted);
  font: normal var(--font-size-xs)/13px var(--font-main);
}

#mask_dialog .hv-form-block :is(input, textarea, select) {
  box-sizing: border-box;
  min-height: 34px;
  margin: 4px 0 0;
  padding: 8px 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--section-radius);
  outline: 0;
  background: var(--color-surface-soft);
  color: var(--color-text);
  font: normal var(--font-size-base)/1.45 var(--font-main);
  box-shadow: none;
}

#mask_dialog .hv-form-block textarea {
  min-height: 54px;
  resize: vertical;
}

#mask_dialog .hv-form-block :is(input, textarea, select):focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 1px rgba(226, 56, 89, .12);
}

#mask_dialog .hv-masks-storage {
  border-left: 1px solid var(--color-border-soft);
}

#mask_dialog .hv-mask-element img {
  border-radius: var(--section-radius);
}

#mask_dialog .hv-options-list {
  border-color: var(--color-border);
  border-radius: var(--section-radius);
  background: var(--color-surface);
  color: var(--color-text);
  box-shadow: 4px 5px 0 rgba(37, 38, 38, .16);
}

#mask_dialog .hv-control {
  box-sizing: border-box;
  margin: 0;
  padding: 14px 16px 16px;
  border-top: 1px solid var(--color-border-soft);
  background: var(--color-surface);
}

#mask_dialog .hv-control .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-width: 0;
  min-height: 20px;
  margin: 0;
  padding: var(--ui-action-padding);
  border: var(--ui-action-border);
  border-radius: var(--ui-action-radius);
  background: var(--ui-action-background);
  color: var(--color-quick-link-text);
  font: var(--ui-action-font);
  letter-spacing: .8px;
  text-transform: uppercase;
  box-shadow: none;
  cursor: pointer;
}

#mask_dialog .hv-control .button:is(:hover, :focus) {
  color: var(--ui-action-hover-color);
}

/* The active-mask avatar gets a dedicated row above the complete toolbar,
   so neither the toolbar nor the textarea can clip it. */
:is(#pun-viewtopic, #pun-post) #post-form .hvMiniProfileWrapper,
#pun-messages form#post .hvMiniProfileWrapper {
  position: relative;
  width: 100%;
  height: 46px;
  margin: 0;
  background: transparent;
  pointer-events: none;
}

:is(#pun-viewtopic, #pun-post) #post-form .hvMiniProfileWrapper:has(> .hvMiniProfile.hv-mask-empty),
#pun-messages form#post .hvMiniProfileWrapper:has(> .hvMiniProfile.hv-mask-empty) {
  height: 0;
}

:is(#pun-viewtopic, #pun-post) #post-form .hvMiniProfile,
#pun-messages form#post .hvMiniProfile {
  top: 4px;
  right: 30px;
  left: auto;
  border: 1px solid var(--color-border-soft);
  background: var(--color-surface);
  box-shadow: none;
  pointer-events: auto;
}

@media (max-width: 768px) {
  #mask_dialog .hv-bg {
    padding: 8px;
  }

  #mask_dialog .inner {
    width: calc(100vw - 16px);
    max-width: none;
    max-height: calc(100vh - 16px);
    overflow-x: hidden;
    overflow-y: auto;
  }

  #mask_dialog .hv-mask-dialog-title {
    padding: 12px 14px;
  }

  #mask_dialog .hv-mask-block {
    gap: 10px;
    padding: 12px;
  }

  #mask_dialog .hv-masks-storage {
    border-top: 1px solid var(--color-border-soft);
    border-left: 0;
  }
}

#pun-viewtopic #pun-main #post-form,
#pun-post #pun-main #post-form,
#pun-messages form#post {
  border-radius: var(--section-radius) !important;
  background: transparent !important;
}

/* Keep the native send/preview row available.  A legacy notification
   iframe rule hides every `.formsubmit`; the page-level editor must restore
   this row so the form has its actual «Отправить» and «Посмотреть» actions. */
#pun-viewtopic #pun-main #post-form .formsubmit,
#pun-post #pun-main #post-form .formsubmit,
#pun-messages form#post > #post-form + p {
  display: flex !important;
  visibility: visible !important;
}

#pun-viewtopic #pun-main #post-form > #post.container,
#pun-post #pun-main #post-form > #post.container,
#pun-messages form#post > #post-form {
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
}

/* Keep the editor wrapper flat. Platform/editor-specific CSS may still add
   its own spacing or frame, so this component explicitly owns the shell. */
#pun-viewtopic #pun-main #post-form fieldset,
#pun-post #pun-main #post-form fieldset,
#pun-messages form#post > fieldset {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  overflow: visible;
}

/* Text entry field: preserve the toolbar-to-field seam while using the EMO
   paper colour, typography and lower rounded corners. */
#pun-viewtopic #pun-main #post-form #main-reply,
#pun-post #pun-main #post-form #main-reply,
#pun-messages form#post #main-reply {
  width: calc(100% - 60px) !important;
  min-width: 0 !important;
  max-width: calc(100% - 60px) !important;
  margin-right: 30px !important;
  margin-left: 30px !important;
  border: 0 !important;
  border-radius: 0 0 var(--section-radius) var(--section-radius) !important;
  background: var(--color-surface) !important;
  color: var(--color-text) !important;
  font-family: var(--font-main) !important;
  box-shadow: none !important;
}

/* Send/preview actions use the same dark pill treatment as the forum reply
   links: light text on a dark surface with a pink-to-peach gradient outline. */
#pun-viewtopic #pun-main #post-form .formsubmit input.button,
#pun-post #pun-main #post-form .formsubmit input.button,
#pun-messages form#post > #post-form + p input.button {
  min-width: 0 !important;
  min-height: 20px !important;
  padding: var(--ui-action-padding) !important;
  border: var(--ui-action-border) !important;
  border-radius: var(--ui-action-radius) !important;
  background: var(--ui-action-background) !important;
  color: var(--color-quick-link-text) !important;
  font: var(--ui-action-font) !important;
  letter-spacing: .8px !important;
  text-transform: uppercase !important;
}

#pun-viewtopic #pun-main #post-form .formsubmit input.button:hover,
#pun-viewtopic #pun-main #post-form .formsubmit input.button:focus,
#pun-post #pun-main #post-form .formsubmit input.button:hover,
#pun-post #pun-main #post-form .formsubmit input.button:focus,
#pun-messages form#post > #post-form + p input.button:hover,
#pun-messages form#post > #post-form + p input.button:focus {
  background: var(--ui-action-background) !important;
  color: var(--ui-action-hover-color) !important;
}

/* =========================================================
   EMO — optional editor BBCode utilities
   [indent] adds a text indent; [hideprofile] hides only the author card
   belonging to the marked post. Their controls extend the native toolbar.
   ========================================================= */

#button-indent:focus-visible,
#button-hideprofile:focus-visible {
  outline: 1px solid var(--color-accent);
  outline-offset: -2px;
}

#button-indent,
#button-hideprofile,
#button-mask {
  border: 0;
  background-color: transparent;
  box-shadow: none;
}

.punbb .post-content .emo-indent,
#pun-post #post-preview .emo-indent,
.mybb-live-preview-content .emo-indent {
  display: inline-block;
  width: 2.4em;
  height: 1em;
}

.emo-hide-profile-marker,
.emo-hide-profile-token-line {
  display: none;
}

#pun-viewtopic #pun-main > .topic > .post.emo-post-hide-profile .post-author {
  display: none;
}

#pun-viewtopic #pun-main > .topic > .post.emo-post-hide-profile .post-body {
  margin-left: 0;
  border-radius: var(--section-radius) var(--section-radius) 0 0;
}

#pun-viewtopic #pun-main > .topic > .post.emo-post-hide-profile .post-links {
  margin-left: 0;
  border-radius: 0 0 var(--section-radius) var(--section-radius);
}

#pun-viewtopic #pun-main > .topic > .post.emo-post-hide-profile .post-links ul {
  margin-left: 0;
}

/* =========================================================
   EMO — БыстроПлюсы для топика
   The plugin injects .post-rating and .post-vote into each post.
   ========================================================= */

#pun-viewtopic #pun-main .post .reactions-root {
  position: absolute;
  bottom: 35px;
  left: 258px;
}



#pun-viewtopic #pun-main .post .post-rating {
  position: absolute;
  right: 18px;
  bottom: 35px;
  float: none;
  margin: 0;
  overflow: visible;
}

#pun-viewtopic #pun-main .post :is(.post-rating, .post-vote),
#pun-viewtopic #pun-main .post :is(.post-rating, .post-vote) p {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

#pun-viewtopic #pun-main .post .post-rating p > a {
  position: relative;
  z-index: 100;
  display: inline-flex;
  align-items: flex-end;
  justify-content: flex-start;
  box-sizing: border-box;
  width: auto;
  min-width: 47px;
  height: 45px;
  padding: 0 2px 6px 29px;
  outline: 1px solid transparent;
  background: var(--quickplus-rating-icon) no-repeat left center;
  background-size: auto 38px;
  color: var(--color-text);
  font-size: 12px !important;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -1px;
  text-align: left;
  text-decoration: none;
  vertical-align: middle;
  cursor: pointer;
}

#pun-viewtopic #pun-main .post .post-rating p > a.noNull {
  background-image: var(--quickplus-rating-active-icon);
}

#pun-viewtopic #pun-main .post .post-rating p > a.noNull::before {
  position: static;
  display: inline-block;
  margin: 10 0px 0 0;
  content: "+";
  font-size: 9px;
}

#pun-viewtopic #pun-main .post .post-vote {
  position: absolute;
  right: 55px;
  bottom: 42px;
  display: block;
  float: none;
  width: 17px;
  height: 19px;
  margin: 0;
}

#pun-viewtopic #pun-main .post .post-vote p > a {
  position: static;
  z-index: 200;
  display: block;
  width: 17px;
  height: 19px;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--quickplus-comment-icon) no-repeat center;
  background-size: contain;
  font-size: 0 !important;
  cursor: pointer;
}

/* On narrow screens both action groups belong to the light post body, not to
   the dark links strip below it. The post body becomes their common anchor. */
@media screen and (max-width: 540px) {
  #pun-viewtopic #pun-main > .topic > .post .post-body {
    position: relative;
  }

  #pun-viewtopic #pun-main .post .reactions-root {
    right: 120px;
    bottom: 12px;
    left: 18px;
  }

  #pun-viewtopic #pun-main .post .post-rating {
    right: 14px;
    bottom: 10px;
  }

  #pun-viewtopic #pun-main .post .post-vote {
    right: 51px;
    bottom: 17px;
  }
}

/* The native link switches to v=0 after a vote; the API-backed class also
   covers the initial page render before the link state is refreshed. */
#pun-viewtopic #pun-main .post .post-vote:has(a[href*="v=0"]),
#pun-viewtopic #pun-main .post.mylike .post-vote {
  display: none !important;
}

/* Hover card for the users who gave the post a positive rating. */
#pun-viewtopic #pun-main .post .emo-like-tooltip {
  position: absolute;
  right: 10px;
  bottom: calc(100% + 10px);
  z-index: 500;
  box-sizing: border-box;
  width: 174px;
  padding: 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--section-radius);
  background: var(--ui-dark-texture);
  box-shadow: 0 5px 14px rgba(0, 0, 0, .2);
  color: var(--color-footer-text);
  visibility: hidden;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .14s ease, transform .14s ease, visibility .14s ease;
  pointer-events: none;
}

#pun-viewtopic #pun-main .post .emo-like-tooltip::after {
  position: absolute;
  right: 22px;
  bottom: -6px;
  width: 0;
  height: 0;
  border-top: 6px solid var(--color-dark);
  border-right: 6px solid transparent;
  border-left: 6px solid transparent;
  content: "";
}

#pun-viewtopic #pun-main .post .emo-like-tooltip.is-open {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

#pun-viewtopic #pun-main .post .emo-like-tooltip > strong {
  display: block;
  margin-bottom: 7px;
  color: var(--color-footer-text);
  font: normal var(--font-size-xs)/11px var(--font-forum-ui);
  letter-spacing: .8px;
  text-transform: uppercase;
}

#pun-viewtopic #pun-main .post .emo-like-tooltip-grid {
  display: grid;
  grid-template-columns: repeat(4, 30px);
  grid-auto-rows: 42px;
  align-content: start;
  gap: 6px;
  max-height: 90px;
  padding-right: 4px;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-color: var(--color-accent) transparent;
  scrollbar-width: thin;
  scrollbar-gutter: stable;
}

#pun-viewtopic #pun-main .post .emo-like-tooltip-grid.is-empty {
  display: block;
  max-height: none;
  padding: 2px 0;
  overflow: visible;
  color: var(--color-footer-text);
  font: normal var(--font-size-xs)/12px var(--font-forum-ui);
  text-align: center;
}

#pun-viewtopic #pun-main .post .emo-like-tooltip-grid > a {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 30px;
  height: 42px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: var(--color-footer-text);
  text-decoration: none;
  transition: transform .14s ease;
}

#pun-viewtopic #pun-main .post .emo-like-tooltip-grid > a:is(:hover, :focus) {
  transform: translateY(-1px);
}

#pun-viewtopic #pun-main .post .emo-like-tooltip-grid img {
  display: block;
  width: 30px;
  height: 30px;
  margin: 0;
  border: 0;
  border-radius: 50%;
  outline: 1px solid transparent;
  object-fit: cover;
  transition: outline-color .14s ease;
}

#pun-viewtopic #pun-main .post .emo-like-tooltip-grid > a:is(:hover, :focus) img {
  outline-color: var(--color-accent);
}

#pun-viewtopic #pun-main .post .emo-like-tooltip-name {
  display: block;
  width: 30px;
  margin-top: 2px;
  overflow: hidden;
  color: var(--color-footer-text);
  font: normal 7px/9px var(--font-forum-ui);
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}
