/* =========================================================
   ErrorFixer — single clean theme
   Inspired by editorial guide/news layouts
   DLE 19.x
   ========================================================= */

/* =========================
   FONT IMPORT FALLBACK
========================= */

:root{
  --ef-font: "Google Sans", "Inter", "Helvetica Neue", Arial, system-ui, -apple-system, sans-serif;
  --ef-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --ef-bg: #fbf8ef;
  --ef-surface: #fffdf7;
  --ef-text: #1a1612;
  --ef-muted: #6b5f53;
  --ef-soft: #948775;
  --ef-border: #ded4bf;
  --ef-border-soft: rgba(26,22,18,.12);

  --ef-yellow: #f7df72;
  --ef-yellow-deep: #e5bc00;

  --ef-radius: 8px;
  --ef-container: 1120px;

  --ef-shadow-soft: 0 1px 0 rgba(26,22,18,.04), 0 8px 24px -12px rgba(26,22,18,.16);
}

/* Тёмная версия */
html[data-theme="dark"]{
  --ef-bg: #15120f;
  --ef-surface: #1d1914;
  --ef-text: #f6efe2;
  --ef-muted: #b9aa92;
  --ef-soft: #8f8069;
  --ef-border: #342d24;
  --ef-border-soft: rgba(246,239,226,.12);

  --ef-yellow: #ffd700;
  --ef-yellow-deep: #caa900;

  --ef-shadow-soft: 0 1px 0 rgba(255,255,255,.03), 0 12px 32px -18px rgba(0,0,0,.65);
}

/* =========================
   BASE
========================= */

*{
  box-sizing: border-box;
}

html{
  -webkit-text-size-adjust: 100%;
}

body{
  margin: 0;
  background: var(--ef-bg);
  color: var(--ef-text);
  font-family: var(--ef-font);
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  overflow-x: hidden;
}

a{
  color: inherit;
  text-decoration: none;
}

a:hover{
  color: #785f30;
}

html[data-theme="dark"] a:hover{
  color: var(--ef-yellow);
}

img{
  max-width: 100%;
  height: auto;
}

/* Контейнер, потом применим его в main.tpl */
.ef-container{
  width: min(var(--ef-container), calc(100% - 40px));
  margin-inline: auto;
}

/* =========================
   FEED LIST
========================= */

.ef-feed{
  display: flex;
  flex-direction: column;
}

/* =========================
   SHORT STORY
========================= */

.ef-story{
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 22px;
  padding: 22px 0;
  border-bottom: 1px solid var(--ef-border-soft);
}

.ef-story:first-child{
  padding-top: 0;
}

.ef-story__thumb{
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--ef-radius);
  overflow: hidden;
  background: var(--ef-surface);
  border: 1px solid var(--ef-border-soft);
  box-shadow: var(--ef-shadow-soft);
}

.ef-story__thumb img{
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease, filter .35s ease;
}

.ef-story:hover .ef-story__thumb img{
  transform: scale(1.035);
  filter: saturate(1.05);
}

.ef-story__noimg{
  width: 100%;
  height: 100%;
  min-height: 140px;
  display: grid;
  place-items: center;
  color: var(--ef-muted);
  background:
    linear-gradient(135deg, rgba(255,215,0,.16), transparent 46%),
    var(--ef-surface);
}

.ef-story__noimg i{
  font-size: 28px;
  opacity: .6;
}

.ef-story__body{
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.ef-story__top{
  display: flex;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
}

.ef-story__title{
  margin: 0;
  max-width: 760px;
  font-family: var(--ef-font);
  font-size: clamp(22px, 2.1vw, 30px);
  line-height: 1.08;
  letter-spacing: -0.035em;
  font-weight: 700;
}

.ef-story__title a{
  color: var(--ef-text);
    display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ef-story__title a:hover{
  color: var(--ef-text);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.ef-story__actions{
  display: flex;
  gap: 8px;
  flex: 0 0 auto;
  opacity: .42;
  transition: opacity .18s ease;
}

.ef-story:hover .ef-story__actions{
  opacity: 1;
}

.ef-story__action{
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  border: 1px solid var(--ef-border-soft);
  color: var(--ef-muted);
  background: transparent;
  cursor: pointer;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}

.ef-story__action:hover{
  background: var(--ef-yellow);
  color: #1a1612;
  border-color: #1a1612;
}

.ef-story__action--active{
  color: var(--ef-yellow-deep);
}

.ef-story__action--admin{
  color: var(--ef-soft);
}

.ef-story__excerpt{
  margin-top: 10px;
  max-width: 720px;
  color: var(--ef-text);
  font-size: 16px;
  line-height: 1.48;

  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ef-story__excerpt > *{
  margin: 0;
}

.ef-story__excerpt p + p{
  display: none;
}

.ef-story__meta{
  margin-top: auto;
  padding-top: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--ef-muted);
  font-size: 14px;
  line-height: 1.3;
}

.ef-story__date{
  color: var(--ef-muted);
}

.ef-story__comments{
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--ef-muted);
}

.ef-story__cat{
  margin-left: auto;
  font-family: var(--ef-mono);
  font-size: 12px;
  line-height: 1;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: 600;
  color: #785f30;
}

html[data-theme="dark"] .ef-story__cat{
  color: var(--ef-yellow);
}

.ef-story__cat a{
  color: inherit;
}

.ef-story__mark{
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--ef-yellow);
  color: #1a1612;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.ef-story__mark--update{
  background: transparent;
  color: var(--ef-muted);
  border: 1px solid var(--ef-border-soft);
}

.ef-story__edit{
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--ef-border-soft);
  color: var(--ef-muted);
  font-size: 13px;
}

/* =========================
   MOBILE
========================= */

@media (max-width: 820px){
  .ef-container{
    width: min(100% - 28px, var(--ef-container));
  }

  .ef-story{
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 16px;
    padding: 18px 0;
  }

  .ef-story__title{
    font-size: 21px;
  }

  .ef-story__excerpt{
    font-size: 15px;
    -webkit-line-clamp: 2;
  }

  .ef-story__actions{
    display: none;
  }
}

@media (max-width: 560px){
  .ef-story{
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .ef-story__thumb{
    aspect-ratio: 16 / 9;
  }

  .ef-story__title{
    font-size: 23px;
  }

  .ef-story__cat{
    margin-left: 0;
    width: 100%;
  }
}
/* =========================
   LAYOUT (NEW SYSTEM)
========================= */

.ef-main{
  padding: 28px 0 80px;
}

.ef-container{
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.ef-layout{
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 32px;
  align-items: start;
}

/* CONTENT AREA */
.ef-content{
  min-width: 0;
}

/* SIDEBAR */
.ef-sidebar{
  position: sticky;
  top: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 1024px){
  .ef-layout{
    grid-template-columns: 1fr;
  }

  .ef-sidebar{
    position: static;
  }
}

/* =========================
   HEADER SYSTEM (EF)
========================= */
.ef-header{
  position: sticky;
  top: 0;
  z-index: 99999;
  background: var(--ef-surface);
  border-bottom: 1px solid var(--ef-border-soft);
}

/* ОБЩИЙ БЛОК (top + nav вместе) */
.ef-header__bottom{
  position: relative;
  background: var(--ef-surface);
  border-top: 1px solid var(--ef-border-soft);
}

/* top bar shadow when scroll */
.ef-header{
  transition: box-shadow .2s ease, background .2s ease;
}
.ef-header__bottom{
  left: 0;
  right: 0;
  z-index: 99998;
}

/* эффект при прокрутке (добавим JS класс) */
.ef-header.is-scrolled{
  box-shadow: 0 10px 30px rgba(0,0,0,.08);
}

.ef-header{
  background: var(--ef-surface);
  border-bottom: 1px solid var(--ef-border-soft);
}

/* TOP */
.ef-header__top{
  padding: 14px 0;
}

.ef-header__inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.ef-header__bottom{
  left: 0;
  right: 0;
  z-index: 99998;

  transition: transform .25s ease, opacity .25s ease;

  background: var(--ef-surface);
  border-bottom: 1px solid var(--ef-border);

  transition: transform .25s ease, opacity .25s ease;
  will-change: transform;
}

body{
  padding-top: 0 !important;
}

/* скрытие */
.ef-header__bottom.is-hidden{
  transform: translateY(-120%);
  opacity: 0;
  pointer-events: none;
}

/* =========================
   LOGO
========================= */

/* =========================
   LOGO (ErrorFixer)
========================= */

.ef-logo{
  display:flex;
  align-items:center;
  gap:12px;
  text-decoration:none;
  color:var(--ef-text);
}

/* квадратный бренд-бейдж */
.ef-logo__icon{
  width:42px;
  height:42px;
  border-radius:12px;

  display:flex;
  align-items:center;
  justify-content:center;

  font-weight:800;
  font-size:14px;
  letter-spacing:1px;

  background: linear-gradient(135deg, var(--ef-yellow), var(--ef-yellow-deep));
  color:#1a1612;

  box-shadow: var(--ef-shadow-soft);
  border:1px solid var(--ef-border);
  flex:0 0 auto;
}

/* текстовая часть */
.ef-logo__textwrap{
  display:flex;
  flex-direction:column;
  line-height:1.1;
}

/* название */
.ef-logo__text{
  font-size:16px;
  font-weight:700;
  color:var(--ef-text);
}

/* подпись */
.ef-logo__subtext{
  font-size:12px;
  color:var(--ef-muted);
  margin-top:2px;
  white-space:nowrap;
}

/* hover эффект */
.ef-logo:hover .ef-logo__icon{
  transform: translateY(-1px);
  transition:.2s ease;
}

.ef-logo:hover .ef-logo__text{
  color:var(--ef-yellow-deep);
}

.ef-logo__mark{
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;

  background: var(--ef-yellow);
  color: #1a1612;

  font-weight: 800;
  border-radius: 10px;
}


/* =========================
   SEARCH
========================= */

.ef-search{
  flex: 1;
  display: flex;
  gap: 10px;
  max-width: 620px;
}

.ef-search__field{
  flex: 1;
  position: relative;
}

.ef-search__icon{
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ef-muted);
}

.ef-search__input{
  width: 100%;
  padding: 10px 12px 10px 36px;
  border-radius: 10px;
  border: 1px solid var(--ef-border);
  background: var(--ef-bg);
  font-family: var(--ef-font);
  outline: none;
}

.ef-search__input:focus{
  border-color: var(--ef-yellow);
}

.ef-search__btn{
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--ef-border);
  background: var(--ef-yellow);
  font-weight: 700;
  cursor: pointer;
}

/* =========================
   USER BAR
========================= */

.ef-userbar{
  display: flex;
  align-items: center;
  gap: 12px;
}

/* =========================
   NAV
========================= */

.ef-header__bottom{
  padding: 10px 0;
}

.ef-nav{
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.ef-nav__link{
  display: flex;
  align-items: center;
  gap: 6px;

  font-size: 14px;
  color: var(--ef-muted);

  padding: 6px 10px;
  border-radius: 8px;

  text-decoration: none;
}

.ef-nav__link:hover{
  background: rgba(255,215,0,.15);
  color: var(--ef-text);
}

/* =========================
   MOBILE
========================= */

@media (max-width: 900px){

  .ef-header__inner{
    flex-direction: column;
    align-items: stretch;
  }

  .ef-search{
    max-width: 100%;
  }

  .ef-userbar{
    justify-content: space-between;
  }
}

/* =========================
   USER / LOGIN SYSTEM
========================= */

.ef-user{
  display: flex;
  align-items: center;
  gap: 10px;
}

/* BUTTONS */
.ef-btn{
  display: inline-flex;
  align-items: center;
  gap: 6px;

  padding: 8px 12px;
  border-radius: 10px;

  font-size: 14px;
  font-weight: 600;

  border: 1px solid var(--ef-border);
  background: transparent;

  cursor: pointer;
  text-decoration: none;
  color: var(--ef-text);
}

.ef-btn--ghost{
  background: transparent;
}

.ef-btn--primary{
  background: var(--ef-yellow);
  color: #1a1612;
  border-color: transparent;
}

.ef-btn--dark{
  background: var(--ef-text);
  color: var(--ef-bg);
  border-color: transparent;
}

/* =========================
   DROPDOWN BASE — FIXED
========================= */

.ef-userdrop{
  position: relative;
  display: inline-flex;
  align-items: center;
}

/* кнопка */
.ef-userdrop__toggle{
  display: inline-flex;
  align-items: center;
  gap: 8px;

  padding: 8px 12px;
  border-radius: 10px;

  background: var(--ef-surface);
  border: 1px solid var(--ef-border-soft);
  color: var(--ef-text);

  cursor: pointer;
  font-family: var(--ef-font);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;

  transition: background .15s ease, border-color .15s ease;
}

.ef-userdrop__toggle:hover{
  background: var(--ef-bg);
  border-color: var(--ef-border);
}

.ef-caret{
  font-size: 11px;
  opacity: .6;
  line-height: 1;
}

/* невидимый мостик между кнопкой и меню */
.ef-userdrop::after{
  content: "";
  position: absolute;
  top: 100%;
  right: 0;
  width: 100%;
  min-width: 280px;
  height: 8px;
  z-index: 99;
}

/* меню */
.ef-userdrop__menu{
  position: absolute;
  right: 0;
  top: calc(100% + 4px);

  width: 280px;

  background: var(--ef-surface);
  border: 1px solid var(--ef-border);
  border-radius: 14px;

  box-shadow: 0 18px 45px rgba(26,22,18,.16);
  padding: 10px;

  z-index: 100;

  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);

  pointer-events: none;

  transition:
    opacity .14s ease,
    transform .14s ease,
    visibility .14s ease;
}

