.ul_news {
  margin-top: 10px;
  margin-left: 1.25em;
}

.news_template_img_right {
  float: right;
  margin: 0 0 12px 14px;
  border-radius: var(--radius-sm);
}

/* --- Page title, same scale as the forum --- */
.news_page_header {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(90%, 1100px);
  margin: 0 auto 18px;
  text-align: center;
}

.news_page_title,
.body_mc h1.news_page_title {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px 12px;
  margin: 0;
  font-size: clamp(1.35rem, 2.6vw + 0.8rem, 1.75rem);
  font-weight: 700;
  line-height: 1.25;
  color: var(--text);
}

.news_page_title a {
  display: inline-flex;
  color: inherit;
}

.news_page_title img,
.news_rss img {
  width: 18px;
  height: 18px;
  display: block;
}

.news_notices {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: min(90%, 1100px);
  margin: 0 auto 14px;
  text-align: center;
}

.news_toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  width: min(90%, 1100px);
  margin: 0 auto 16px;
}

.news_toolbar .standardButton,
.news_toolbar .adminButton {
  width: auto !important;
  margin: 0 !important;
}

.news_list {
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: min(90%, 1100px);
  margin: 0 auto;
  text-align: left;
}

.news_item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.news_item_header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px 14px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border);
}

.news_item_icon {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background-color: var(--inset);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 32px 32px;
}

.news_item_heading {
  flex: 1 1 auto;
  min-width: 0;
}

.news_item_title,
.body_mc .news_item_title {
  margin: 0 0 4px;
  font-size: clamp(1.2rem, 1.1vw + 0.85rem, 1.45rem);
  font-weight: 700;
  line-height: 1.25;
  color: var(--text);
  text-align: left;
  overflow-wrap: anywhere;
}

.news_item_title a,
.body_mc .news_item_title a {
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  color: var(--text);
}

.news_item_title a:hover,
.body_mc .news_item_title a:hover {
  color: var(--accent);
}

.news_item_meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 0;
  margin: 0;
  font-size: 0.78rem;
  font-weight: 400;
  line-height: 1.4;
  color: var(--muted);
}

.news_item_meta span + span::before {
  content: "·";
  margin: 0 8px;
  color: var(--border-strong);
}

.news_item_meta a,
.body_mc .news_item_meta a {
  font-size: inherit;
  font-weight: 600;
  color: var(--muted);
}

.news_item_meta a:hover,
.body_mc .news_item_meta a:hover {
  color: var(--accent);
}

.news_item_actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  padding-top: 4px;
}

.news_item .deepend_mc {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 16px 18px 8px;
}

.news_item_footer {
  padding: 10px 18px 14px;
  border-top: 1px solid rgba(44, 53, 68, 0.55);
}

.news_item_comments,
.body_mc a.news_item_comments {
  display: inline-flex;
  align-items: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}

.news_item_comments:hover,
.body_mc a.news_item_comments:hover {
  color: var(--accent);
}

.news_list_footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: min(90%, 1100px);
  margin: 16px auto 0;
}

.news_rss,
.news_rss a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--muted);
}

.news_rss a:hover {
  color: var(--accent);
}

.news_list_footer .cc_pager,
.news_list_footer .news_pager {
  width: auto;
  margin: 0 0 0 auto;
}

.news_empty {
  width: min(90%, 1100px);
  margin: 28px auto;
  text-align: center;
  color: var(--muted);
}

.news_back,
.body_mc a.news_back {
  display: block;
  width: min(90%, 1100px);
  margin: 18px auto 0;
  text-align: center;
  font-size: 0.9rem;
  color: var(--muted);
}

.news_back:hover,
.body_mc a.news_back:hover {
  color: var(--accent);
}

/* --- News add / edit form --- */
.news_form_page {
  width: min(90%, 900px);
  margin: 0 auto 8px;
  text-align: left;
}

.news_form_page .news_page_header,
.news_form_page .news_notices {
  width: 100%;
  align-items: flex-start;
  text-align: left;
}

.news_form_preview {
  margin: 0 0 18px;
}

.news_form_panel {
  margin: 0 0 16px;
  padding: 16px 18px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset;
}

.news_form_panel_head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 14px;
}

.news_form_panel_icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: rgba(62, 207, 255, 0.12);
  color: var(--accent);
}

.news_form_panel_icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.news_form_panel_head h2,
.body_mc .news_form_panel_head h2 {
  margin: 0 0 2px;
  text-align: left;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}

.news_form_panel_text {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.news_form_fields {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.news_form_field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.news_form_label {
  font-size: 0.82rem;
  font-weight: 650;
  color: var(--text);
}

.news_form_hint {
  font-weight: 500;
  color: var(--muted);
}

.news_form_category {
  display: flex;
  align-items: stretch;
  gap: 12px;
}

.news_form_category_pic {
  flex: 0 0 auto;
  align-self: stretch;
  width: 81px;
  position: relative;
  box-sizing: border-box;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--inset);
  overflow: hidden;
}

.body_mc .news_form_category_pic img,
.news_form_category_pic img {
  position: absolute;
  inset: 4px;
  width: calc(100% - 8px);
  height: calc(100% - 8px);
  max-width: none;
  object-fit: contain;
  border: 0;
  background: transparent;
}

.news_form_category_select {
  flex: 0 1 auto;
  width: auto;
  min-width: min(280px, 100%);
  max-width: 100%;
  height: auto !important;
  min-height: 0;
}

.news_form_editor {
  width: 100%;
}

.news_form_actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

@media (max-width: 760px) {
  .news_page_header,
  .news_list,
  .news_toolbar,
  .news_list_footer,
  .news_notices,
  .news_empty,
  .news_back,
  .news_form_page {
    width: 100%;
  }

  .news_toolbar,
  .news_pager,
  .news_list_footer .cc_pager,
  .news_list_footer {
    justify-content: center;
  }

  .news_pager,
  .news_list_footer .cc_pager {
    margin-left: 0;
  }

  .news_item_header {
    gap: 12px;
    padding: 14px;
  }

  .news_item_meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }

  .news_item_meta span + span::before {
    content: none;
  }

  .news_item .deepend_mc,
  .news_item_footer {
    padding-left: 14px;
    padding-right: 14px;
  }
}
