/* Responsive */
.ch_gamebar {
  box-sizing: border-box;
}

.ch_user_menu {
  box-sizing: border-box;
}

.ch_infobar .ch_user_block ul.ch_user_menu li.link a.fullwidth {
  box-sizing: border-box;
}

.ch_blog-comments {
  box-sizing: border-box;
}

nav[role="navigation"] {
  box-sizing: border-box;
}

footer {
  box-sizing: border-box;
}

/* Blog comments */
.ch_blog-comments {
  background: #fdf6db;
  margin: 0 0 20px 0;
  padding: 10px 0 20px 0;
}
.ch_blog-comments header {
  padding: 0 10px;
}
.ch_blog-comments header h3 {
  margin: 4px 0 6px 0;
}
.ch_blog-comments ul {
  list-style: none;
  margin: 0 2px;
  padding: 0;
}
.ch_blog-comments ul li {
  margin: 10px 0;
  padding: 0 8px;
}
.ch_blog-comments ul li .ch_comment {
  margin: 0;
  padding: 0 8px 0px 40px;
}
.ch_blog-comments ul li .ch_comment .ch_meta {
  *zoom: 1;
  margin-left: -40px;
}
.ch_blog-comments ul li .ch_comment .ch_meta:after {
  content: "";
  display: table;
  clear: both;
}
.ch_blog-comments ul li .ch_comment .ch_meta .ch_user {
  float: left;
  height: auto;
  margin: 0 6px 0 0;
  max-width: 50%;
  padding-bottom: 0;
}
.ch_blog-comments ul li .ch_comment .ch_meta .ch_reply-to {
  font-size: 12px;
  line-height: 18px;
  margin: 0;
  overflow: hidden;
  padding: 6px 0 0 20px;
  text-indent: -20px;
}
.ch_blog-comments ul li .ch_comment p {
  clear: both;
  font-size: 12px;
  line-height: 18px;
  margin: 0;
}
.ch_blog-comments ul li a {
  border-style: solid;
  border-width: 0 0 1px 0;
  text-decoration: none;
}
.ch_blog-comments ul li a:link {
  border-color: #66bae2;
  color: #0c83bd;
}
.ch_blog-comments ul li a:visited {
  border-color: #94aab5;
  color: #3e728b;
}
.ch_blog-comments ul li a:hover, .ch_blog-comments ul li a:active {
  border-color: #1785ba;
  color: #08577d;
}

html.ch-has-editor-js .ch-editor-source {
  height: 1px;
  left: -9999px;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  position: absolute;
  top: auto;
  width: 1px;
}

html.ch-has-editor-js .ch-editor-source.ch-editor-source--fallback {
  height: auto;
  left: auto;
  opacity: 1;
  overflow: visible;
  pointer-events: auto;
  position: static;
  width: 100%;
}

/* Tags */
.ch_tags {
  background: #fdf6db;
  margin: 0 0 20px 0;
  padding: 10px 0 20px 0;
}
.ch_tags header {
  padding: 0 10px;
}
.ch_tags header h3 {
  margin: 4px 0 6px 0;
}
.ch_tags ul {
  list-style: none;
  margin: 0 10px;
  padding: 0;
}
.ch_tags ul li {
  display: inline-block;
  margin: 0 10px 0 0;
  padding: 0;
}
.ch_tags ul a {
  border-style: solid;
  border-width: 0 0 1px 0;
  text-decoration: none;
}
.ch_tags ul a:link {
  border-color: #66bae2;
  color: #0c83bd;
}
.ch_tags ul a:visited {
  border-color: #94aab5;
  color: #3e728b;
}
.ch_tags ul a:hover, .ch_tags ul a:active {
  border-color: #1785ba;
  color: #08577d;
}

/* Hot topics */
.ch_blog-hot {
  background: #fdf6db;
  margin: 0 0 20px 0;
  padding: 10px 0 14px 0;
}
.ch_blog-hot header {
  padding: 0 10px;
}
.ch_blog-hot header h3 {
  margin: 4px 0 6px 0;
}
.ch_blog-hot ol {
  margin: 0 10px 0 34px;
  padding: 0;
}
.ch_blog-hot ol li {
  font-size: 13px;
  line-height: 18px;
  margin: 0 0 8px 0;
  overflow-wrap: anywhere;
}
.ch_blog-hot .ch_blog-hot-meta {
  color: #8a7f5c;
  display: block;
  font-size: 12px;
}
.ch_blog-hot ol a {
  border-style: solid;
  border-width: 0 0 1px 0;
  text-decoration: none;
}
.ch_blog-hot ol a:link {
  border-color: #66bae2;
  color: #0c83bd;
}
.ch_blog-hot ol a:visited {
  border-color: #94aab5;
  color: #3e728b;
}
.ch_blog-hot ol a:hover, .ch_blog-hot ol a:active {
  border-color: #1785ba;
  color: #08577d;
}
.cursor-pointer
{
  cursor: pointer
}