/* показываем меню */
.ef-userdrop:hover .ef-userdrop__menu,
.ef-userdrop:focus-within .ef-userdrop__menu{
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

/* чтобы меню не прыгало при наведении */
.ef-userdrop__menu:hover{
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* =========================
   LOGIN FORM
========================= */

.ef-loginform{
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ef-field{
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ef-field label{
  font-size: 12px;
  color: var(--ef-muted);
}

.ef-field input{
  padding: 10px 12px;
  border-radius: 10px;

  border: 1px solid var(--ef-border);
  background: var(--ef-bg);

  font-family: var(--ef-font);
  outline: none;
}

.ef-field input:focus{
  border-color: var(--ef-yellow);
}

.ef-loginform__bottom{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

/* =========================
   LINKS
========================= */

.ef-link{
  font-size: 12px;
  color: var(--ef-muted);
  text-decoration: none;
}

.ef-link:hover{
  color: var(--ef-text);
}

/* =========================
   LOGGED USER
========================= */

.ef-userdrop--logged .ef-userdrop__toggle{
  padding: 6px 10px;
}

.ef-avatar{
  width: 26px;
  height: 26px;
  border-radius: 50%;
  overflow: hidden;
  display: block;
}

.ef-avatar img{
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ef-username{
  font-size: 14px;
}

/* DROPDOWN ITEMS */
.ef-dropitem{
  display: block;
  padding: 10px 10px;
  border-radius: 10px;

  font-size: 14px;
  color: var(--ef-text);

  text-decoration: none;
}

.ef-dropitem:hover{
  background: rgba(255,215,0,.15);
}

.ef-dropitem--danger{
  color: #e11d48;
}

.ef-dropitem--admin{
  font-weight: 700;
}

/* =========================
   MOBILE
========================= */

@media (max-width: 720px){

  .ef-userdrop__menu{
    right: auto;
    left: 0;
    width: 260px;
  }

}

/* =========================
   SIDEBAR SYSTEM
========================= */

.ef-sidebar{
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* =========================
   WIDGET BASE
========================= */

.widget{
  background: var(--ef-surface);
  border: 1px solid var(--ef-border-soft);
  border-radius: 14px;

  box-shadow: var(--ef-shadow-soft);
  overflow: hidden;
}

.widget__title{
  padding: 12px 14px;

  font-size: 13px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;

  color: var(--ef-muted);

  border-bottom: 1px solid var(--ef-border-soft);
}

.widget__body{
  padding: 12px;
}

/* =========================
   QUICK ACCESS
========================= */

.side-quick{
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.side-quick__item{
  display: flex;
  gap: 10px;
  align-items: flex-start;

  padding: 10px;
  border-radius: 12px;

  text-decoration: none;

  border: 1px solid transparent;
  transition: background .15s ease, border-color .15s ease;
}

.side-quick__item:hover{
  background: rgba(255,215,0,.08);
  border-color: var(--ef-border-soft);
}

.side-quick__icon{
  width: 34px;
  height: 34px;
  border-radius: 10px;

  display: grid;
  place-items: center;

  background: var(--ef-bg);
  border: 1px solid var(--ef-border-soft);

  color: var(--ef-muted);
}

.side-quick__text strong{
  display: block;
  font-size: 14px;
  color: var(--ef-text);
  font-weight: 700;
}

.side-quick__text small{
  display: block;
  font-size: 12px;
  color: var(--ef-muted);
  margin-top: 2px;
  line-height: 1.3;
}

/* =========================
   TOP STORY
========================= */

.side-topstory{
  border-radius: 14px;
  overflow: hidden;
}

/* =========================
   CAT MENU
========================= */

.widget__body ul{
  list-style: none;
  margin: 0;
  padding: 0;
}

.widget__body ul li{
  margin: 0;
}

.widget__body ul li a{
  display: block;
  padding: 8px 10px;

  border-radius: 10px;

  color: var(--ef-text);
  text-decoration: none;

  font-size: 14px;
}

.widget__body ul li a:hover{
  background: rgba(255,215,0,.10);
}

/* =========================
   COMMENTS / LISTS
========================= */

.widget__body{
  font-size: 14px;
  color: var(--ef-text);
}

/* =========================
   ABOUT BLOCK
========================= */

.widget--softinfo .widget__body{
  color: var(--ef-muted);
  font-size: 14px;
  line-height: 1.55;
}

.side-about__list{
  margin-top: 10px;
  padding: 0;
  list-style: none;

  display: flex;
  flex-direction: column;
  gap: 6px;
}

.side-about__list li{
  display: flex;
  align-items: center;
  gap: 8px;

  font-size: 13px;
  color: var(--ef-text);
}

.side-about__list i{
  color: #22c55e;
  font-size: 12px;
}

/* =========================
   SMALL RESPONSIVE
========================= */

@media (max-width: 1024px){
  .ef-sidebar{
    gap: 14px;
  }
}

/* =========================
   CATEGORY MENU (EF)
========================= */

.ef-catmenu{
  list-style: none;
  margin: 0;
  padding: 0;

  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* ITEM */
.ef-catmenu__item{
  margin: 0;
}

/* LINK */
.ef-catmenu__link{
  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 9px 10px;
  border-radius: 10px;

  text-decoration: none;

  color: var(--ef-text);
  font-size: 14px;

  transition: background .15s ease, color .15s ease;
}

.ef-catmenu__link:hover{
  background: rgba(255,215,0,.10);
}

/* NAME */
.ef-catmenu__name{
  display: inline-flex;
  align-items: center;
  gap: 6px;

  font-weight: 500;
}

/* COUNT */
.ef-catmenu__count{
  font-size: 12px;
  color: var(--ef-muted);
}

/* ACTIVE */
.is-active{
  background: rgba(255,215,0,.16);
  font-weight: 700;
}

/* CHEVRON */
.ef-catmenu__chev{
  font-size: 12px;
  opacity: .6;
}

/* =========================
   SUB MENU
========================= */

.ef-catmenu--sub{
  margin-left: 12px;
  margin-top: 4px;
  padding-left: 10px;

  border-left: 1px solid var(--ef-border-soft);
}

.ef-catmenu--sub .ef-catmenu__link{
  font-size: 13px;
  padding: 7px 10px;
  opacity: .9;
}

.ef-catmenu--sub .ef-catmenu__link:hover{
  opacity: 1;
}

/* =========================
   HOVER DEPTH FEEL
========================= */

.ef-catmenu__item:hover > .ef-catmenu__link{
  transform: translateX(2px);
}

/* =========================
   MOBILE
========================= */

@media (max-width: 1024px){
  .ef-catmenu__link{
    padding: 10px;
  }
}

/* =========================
   POPULAR TOP STORY (EF)
========================= */

.ef-topstory{
  display: flex;
  flex-direction: column;

  border-radius: 14px;
  overflow: hidden;

  text-decoration: none;

  background: var(--ef-surface);
  border: 1px solid var(--ef-border-soft);

  transition: transform .15s ease, box-shadow .15s ease;
}

.ef-topstory:hover{
  transform: translateY(-2px);
  box-shadow: var(--ef-shadow-soft);
}

/* IMAGE */
.ef-topstory__media{
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--ef-bg);
}

.ef-topstory__media img{
  width: 100%;
  height: 100%;
  transition: transform .35s ease, filter .35s ease;
}

.ef-topstory:hover .ef-topstory__media img{
  transform: scale(1.04);
  filter: saturate(1.05);
}

/* BODY */
.ef-topstory__body{
  padding: 12px 12px 14px;
}

/* LABEL */
.ef-topstory__label{
  display: inline-flex;
  align-items: center;
  gap: 6px;

  font-size: 11px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;

  color: #e11d48;
}

/* TITLE */
.ef-topstory__title{
  margin-top: 6px;

  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;

  color: var(--ef-text);
}

/* META */
.ef-topstory__meta{
  margin-top: 8px;

  display: flex;
  gap: 10px;

  font-size: 12px;
  color: var(--ef-muted);
}

.ef-topstory__meta i{
  margin-right: 4px;
  opacity: .7;
}

/* =========================
   OPTIONAL DARK TUNE
========================= */

html[data-theme="dark"] .ef-topstory__label{
  color: #ff4d6d;
}

/* =========================
   FOOTER SYSTEM (EF)
========================= */

.ef-footer{
  margin-top: 60px;
  border-top: 1px solid var(--ef-border-soft);
  background: var(--ef-surface);
}

/* TOP */
.ef-footer__top{
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 32px;

  padding: 34px 0;
}

/* BRAND */
.ef-footer__logo{
  display: flex;
  align-items: center;
  gap: 12px;
}

.ef-footer__mark{
  width: 42px;
  height: 42px;

  display: grid;
  place-items: center;

  background: var(--ef-yellow);
  color: #1a1612;

  font-weight: 800;
  border-radius: 10px;
}

.ef-footer__title{
  font-weight: 800;
  font-size: 16px;
}

.ef-footer__subtitle{
  font-size: 12px;
  color: var(--ef-muted);
}

.ef-footer__text{
  margin-top: 12px;
  font-size: 14px;
  color: var(--ef-muted);
  line-height: 1.5;
  max-width: 320px;
}

/* HEAD */
.ef-footer__head{
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;

  color: var(--ef-muted);
  margin-bottom: 12px;
}

/* LINKS */
.ef-footer__links{
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ef-footer__links a{
  font-size: 14px;
  color: var(--ef-text);
  text-decoration: none;

  opacity: .8;
  transition: opacity .15s ease, color .15s ease;
}

.ef-footer__links a:hover{
  opacity: 1;
  color: var(--ef-text);
}

/* BOTTOM */
.ef-footer__bottom{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;

  padding: 16px 0;
  border-top: 1px solid var(--ef-border-soft);

  font-size: 13px;
  color: var(--ef-muted);
}

/* COUNTER */
.ef-footer__counter{
  display: flex;
  align-items: center;
  gap: 8px;
}

/* RESPONSIVE */
@media (max-width: 900px){
  .ef-footer__top{
    grid-template-columns: 1fr;
  }

  .ef-footer__text{
    max-width: 100%;
  }

  .ef-footer__bottom{
    flex-direction: column;
    align-items: flex-start;
  }
}
/* =========================
   LAST COMMENTS — MODERN CARD
========================= */

.lc-item{
  display: flex;
  gap: 12px;

  padding: 8px 10px;

  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--card);

  text-decoration: none;
  color: var(--text);

  transition: .15s ease;
}

.lc-item:hover{
  transform: translateY(-1px);
  box-shadow: var(--shadow);
  border-color: rgba(255,210,70,.35);
}

/* AVATAR */
.lc-ava{
  flex: 0 0 auto;
}

.lc-ava__img{
  width: 38px;
  height: 38px;

  border-radius: 50%;

  background-size: cover;
  background-position: center;

  border: 1px solid var(--border);
}

/* MAIN */
.lc-body{
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

/* TOP LINE */
.lc-head{
  display: flex;
  align-items: center;
  gap: 6px;

  font-size: 12px;
  color: var(--muted);
  flex-wrap: wrap;
}

.lc-name{
  font-weight: 700;
  color: var(--text);
}

.lc-dot{
  opacity: .5;
}

.lc-news{
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;

  max-width: 180px;
  display: inline-block;
}

/* TEXT */
.lc-text{
  font-size: 13px;
  line-height: 1.35;
  color: var(--text);

  opacity: .85;

  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;

  overflow: hidden;
}
/* =========================
   POPULAR WEEK — MODERN LIST
========================= */

.pweek-item{
  margin-bottom: 10px;
}

.pweek-link{
  display: flex;
  flex-direction: column;
  gap: 6px;

    padding: 8px 10px;

  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--card);

  text-decoration: none;
  color: var(--text);

  transition: .15s ease;
}

.pweek-link:hover{
  transform: translateY(-1px);
  box-shadow: var(--shadow);
  border-color: rgba(255,210,70,.35);
}

/* TITLE */
.pweek-title{
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;

  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;

  overflow: hidden;
}

/* META */
.pweek-meta{
  display: flex;
  gap: 12px;

  font-size: 12px;
  color: var(--muted);
}

.pweek-meta__item{
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pweek-meta__item i{
  font-size: 12px;
  opacity: .8;
}
/* =========================
   PAGINATION — MODERN CLEAN UI
========================= */

.pages-navigation{
  display: flex;
  justify-content: center;
  margin: 24px 0;
}

.pages-navigation__inner{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;

  padding: 10px;

  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 16px;

  box-shadow: var(--shadow);
}

/* LINKS (DLE generates a, span, strong etc inside {pages}) */
.pages-navigation a,
.pages-navigation span,
.pages-navigation strong{
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-width: 36px;
  height: 36px;

  padding: 0 10px;

  border-radius: 10px;

  font-size: 14px;
  font-weight: 600;

  text-decoration: none;

  color: var(--text);

  transition: .15s ease;
}

/* hover */
.pages-navigation a:hover{
  background: rgba(255, 210, 70, .15);
  border-color: rgba(255, 210, 70, .35);
}

/* active page (DLE often uses <strong> or <span>) */
.pages-navigation strong,
.pages-navigation .current{
  background: #ffd329;
  color: #1a1612;
  font-weight: 800;
  box-shadow: 0 6px 18px rgba(255, 210, 70, .25);
}

/* ellipsis (...) */
.pages-navigation span{
  opacity: .6;
}
/* =========================
   PREMIUM THEME TOGGLE — SOFT BUTTON
========================= */

.ef-theme{
  width: 42px;
  height: 42px;

  position: relative;

  display: grid;
  place-items: center;

  border: 0;
  border-radius: 14px;

  background:
    linear-gradient(180deg, rgba(255,255,255,.72), rgba(255,255,255,.36)),
    rgba(255,255,255,.62);

  color: #1a1612;

  cursor: pointer;

  box-shadow:
    0 1px 0 rgba(255,255,255,.75) inset,
    0 8px 18px rgba(26,22,18,.08);

  transition:
    transform .16s ease,
    background .18s ease,
    box-shadow .18s ease,
    color .18s ease;
}

.ef-theme:hover{
  transform: translateY(-1px);
  background:
    linear-gradient(180deg, rgba(255,255,255,.9), rgba(255,255,255,.48)),
    rgba(255,255,255,.78);

  box-shadow:
    0 1px 0 rgba(255,255,255,.85) inset,
    0 10px 24px rgba(26,22,18,.12);
}

.ef-theme:active{
  transform: translateY(0) scale(.97);
}

.ef-theme i{
  position: relative;
  z-index: 2;

  font-size: 17px;

  transition:
    transform .45s cubic-bezier(.2,.8,.2,1),
    opacity .25s ease,
    color .18s ease;
}

/* маленькое жёлтое свечение, чтобы кнопка не была лысой */
.ef-theme::before{
  content:"";
  position: absolute;
  inset: 8px;

  border-radius: 999px;

  background: rgba(255,211,41,.16);
  opacity: .75;

  transition: opacity .18s ease, transform .18s ease;
}

.ef-theme:hover::before{
  opacity: 1;
  transform: scale(1.08);
}

/* animation */
.ef-theme.is-animating i{
  transform: rotate(360deg) scale(1.15);
  opacity: .65;
}

/* click flash */
.ef-theme.flash::after{
  content:"";
  position: absolute;
  inset: -10px;

  border-radius: 18px;

  background: radial-gradient(circle,
    rgba(255, 211, 41, .42),
    transparent 62%
  );

  animation: efThemeFlash .45s ease-out;
  pointer-events: none;
}

@keyframes efThemeFlash{
  0%{
    opacity: 0;
    transform: scale(.65);
  }
  38%{
    opacity: 1;
  }
  100%{
    opacity: 0;
    transform: scale(1.55);
  }
}

/* dark theme */
html[data-theme="dark"] .ef-theme{
  background:
    linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.03)),
    rgba(255,255,255,.045);

  color: #ffd329;

  box-shadow:
    0 1px 0 rgba(255,255,255,.08) inset,
    0 10px 24px rgba(0,0,0,.28);
}

html[data-theme="dark"] .ef-theme:hover{
  background:
    linear-gradient(180deg, rgba(255,255,255,.11), rgba(255,255,255,.04)),
    rgba(255,255,255,.065);

  box-shadow:
    0 1px 0 rgba(255,255,255,.1) inset,
    0 12px 28px rgba(0,0,0,.36);
}

html[data-theme="dark"] .ef-theme::before{
  background: rgba(255,211,41,.12);
}
/* =========================
   INFO CARD (SYSTEM NOTICE STYLE)
========================= */

.ef-info{
  margin: 18px 0;
}

.ef-info__inner{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;

  padding: 16px 18px;

  box-shadow: 0 10px 24px rgba(0,0,0,.05);

  position: relative;
  overflow: hidden;
}

/* subtle left accent like your toasts */
.ef-info__inner::before{
  content:"";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;

  width: 4px;

  background: #ffd329;
}

/* header */
.ef-info__head{
  display: flex;
  align-items: center;
  gap: 10px;

  margin-bottom: 10px;
}

.ef-info__icon{
  width: 34px;
  height: 34px;

  display: grid;
  place-items: center;

  border-radius: 10px;

  background: rgba(255,211,41,.15);
  color: #1a1612;
}

.ef-info__title{
  font-weight: 800;
  font-size: 15px;
  color: var(--text);
}

/* body */
.ef-info__body{
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

/* actions */
.ef-info__actions{
  margin-top: 14px;
  display: flex;
  justify-content: flex-end;
}

/* button polish inside info */
.ef-info .btn--primary{
  background: #ffd329;
  color: #1a1612;
  border: none;

  padding: 10px 14px;
  border-radius: 12px;

  font-weight: 800;

  transition: transform .15s ease, filter .15s ease;
}

.ef-info .btn--primary:hover{
  transform: translateY(-1px);
  filter: brightness(.98);
}

.ef-info .btn--primary:active{
  transform: translateY(0);
}
/* =========================================================
   FULL STORY (ErrorFixer v2 UI)
========================================================= */

.f-card{
  max-width: 920px;
  margin: 0 auto;
}

/* ================= HEADER ================= */

.f-head{
  margin-bottom: 18px;
}

.f-head__top{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.f-title{
  font-size: 32px;
  line-height: 1.2;
  font-weight: 900;
  letter-spacing: -0.02em;
  margin: 0;
}

/* ACTIONS */
/* =========================================================
   FULLSTORY ACTION BUTTONS (UNIFIED WITH SHORTSTYLE)
========================================================= */

.f-actions{
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

/* основная кнопка (как ef-story__action) */
.f-actions .ef-story__action,
.f-actions .s-ico{
  width: 40px;
  height: 40px;

  display: grid;
  place-items: center;

  border-radius: 12px;

  border: 1px solid var(--ef-border);
  background: var(--ef-surface);

  color: var(--ef-text);

  cursor: pointer;

  transition: transform .15s ease, background .15s ease, border-color .15s ease, box-shadow .15s ease;
}

/* hover как в shortstory */
.f-actions .ef-story__action:hover,
.f-actions .s-ico:hover{
  transform: translateY(-1px);
  background: var(--ef-bg);
  border-color: rgba(255, 211, 41, .35);
  box-shadow: 0 8px 18px rgba(0,0,0,.06);
}

/* active */
.f-actions .ef-story__action:active,
.f-actions .s-ico:active{
  transform: translateY(0);
}

/* иконка */
.f-actions i{
  font-size: 16px;
  opacity: .85;
}

/* admin highlight (как в shortstory) */
.f-actions .ef-story__action--admin{
  color: var(--ef-soft);
}

/* hover admin */
.f-actions .ef-story__action--admin:hover{
  color: var(--ef-text);
}

.s-ico{
  width: 38px;
  height: 38px;

  display: grid;
  place-items: center;

  border-radius: 12px;
  border: 1px solid var(--ef-border);
  background: var(--ef-surface);

  cursor: pointer;

  transition: .15s ease;
}

.s-ico:hover{
  transform: translateY(-1px);
  background: var(--ef-bg);
}

/* ================= META ================= */

.f-meta{
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  color: var(--ef-muted);
  font-size: 13px;
}

.f-meta__item{
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.f-meta__dot{
  opacity: .4;
}

/* ================= EDIT NOTE ================= */

.f-editnote{
  margin-top: 12px;
  padding: 10px 12px;

  border-radius: 12px;
  border: 1px solid var(--ef-border);
  background: var(--ef-bg);

  font-size: 13px;
  color: var(--ef-muted);
}

/* ================= COVER ================= */

.f-cover{
  margin: 18px 0;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--ef-border);
  background: var(--ef-surface);
}

.f-cover__img{
  width: 100%;
  display: block;
  object-fit: cover;
  max-height: 420px;
}

.f-cover__cap{
  padding: 10px 14px;
  font-size: 12px;
  color: var(--ef-muted);
  border-top: 1px solid var(--ef-border);
}

/* empty cover */
.f-cover--empty{
  height: 240px;
  display: grid;
  place-items: center;
  color: var(--ef-muted);
}

/* ================= BODY ================= */

.f-body{
  font-size: 16px;
  line-height: 1.75;
}


/* =========================
   TOC TREE (NO JS VERSION)
========================= */

.toc{
  margin: 18px 0;
  border: 1px solid var(--ef-border);
  border-radius: var(--ef-radius);
  background: var(--ef-surface);
  overflow: hidden;
}

/* header */
.toc__sum{
  padding: 12px 14px;
  cursor: pointer;
  font-weight: 800;
  display:flex;
  justify-content:space-between;
  align-items:center;
  background: linear-gradient(180deg, rgb(149 136 77 / 12%), transparent);
}

/* nav container */
.toc__nav{
  padding: 10px 14px 14px;
  border-left: 2px solid var(--ef-border-soft);
  margin-left: 14px;

  display:flex;
  flex-direction:column;
  gap:6px;
}

/* =========================
   BASE ITEM
========================= */

.toc__nav a{
  position: relative;
  display: block;
  text-decoration: none;
  color: var(--ef-muted);
  font-size: 14px;
  padding: 6px 10px 6px 18px;
  border-radius: 6px;

  transition: .15s ease;
}

/* hover */
.toc__nav a:hover{
  background: rgba(247,223,114,.15);
  color: var(--ef-text);
}

/* =========================
   TREE LEVELS (IMPORTANT)
   работает даже без JS
========================= */

/* H2 (главный уровень) */
.toc__nav a{
  font-weight: 600;
}

/* H3 — чуть глубже */
.toc__nav a.toc-h3{
  margin-left: 16px;
  font-size: 13.5px;
  color: var(--ef-soft);
}

/* H4 — ещё глубже */
.toc__nav a.toc-h4{
  margin-left: 32px;
  font-size: 13px;
  color: var(--ef-soft);
}

/* =========================
   VISUAL DOT (TREE NODE)
========================= */

.toc__nav a::before{
  content:"";
  position:absolute;
  left:6px;
  top:50%;
  width:6px;
  height:6px;
  transform: translateY(-50%);
  border-radius:50%;
  background: var(--ef-border);
}

/* highlight */
.toc__nav a:hover::before{
  background: var(--ef-yellow);
}
.toc__nav a{
  position: relative;
  display: block;
  padding: 4px 0 4px 18px;
}

.toc__nav a[data-lvl="3"]{
  padding-left: 34px;
  font-size: 14px;
  color: var(--ef-muted);
}

.toc__nav a[data-lvl="2"]{
  font-weight: 600;
  padding-left: 23px;
}

.toc__nav a::before{
  content: "";
  position: absolute;
  left: 10px;
  top: 50%;
  width: 8px;
  height: 2px;
  background: var(--ef-border);
  transform: translateY(-50%);
}

.toc__nav a[data-lvl="3"]::before{
  width: 14px;
  opacity: .6;
}

/* ================= GALLERY ================= */

.f-gallery{
  margin-top: 24px;
}

.f-gallery__grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.f-gallery__grid a{
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--ef-border);
  display: block;
}

.f-gallery__grid img{
  width: 100%;
  height: 120px;
  object-fit: cover;
  display: block;
}

/* ================= TAGS ================= */

.f-tags{
  margin-top: 20px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--ef-muted);
}

.f-tags__list a{
  display: inline-block;
  padding: 6px 10px;
  border-radius: 10px;

  border: 1px solid var(--ef-border);
  background: var(--ef-surface);

  font-size: 13px;
}

/* ================= FOOT ================= */

.f-foot{
  margin-top: 22px;

  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.f-rate{
  display: inline-flex;
  align-items: center;
  gap: 10px;

  padding: 6px 10px;

  border: 1px solid var(--ef-border);
  background: var(--ef-surface);
  border-radius: 14px;
}

/* VALUE */
.f-rate__val{
  min-width: 26px;
  text-align: center;

  font-weight: 900;
  font-size: 14px;

  color: var(--ef-text);
}

/* BUTTON BASE */
.f-rate__btn{
  width: 36px;
  height: 36px;

  display: grid;
  place-items: center;

  border-radius: 10px;

  border: 1px solid var(--ef-border);
  background: var(--ef-bg);

  cursor: pointer;

  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}

.f-rate__btn i{
  font-size: 14px;
  color: var(--ef-text);
  opacity: .75;
  transition: .15s ease;
}

/* HOVER */
.f-rate__btn:hover{
  transform: translateY(-1px);
  border-color: var(--ef-yellow);
  background: var(--ef-surface);
}

.f-rate__btn:hover i{
  opacity: 1;
}

/* ACTIVE STATES */
.f-rate__btn--up:hover i,
.f-rate__btn--up.active i{
  color: #22c55e;
}

.f-rate__btn--down:hover i,
.f-rate__btn--down.active i{
  color: #ef4444;
}

/* CLICK FEEL */
.f-rate__btn:active{
  transform: scale(.95);
}

/* DARK MODE TUNING */
html[data-theme="dark"] .f-rate{
  background: rgba(29,25,20,.6);
}

html[data-theme="dark"] .f-rate__btn{
  background: rgba(255,255,255,.03);
}

/* ================= RELATED ================= */

.f-related{
  margin-top: 30px;
}

.rel-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

/* ================= COMMENTS ================= */

.f-comments{
  margin-top: 30px;
}

/* ================= MOBILE ================= */

@media (max-width: 900px){

  .f-title{
    font-size: 24px;
  }

  .f-gallery__grid{
    grid-template-columns: repeat(2, 1fr);
  }

  .rel-grid{
    grid-template-columns: 1fr;
  }
}
/* =========================================================
   FULL STORY TYPOGRAPHY (PROSE SYSTEM)
========================================================= */

/* =========================
   HEADINGS (NEW STYLE SYSTEM)
========================= */

.f-body h1,
.f-body h2,
.f-body h3,
.f-body h4{
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--ef-text);
  scroll-margin-top: 90px;
  position: relative;
}

/* H1 — главный */
.f-body h1{
  font-size: 34px;
  margin: 28px 0 14px;
}

/* H2 — секции */
.f-body h2{
  font-size: 26px;
  margin: 26px 0 12px;
  padding-left: 14px;
  border-left: 4px solid var(--ef-yellow);
}

/* H3 — подпункты */
.f-body h3{
  font-size: 20px;
  margin: 20px 0 10px;
  padding-left: 12px;
  border-left: 3px solid var(--ef-border);
  color: var(--ef-text);
  opacity: 0.95;
}

/* H4 — мелкие */
.f-body h4{
  font-size: 16px;
  margin: 16px 0 8px;
  padding-left: 10px;
  border-left: 2px solid var(--ef-border-soft);
  color: var(--ef-muted);
}

/* ================= PARAGRAPH ================= */

.f-body p{
  margin: 0 0 14px;
  color: var(--text);
  line-height: 1.75;
}

/* ================= HR ================= */

.f-body hr{
  border: none;
  height: 1px;
  margin: 22px 0;

  background: linear-gradient(
    to right,
    transparent,
    var(--ef-border),
    transparent
  );
}

/* ================= LISTS ================= */

.f-body ul,
.f-body ol{
  margin: 14px 0 18px 20px;
  padding: 0;
  color: var(--text);
}

.f-body ul li,
.f-body ol li{
  margin: 6px 0;
  line-height: 1.6;
}

/* custom bullets */
.f-body ul li::marker{
  color: #ffd329;
}

/* ================= BLOCKQUOTE ================= */

.f-body blockquote{
  margin: 18px 0;
  padding: 14px 16px;

  border-left: 4px solid #ffd329;
  background: var(--ef-surface);

  border-radius: 12px;

  color: var(--muted);
  font-style: italic;
}

/* ================= CODE ================= */

.f-body pre{
  margin: 16px 0;
  padding: 14px 16px;

  background: #0f0f10;
  color: #eaeaea;

  border-radius: 14px;
  overflow-x: auto;

  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
  line-height: 1.5;
}

.f-body code{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;

  background: rgba(0,0,0,.06);
  padding: 2px 6px;
  border-radius: 6px;
}

/* ================= SPOILER (DLE DEFAULT) ================= */

.f-body .quote,
.f-body .quote_expand,
.f-body .quoteSpoiler{
  margin: 16px 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--ef-border);
  background: var(--ef-surface);
}

/* spoiler header */
.f-body .quote_title,
.f-body .quote-header{
  padding: 10px 12px;
  cursor: pointer;
  font-weight: 700;
  background: var(--ef-bg);
}

/* spoiler body */
.f-body .quote_text,
.f-body .quote-content{
  padding: 12px 14px;
  color: var(--text);
  line-height: 1.6;
}

/* ================= LINKS ================= */

.f-body a{
  color: #9a6e3a;
  text-decoration: none;
  font-weight: 600;
}

.f-body a:hover{
  text-decoration: underline;
}

/* ================= IMAGES ================= */

.f-body img{
  max-width: 100%;
  border-radius: 14px;
  margin: 12px 0;
}

/* ================= TABLES ================= */

.f-body table{
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 14px;
}

.f-body th,
.f-body td{
  border: 1px solid var(--ef-border);
  padding: 10px 12px;
  text-align: left;
}

.f-body th{
  background: var(--ef-surface);
  font-weight: 800;
}
/* =========================
   FIX CODE BLOCK (PRISM / ENGINE OVERRIDE)
========================= */

.f-body pre[class*="language-"],
.f-body code[class*="language-"],
pre[class*="language-"],
code[class*="language-"]{

  text-shadow: none !important;   /* 🔥 убирает белую тень */
  background: #0f0f10 !important; /* норм тёмный фон */
  color: #eaeaea !important;      /* читаемый текст */

  border-radius: 14px;
}

/* если внутри есть токены prism */
.f-body .token{
  text-shadow: none !important;
}
/* =========================================================
   PRISM TOOLBAR FIX (COPY BUTTON)
========================================================= */

div.code-toolbar > .toolbar{
  opacity: 1 !important;
}

/* кнопка */
div.code-toolbar > .toolbar > .toolbar-item > button,
div.code-toolbar > .toolbar > .toolbar-item > a{
  background: rgba(255,255,255,.06) !important;
  border: 1px solid rgba(255,255,255,.08) !important;

  color: #eaeaea !important;

  font-size: 12px !important;
  padding: 6px 10px !important;

  border-radius: 10px !important;

  text-shadow: none !important;   /* 🔥 УБИРАЕМ БЕЛУЮ ТЕНЬ */
  cursor: pointer !important;

  transition: .15s ease;
  margin-top: 3px;
}

/* hover */
div.code-toolbar > .toolbar > .toolbar-item > button:hover,
div.code-toolbar > .toolbar > .toolbar-item > a:hover{
  background: rgba(255,255,255,.12) !important;
}

/* иконка / текст */
div.code-toolbar > .toolbar .toolbar-item{
  margin-left: 6px !important;
}

/* убрать белый glow полностью */
div.code-toolbar *{
  text-shadow: none !important;
}
/* =========================================================
   PRISM DARK FIX (REMOVE WHITE BACKGROUND)
========================================================= */

:not(pre) > code[class*="language-"],
pre[class*="language-"]{
  background: #0f0f10 !important;  /* 🔥 твой тёмный фон */
  border: 1px solid var(--ef-border) !important;

  color: #eaeaea !important;
  text-shadow: none !important;
}

/* если внутри inline code */
:not(pre) > code{
  background: rgba(255,255,255,.06) !important;
  border: 1px solid rgba(255,255,255,.08) !important;
  border-radius: 8px;
}

/* Prism tokens */
.token{
  background: transparent !important;
  text-shadow: none !important;
}
/* =========================================================
   RELATED NEWS GRID FIX (EF CLEAN)
========================================================= */

.rel-grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}

/* CARD */
.rel-card{
  display: flex;
  flex-direction: column;

  height: 100%;
  min-height: 240px;

  border-radius: 16px;
  overflow: hidden;

  background: var(--ef-surface);
  border: 1px solid var(--ef-border);

  transition: transform .15s ease, box-shadow .15s ease;
}

.rel-card:hover{
  transform: translateY(-3px);
  box-shadow: var(--ef-shadow-soft);
}

/* IMAGE */
.rel-thumb{
  width: 100%;
  height: 140px;
  display: block;
  overflow: hidden;
  flex: 0 0 auto;
}

.rel-thumb img{
  width: 100%;
  height: 100%;
  display: block;
}

/* CONTENT */
.rel-main{
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;

  min-width: 0;
}

/* TITLE — ВАЖНО (фикс твоего бага) */
.rel-title{
  font-size: 15px;
  font-weight: 800;
  line-height: 1.35;

  margin: 0;

  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;

  word-break: break-word;
}

.rel-title a{
  color: var(--ef-text);
  text-decoration: none;
}

.rel-title a:hover{
  color: var(--ef-soft);
}

/* META */
.rel-meta{
  margin-top: auto;
  font-size: 13px;
  color: var(--ef-muted);
}

/* RESPONSIVE */
@media (max-width: 1024px){
  .rel-grid{
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px){
  .rel-grid{
    grid-template-columns: 1fr;
  }
}
/* =========================================================
   COMMENTS — EF CLEAN UI
========================================================= */

.cmt-card{
  margin: 18px 0;
  padding: 16px;

  background: var(--ef-surface);
  border: 1px solid var(--ef-border-soft);
  border-radius: 18px;

  box-shadow: var(--ef-shadow-soft);
}

/* TOP */
.cmt-top{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

/* USER */
.cmt-user{
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.cmt-ava{
  width: 46px;
  height: 46px;

  position: relative;
  flex: 0 0 auto;

  border-radius: 50%;
  overflow: hidden;

  background:
    linear-gradient(135deg, rgba(255,211,41,.35), rgba(255,255,255,.25)),
    var(--ef-bg);

  border: 1px solid var(--ef-border);
}

.cmt-ava__stub{
  position: absolute;
  inset: 0;

  display: grid;
  place-items: center;

  font-size: 0;
  font-weight: 900;
  color: var(--ef-text);
}

.cmt-ava__stub::first-letter{
  font-size: 16px;
}

.cmt-ava__cover{
  position: absolute;
  inset: 0;

  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* USER INFO */
.cmt-uinfo{
  min-width: 0;
}

.cmt-name{
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.cmt-author{
  font-size: 15px;
  font-weight: 800;
  color: var(--ef-text);
}

.cmt-online{
  display: inline-flex;
  align-items: center;

  height: 20px;
  padding: 0 8px;

  border-radius: 999px;

  background: rgba(34,197,94,.12);
  color: #16a34a;

  font-size: 11px;
  font-weight: 800;
}

.cmt-meta{
  margin-top: 3px;

  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;

  font-size: 12px;
  color: var(--ef-muted);
}

.cmt-meta a{
  color: var(--ef-muted);
}

.cmt-meta a:hover{
  color: var(--ef-text);
}

.cmt-dot{
  opacity: .45;
}

/* RATING */
.cmt-rate{
  flex: 0 0 auto;
}

.cmt-rate__pm{
  display: inline-flex;
  align-items: center;
  gap: 8px;

  padding: 5px 7px;

  border-radius: 14px;
  background: var(--ef-bg);
  border: 1px solid var(--ef-border-soft);
}

.cmt-rate__btn{
  width: 32px;
  height: 32px;

  display: grid;
  place-items: center;

  border-radius: 10px;
  border: 1px solid var(--ef-border-soft);
  background: var(--ef-surface);

  color: var(--ef-muted);
  cursor: pointer;

  transition:
    transform .14s ease,
    background .14s ease,
    color .14s ease,
    border-color .14s ease;
}

.cmt-rate__btn:hover{
  transform: translateY(-1px);
  background: var(--ef-surface);
  border-color: var(--ef-yellow);
}

.cmt-rate__btn--up:hover{
  color: #22c55e;
}

.cmt-rate__btn--down:hover{
  color: #ef4444;
}

.cmt-rate__val{
  min-width: 20px;
  text-align: center;

  font-size: 13px;
  font-weight: 900;
  color: var(--ef-text);
}

/* BODY */
.cmt-body{
  margin-top: 14px;
  padding-top: 14px;

  border-top: 1px solid var(--ef-border-soft);
}

.cmt-from{
  margin: 0 0 10px;

  font-size: 15px;
  font-weight: 900;
  color: var(--ef-text);
}

.cmt-text{
  color: var(--ef-text);
  font-size: 15px;
  line-height: 1.65;
}

.cmt-text p{
  margin: 0 0 10px;
}

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

/* IMAGES */
.cmt-images{
  margin-top: 14px;
  padding-top: 14px;

  border-top: 1px solid var(--ef-border-soft);

  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.cmt-images img{
  max-width: 160px;
  border-radius: 12px;
  border: 1px solid var(--ef-border-soft);
}

/* SIGNATURE */
.cmt-sign{
  margin-top: 14px;
  padding-top: 12px;

  border-top: 1px dashed var(--ef-border-soft);

  color: var(--ef-muted);
  font-size: 13px;
  line-height: 1.5;
}

/* FOOT */
.cmt-foot{
  margin-top: 14px;
}

.cmt-btns{
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.cmt-btn{
  display: inline-flex;
  align-items: center;
  gap: 7px;

  min-height: 34px;
  padding: 7px 10px;

  border-radius: 11px;
  border: 1px solid var(--ef-border-soft);

  background: var(--ef-bg);
  color: var(--ef-muted);

  font-size: 13px;
  font-weight: 700;

  cursor: pointer;

  transition:
    transform .14s ease,
    background .14s ease,
    color .14s ease,
    border-color .14s ease;
}

.cmt-btn:hover{
  transform: translateY(-1px);
  background: var(--ef-surface);
  color: var(--ef-text);
  border-color: var(--ef-yellow);
}

.cmt-btn--ghost{
  background: transparent;
}

.cmt-btn--danger{
  color: #ef4444;
}

.cmt-btn--danger:hover{
  border-color: rgba(239,68,68,.35);
  color: #ef4444;
}

/* MASS ACTION */
.cmt-mass{
  display: inline-flex;
  align-items: center;
}

/* DARK */
html[data-theme="dark"] .cmt-online{
  background: rgba(34,197,94,.16);
  color: #4ade80;
}

html[data-theme="dark"] .cmt-rate__pm,
html[data-theme="dark"] .cmt-btn{
  background: rgba(255,255,255,.035);
}

/* MOBILE */
@media (max-width: 700px){
  .cmt-top{
    flex-direction: column;
  }

  .cmt-rate{
    width: 100%;
  }

  .cmt-rate__pm{
    width: 100%;
    justify-content: flex-start;
  }

  .cmt-btns{
    gap: 6px;
  }

  .cmt-btn{
    font-size: 12px;
  }
}
/* Убираем нумерацию DLE комментариев */
#dle-comments ol,
#dle-comments ul{
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* иногда DLE вешает номер через li::before */
#dle-comments li::marker{
  content: "" !important;
  display: none !important;
}

/* страховка от кастомных счетчиков */
#dle-comments li{
  list-style: none !important;
}

/* =========================================================
   DLE DROPDOWN MENU (ErrorFixer STYLE FIXED)
========================================================= */

#dropmenudiv{
  background: var(--ef-surface);
  border: 1px solid var(--ef-border);
  border-radius: 14px;

  box-shadow: var(--ef-shadow-soft);

  padding: 6px;
  min-width: 220px;

  overflow: hidden;

  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  z-index: 999999;
}

/* ITEMS */
#dropmenudiv a{
  display:flex;
  align-items:center;
  gap:10px;

  padding: 10px 12px;
  border-radius: 12px;

  color: var(--ef-text);
  text-decoration:none;

  font-weight: 600;
  font-size: 14px;
  line-height: 1.2;

  transition: background .15s ease, color .15s ease;
}

#dropmenudiv a:hover{
  background: rgba(255, 211, 41, .12);
}
/* Hide "Quick edit" in DLE admin dropdown */
#dropmenudiv a:nth-child(1){ display:none !important; }

/* separator */
#dropmenudiv hr{
  border:0;
  height:1px;

  background: var(--ef-border);

  margin:6px 4px;
}

/* danger (delete) */
#dropmenudiv a:last-child{
  color: #ef4444;
}

#dropmenudiv a:last-child:hover{
  background: rgba(239,68,68,.10);
}

/* DARK TUNE */
html[data-theme="dark"] #dropmenudiv{
  background: rgba(29,25,20,.95);
  border-color: rgba(255,255,255,.08);
}
/* =========================================================
   DLE COMMENT TREE FIX (CLEAN LAYER SYSTEM)
========================================================= */

/* базовый reset списков (оставляем твой стиль, но безопасно расширяем) */
#dle-comments-list,
#dle-comments-list ul,
#dle-comments-list ol,
.comments,
.comments ul,
.comments ol,
.com_list,
.com_list ul,
.com_list ol,
ol.comments-tree-list{
  list-style: none !important;
}

/* =========================
   LEVEL SYSTEM (UL BASED)
========================= */

#dle-comments-list ul,
.comments ul,
.com_list ul{
  margin: 10px 0 0 0 !important;
  padding-left: 20px !important;

  border-left: 1px solid rgba(148,163,184,.35);
}

/* =========================
   LEVEL SYSTEM (TREE LIST)
========================= */

.comments-tree-list{
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* вложенность */
.comments-tree-list .comments-tree-list{
  margin-top: 12px !important;
  margin-left: 18px !important;
  padding-left: 14px !important;

  border-left: 1px solid rgba(148,163,184,.35);
}

/* каждый уровень чуть “уходит вправо” */
.comments-tree-list > li{
  margin: 0 !important;
}

/* карточка внутри вложенности */
.comments-tree-list .cmt-card{
  margin-top: 10px;
}

/* =========================
   DARK MODE FIX
========================= */

html[data-theme="dark"] #dle-comments-list ul,
html[data-theme="dark"] .comments ul,
html[data-theme="dark"] .com_list ul,
html[data-theme="dark"] .comments-tree-list .comments-tree-list{
  border-left-color: rgba(148,163,184,.18);
}
/* =========================================================
   DLE SPOILER (ErrorFixer адаптация)
========================================================= */

.title_spoiler{
  margin:12px 0 0;
  padding:10px 14px;

  display:flex;
  align-items:center;
  gap:10px;

  border:1px dashed var(--ef-border);
  border-radius:14px;

  background: var(--ef-surface);
  box-shadow: var(--ef-shadow-soft);

  font-weight:800;
  color: var(--ef-text);
}

.title_spoiler a{
  color: inherit;
  text-decoration:none;

  display:inline-flex;
  align-items:center;
  gap:10px;
}

.title_spoiler a:first-child{
  width:34px;
  height:34px;

  border-radius:12px;
  border:1px solid var(--ef-border);

  background: var(--ef-bg);

  display:flex;
  align-items:center;
  justify-content:center;

  flex:0 0 auto;

  transition: transform .08s ease, background .15s ease, border-color .15s ease;
}

.title_spoiler a:first-child:hover{
  background: var(--ef-surface);
}

.title_spoiler a:first-child:active{
  transform: translateY(1px);
}

.title_spoiler svg{
  opacity:.85;
}

/* CONTENT */
.text_spoiler{
  padding:14px;

  border:1px dashed var(--ef-border);
  border-top:0;
  border-radius:0 0 14px 14px;

  background: var(--ef-bg);

  color: var(--ef-text);
  margin:0 0 12px;
}

.title_spoiler + .text_spoiler{
  box-shadow: var(--ef-shadow-soft);
}

/* animation */
.text_spoiler[style*="display: block"],
.text_spoiler[style*="display:block"]{
  animation: spoilerFade .18s ease;
}

@keyframes spoilerFade{
  from{ opacity:0; transform: translateY(-4px); }
  to{ opacity:1; transform:none; }
}

/* =========================================================
   QUOTES (ErrorFixer style)
========================================================= */

.quote_block{
  margin:12px 0;

  border:1px dashed var(--ef-border);
  border-radius:14px;

  overflow:hidden;

  background: var(--ef-surface);
  box-shadow: var(--ef-shadow-soft);
}

/* header */
.title_quote{
  display:flex;
  align-items:center;

  gap:12px;

  padding:10px 12px;

  border-bottom:1px dashed var(--ef-border);

  font-weight:800;
  font-size:13px;

  color: var(--ef-muted);
}

.title_quote .quote_link{
  width:34px;
  height:34px;

  display:flex;
  align-items:center;
  justify-content:center;

  border-radius:12px;
  border:1px solid var(--ef-border);

  background: var(--ef-bg);

  color: var(--ef-text);
  text-decoration:none;

  transition: transform .08s ease, background .15s ease;
}

.title_quote .quote_link:hover{
  background: var(--ef-surface);
}

.title_quote .quote_link:active{
  transform: translateY(1px);
}

.title_quote .quote_link svg{
  width:18px;
  height:18px;
  opacity:.85;
}

/* body */
.quote{
  padding:12px;
}

.quote_body{
  color: var(--ef-text);
  font-size: 15px;
  line-height: 1.6;

  border-left:4px solid #16a34a;

  background: rgba(255, 211, 41, .06);

  padding:12px;
  border-radius:12px;

  overflow-wrap:anywhere;
  word-break:break-word;
}

.quote_body p{
  margin:8px 0;
}

.quote_body p:first-child{ margin-top:0; }
.quote_body p:last-child{ margin-bottom:0; }

/* dark mode tweak */
html[data-theme="dark"] .quote_block{
  border-color: rgba(255,255,255,.12);
}

html[data-theme="dark"] .quote_body{
  background: rgba(255,255,255,.04);
  border-left-color: rgba(255, 211, 41, .6);
}
/* =========================================================
   DLE COMMENT THREAD FIX (FOR YOUR FLAT STRUCTURE)
========================================================= */

/* каждый комментарий */
.cmt-card{
  position: relative;
}

/* =========================
   DEFAULT LEVEL
========================= */
#dle-comments-list > .cmt-card,
.comments > .cmt-card,
.com_list > .cmt-card{
  margin-left: 0;
}

/* =========================
   REPLY LEVEL (DLE common wrapper fix)
========================= */

/* если DLE оборачивает ответы в li/ul */
#dle-comments-list ul .cmt-card,
.comments ul .cmt-card,
.com_list ul .cmt-card{
  margin-left: 28px;
  position: relative;
}

/* линия связи */
#dle-comments-list ul .cmt-card::before,
.comments ul .cmt-card::before,
.com_list ul .cmt-card::before{
  content: "";
  position: absolute;

  left: -14px;
  top: 0;
  bottom: 0;

  width: 1px;
  background: rgba(148,163,184,.35);
}

/* =========================
   DOUBLE NESTING (deep replies)
========================= */
#dle-comments-list ul ul .cmt-card,
.comments ul ul .cmt-card,
.com_list ul ul .cmt-card{
  margin-left: 46px;
}

/* =========================
   MOBILE FIX
========================= */
@media (max-width: 720px){
  #dle-comments-list ul .cmt-card,
  .comments ul .cmt-card,
  .com_list ul .cmt-card{
    margin-left: 16px;
  }

  #dle-comments-list ul ul .cmt-card,
  .comments ul ul .cmt-card,
  .com_list ul ul .cmt-card{
    margin-left: 28px;
  }
}
/* =========================================================
   DLE CONFIRM DIALOG (jQuery UI CLEAN RESTYLE)
========================================================= */

/* само окно */
.ui-dialog{
  border: 1px solid var(--ef-border) !important;
  border-radius: 16px !important;
  background: var(--ef-surface) !important;
  box-shadow: 0 20px 60px rgba(0,0,0,.18) !important;
  padding: 0 !important;
  overflow: hidden;
}

/* header */
.ui-dialog-titlebar{
  background: var(--ef-bg) !important;
  border: none !important;
  border-bottom: 1px solid var(--ef-border) !important;
  padding: 12px 14px !important;

  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* заголовок */
.ui-dialog-title{
  font-size: 15px !important;
  font-weight: 800 !important;
  color: var(--ef-text) !important;
}

/* ❌ КНОПКА CLOSE (убираем текст полностью) */
.ui-dialog-titlebar-close{
  width: 34px !important;
  height: 34px !important;

  border-radius: 10px !important;
  border: 1px solid var(--ef-border) !important;
  background: var(--ef-surface) !important;

  display: grid !important;
  place-items: center !important;

  cursor: pointer !important;
}

/* скрыть слово "Close" */
.ui-dialog-titlebar-close span:last-child{
  display: none !important;
}

/* иконка крестика */
.ui-dialog-titlebar-close .ui-icon{
  background-image: none !important;
  position: relative;
}

.ui-dialog-titlebar-close .ui-icon::before{
  content: "✕";
  font-size: 14px;
  color: var(--ef-text);
}

/* контент */
.ui-dialog-content{
  padding: 14px !important;
  font-size: 14px !important;
  color: var(--ef-text) !important;
  background: var(--ef-surface) !important;
}

/* кнопочная панель */
.ui-dialog-buttonpane{
  background: var(--ef-bg) !important;
  border-top: 1px solid var(--ef-border) !important;
  padding: 10px !important;
}

/* кнопки */
.ui-dialog-buttonset button{
  border-radius: 12px !important;
  padding: 8px 14px !important;

  font-weight: 700 !important;
  font-size: 13px !important;

  border: 1px solid var(--ef-border) !important;
  background: var(--ef-surface) !important;
  color: var(--ef-text) !important;

  cursor: pointer !important;

  transition: .15s ease;
}

.ui-dialog-buttonset button:hover{
  transform: translateY(-1px);
  background: var(--ef-bg) !important;
}

/* кнопка удалить */
.ui-button-delete{
  background: rgba(239,68,68,.10) !important;
  border-color: rgba(239,68,68,.35) !important;
  color: #ef4444 !important;
}

.ui-button-delete:hover{
  background: rgba(239,68,68,.18) !important;
}
/* =========================================================
   REMOVE "Close" TEXT + STYLE ONLY X BUTTON
========================================================= */

/* полностью убираем текст Close */
.ui-dialog-titlebar-close{
  font-size: 0 !important;   /* 🔥 убирает текст */
}

/* возвращаем иконку крестика */
.ui-dialog-titlebar-close .ui-icon{
  font-size: 0 !important;
  position: relative;
}

/* рисуем свой крест */
.ui-dialog-titlebar-close .ui-icon::before{
  content: "✕";
  font-size: 14px;
  color: var(--ef-text);
}

/* делаем кнопку как норм UI */
.ui-dialog-titlebar-close{
  width: 34px !important;
  height: 34px !important;

  display: grid !important;
  place-items: center !important;

  border-radius: 10px !important;
  border: 1px solid var(--ef-border) !important;
  background: var(--ef-surface) !important;

  cursor: pointer !important;
  padding: 0 !important;
}

/* hover */
.ui-dialog-titlebar-close:hover{
  background: var(--ef-bg) !important;
  transform: translateY(-1px);
}
/* =========================================================
   COMMENT EDIT SAVE BUTTONS (EF STYLE)
========================================================= */

.save-buttons{
  display: flex;
  justify-content: flex-end;
  gap: 10px;

  padding: 10px 0 0;
}

/* base button (DLE bbcodes override) */
.save-buttons .bbcodes{
  padding: 8px 14px !important;

  border-radius: 12px !important;
  border: 1px solid var(--ef-border) !important;

  background: var(--ef-surface) !important;
  color: var(--ef-text) !important;

  font-size: 13px !important;
  font-weight: 700 !important;

  cursor: pointer !important;

  transition: transform .15s ease, background .15s ease, border-color .15s ease, box-shadow .15s ease;
}

/* hover */
.save-buttons .bbcodes:hover{
  transform: translateY(-1px);
  background: var(--ef-bg) !important;
  border-color: rgba(255, 211, 41, .35) !important;
  box-shadow: 0 8px 18px rgba(0,0,0,.06);
}

/* cancel (danger-ish neutral) */
.save-buttons .cancelchanges{
  opacity: .85;
}

.save-buttons .cancelchanges:hover{
  border-color: rgba(239,68,68,.35) !important;
  background: rgba(239,68,68,.08) !important;
  color: #ef4444 !important;
}

/* apply (primary accent) */
.save-buttons .applychanges{
  background: var(--ef-yellow) !important;
  border-color: transparent !important;
  color: #1a1612 !important;
}

/* active press */
.save-buttons .bbcodes:active{
  transform: scale(.97);
}

/* =========================================================
   MASS COMMENTS ACTION BAR
========================================================= */

.mass_comments_action{
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;

  padding: 12px 14px;
  margin-top: 12px;

  border: 1px solid var(--ef-border);
  border-radius: 14px;

  background: var(--ef-surface);
  color: var(--ef-muted);

  font-size: 13px;
  font-weight: 600;
}

/* select */
.mass_comments_action select{
  padding: 8px 10px;

  border-radius: 10px;
  border: 1px solid var(--ef-border);

  background: var(--ef-bg);
  color: var(--ef-text);

  font-size: 13px;

  outline: none;
}

/* button */
.mass_comments_action .bbcodes{
  padding: 8px 12px !important;

  border-radius: 10px !important;
  border: 1px solid var(--ef-border) !important;

  background: var(--ef-surface) !important;
  color: var(--ef-text) !important;

  font-weight: 700 !important;
  font-size: 13px !important;

  cursor: pointer;
}

.mass_comments_action .bbcodes:hover{
  background: var(--ef-bg) !important;
  border-color: rgba(255, 211, 41, .35) !important;
}
/* =========================================================
   COMMENT SUBMIT BUTTON (EF STYLE)
========================================================= */

.form_submit{
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}

/* основная кнопка отправки */
.form_submit .btn--primary{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  padding: 10px 16px;

  border-radius: 14px;
  border: 1px solid transparent;

  background: var(--ef-yellow);
  color: #1a1612;

  font-size: 14px;
  font-weight: 800;

  cursor: pointer;

  transition: transform .15s ease, filter .15s ease, box-shadow .15s ease;
}

/* hover */
.form_submit .btn--primary:hover{
  transform: translateY(-1px);
  filter: brightness(.98);
  box-shadow: 0 10px 22px rgba(255, 211, 41, .18);
}

/* active click */
.form_submit .btn--primary:active{
  transform: translateY(0);
  filter: brightness(.95);
}

/* focus (accessibility) */
.form_submit .btn--primary:focus{
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 211, 41, .35);
}

/* dark mode tuning */
html[data-theme="dark"] .form_submit .btn--primary{
  box-shadow: none;
}

html[data-theme="dark"] .form_submit .btn--primary:hover{
  box-shadow: 0 10px 22px rgba(0,0,0,.35);
}
.tox{
  border: 1px solid var(--border) !important;
  border-radius: 16px !important;
  overflow: hidden !important;
  background: var(--card) !important;
  box-shadow: var(--shadow) !important;
}
/* =========================
   FEEDBACK (EF STYLE FIX)
========================= */

.fb{
  font-family: var(--ef-font);
}

/* layout */
.fb__form-list{
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
  flex-direction:column;
  gap:14px;
}

.fb__row{
  display:flex;
  flex-direction:column;
  gap:6px;
}

/* labels */
.fb__label{
  font-size:13px;
  font-weight:700;
  color: var(--ef-muted);
}

/* inputs */
.fb input,
.fb textarea,
.fb select{
  width:100%;
  border-radius: var(--ef-radius);
  border:1px solid var(--ef-border);
  background: var(--ef-surface);
  color: var(--ef-text);
  padding:12px 14px;
  font-size:14px;
  outline:none;
  transition:.15s ease;
  box-shadow: var(--ef-shadow-soft);
}

/* focus */
.fb input:focus,
.fb textarea:focus,
.fb select:focus{
  border-color: var(--ef-yellow-deep);
  box-shadow: 0 0 0 3px rgba(247,223,114,.25);
}

/* textarea */
.fb textarea{
  min-height:160px;
  resize:vertical;
}

/* footer */
.fb__footer{
  display:flex;
  justify-content:flex-end;
  margin-top:16px;
  gap:12px;
  flex-wrap:wrap;
}

/* button */
.fb__btn{
  background: var(--ef-yellow);
  color: #1a1612;
  border:none;
  padding:12px 18px;
  border-radius: var(--ef-radius);
  font-weight:800;
  cursor:pointer;
  box-shadow: var(--ef-shadow-soft);
  transition:.15s ease;
}

.fb__btn:hover{
  background: var(--ef-yellow-deep);
}

/* file input FIX */
.fb input[type="file"]{
  padding:10px;
  border:1px dashed var(--ef-border);
  background: var(--ef-bg);
}

/* file button */
.fb input[type="file"]::file-selector-button{
  border:none;
  padding:8px 12px;
  margin-right:10px;
  border-radius:6px;
  background: var(--ef-yellow);
  color:#1a1612;
  font-weight:700;
  cursor:pointer;
}

/* captcha */
.fb-captcha{
  display:flex;
  flex-direction:column;
  gap:8px;
}

/* hover UX */
.fb input:hover,
.fb textarea:hover,
.fb select:hover{
  border-color: var(--ef-soft);
}

/* =========================
   DARK MODE FIX
========================= */

html[data-theme="dark"] .fb input,
html[data-theme="dark"] .fb textarea,
html[data-theme="dark"] .fb select{
  background: var(--ef-surface);
  border-color: var(--ef-border);
  color: var(--ef-text);
}

html[data-theme="dark"] .fb input[type="file"]{
  background: var(--ef-surface);
  border-color: var(--ef-border);
}

html[data-theme="dark"] .fb input[type="file"]::file-selector-button{
  background: var(--ef-yellow);
  color:#111;
}

html[data-theme="dark"] .fb__btn{
  color:#111;
}
/* =========================
   ADD COMMENTS (EF STYLE)
========================= */

.ac-box{
  font-family: var(--ef-font);
  background: var(--ef-surface);
  border: 1px solid var(--ef-border);
  border-radius: var(--ef-radius);
  box-shadow: var(--ef-shadow-soft);
  padding: 18px;
}

/* header */
.ac-box__header{
  margin-bottom: 14px;
}

.ac-box__title{
  font-size:18px;
  font-weight:800;
  color: var(--ef-text);
  margin:0;
}

/* form grid */
.ac-form{
  display:flex;
  flex-direction:column;
  gap:14px;
}

/* rows */
.ac-row{
  display:grid;
  gap:14px;
}

.ac-row--2{
  grid-template-columns:1fr 1fr;
}

@media (max-width: 720px){
  .ac-row--2{
    grid-template-columns:1fr;
  }
}

/* field */
.ac-field{
  display:flex;
  flex-direction:column;
  gap:6px;
}

.ac-field--full{
  width:100%;
}

/* labels */
.ac-field label{
  font-size:13px;
  font-weight:700;
  color: var(--ef-muted);
}

/* inputs */
.ac-field input,
.ac-field textarea,
.ac-field select{
  width:100%;
  padding:12px 14px;
  border-radius: var(--ef-radius);
  border:1px solid var(--ef-border);
  background: var(--ef-surface);
  color: var(--ef-text);
  outline:none;
  transition:.15s ease;
}

/* focus */
.ac-field input:focus,
.ac-field textarea:focus,
.ac-field select:focus{
  border-color: var(--ef-yellow-deep);
  box-shadow: 0 0 0 3px rgba(247,223,114,.25);
}

/* editor wrapper (TinyMCE fix) */
.ac-editor{
  border:1px solid var(--ef-border);
  border-radius: var(--ef-radius);
  overflow:hidden;
  background: var(--ef-surface);
}

/* footer */
.ac-footer{
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  gap:14px;
  flex-wrap:wrap;
  margin-top:16px;
}

/* captcha */
.ac-captcha{
  display:flex;
  flex-direction:column;
  gap:8px;
}

.ac-captcha__img img{
  border-radius: var(--ef-radius);
  border:1px solid var(--ef-border);
}

/* button */
.ac-btn{
  background: var(--ef-yellow);
  color:#1a1612;
  border:none;
  padding:12px 18px;
  border-radius: var(--ef-radius);
  font-weight:800;
  cursor:pointer;
  box-shadow: var(--ef-shadow-soft);
  transition:.15s ease;
}

.ac-btn:hover{
  background: var(--ef-yellow-deep);
}

/* file / upload inside editor or attachments fallback */
.ac-field input[type="file"]{
  padding:10px;
  border:1px dashed var(--ef-border);
  background: var(--ef-bg);
  border-radius: var(--ef-radius);
}

.ac-field input[type="file"]::file-selector-button{
  border:none;
  padding:8px 12px;
  margin-right:10px;
  border-radius:6px;
  background: var(--ef-yellow);
  font-weight:700;
  cursor:pointer;
}

/* =========================
   DARK MODE
========================= */

html[data-theme="dark"] .ac-box{
  background: var(--ef-surface);
  border-color: var(--ef-border);
}

html[data-theme="dark"] .ac-field input,
html[data-theme="dark"] .ac-field textarea,
html[data-theme="dark"] .ac-field select{
  background: var(--ef-surface);
  color: var(--ef-text);
  border-color: var(--ef-border);
}

html[data-theme="dark"] .ac-editor{
  background: var(--ef-surface);
  border-color: var(--ef-border);
}

html[data-theme="dark"] .ac-btn{
  color:#111;
}
/* =========================
   LOST PASSWORD (EF STYLE)
========================= */

.ef-auth{
  font-family: var(--ef-font);
}

/* box */
.ef-auth__box{
  background: var(--ef-surface);
  border:1px solid var(--ef-border);
  border-radius: var(--ef-radius);
  box-shadow: var(--ef-shadow-soft);
  overflow:hidden;
}

/* header */
.ef-auth__header{
  padding:18px 18px 0;
}

.ef-auth__title{
  font-size:20px;
  font-weight:900;
  color: var(--ef-text);
  margin:0;
}

/* body */
.ef-auth__body{
  padding:18px;
}

/* form */
.ef-auth__form{
  display:flex;
  flex-direction:column;
  gap:14px;
}

/* fields */
.ef-field{
  display:flex;
  flex-direction:column;
  gap:6px;
}

/* labels */
.ef-field label{
  font-size:13px;
  font-weight:700;
  color: var(--ef-muted);
}

/* inputs */
.ef-field input,
.ef-field textarea,
.ef-field select{
  width:100%;
  padding:12px 14px;
  border-radius: var(--ef-radius);
  border:1px solid var(--ef-border);
  background: var(--ef-surface);
  color: var(--ef-text);
  outline:none;
  transition:.15s ease;
}

/* focus */
.ef-field input:focus{
  border-color: var(--ef-yellow-deep);
  box-shadow: 0 0 0 3px rgba(247,223,114,.25);
}

/* captcha */
.ef-captcha{
  display:flex;
  flex-direction:column;
  gap:8px;
}

.ef-captcha__img img{
  border-radius: var(--ef-radius);
  border:1px solid var(--ef-border);
}

/* footer */
.ef-auth__footer{
  padding:18px;
  display:flex;
  justify-content:flex-end;
}

/* button */
.ef-btn{
  background: var(--ef-yellow);
  color:#1a1612;
  border:none;
  padding:12px 18px;
  border-radius: var(--ef-radius);
  font-weight:900;
  cursor:pointer;
  box-shadow: var(--ef-shadow-soft);
  transition:.15s ease;
}

.ef-btn:hover{
  background: var(--ef-yellow-deep);
}

/* =========================
   DARK MODE
========================= */

html[data-theme="dark"] .ef-auth__box{
  background: var(--ef-surface);
  border-color: var(--ef-border);
}

html[data-theme="dark"] .ef-field input{
  background: var(--ef-surface);
  border-color: var(--ef-border);
  color: var(--ef-text);
}

html[data-theme="dark"] .ef-btn{
  color:#111;
}
/* =========================
   PM SYSTEM (EF STYLE)
========================= */

.pm,
.pm-thread{
  font-family: var(--ef-font);
}

/* BOX */
.pm__box,
.pm-thread__box{
  background: var(--ef-surface);
  border:1px solid var(--ef-border);
  border-radius: var(--ef-radius);
  box-shadow: var(--ef-shadow-soft);
  overflow:hidden;
  padding: 10px;
    margin-top: 10px;
}

/* HEADER */
.pm__header,
.pm-thread__header{
    padding: 13px;
    border-bottom: 1px solid var(--ef-border);
    margin-bottom: 10px;
}

.pm__title,
.pm-thread__title{
  margin:0;
  font-size:20px;
  font-weight:900;
  color: var(--ef-text);
}

/* NAV */
.pm__nav{
  display:flex;
  gap:10px;
  padding:14px 18px;
}

.pm__tab{
  padding:8px 12px;
  border-radius: var(--ef-radius);
  border:1px solid var(--ef-border);
  cursor:pointer;
  font-weight:700;
  font-size:13px;
  color: var(--ef-text);
}

.pm__tab.is-active{
  background: var(--ef-yellow);
  border-color: var(--ef-yellow-deep);
}

/* STATUS */
.pm__status{
  padding:0 18px 14px;
}

.pm__text{
  font-size:12px;
  color: var(--ef-muted);
  margin-top:6px;
}

/* LIST */
.pm__list{
  padding:18px;
}

/* COMPOSE */
.pm__compose{
  padding:18px;
  border-top:1px solid var(--ef-border);
}

.pm__subtitle{
  margin:0 0 12px;
  font-size:16px;
  font-weight:800;
}

/* FORM */
.pm__form{
  display:flex;
  flex-direction:column;
  gap:14px;
}

.pm__row{
  display:grid;
  gap:12px;
}

.pm__row--2{
  grid-template-columns:1fr 1fr;
}

@media(max-width:720px){
  .pm__row--2{
    grid-template-columns:1fr;
  }
}

/* INPUTS */
.pm input,
.pm textarea,
.pm select,
.pm-thread input,
.pm-thread textarea{
  width:100%;
  padding:12px 14px;
  border-radius: var(--ef-radius);
  border:1px solid var(--ef-border);
  background: var(--ef-surface);
  color: var(--ef-text);
  outline:none;
}

/* editor */
.pm__editor{
  border:1px solid var(--ef-border);
  border-radius: var(--ef-radius);
  overflow:hidden;
}

/* FOOTER */
.pm__footer,
.pm-thread__footer{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  justify-content:flex-end;
  margin-top:14px;
}

/* BUTTONS */
.pm__btn{
  background: var(--ef-yellow);
  color:#1a1612;
  border:none;
  padding:12px 16px;
  border-radius: var(--ef-radius);
  font-weight:900;
  cursor:pointer;
}

.pm__btn--soft{
  background: transparent;
  border:1px solid var(--ef-border);
  color: var(--ef-text);
}

/* CAPTCHA */
.pm__captcha{
  display:flex;
  flex-direction:column;
  gap:8px;
}

.pm__captcha-img img{
  border-radius: var(--ef-radius);
  border:1px solid var(--ef-border);
}

/* MESSAGE */
.pm-msg{
  padding:14px;
  border:1px solid var(--ef-border);
  border-radius: var(--ef-radius);
  margin-bottom:12px;
}

.pm-msg__top{
  display:flex;
  justify-content:space-between;
  gap:14px;
}

.pm-msg__user{
  display:flex;
  gap:12px;
}

.pm-msg__ava{
  width:42px;
  height:42px;
  border-radius:12px;
  background-size:cover;
  background-position:center;
}

.pm-msg__name{
  font-weight:800;
}

.pm-msg__online{
  font-size:11px;
  color:#16a34a;
  margin-left:6px;
}

.pm-msg__date{
  font-size:12px;
  color: var(--ef-muted);
}

/* actions */
.pm-action{
  font-size:12px;
  padding:6px 10px;
  border-radius: var(--ef-radius);
  border:1px solid var(--ef-border);
  cursor:pointer;
}

.pm-action--danger{
  color:#ef4444;
  border-color: rgba(239,68,68,.3);
}

/* text */
.pm-msg__text{
  margin-top:10px;
  line-height:1.6;
  color: var(--ef-text);
}

.pm-msg__sign{
  margin-top:10px;
  font-size:12px;
  color: var(--ef-muted);
  border-top:1px dashed var(--ef-border);
  padding-top:10px;
}

/* DARK */
html[data-theme="dark"] .pm__box,
html[data-theme="dark"] .pm-thread__box{
  background: var(--ef-surface);
  border-color: var(--ef-border);
}

html[data-theme="dark"] .pm-action{
  color: var(--ef-text);
}
/* =========================
   PM TABLE - HARD OVERRIDE FIX
========================= */

table.pm{
  width:100% !important;
  border-collapse: separate !important;
  border-spacing: 0 10px !important;
  font-family: var(--ef-font) !important;
}

/* HEADER */
table.pm thead th{
  background: transparent !important;
  border: none !important;
  padding: 10px 12px !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  color: var(--ef-muted) !important;
  text-align: left !important;
}

/* ROW */
table.pm tbody tr{
  background: var(--ef-surface) !important;
  border: 1px solid var(--ef-border) !important;
  box-shadow: var(--ef-shadow-soft) !important;
  border-radius: var(--ef-radius) !important;
  overflow: hidden !important;
}

/* TD RESET */
table.pm td{
  border: none !important;
  padding: 12px !important;
  vertical-align: middle !important;
  color: var(--ef-text) !important;
  background: transparent !important;
}

/* FIRST/LAST ROUND FIX */
table.pm tbody tr td:first-child{
  border-top-left-radius: var(--ef-radius) !important;
  border-bottom-left-radius: var(--ef-radius) !important;
}

table.pm tbody tr td:last-child{
  border-top-right-radius: var(--ef-radius) !important;
  border-bottom-right-radius: var(--ef-radius) !important;
}

/* SUBJECT */
.pm_subj a{
  font-weight: 800 !important;
  color: var(--ef-text) !important;
  text-decoration: none !important;
}

.pm_subj a:hover{
  color: var(--ef-yellow-deep) !important;
}

/* LAST MESSAGE */
.pm_last_message{
  font-size: 12px !important;
  color: var(--ef-muted) !important;
  margin-top: 4px !important;
}

/* ICON */
.pm_icon svg{
  opacity: .8 !important;
  display: block !important;
  margin: auto !important;
}

/* CHECKBOX */
.form-check-input{
  width: 16px !important;
  height: 16px !important;
  accent-color: var(--ef-yellow) !important;
}

/* ROW HOVER */
table.pm tbody tr:hover{
  transform: translateY(-1px);
  box-shadow: 0 14px 30px -18px rgba(0,0,0,.25) !important;
  border-color: var(--ef-yellow) !important;
}

/* CLICKABLE CELLS */
table.pm td{
  cursor: pointer;
}
/* =========================
   PM MESSAGES SPACING FIX
========================= */

.pm-msg{
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  margin-bottom: 14px;

  background: var(--ef-surface);
  border: 1px solid var(--ef-border);
  border-radius: var(--ef-radius);
  box-shadow: var(--ef-shadow-soft);
}

/* HEADER (аватар + юзер + кнопки) */
.pm-msg__top{
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}

/* LEFT SIDE */
.pm-msg__user{
  display: flex;
  align-items: center;
  gap: 12px;
}

/* AVATAR */
.pm-msg__ava{
  width: 42px;
  height: 42px;
  border-radius: 50%;
  overflow: hidden;
  flex: 0 0 auto;
}

.pm-msg__cover{
  width: 100%;
  height: 100%;
  display: block;
  background-size: cover;
  background-position: center;
}

/* USER INFO */
.pm-msg__uinfo{
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pm-msg__name{
  font-weight: 700;
  color: var(--ef-text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.pm-msg__meta{
  font-size: 12px;
  color: var(--ef-muted);
}

/* ONLINE BADGE */
.pm-msg__online{
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(247,223,114,.25);
  color: var(--ef-text);
}

/* ACTION BUTTONS */
.pm-msg__actions{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

/* TEXT BLOCK — ВОТ ГЛАВНАЯ ПРОБЛЕМА */
.pm-msg__text{
  line-height: 1.6;
  font-size: 14px;
  color: var(--ef-text);
  padding-top: 4px;
}

/* если внутри p/ul — нормализуем */
.pm-msg__text p{
  margin: 0 0 10px;
}

.pm-msg__text p:last-child{
  margin-bottom: 0;
}

/* SIGNATURE */
.signature{
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--ef-border);
  font-size: 12px;
  color: var(--ef-muted);
}
/* =========================
   PROFILE POPUP
========================= */

.profile-popup{
  width: 320px;
  background: var(--ef-surface);
  border: 1px solid var(--ef-border);
  border-radius: var(--ef-radius);
  box-shadow: var(--ef-shadow-soft);
  overflow: hidden;
  font-family: var(--ef-font);
}

/* HEADER */
.profile-popup__head{
  display: flex;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid var(--ef-border);
}

/* AVATAR */
.profile-popup__avatar{
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  flex: 0 0 auto;
}

.profile-popup__cover{
  width: 100%;
  height: 100%;
  display: block;
  background-size: cover;
  background-position: center;
}

/* NAME */
.profile-popup__name{
  font-weight: 800;
  color: var(--ef-text);
  font-size: 15px;
}

/* STATUS */
.profile-popup__status{
  font-size: 12px;
  margin-top: 4px;
}

.is-online{
  color: #70bb39;
  font-weight: 600;
}

.is-offline{
  color: var(--ef-muted);
}

/* BODY */
.profile-popup__body{
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ROW */
.pp-row{
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--ef-text);
  padding: 6px 0;
  border-bottom: 1px dashed rgba(0,0,0,.06);
}

html[data-theme="dark"] .pp-row{
  border-bottom: 1px dashed rgba(255,255,255,.06);
}

.pp-row span{
  color: var(--ef-muted);
  font-weight: 500;
}

.pp-row b{
  font-weight: 700;
  color: var(--ef-text);
}
/* =========================
   REGISTRATION PAGE
========================= */

.regtext{
  margin-bottom: 16px;
  color: var(--ef-muted);
  line-height: 1.6;
}

.reg-grid{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.formrow{
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.formrow--full{
  grid-column: 1 / -1;
}

/* LABEL */
.label{
  font-size: 12px;
  color: var(--ef-muted);
  font-weight: 600;
}

/* INPUTS */
.wide,
input[type="text"],
input[type="password"],
input[type="email"],
textarea,
select{
  width: 100%;
  border-radius: var(--ef-radius);
  border: 1px solid var(--ef-border);
  background: var(--ef-surface);
  color: var(--ef-text);
  outline: none;
  transition: .2s;
  font-family: var(--ef-font);
}

.wide:focus,
input:focus,
textarea:focus,
select:focus{
  border-color: var(--ef-yellow);
  box-shadow: 0 0 0 3px rgba(247,223,114,.25);
}

/* LOGIN CHECK */
.input-group{
  display: flex;
  gap: 8px;
}

/* BUTTONS INSIDE FORM */
.input-group .btn{
  white-space: nowrap;
}

/* CAPTCHA */
.c-captcha{
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* FILE INPUT FIX */
input[type="file"]{
  padding: 10px;
  border-radius: var(--ef-radius);
  border: 1px dashed var(--ef-border);
  background: transparent;
  color: var(--ef-muted);
}

/* USER FIELDS */
.user_fields{
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* FORM FOOTER */
.form_submit{
  margin-top: 16px;
  display: flex;
  justify-content: flex-end;
}

/* RESPONSIVE */
@media (max-width: 720px){
  .reg-grid{
    grid-template-columns: 1fr;
  }
}
/* =========================
   BUTTON SYSTEM (GLOBAL)
========================= */

.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  padding: 10px 14px;
  border-radius: var(--ef-radius);
  border: 1px solid transparent;

  font-family: var(--ef-font);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;

  cursor: pointer;
  user-select: none;

  transition: all .2s ease;
  text-decoration: none;

  white-space: nowrap;
}

/* =========================
   PRIMARY BUTTON (желтая)
========================= */

.btn--primary{
  background: var(--ef-yellow);
  color: #1a1612;
  border-color: var(--ef-yellow);
  box-shadow: 0 6px 18px -10px rgba(247,223,114,.6);
}

.btn--primary:hover{
  background: var(--ef-yellow-deep);
  border-color: var(--ef-yellow-deep);
  transform: translateY(-1px);
}

/* =========================
   SOFT BUTTON (вторичный)
========================= */

.btn--soft{
  background: var(--ef-surface);
  color: var(--ef-text);
  border-color: var(--ef-border);
}

.btn--soft:hover{
  border-color: var(--ef-yellow);
  background: rgba(247,223,114,.10);
  color: var(--ef-text);
}

/* =========================
   GHOST BUTTON (почти без фона)
========================= */

.btn--ghost{
  background: transparent;
  color: var(--ef-muted);
  border-color: var(--ef-border);
}

.btn--ghost:hover{
  color: var(--ef-text);
  border-color: var(--ef-yellow);
  background: rgba(247,223,114,.08);
}

/* =========================
   DANGER BUTTON
========================= */

.btn--danger{
  background: transparent;
  color: #ff4d4d;
  border-color: rgba(255,77,77,.3);
}

.btn--danger:hover{
  background: rgba(255,77,77,.10);
  border-color: #ff4d4d;
}

/* =========================
   DISABLED STATE
========================= */

.btn:disabled{
  opacity: .5;
  cursor: not-allowed;
  transform: none !important;
}
/* =========================
   INFO PAGE BLOCK
========================= */

.info__content{
  font-size: 14px;
  line-height: 1.6;
  color: var(--ef-text);
}

/* PROSE FIX (если внутри HTML) */
.prose p{
  margin: 0 0 10px;
}

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

/* FOOTER */
.info__footer{
  margin-top: 16px;
  display: flex;
  justify-content: flex-end;
}

/* OPTIONAL: CARD VARIANTS */
.card.info{
    background: var(--ef-surface);
    border: 1px solid var(--ef-border-soft);
    border-radius: 14px;
    box-shadow: var(--ef-shadow-soft);
    padding: 12px;
    margin-bottom: 10px;
}

/* ERROR TEXT (если DLE отдаёт ошибки) */
.info__content span,
.info__content b{
  color: var(--ef-text);
}

/* LINKS INSIDE INFO */
.info__content a{
  color: var(--ef-yellow-deep);
  text-decoration: none;
  font-weight: 600;
}

.info__content a:hover{
  text-decoration: underline;
}
/* =========================
   ALERT SYSTEM
========================= */

.alert{
  display: flex;
  align-items: flex-start;
  gap: 12px;

  padding: 14px 14px;
  border-radius: var(--ef-radius);

  border: 1px solid var(--ef-border);
  background: var(--ef-surface);

  color: var(--ef-text);
}

/* ERROR VARIANT */
.alert--error{
  border-left: 4px solid #ff4d4d;
  background: rgba(255,77,77,.06);
}

/* ICON */
.alert__icon{
  width: 26px;
  height: 26px;

  border-radius: 50%;

  display: flex;
  align-items: center;
  justify-content: center;

  font-weight: 800;
  font-size: 14px;

  background: #ff4d4d;
  color: #fff;

  flex: 0 0 auto;
}

/* CONTENT */
.alert__content{
  font-size: 14px;
  line-height: 1.6;
  color: var(--ef-text);
}

/* STRONG TEXT INSIDE */
.alert__content b,
.alert__content strong{
  font-weight: 800;
}

/* FOOTER BUTTON */
.info__footer{
  margin-top: 16px;
  display: flex;
  justify-content: flex-end;
}

/* DARK MODE FIX */
html[data-theme="dark"] .alert--error{
  background: rgba(255,77,77,.10);
}
/* =========================
   USER PROFILE SYSTEM
========================= */

.user__header{
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--ef-border);
}

/* AVATAR */
.user__ava img{
  width: 54px;
  height: 54px;
  border-radius: 50%;
  object-fit: cover;
}

/* NAME */
.user__name{
  font-size: 18px;
  font-weight: 800;
  color: var(--ef-text);
}

/* META */
.user__meta{
  font-size: 12px;
  color: var(--ef-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ACTIONS */
.user__actions{
  margin-left: auto;
  display: flex;
  gap: 8px;
}

/* TABS */
.user__tabs{
  display: flex;
  gap: 10px;
  margin: 14px 0;
}

.user__tabs a{
  padding: 8px 12px;
  border-radius: var(--ef-radius);
  border: 1px solid var(--ef-border);
  color: var(--ef-text);
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
}

.user__tabs a.is-active{
  background: var(--ef-yellow);
  border-color: var(--ef-yellow);
}

/* KV TABLE */
.kv{
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.kv__row{
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px dashed var(--ef-border);
}

.kv__row span{
  color: var(--ef-muted);
  font-size: 13px;
}

.kv__row b{
  color: var(--ef-text);
}

/* METRICS */
.metrics{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 14px;
}

.metric{
  display: flex;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--ef-border);
  border-radius: var(--ef-radius);
  background: var(--ef-surface);
}

.metric__icon{
  font-size: 18px;
}

.metric__label{
  font-size: 12px;
  color: var(--ef-muted);
}

.metric__value{
  font-weight: 800;
  color: var(--ef-text);
}

/* MINI CARD */
.card.mini{
  margin-top: 14px;
  box-shadow: none;
}
/* =========================
   FORMS SYSTEM (FULL FIX)
========================= */

.formgrid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.formrow{
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.formrow--full{
  grid-column: 1 / -1;
}

.label{
  font-size: 13px;
  color: var(--ef-muted);
  font-weight: 600;
}

/* =========================
   INPUT BASE
========================= */

.input,
.textarea,
select{
  width: 100%;
  font-family: var(--ef-font);
  font-size: 14px;
  color: var(--ef-text);

  background: var(--ef-surface);
  border: 1px solid var(--ef-border);
  border-radius: var(--ef-radius);

  padding: 10px 12px;
  outline: none;

  transition: .2s ease;
}

/* textarea */
.textarea{
  min-height: 120px;
  resize: vertical;
  line-height: 1.5;
}

/* select fix */
select{
  appearance: none;
  cursor: pointer;
}

/* focus state */
.input:focus,
.textarea:focus,
select:focus{
  border-color: var(--ef-yellow);
  box-shadow: 0 0 0 3px rgba(247,223,114,.25);
}

/* placeholder */
.input::placeholder,
.textarea::placeholder{
  color: var(--ef-soft);
}

/* =========================
   CHECKBOX / CHECK BLOCKS
========================= */

.check{
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ef-text);
}

.check input{
  accent-color: var(--ef-yellow);
}

/* =========================
   FILE INPUT (IMPORTANT)
========================= */

input[type="file"]{
  width: 100%;
  padding: 10px;
  border: 1px dashed var(--ef-border);
  border-radius: var(--ef-radius);
  background: var(--ef-bg);
  color: var(--ef-muted);
  cursor: pointer;
}

input[type="file"]::file-selector-button{
  border: 1px solid var(--ef-border);
  background: var(--ef-surface);
  color: var(--ef-text);
  padding: 6px 10px;
  border-radius: var(--ef-radius);
  margin-right: 10px;
  cursor: pointer;
  transition: .2s;
}

input[type="file"]::file-selector-button:hover{
  background: var(--ef-yellow);
  border-color: var(--ef-yellow);
}

/* =========================
   FORM FOOTER
========================= */

.form_submit{
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

/* =========================
   SMALL IMPROVEMENTS
========================= */

.muted{
  color: var(--ef-muted);
  font-size: 13px;
}

.divider{
  height: 1px;
  background: var(--ef-border);
  margin: 14px 0;
}
/* =========================
   STORY CARD (SEARCH)
========================= */

.story-card{
  background: var(--ef-surface);
  border: 1px solid var(--ef-border);
  border-radius: var(--ef-radius);
  overflow: hidden;
  transition: .2s ease;
}

.story-card:hover{
  transform: translateY(-2px);
  box-shadow: var(--ef-shadow-soft);
}

/* фиксированные посты */
.story-card--fixed{
  border-color: var(--ef-yellow);
}

/* =========================
   BODY
========================= */

.story-card .card__body{
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* =========================
   TITLE
========================= */

.story-card__title{
  font-size: 18px;
  line-height: 1.4;
  margin: 0;
  font-weight: 700;
}

.story-card__title a,
.story-card__title a:visited{
  color: var(--ef-text);
  text-decoration: none;
}

.story-card__title a:hover{
  color: var(--ef-yellow-deep);
}

/* =========================
   EXCERPT
========================= */

.story-card__excerpt{
  font-size: 14px;
  line-height: 1.6;
  color: var(--ef-muted);

  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;

  overflow: hidden;
}

/* =========================
   META BLOCK
========================= */

.story-card__meta{
  display: flex;
  align-items: center;
  justify-content: space-between;

  font-size: 12px;
  color: var(--ef-soft);

  padding-top: 8px;
  border-top: 1px solid var(--ef-border-soft);
}

.story-card__meta-left,
.story-card__meta-right{
  display: flex;
  align-items: center;
  gap: 8px;
}

.meta__dot{
  opacity: .5;
}

/* category link */
.story-card__meta-right a{
  color: var(--ef-soft);
  text-decoration: none;
}

.story-card__meta-right a:hover{
  color: var(--ef-yellow-deep);
}

/* =========================
   SEARCH PAGE WRAPPER
========================= */

.searchpage{
  padding: 0;
}

/* =========================
   SEARCH TABLE BLOCK
========================= */

.searchtable{
  display: flex;
  flex-direction: column;
  gap: 14px;
      margin-bottom: 15px;
}

/* =========================
   SEARCH GRID
========================= */

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

  padding: 16px;
  background: var(--ef-surface);
  border: 1px solid var(--ef-border);
  border-radius: var(--ef-radius);
}

/* =========================
   INPUT FIELD FIX (ВАЖНО)
========================= */

.search__field input{
  width: 100%;
  padding: 12px 14px;

  border-radius: var(--ef-radius);
  border: 1px solid var(--ef-border);

  background: var(--ef-surface);
  color: var(--ef-text);

  font-size: 14px;
  outline: none;

  transition: .2s;
}

.search__field input:focus{
  border-color: var(--ef-yellow);
  box-shadow: 0 0 0 3px rgba(247,223,114,.25);
}

/* =========================
   ACTION BUTTONS
========================= */

.search__actions{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* усиление кнопок поиска */
.search__actions .btn{
  padding: 10px 14px;
  border-radius: var(--ef-radius);
  font-weight: 600;
}

/* primary = бренд */
.btn--primary{
  background: var(--ef-yellow);
  color: #1a1612;
  border: 1px solid var(--ef-yellow);
}

.btn--primary:hover{
  background: var(--ef-yellow-deep);
}

/* ghost */
.btn--ghost{
  background: transparent;
  border: 1px solid var(--ef-border);
  color: var(--ef-text);
}

.btn--ghost:hover{
  border-color: var(--ef-yellow);
  color: var(--ef-yellow-deep);
}

/* =========================
   RESULT COUNTER
========================= */

.search_result_num{
  padding: 10px 14px;
  border-left: 3px solid var(--ef-yellow);
  background: var(--ef-bg);
  border-radius: var(--ef-radius);

  font-size: 13px;
  color: var(--ef-muted);
}

/* =========================
   SEARCH RESULTS AREA (IMPORTANT)
========================= */

.card.story-card{
  margin-top: 12px;
}

/* =========================
   FIX EXTENDED SEARCH CHAOS
========================= */

.search__inline{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;

  font-size: 14px;
  color: var(--ef-text);
}

/* =========================
   SELECT FIX (CRITICAL)
========================= */

.search__inline select{
  appearance: none;
  background: var(--ef-surface);
  border: 1px solid var(--ef-border);
  border-radius: var(--ef-radius);

  padding: 8px 10px;
  color: var(--ef-text);
  font-size: 14px;

  min-height: 38px;
}

/* =========================
   INPUT FIX INSIDE INLINE
========================= */

.search__inline input[type="text"]{
  width: 80px;
  padding: 8px 10px;

  border-radius: var(--ef-radius);
  border: 1px solid var(--ef-border);
  background: var(--ef-surface);

  text-align: center;
}

/* =========================
   CHECKBOX / RADIO FIX
========================= */

.form-check-label{
  display: flex;
  align-items: center;
  gap: 8px;

  padding: 6px 10px;
  border: 1px solid var(--ef-border-soft);
  border-radius: var(--ef-radius);

  background: var(--ef-bg);
  cursor: pointer;

  transition: .2s;
}

.form-check-label:hover{
  border-color: var(--ef-yellow);
}

/* input inside label */
.form-check-input{
  accent-color: var(--ef-yellow);
}

/* =========================
   FIX INLINE WRAPPING CHAOS
========================= */

.search__inline > *{
  margin: 0;
}

/* =========================
   CARD SUB SPACING FIX
========================= */

.card--sub .card__body{
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* =========================
   TEXT AFTER SELECTS (like "комментариями")
========================= */

.card--sub .card__body{
  line-height: 1.6;
}

/* =========================
   RADIO GROUP FIX (showposts)
========================= */

.search__inline label{
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
::selection{
  background: var(--ef-yellow);
  color: #1a1612;
}

::-moz-selection{
  background: var(--ef-yellow);
  color: #1a1612;
}