.ch-trix-editor {
  background: #ffffff;
}

trix-toolbar.trix-toolbar {
  background: #f3f3f3;
  border: 1px solid #cfcfcf;
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
  overflow: visible !important;
  padding: 10px 14px 6px;
}

trix-toolbar .trix-button-row {
  flex-wrap: wrap;
  overflow-x: visible !important;
}

trix-toolbar .trix-button-group {
  border: 0;
  margin: 0 8px 4px 0;
}

trix-toolbar .trix-button {
  border: 0;
  border-radius: 8px;
  margin: 0;
}

trix-toolbar .trix-button:not(:disabled):hover,
trix-toolbar .trix-button.trix-active {
  background: #e5e5e5;
}

trix-editor.trix-content {
  background: #ffffff;
  border: 1px solid #cfcfcf;
  border-radius: 0 0 10px 10px;
  color: rgb(48, 48, 48);
  font-size: 16px;
  line-height: 24px;
  min-height: 280px;
  padding: 18px 20px;
}

trix-editor.trix-content ul,
trix-editor.trix-content ol,
.ch_post-text ul,
.ch_post-text ol {
  margin: 0 0 20px 28px;
  padding: 0 0 0 4px;
}

trix-editor.trix-content ul,
.ch_post-text ul {
  list-style: disc;
}

trix-editor.trix-content ol,
.ch_post-text ol {
  list-style: decimal;
}

trix-editor.trix-content li,
.ch_post-text li {
  border: 0 !important;
  margin: 0 0 6px 0;
  padding: 0;
}

.ch_post-text {
  color: rgb(48, 48, 48);
  font-size: 16px;
  line-height: 24px;
  margin: 0 0 20px 0;
}

.ch_post-text p {
  font-size: inherit;
  line-height: inherit;
  margin: 0 0 20px 0;
}

.ch-rich-editor .ch-editor-error {
  color: #9c2c2c;
  font-size: 13px;
  line-height: 18px;
}

.ch-lexxy-editor {
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  min-height: 300px;
  padding: 16px;
}

.lexxy-content,
.ch_post-text,
.ch_comment-text {
  --highlight-1: rgb(136, 118, 38);
  --highlight-2: rgb(185, 94, 6);
  --highlight-3: rgb(207, 0, 0);
  --highlight-4: rgb(216, 28, 170);
  --highlight-5: rgb(144, 19, 254);
  --highlight-6: rgb(5, 98, 185);
  --highlight-7: rgb(17, 138, 15);
  --highlight-8: rgb(148, 82, 22);
  --highlight-9: rgb(102, 102, 102);
  --highlight-bg-1: rgba(229, 223, 6, 0.3);
  --highlight-bg-2: rgba(255, 185, 87, 0.3);
  --highlight-bg-3: rgba(255, 118, 118, 0.3);
  --highlight-bg-4: rgba(248, 137, 216, 0.3);
  --highlight-bg-5: rgba(190, 165, 255, 0.3);
  --highlight-bg-6: rgba(124, 192, 252, 0.3);
  --highlight-bg-7: rgba(140, 255, 129, 0.3);
  --highlight-bg-8: rgba(221, 170, 123, 0.3);
  --highlight-bg-9: rgba(200, 200, 200, 0.3);
  --lexxy-color-table-header-bg: #f3f4f6;
  --lexxy-color-table-cell-border: #d1d5db;
}

.lexxy-content ul {
  list-style-type: disc;
  padding-left: 1.5rem;
}

.lexxy-content ol {
  list-style-type: decimal;
  padding-left: 1.5rem;
}

.lexxy-content h1 {
  font-size: 2rem;
  font-weight: bold;
}

.lexxy-content h2 {
  font-size: 1.5rem;
  font-weight: bold;
}

.lexxy-content h3 {
  font-size: 1.25rem;
  font-weight: bold;
}

.lexxy-content h4 {
  font-size: 1rem;
  font-weight: bold;
}

.lexxy-content h5 {
  font-size: 0.875rem;
  font-weight: bold;
}

.lexxy-content h6 {
  font-size: 0.75rem;
  font-weight: bold;
}

.lexxy-content strong {
  font-weight: bold;
}

.lexxy-content em {
  font-style: italic;
}

.lexxy-content blockquote {
  border-left: 4px solid #d1d5db;
  font-style: italic;
  padding-left: 1rem;
}

.lexxy-content mark,
.ch_post-text mark,
.ch_comment-text mark {
  background-color: transparent;
  color: inherit;
}

.lexxy-content .lexxy-content__table-wrapper,
.ch_post-text .lexxy-content__table-wrapper,
.ch_comment-text .lexxy-content__table-wrapper {
  margin: 0 0 20px 0;
  overflow-x: auto;
}

.lexxy-content table,
.ch_post-text table,
.ch_comment-text table {
  border-collapse: collapse;
  margin: 0 0 20px 0;
  width: 100%;
}

.lexxy-content caption,
.ch_post-text caption,
.ch_comment-text caption {
  color: #6b7280;
  font-size: 13px;
  margin-bottom: 8px;
  text-align: left;
}

.lexxy-content th,
.lexxy-content td,
.ch_post-text th,
.ch_post-text td,
.ch_comment-text th,
.ch_comment-text td {
  border: 1px solid #d1d5db;
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}

.lexxy-content th p,
.lexxy-content td p,
.ch_post-text th p,
.ch_post-text td p,
.ch_comment-text th p,
.ch_comment-text td p {
  margin: 0;
}

ul.ch_posts li article .ch_post-text th p,
ul.ch_posts li article .ch_post-text td p {
  margin: 0;
}

.lexxy-content th,
.ch_post-text th,
.ch_comment-text th {
  background: #f3f4f6;
  font-weight: bold;
}

.lexxy-content td.lexxy-content__table-cell--header,
.ch_post-text td.lexxy-content__table-cell--header,
.ch_comment-text td.lexxy-content__table-cell--header {
  background: var(--lexxy-color-table-header-bg);
  font-weight: bold;
}

.ch_comment-text {
  font-size: 14px;
  line-height: 18px;
  margin: 0 0 18px 0;
}

.ch_comment-text p {
  font-size: inherit;
  line-height: inherit;
  margin: 0 0 18px 0;
}

.ch_comment-text p:last-child {
  margin-bottom: 0;
}

.ch_comment-text ul,
.ch_comment-text ol {
  margin: 0 0 12px 20px;
  padding: 0;
}

.ch_comment-text ul {
  list-style: disc;
}

.ch_comment-text ol {
  list-style: decimal;
}

.ch-comment-editor {
  min-height: 220px;
}

.ch-personal-editor {
  min-height: 260px;
}

.ch-club-description {
  color: rgb(48, 48, 48);
  font-size: 16px;
  line-height: 24px;
  margin: 0 0 20px 0;
}

.ch-club-description p {
  font-size: inherit;
  line-height: inherit;
  margin: 0 0 20px 0;
}

.ch-club-description ul,
.ch-club-description ol {
  margin: 0 0 20px 28px;
  padding: 0 0 0 4px;
}

.ch-club-description ul {
  list-style: disc;
}

.ch-club-description ol {
  list-style: decimal;
}

.ch-club-description li {
  margin: 0 0 6px 0;
}

.ch-club-editor {
  min-height: 260px;
}

.ch-news-editor {
  min-height: 320px;
  margin: 0 0 16px 0;
}

.ch-about-editor {
  min-height: 320px;
  margin: 16px 0;
}

.ch-object-description {
  color: rgb(48, 48, 48);
  font-size: 14px;
  line-height: 20px;
  margin: 0;
}

.ch-object-description p {
  font-size: inherit;
  line-height: inherit;
  margin: 0 0 12px 0;
}

.ch-object-description p:last-child {
  margin-bottom: 0;
}

.ch-object-description ul,
.ch-object-description ol {
  margin: 0 0 12px 22px;
  padding: 0;
}

.ch-object-description ul {
  list-style: disc;
}

.ch-object-description ol {
  list-style: decimal;
}

.ch-object-description li {
  margin: 0 0 4px 0;
}

.ch-object-editor {
  min-height: 220px;
}

/* ===== Blog pages (templates/blog/layout.mtpl.php adds .ch_blog): wider, larger text, cards ===== */

/* 1. Wider on big screens: 960 -> 1140 */
@media (min-width: 1200px) {
  .content-body.ch_blog {
    width: 1140px;
  }
}

/* 2. Larger, airier text */
.ch_blog ul.ch_posts li article .ch_post-text,
.ch_blog article.ch_post .ch_post-text,
.ch_blog ul.ch_posts li article .ch_post-text p,
.ch_blog article.ch_post .ch_post-text p {
  font-size: 18px;
  line-height: 29px;
}
.ch_blog .ch_post-text ul li,
.ch_blog .ch_post-text ol li {
  font-size: 17px;
  line-height: 26px;
}
.ch_blog .ch_post-text blockquote {
  border-left: 4px solid #ffcc00;
  background: #fffbea;
  border-radius: 0 10px 10px 0;
  padding: 10px 18px;
}
.ch_blog .ch_post-text img {
  border-radius: 10px;
}

/* 3. Posts in the feed as cards instead of grey lines */
.ch_blog ul.ch_posts > li {
  background: #fff;
  border: 1px solid #efe9d6;
  border-radius: 14px;
  box-shadow: 0 1px 3px rgba(80, 60, 0, 0.06);
  margin: 0 0 24px 0;
  padding: 6px 32px 8px;
}
.ch_blog ul.ch_posts li article h1 {
  font-size: 26px;
  line-height: 34px;
  margin: 20px 0 0 0;
}
.ch_blog ul.ch_posts li article h1 a {
  border-bottom-color: transparent !important;
}
.ch_blog ul.ch_posts li article h1 a:hover {
  border-bottom-color: currentColor !important;
}

/* Meta: quieter grey, rating as small pill buttons, tags as chips */
.ch_blog .ch_post div.meta ul.ch_meta li {
  color: #8a8a8a;
}
.ch_blog .ch_post div.meta ul.ch_meta li.rating a {
  background: #f4f1e6;
  border: 0;
  border-radius: 999px;
  color: #6b5d2b !important;
  display: inline-block;
  line-height: 20px;
  min-width: 22px;
  text-align: center;
  text-decoration: none;
}
.ch_blog .ch_post div.meta ul.ch_meta li.rating a:hover {
  background: #ffe27a;
}
.ch_blog .ch_post div.meta ul.ch_meta li.tags a,
.ch_blog .ch_tags ul a {
  background: #fdf6db;
  border: 0 !important;
  border-radius: 999px;
  display: inline-block;
  line-height: 20px;
  margin: 2px 0;
  padding: 0 10px;
  text-decoration: none;
}
.ch_blog .ch_tags ul a {
  background: #fff;
}
.ch_blog .ch_post div.meta ul.ch_meta li.tags a:hover,
.ch_blog .ch_tags ul a:hover {
  background: #ffe27a;
}

/* 4. Sidebar: rounded panels, a bit larger type */
.ch_blog .ch_tags,
.ch_blog .ch_blog-hot,
.ch_blog .ch_blog-comments {
  border-radius: 14px;
  padding: 14px 6px 18px;
}
.ch_blog .ch_blog-hot ol li {
  font-size: 14px;
  line-height: 20px;
}
.ch_blog .ch_blog-comments ul li .ch_comment p,
.ch_blog .ch_blog-comments ul li .ch_comment .ch_meta .ch_reply-to {
  font-size: 13px;
  line-height: 19px;
}
.ch_blog .ch_blog-comments ul li + li {
  border-top: 1px solid #f3e9c2;
  padding-top: 10px;
}

/* The post page has no sidebar: keep lines readable (about 75 characters) */
.ch_blog article.ch_post .ch_post-text > :not(.lexxy-content__table-wrapper):not(table) {
  max-width: min(800px, 100%);
}

/* 5. Post page: comments larger, the number beside the date, softer separators */
.ch_blog article.ch_post {
  padding: 0 4px;
}
.ch_blog section.ch_post-comments h1 {
  color: #6f6f6f;
  font-size: 26px;
  margin: 32px 0 8px 0;
}
.ch_blog ul.ch_post-comments > li {
  border-top: 1px solid #f1ede0;
  border-bottom: 0;
  padding: 4px 8px 6px;
}
.ch_blog ul.ch_post-comments > li:hover {
  background: #fffdf4;
}
.ch_blog ul.ch_post-comments article.ch_comment .ch_comment-text,
.ch_blog ul.ch_post-comments article.ch_comment p {
  font-size: 16px;
  line-height: 25px;
  clear: both;
  max-width: 800px;
}
.ch_blog .ch_post-comments article.ch_comment div.meta ul.ch_meta,
.ch_blog .ch_post-comments article.ch_comment div.meta ul.ch_extended-menu {
  margin-bottom: 4px;
}
.ch_blog .ch_post-comments article.ch_comment div.meta .ch_user {
  margin-bottom: 0;
}
.ch_blog ul.ch_post-comments article.ch_comment .ch_user a {
  font-size: 14px;
}
/* The comment number (an inline-styled div in post.mtpl.php, also restyled by phone.css): right, after «Удалить» */
:root body .ch_blog ul.ch_post-comments article.ch_comment div.meta > div:first-child {
  border-left: 1px solid #e6dfc8;
  color: #b9b29a;
  float: right !important;
  font-size: 12px;
  line-height: 20px;
  margin: 16px 0 0 14px !important;
  padding-left: 14px;
}
.ch_blog ul.ch_post-comments article.ch_comment div.meta > div:first-child::before {
  content: '#';
}
.ch_blog .ch_post-comments article.ch_comment div.meta ul.ch_meta li {
  color: #9a9a9a;
}

/* Phone: same ideas, smaller steps */
@media (max-width: 767px) {
  .ch_blog ul.ch_posts {
    margin-top: 20px;
  }
  :root body .ch_blog ul.ch_posts > li {
    border-radius: 12px;
    padding: 2px 14px 4px;
  }
  .ch_blog ul.ch_posts li article h1 {
    font-size: 22px;
    line-height: 29px;
  }
  .ch_blog ul.ch_posts li article .ch_post-text,
  .ch_blog article.ch_post .ch_post-text,
  .ch_blog ul.ch_posts li article .ch_post-text p,
  .ch_blog article.ch_post .ch_post-text p {
    font-size: 17px;
    line-height: 27px;
  }
}

/* Tags without the commas between chips (the label stays) */
.ch_blog .ch_post div.meta ul.ch_meta li.tags > span {
  font-size: 0;
}
.ch_blog .ch_post div.meta ul.ch_meta li.tags > span::before {
  content: 'Теги:';
  font-size: 13px;
  margin-right: 6px;
}
.ch_blog .ch_post div.meta ul.ch_meta li.tags > span a {
  font-size: 13px;
  margin-right: 6px;
}

/* Phone: fewer things to hit by mistake — bigger arrows, tags on their own row with room around */
@media (max-width: 767px) {
  :root body .ch_blog .ch_post div.meta ul.ch_meta:not(.ch_meta-following) li.rating a {
    line-height: 30px;
    min-width: 34px;
    margin: 0 4px;
  }
  :root body .ch_blog .ch_post div.meta ul.ch_meta:not(.ch_meta-following) li.tags {
    margin-top: 12px;
  }
  .ch_blog .ch_post div.meta ul.ch_meta li.tags > span a {
    line-height: 28px;
    margin: 0 8px 6px 0;
    padding: 0 12px;
  }
}

/* Sidebar last comments: name and «на <post>» on one line; a long title wraps from the text's edge, not under the link */
.ch_blog .ch_blog-comments ul li .ch_comment .ch_meta {
  padding-left: 40px;
  position: relative;
}
.ch_blog .ch_blog-comments ul li .ch_comment .ch_meta .ch_user {
  display: inline;
  float: none;
  height: auto;
  margin: 0;
  max-width: none;
  padding: 0;
}
.ch_blog .ch_blog-comments ul li .ch_comment .ch_meta .ch_user img {
  left: 0;
  margin: 0;
  position: absolute;
  top: 0;
}
.ch_blog .ch_blog-comments ul li .ch_comment .ch_meta .ch_reply-to {
  display: inline;
  overflow: visible;
  padding: 0;
  text-indent: 0;
}
.ch_blog .ch_blog-comments ul li .ch_comment p {
  margin-top: 2px;
  min-height: 14px;
}

/* Pager under the feeds: «← Предыдущие» on the left and «Следующие →» on the right of one line */
.ch_blog .ch_blog-pager {
  align-items: baseline;
  clear: both;
  display: flex;
  flex-wrap: wrap;
  gap: 0 16px;
}
.ch_blog .ch_blog-pager p.next {
  margin-left: auto;
}
