/*
Theme Name: L2J Dark
Theme URI: https://localhost/wp_local/
Author: Custom
Author URI: https://localhost/wp_local/
Description: Custom dark fantasy theme for L2 Interlude server website.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
Text Domain: l2j-dark
*/

:root {
  --bg: #0b0711;
  --bg-soft: #120a17;
  --card: #1f0f1c;
  --card-2: #24111f;
  --text: #f6efe5;
  --muted: #e4c59f;
  --line: #3a253f;
  --primary: #ffb347;
  --primary-2: #ffcc66;
  --accent: #ff9f3a;
  --radius: 14px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: linear-gradient(180deg, #0a0710 0%, var(--bg) 24%, #140a18 100%);
  color: var(--text);
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
  line-height: 1.5;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 15% -10%, rgba(255, 159, 58, 0.18), transparent 34%),
    radial-gradient(circle at 85% -15%, rgba(255, 204, 102, 0.14), transparent 28%);
  z-index: -1;
}

a { color: var(--primary-2); text-decoration: none; }
a:hover { color: #ffe4b8; }

.container {
  width: min(1180px, 94vw);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(8px);
  background: rgba(6, 10, 20, 0.9);
  border-bottom: 1px solid rgba(39, 50, 82, 0.7);
}

.site-header-top {
  border-bottom: 1px solid rgba(39, 50, 82, 0.45);
  background: rgba(4, 7, 14, 0.92);
}

.site-header-top-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 6px 0;
}

.top-pages-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 4px;
  font-size: 12px;
  font-weight: 600;
}

.top-pages-nav a {
  color: rgba(243, 221, 187, 0.82);
  padding: 4px 10px;
  border-radius: 999px;
  transition: color 0.15s, background 0.15s;
}

.top-pages-nav a:hover {
  color: #ffe4b8;
  background: rgba(255, 159, 58, 0.1);
}

.top-pages-sep {
  display: inline-block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 159, 58, 0.35);
  margin: 0 2px;
  flex-shrink: 0;
}

a.l2j-header-online {
  color: #c8f5c4 !important;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid rgba(120, 200, 140, 0.35);
  background: rgba(20, 48, 28, 0.35);
  text-decoration: none;
  white-space: nowrap;
}

a.l2j-header-online:hover {
  color: #e4ffe0 !important;
  background: rgba(40, 90, 55, 0.45);
}

a.l2j-header-online strong {
  color: #b8ffb0;
  font-weight: 800;
}

a.l2j-header-online.is-offline {
  color: #ffd0d0 !important;
  border: 1px solid rgba(220, 95, 95, 0.35);
  background: rgba(58, 18, 24, 0.35);
}

a.l2j-header-online.is-offline:hover {
  color: #ffe7e7 !important;
  background: rgba(90, 30, 40, 0.45);
}

a.l2j-header-online.is-offline strong {
  color: #ffb6b6;
}

/* Страница статистики: кнопки-якоря */
.l2j-stats-dashboard {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.l2j-stats-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  padding: 14px 12px;
  margin: 0 0 8px;
  border-radius: 12px;
  border: 1px solid rgba(255, 159, 58, 0.22);
  background: linear-gradient(145deg, rgba(18, 12, 22, 0.9) 0%, rgba(10, 8, 14, 0.85) 100%);
}

.l2j-stats-nav__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  color: #f1d9b5 !important;
  border: 1px solid rgba(255, 159, 58, 0.35);
  background: rgba(0, 0, 0, 0.25);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.l2j-stats-nav__btn:hover {
  color: #fff8e8 !important;
  border-color: rgba(255, 159, 58, 0.55);
  background: rgba(255, 159, 58, 0.12);
}

.l2j-stat-section {
  scroll-margin-top: 88px;
}

.l2j-sr-skill-noname {
  opacity: 0.55;
}

.l2j-game-stat-wrap {
  margin-top: 8px;
}

/* Рейтинг PvP/PK: переключатель сортировки */
.l2j-rank-sort-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin: 6px 0 16px;
}

.l2j-rank-sort-nav__label {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.l2j-rank-sort-nav__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none !important;
  color: #e8dcc4 !important;
  border: 1px solid rgba(255, 159, 58, 0.28);
  background: rgba(13, 21, 38, 0.55);
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.l2j-rank-sort-nav__btn:hover {
  border-color: rgba(255, 184, 92, 0.5);
  background: rgba(18, 27, 47, 0.75);
  color: #fff4e0 !important;
}

.l2j-rank-sort-nav__btn.is-active {
  border-color: rgba(255, 170, 70, 0.6);
  background: linear-gradient(180deg, rgba(255, 208, 106, 0.16) 0%, rgba(255, 122, 61, 0.07) 100%);
  color: #ffe8c4 !important;
}

.l2j-game-stat-count {
  font-size: 18px;
  margin: 12px 0 16px;
  color: var(--bbp-gold-soft, #f1d9b5);
}

.l2j-game-stat-count strong {
  color: #b8ffb0;
  font-size: 1.15em;
}

.l2j-game-stat-empty,
.l2j-game-stat-hint {
  color: rgba(241, 217, 181, 0.75);
  font-size: 14px;
  margin: 12px 0;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: 8px;
}

.l2j-auth-modal-root {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 11000;
  align-items: center;
  justify-content: center;
  padding: min(4vw, 20px);
}

.l2j-auth-modal-root.is-open {
  display: flex;
}

.l2j-auth-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 8, 16, 0.78);
  backdrop-filter: blur(8px);
}

.l2j-auth-modal {
  position: relative;
  z-index: 1;
  width: min(560px, 96vw);
  max-height: 88vh;
  overflow: auto;
  border-radius: 14px;
  border: 1px solid rgba(255, 159, 58, 0.24);
  background:
    linear-gradient(145deg, rgba(255, 159, 58, 0.08) 0%, transparent 46%),
    linear-gradient(180deg, rgba(19, 33, 58, 0.95) 0%, rgba(10, 14, 26, 0.99) 100%);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.55);
  padding: 16px 16px 18px;
}

.l2j-auth-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(39, 50, 82, 0.9);
  background: rgba(6, 10, 20, 0.9);
  color: #f3ddbb;
  font-size: 24px;
  cursor: pointer;
}

.l2j-auth-tabs {
  display: inline-flex;
  gap: 8px;
  margin-bottom: 14px;
}

.l2j-auth-tab {
  border: 1px solid rgba(39, 50, 82, 0.95);
  background: rgba(6, 10, 20, 0.7);
  color: #d9c9ac;
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  font-weight: 700;
}

.l2j-auth-tab.is-active {
  border-color: rgba(255, 159, 58, 0.45);
  color: #ffe4b8;
}

.l2j-auth-notice {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 159, 58, 0.35);
  background: rgba(255, 159, 58, 0.08);
  color: #f1dcc1;
  font-size: 13px;
  line-height: 1.45;
}

.l2j-auth-pane h2 {
  margin: 0 0 12px;
  color: #f3ddbb;
}

.l2j-auth-form,
.l2j-auth-resend {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 0 12px;
}

.l2j-auth-form label,
.l2j-auth-resend label {
  font-size: 12px;
  color: #d6c4a4;
  font-weight: 700;
}

.l2j-auth-form input,
.l2j-auth-resend input {
  background: rgba(6, 10, 20, 0.72);
  border: 1px solid rgba(39, 50, 82, 0.95);
  color: var(--text);
  border-radius: 10px;
  padding: 10px 12px;
}

.l2j-auth-check {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  font-size: 12px;
}

.l2j-auth-forgot-link {
  display: inline-block;
  font-size: 12px;
  color: #ffd8a0;
  text-decoration: underline;
  margin-top: 2px;
  margin-bottom: 2px;
}

.l2j-auth-turnstile {
  margin-top: 4px;
  margin-bottom: 4px;
}

body.l2j-auth-modal-open {
  overflow: hidden;
}

.header-inner {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  overflow: visible;
}

.main-nav {
  flex: 1;
  min-width: 0;
  display: flex;
  justify-content: flex-end;
}

.header-nav-cluster {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px 14px;
}

.header-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.header-menu--actions {
  gap: 8px 10px;
}

.nav-divider {
  width: 1px;
  height: 26px;
  background: rgba(39, 50, 82, 0.85);
  flex-shrink: 0;
}

.nav-pill {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  color: #f3ddbb !important;
  background: rgba(19, 33, 58, 0.55);
  border: 1px solid rgba(39, 50, 82, 0.9);
  opacity: 1;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.nav-pill:hover {
  border-color: rgba(255, 159, 58, 0.45);
  box-shadow: 0 0 14px rgba(255, 159, 58, 0.2);
  color: #ffe4b8 !important;
}

.nav-pill--accent {
  background: linear-gradient(180deg, rgba(255, 208, 106, 0.22) 0%, rgba(255, 122, 61, 0.18) 100%);
  border-color: rgba(255, 159, 58, 0.5);
  color: #ffd8a0 !important;
}

.nav-pill--accent:hover {
  border-color: rgba(255, 180, 90, 0.75);
  box-shadow: 0 0 18px rgba(255, 159, 58, 0.28);
}

.btn-header-sm {
  padding: 8px 14px !important;
  font-size: 13px !important;
  border-radius: 999px !important;
}

ul.header-menu--wp {
  gap: 12px 18px;
}

.main-nav .header-menu--wp .sub-menu {
  position: absolute;
  left: 0;
  top: 100%;
  margin-top: 6px;
  min-width: 200px;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 8px 0;
  background: rgba(10, 14, 26, 0.98);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  z-index: 30;
  display: none;
}

.main-nav .header-menu--wp li:hover > .sub-menu,
.main-nav .header-menu--wp li:focus-within > .sub-menu {
  display: flex;
}

.main-nav .header-menu--wp li.menu-item-has-children {
  position: relative;
}

.master-l2j-accounts .small {
  font-size: 12px;
  color: var(--muted);
}

.master-l2j-shell {
  position: relative;
}

.master-l2j-lk-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
  margin-bottom: 12px;
}

/* Статистика: только кнопки слева (без «Выйти» справа) */
.l2j-stats-toolbar {
  justify-content: flex-start;
}

.master-l2j-layout {
  display: grid !important;
  grid-template-columns: minmax(340px, 1fr) minmax(340px, 1fr);
  gap: 14px;
  align-items: start;
}

.master-l2j-top-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 0;
  flex-wrap: nowrap;
}

.master-l2j-sidebtn {
  min-height: 44px;
  width: auto;
  min-width: 170px;
  border: 1px solid rgba(255, 159, 58, 0.28);
  border-radius: 10px;
  background: rgba(13, 21, 38, 0.65);
  color: #f2e2c8;
  text-align: left;
  font-weight: 700;
  font-size: 13px;
  line-height: 1.25;
  padding: 10px 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: border-color .18s ease, background-color .18s ease, transform .18s ease;
}

.master-l2j-sidebtn:hover {
  border-color: rgba(255, 184, 92, 0.55);
  background: rgba(18, 27, 47, 0.86);
  transform: translateY(-1px);
}

.master-l2j-sidebtn.is-active {
  border-color: rgba(255, 170, 70, 0.65);
  background: linear-gradient(180deg, rgba(255, 208, 106, 0.18) 0%, rgba(255, 122, 61, 0.08) 100%);
}

.master-l2j-stats-placeholder {
  border: 1px solid rgba(255, 159, 58, 0.22);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(26, 15, 34, 0.92) 0%, rgba(20, 11, 28, 0.94) 100%);
  padding: 18px;
}

.master-l2j-profile-form {
  display: grid;
  gap: 8px;
  max-width: 900px;
}

.master-l2j-profile-layout {
  display: grid;
  grid-template-columns: minmax(140px, 180px) 1fr;
  gap: 16px 20px;
  align-items: stretch;
}

.master-l2j-profile-avatar-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 8px;
  align-self: stretch;
  min-height: 0;
}

.master-l2j-profile-avatar-col label {
  margin-top: 0;
}

.master-l2j-profile-avatar-col .master-l2j-avatar-file {
  width: 100%;
  max-width: 100%;
  font-size: 11px;
  padding: 8px;
  background: rgba(19, 33, 58, 0.55);
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--muted);
}

.master-l2j-profile-fields-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 12px;
  align-self: start;
}

/* Первая строка полей — без лишнего отступа сверху, вровень с аватаром */
.master-l2j-profile-fields-inner > .master-l2j-profile-field:nth-child(1) label,
.master-l2j-profile-fields-inner > .master-l2j-profile-field:nth-child(2) label {
  margin-top: 0;
}

.master-l2j-profile-field {
  min-width: 0;
}

.master-l2j-profile-field--full {
  grid-column: 1 / -1;
  margin-top: 2px;
}

.master-l2j-profile-form label {
  font-size: 12px;
  color: #d6c4a4;
  font-weight: 700;
  margin-top: 6px;
}

.master-l2j-profile-form input[type="text"],
.master-l2j-profile-form input[type="url"],
.master-l2j-profile-form input[type="email"],
.master-l2j-profile-form input[type="password"],
.master-l2j-profile-form input[type="date"],
.master-l2j-profile-form textarea {
  width: 100%;
  background: rgba(19, 33, 58, 0.55);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 11px;
  padding: 10px 12px;
}

.master-l2j-profile-form input[disabled] {
  opacity: 0.8;
}

.master-l2j-avatar-row {
  margin-bottom: 0;
}

.master-l2j-avatar-preview {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  border: 1px solid rgba(255, 159, 58, 0.35);
  object-fit: cover;
  display: block;
}

.master-l2j-profile-form .master-l2j-submit {
  margin-top: 8px;
}

@media (max-width: 780px) {
  .master-l2j-profile-layout {
    grid-template-columns: 1fr;
  }

  .master-l2j-profile-fields-inner {
    grid-template-columns: 1fr;
  }

  .master-l2j-profile-avatar-col {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    align-self: auto;
  }

  .master-l2j-profile-fields-inner {
    margin-top: 0;
  }

  .master-l2j-profile-fields-inner > .master-l2j-profile-field:nth-child(1) label,
  .master-l2j-profile-fields-inner > .master-l2j-profile-field:nth-child(2) label {
    margin-top: 6px;
  }

  .master-l2j-profile-avatar-col .master-l2j-avatar-file {
    flex: 1 1 200px;
  }
}

.master-l2j-accounts input[type="text"],
.master-l2j-accounts input[type="password"],
.master-l2j-accounts select {
  width: 100%;
  background: rgba(19, 33, 58, 0.55);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 11px;
  padding: 10px 12px;
  outline: none;
}

.master-l2j-accounts input[type="text"]::placeholder,
.master-l2j-accounts input[type="password"]::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

.master-l2j-accounts button {
  background: linear-gradient(180deg, #ffd06a 0%, #ff7a3d 100%);
  border: 1px solid rgba(255, 159, 58, 0.55);
  color: #041224;
  font-weight: 900;
  border-radius: 11px;
  padding: 11px 16px;
  cursor: pointer;
}

.btn-master-open {
  width: 100%;
  background: linear-gradient(180deg, #ffd06a 0%, #ff7a3d 100%);
  border: 1px solid rgba(255, 159, 58, 0.55);
  color: #041224;
  font-weight: 900;
  border-radius: 11px;
  padding: 11px 16px;
  cursor: pointer;
}

.master-l2j-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 9999;
}

.master-l2j-modal {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(560px, 92vw);
  max-height: 86vh;
  overflow: auto;
  z-index: 10000;
  border-radius: 14px;
  border: 1px solid rgba(17, 24, 39, 0.14);
  background: #ffffff;
  color: #111827;
  padding: 18px 18px 20px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
}

.master-l2j-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(17, 24, 39, 0.15);
  background: #ffffff;
  color: #111827;
  cursor: pointer;
}

.master-l2j-modal-form {
  margin-top: 6px;
}

.master-l2j-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.master-l2j-login-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.master-l2j-login-row .master-l2j-login-input {
  flex: 1;
}

.master-l2j-login-refresh {
  flex: 0 0 auto;
  min-width: 120px;
  height: 44px;
  border-radius: 11px;
  border: 1px solid rgba(255, 159, 58, 0.55);
  background: #fff;
  color: #111827;
  font-weight: 800;
  cursor: pointer;
}

.master-l2j-login-refresh:hover {
  filter: brightness(1.02);
}

.master-l2j-prefix-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.master-l2j-prefix-static {
  flex: 1;
  min-width: 0;
  max-width: 160px;
  padding: 10px 10px;
}

.master-l2j-prefix-refresh {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 11px;
  border: 1px solid rgba(255, 159, 58, 0.55);
  background: #ffffff;
  color: #111827;
  font-weight: 900;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.master-l2j-prefix-refresh:hover {
  filter: brightness(1.02);
}

.master-l2j-static {
  border: 1px solid rgba(17, 24, 39, 0.14);
  border-radius: 11px;
  padding: 10px 12px;
  background: #f9fafb;
  color: #111827;
}

.master-l2j-submit {
  width: 100%;
  background: linear-gradient(180deg, #ffd06a 0%, #ff7a3d 100%);
  border: 1px solid rgba(255, 159, 58, 0.55);
  color: #041224;
  font-weight: 900;
  border-radius: 11px;
  padding: 12px 16px;
  cursor: pointer;
}

.master-l2j-submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.master-l2j-modal .small {
  font-size: 12px;
  color: rgba(17, 24, 39, 0.72);
}

.master-l2j-accounts button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

@media (max-width: 1300px) {
  .master-l2j-lk-toolbar {
    flex-wrap: wrap;
  }
  .master-l2j-top-actions {
    flex-wrap: wrap;
  }
  .master-l2j-layout {
    grid-template-columns: 1fr;
  }
  .master-l2j-form-grid { grid-template-columns: 1fr; }
}

/* -------------------------------------------------------------------------
   bbPress — единый стиль (рамки, типографика, поверхности)
   ------------------------------------------------------------------------- */

#bbpress-forums {
  /* Токены = как у карточек главной форума (.forum-card) */
  --bbp-border: 1px solid rgba(255, 159, 58, 0.22);
  --bbp-border-accent: 1px solid rgba(255, 159, 58, 0.32);
  --bbp-radius: 12px;
  --bbp-radius-sm: 10px;
  --bbp-surface: #1a101b;
  --bbp-surface-alt: #201322;
  --bbp-surface-deep: #140d17;
  --bbp-header: #2a1728;
  --bbp-header-glow: linear-gradient(180deg, rgba(255, 159, 58, 0.12), rgba(255, 159, 58, 0.02));
  --bbp-card: linear-gradient(180deg, #1b1119 0%, #140d17 100%);
  --bbp-text: #f6efe5;
  --bbp-muted: #e4c59f;
  --bbp-gold: #ffd8a0;
  --bbp-gold-soft: #f1d9b5;
  color: var(--bbp-text);
  font-size: 13px;
  line-height: 1.5;
}

#bbpress-forums .l2j-bbp-user-site-meta {
  margin: 0 0 16px;
  padding: 14px 16px;
  border: var(--bbp-border);
  border-radius: var(--bbp-radius);
  background: var(--bbp-card);
}

#bbpress-forums .l2j-bbp-user-site-meta__title {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 800;
  color: var(--bbp-gold-soft);
}

#bbpress-forums .l2j-bbp-user-site-meta__dl {
  display: grid;
  grid-template-columns: minmax(100px, 140px) 1fr;
  gap: 6px 14px;
  margin: 0;
}

#bbpress-forums .l2j-bbp-user-site-meta__dl dt {
  margin: 0;
  color: var(--bbp-muted);
  font-weight: 700;
}

#bbpress-forums .l2j-bbp-user-site-meta__dl dd {
  margin: 0;
  color: var(--bbp-text);
}

#bbpress-forums .l2j-bbp-user-site-meta__bio {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 159, 58, 0.15);
}

#bbpress-forums .l2j-bbp-user-site-meta__bio p {
  margin: 6px 0 0;
  color: var(--bbp-text);
}

/* Под аватаром: сообщения, ранг, роль, ссылка на ЛК */
#bbpress-forums .l2j-bbp-user-sidebar-stats {
  margin: 0 0 14px;
  padding: 12px 14px;
  border: var(--bbp-border);
  border-radius: var(--bbp-radius-sm);
  background: var(--bbp-surface-deep);
  font-size: 12px;
  line-height: 1.45;
}

#bbpress-forums .l2j-bbp-user-sidebar-stats__line {
  margin: 0 0 8px;
  color: var(--bbp-text);
}

#bbpress-forums .l2j-bbp-user-sidebar-stats__line:last-child {
  margin-bottom: 0;
}

#bbpress-forums .l2j-bbp-user-sidebar-stats__label {
  display: inline-block;
  min-width: 7.5em;
  color: var(--bbp-muted);
  font-weight: 700;
}

#bbpress-forums .l2j-bbp-user-sidebar-stats__sub {
  display: block;
  margin-top: 4px;
  color: var(--bbp-muted);
  font-size: 11px;
  font-weight: 500;
}

#bbpress-forums .l2j-bbp-user-sidebar-stats__lk {
  margin: 10px 0 0;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 159, 58, 0.12);
}

#bbpress-forums .l2j-bbp-user-sidebar-stats__lk-link {
  color: var(--bbp-gold);
  font-weight: 700;
}

#bbpress-forums .l2j-bbp-user-sidebar-stats__lk-link:hover {
  color: #ffe4c4;
}

/* Под автором в теме / ответе: сообщения и ранг */
#bbpress-forums .l2j-bbp-author-mini-stats {
  margin: 8px 0 0;
  padding: 8px 10px;
  border: var(--bbp-border);
  border-radius: var(--bbp-radius-sm);
  background: var(--bbp-surface-deep);
  font-size: 11px;
  line-height: 1.4;
  color: var(--bbp-text);
}

#bbpress-forums .l2j-bbp-author-mini-stats__posts,
#bbpress-forums .l2j-bbp-author-mini-stats__rank {
  margin: 0 0 4px;
}

#bbpress-forums .l2j-bbp-author-mini-stats__rank:last-child,
#bbpress-forums .l2j-bbp-author-mini-stats__posts:last-child {
  margin-bottom: 0;
}

#bbpress-forums .l2j-bbp-author-mini-stats__label {
  color: var(--bbp-muted);
  font-weight: 700;
}

#bbpress-forums .l2j-bbp-author-mini-stats__sub {
  color: var(--bbp-muted);
  font-weight: 500;
  font-size: 10px;
}

/* Единый профиль: контакты в теле страницы профиля */
#bbpress-forums .l2j-bbp-user-profile-contacts {
  display: grid;
  grid-template-columns: minmax(100px, 140px) 1fr;
  gap: 6px 14px;
  margin: 12px 0;
  padding: 12px 0;
  border-top: 1px solid rgba(255, 159, 58, 0.12);
  border-bottom: 1px solid rgba(255, 159, 58, 0.12);
}

#bbpress-forums .l2j-bbp-user-profile-contacts dt {
  margin: 0;
  color: var(--bbp-muted);
  font-weight: 700;
}

#bbpress-forums .l2j-bbp-user-profile-contacts dd {
  margin: 0;
  color: var(--bbp-text);
}

#bbpress-forums .l2j-bbp-unified-bio {
  margin-top: 10px;
  color: var(--bbp-text);
}

#bbpress-forums .l2j-bbp-unified-bio p {
  margin: 0.5em 0 0;
}

#bbpress-forums .l2j-bbp-profile-stats-hint {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--bbp-muted);
}

/* Редактирование профиля форума (#bbp-your-profile) — тот же визуал, что и ЛК */
#bbpress-forums #bbp-your-profile {
  max-width: 720px;
}

#bbpress-forums #bbp-your-profile h2.entry-title {
  margin: 20px 0 10px;
  font-size: 16px;
  font-weight: 800;
  color: var(--bbp-gold-soft);
  border: none;
  padding: 0;
  text-align: left;
}

#bbpress-forums #bbp-your-profile h2.entry-title:first-of-type {
  margin-top: 0;
}

/* Заголовки секций (Имя, Контакты…) — слева; перебивает .entry-title / блоки с text-align:center */
#bbpress-forums #bbp-user-wrapper #bbp-user-body #bbp-your-profile {
  text-align: left !important;
  margin-left: 0;
  margin-right: auto;
}

#bbpress-forums #bbp-user-wrapper #bbp-user-body #bbp-your-profile h2.entry-title {
  text-align: left !important;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

#bbpress-forums #bbp-your-profile fieldset.bbp-form,
#bbpress-forums #bbp-your-profile fieldset.submit {
  margin: 0 0 16px;
  padding: 14px 16px 16px;
  border: var(--bbp-border);
  border-radius: var(--bbp-radius);
  background: var(--bbp-card);
  text-align: left;
}

#bbpress-forums #bbp-your-profile fieldset.submit {
  margin-bottom: 0;
}

#bbpress-forums #bbp-your-profile fieldset.submit > div {
  display: flex;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 10px;
}

/* Как в bbPress: только h2 видимы; legend дублирует текст и ломает выравнивание */
#bbpress-forums #bbp-your-profile fieldset legend {
  display: none !important;
}

/* Подпись сверху, поля на всю ширину карточки, всё слева */
#bbpress-forums #bbp-your-profile .bbp-form > div {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 12px;
}

#bbpress-forums #bbp-your-profile .bbp-form > div > * {
  min-width: 0;
}

#bbpress-forums #bbp-your-profile .bbp-form > div:last-child {
  margin-bottom: 0;
}

#bbpress-forums #bbp-your-profile .user-pass1-wrap,
#bbpress-forums #bbp-your-profile .user-pass2-wrap {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 12px;
}

#bbpress-forums #bbp-your-profile .pw-weak {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: 12px;
  text-align: left;
}

#bbpress-forums #bbp-your-profile .pw-weak .pw-checkbox,
#bbpress-forums #bbp-your-profile .pw-weak input[type="checkbox"] {
  align-self: flex-start;
  margin-top: 4px;
}

#bbpress-forums #bbp-your-profile label {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--bbp-muted);
  text-align: left;
}

/*
 * bbPress default: fieldset label[for] { float:left; width:20%; text-align:right }
 * Специфичность выше, чем у «label» без [for] — без этого подписи остаются справа в узкой колонке.
 */
#bbpress-forums #bbp-your-profile fieldset label[for] {
  float: none !important;
  width: 100% !important;
  max-width: 100% !important;
  padding: 0 0 6px 0 !important;
  margin: 0 0 6px !important;
  text-align: left !important;
  display: block !important;
}

#bbpress-forums #bbp-your-profile fieldset dl label[for] {
  float: none !important;
  width: 100% !important;
  max-width: 100% !important;
  text-align: left !important;
}

/* Строки формы: убрать float-колонку bbPress (иначе label остаётся в «левой 20%» с text-align:right) */
#bbpress-forums #bbp-your-profile form#bbp-your-profile fieldset div {
  float: none !important;
  clear: both !important;
}

#bbpress-forums #bbp-your-profile fieldset.bbp-form > div,
#bbpress-forums #bbp-your-profile fieldset.submit > div {
  clear: both !important;
}

#bbpress-forums #bbp-your-profile fieldset p.description,
#bbpress-forums #bbp-your-profile fieldset span.description {
  float: none !important;
  clear: none !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 6px 0 0 !important;
  text-align: left !important;
}

#bbpress-forums #bbp-your-profile fieldset fieldset.password {
  width: 100% !important;
  max-width: 100% !important;
  margin-left: 0 !important;
  float: none !important;
}

#bbpress-forums #bbp-your-profile fieldset.submit .button,
#bbpress-forums #bbp-your-profile fieldset.submit button {
  float: none !important;
}

/* Select «Отображаемое имя» и язык — на всю ширину блока */
#bbpress-forums #bbp-your-profile .bbp-form > div > select,
#bbpress-forums #bbp-your-profile select#display_name {
  display: block;
  width: 100% !important;
  max-width: 100% !important;
  margin-top: 0;
  margin-left: 0;
  margin-right: 0;
}

#bbpress-forums #bbp-your-profile input[type="text"],
#bbpress-forums #bbp-your-profile input[type="email"],
#bbpress-forums #bbp-your-profile input[type="password"],
#bbpress-forums #bbp-your-profile input[type="url"],
#bbpress-forums #bbp-your-profile input[type="number"],
#bbpress-forums #bbp-your-profile textarea,
#bbpress-forums #bbp-your-profile select {
  width: 100%;
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
  box-sizing: border-box;
  background: rgba(19, 33, 58, 0.65) !important;
  border: 1px solid rgba(255, 159, 58, 0.28) !important;
  color: var(--bbp-text) !important;
  border-radius: 11px !important;
  padding: 10px 12px !important;
  font-size: 14px;
  line-height: 1.35;
  outline: none;
  box-shadow: none;
}

#bbpress-forums #bbp-your-profile select {
  min-height: 42px;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--bbp-muted) 50%),
    linear-gradient(135deg, var(--bbp-muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) calc(50% - 3px), calc(100% - 13px) calc(50% - 3px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 32px !important;
}

#bbpress-forums #bbp-your-profile textarea {
  min-height: 120px;
  resize: vertical;
}

#bbpress-forums #bbp-your-profile input[disabled],
#bbpress-forums #bbp-your-profile input:disabled {
  opacity: 0.75;
  cursor: not-allowed;
}

#bbpress-forums #bbp-your-profile .description,
#bbpress-forums #bbp-your-profile p.description {
  margin: 6px 0 0;
  max-width: 100%;
  font-size: 12px;
  color: var(--bbp-muted);
  text-align: left;
}

#bbpress-forums #bbp-your-profile #pass-strength-result {
  margin-top: 8px;
  margin-left: 0;
  margin-right: 0;
  max-width: 100%;
  padding: 8px 10px;
  border-radius: var(--bbp-radius-sm);
  border: var(--bbp-border);
  background: var(--bbp-surface-deep);
  color: var(--bbp-text);
}

#bbpress-forums #bbp-your-profile .button,
#bbpress-forums #bbp-your-profile button.button,
#bbpress-forums #bbp-your-profile #bbp_user_edit_submit {
  background: linear-gradient(180deg, rgba(255, 208, 106, 0.95) 0%, rgba(255, 122, 61, 0.9) 100%) !important;
  border: 1px solid rgba(255, 159, 58, 0.55) !important;
  color: #041224 !important;
  border-radius: 11px !important;
  padding: 10px 18px !important;
  font-weight: 800 !important;
  text-shadow: none !important;
  box-shadow: none !important;
  cursor: pointer;
}

#bbpress-forums #bbp-your-profile .button:hover,
#bbpress-forums #bbp-your-profile button.button:hover,
#bbpress-forums #bbp-your-profile #bbp_user_edit_submit:hover {
  filter: brightness(1.06);
  color: #041224 !important;
}

#bbpress-forums #bbp-your-profile .wp-generate-pw,
#bbpress-forums #bbp-your-profile .wp-hide-pw,
#bbpress-forums #bbp-your-profile .wp-cancel-pw {
  background: rgba(19, 33, 58, 0.75) !important;
  border: 1px solid rgba(255, 159, 58, 0.35) !important;
  color: var(--bbp-gold) !important;
  margin: 0 6px 8px 0;
}

#bbpress-forums #bbp-your-profile .password-input-wrapper {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 6px 0 0;
}

#bbpress-forums #bbp-your-profile .password-button-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  justify-content: flex-start;
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
}

#bbpress-forums #bbp-your-profile input[type="checkbox"] {
  width: auto;
  margin-right: 8px;
  accent-color: #ff9f3a;
}

/* Меню профиля слева: активная вкладка (вместо серого #eee из bbpress.css) */
#bbpress-forums #bbp-single-user-details #bbp-user-navigation ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

#bbpress-forums #bbp-single-user-details #bbp-user-navigation li {
  margin: 0 0 6px;
}

#bbpress-forums #bbp-single-user-details #bbp-user-navigation a {
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid transparent;
  color: var(--bbp-muted);
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

#bbpress-forums #bbp-single-user-details #bbp-user-navigation li:not(.current) a:hover {
  background: rgba(255, 159, 58, 0.1);
  border-color: rgba(255, 159, 58, 0.25);
  color: var(--bbp-gold);
}

#bbpress-forums #bbp-single-user-details #bbp-user-navigation li.current a {
  background: linear-gradient(180deg, rgba(255, 208, 106, 0.95) 0%, rgba(255, 122, 61, 0.92) 100%) !important;
  border: 1px solid rgba(255, 159, 58, 0.55) !important;
  color: #041224 !important;
  opacity: 1 !important;
  font-weight: 800;
}

#bbpress-forums a {
  color: var(--bbp-gold);
}

#bbpress-forums a:hover {
  color: #ffe5b8;
}

#bbpress-forums .bbp-breadcrumb,
#bbpress-forums .bbp-topic-form,
#bbpress-forums .bbp-reply-form,
#bbpress-forums .bbp-search-form {
  margin-bottom: 12px;
}

#bbpress-forums .bbp-breadcrumb {
  clear: both;
  float: none;
  padding: 10px 14px;
  margin-bottom: 10px;
  border: var(--bbp-border);
  border-radius: var(--bbp-radius);
  background: var(--bbp-header-glow);
}

#bbpress-forums .bbp-breadcrumb,
#bbpress-forums .bbp-breadcrumb p {
  color: var(--bbp-muted);
  font-size: 12px;
}

#bbpress-forums #bbp-search-form,
#bbpress-forums .bbp-search-form {
  padding: 12px 14px;
  border: var(--bbp-border);
  border-radius: var(--bbp-radius);
  background: var(--bbp-card);
}

/* Заголовки внутри форума */
#bbpress-forums h1,
#bbpress-forums h2,
#bbpress-forums h3,
#bbpress-forums h4 {
  color: #ffffff;
  font-weight: 700;
  letter-spacing: 0.02em;
}

#bbpress-forums div.bbp-forum-title h3,
#bbpress-forums div.bbp-topic-title h3 {
  margin: 0 0 4px;
  font-size: 15px;
}

#bbpress-forums div.bbp-topic-title h3 a,
#bbpress-forums div.bbp-forum-title h3 a {
  color: #ffffff;
}

#bbpress-forums div.bbp-topic-title h3 a:hover,
#bbpress-forums div.bbp-forum-title h3 a:hover {
  color: var(--bbp-gold);
}

#bbpress-forums input[type="text"],
#bbpress-forums input[type="search"],
#bbpress-forums input[type="password"],
#bbpress-forums select,
#bbpress-forums textarea {
  background: #1b1420;
  color: #f7efe3;
  border: 1px solid rgba(255, 159, 58, 0.35);
  border-radius: 10px;
  padding: 8px 10px;
}

#bbpress-forums .button,
#bbpress-forums button,
#bbpress-forums input[type="submit"] {
  background: linear-gradient(180deg, #ffd06a 0%, #ff7a3d 100%);
  color: #1b130d;
  border: 1px solid rgba(255, 159, 58, 0.55);
  border-radius: 10px;
  font-weight: 800;
  padding: 8px 14px;
}

/*
 * bbPress default CSS uses #bbpress-forums ul.bbp-* { border: 1px solid #eee } — выше
 * специфичности, чем #bbpress-forums .bbp-topics, из‑за этого «белая» рамка.
 */
#bbpress-forums ul.bbp-forums,
#bbpress-forums ul.bbp-topics,
#bbpress-forums ul.bbp-replies,
#bbpress-forums ul.bbp-search-results,
#bbpress-forums ul.bbp-lead-topic {
  border: 1px solid rgba(255, 255, 255, 0.07) !important;
  border-radius: var(--bbp-radius);
  overflow: hidden;
  background: var(--bbp-card);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.45);
}

#bbpress-forums li.bbp-header,
#bbpress-forums li.bbp-footer {
  background-color: var(--bbp-header);
  background-image: linear-gradient(180deg, rgba(255, 159, 58, 0.12), rgba(255, 159, 58, 0.02));
  border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
  color: #ffffff;
}

#bbpress-forums ul.bbp-topics > li.bbp-header:first-child,
#bbpress-forums ul.bbp-forums > li.bbp-header:first-child,
#bbpress-forums ul.bbp-search-results > li.bbp-header:first-child {
  border-top: none !important;
}

/* ---------- bbPress: страница поиска — карточки (без ложной «таблицы» Автор|Контент) ---------- */
#bbpress-forums.l2j-bbp-search-page ul.bbp-search-results.l2j-bbp-search-list > li.bbp-body {
  float: none !important;
  padding: 4px 0 0 !important;
  margin: 0 !important;
  background: transparent !important;
  border: none !important;
}

#bbpress-forums.l2j-bbp-search-page article.l2j-bbp-search-card {
  display: block;
  margin: 0 0 18px;
  border-radius: var(--bbp-radius-sm);
  border: var(--bbp-border);
  overflow: hidden;
  background: var(--bbp-surface-deep);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.32);
}

#bbpress-forums.l2j-bbp-search-page .l2j-bbp-search-card .bbp-topic-header,
#bbpress-forums.l2j-bbp-search-page .l2j-bbp-search-card .bbp-reply-header,
#bbpress-forums.l2j-bbp-search-page .l2j-bbp-search-card .bbp-forum-header {
  float: none !important;
  clear: both !important;
  width: 100% !important;
  box-sizing: border-box;
  margin: 0 !important;
  padding: 12px 16px 14px !important;
  border: none !important;
  border-top: none !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 0 !important;
  background: linear-gradient(180deg, rgba(38, 22, 36, 0.98) 0%, rgba(20, 12, 22, 0.96) 100%) !important;
}

#bbpress-forums.l2j-bbp-search-page .l2j-bbp-search-card .bbp-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 16px;
  width: 100%;
  margin: 0 0 10px !important;
  padding: 0 !important;
  color: var(--bbp-muted);
  font-size: 12px;
}

#bbpress-forums.l2j-bbp-search-page .l2j-bbp-search-card .bbp-meta a {
  color: var(--bbp-gold) !important;
  font-weight: 700;
  text-decoration: none;
}

#bbpress-forums.l2j-bbp-search-page .l2j-bbp-search-card .bbp-meta a:hover {
  text-decoration: underline;
}

#bbpress-forums.l2j-bbp-search-page .l2j-bbp-search-kind {
  color: var(--bbp-muted);
  font-weight: 600;
  margin-right: 4px;
}

#bbpress-forums.l2j-bbp-search-page .l2j-bbp-search-card .bbp-topic-title,
#bbpress-forums.l2j-bbp-search-page .l2j-bbp-search-card .bbp-reply-title,
#bbpress-forums.l2j-bbp-search-page .l2j-bbp-search-card .bbp-forum-title {
  margin: 0;
  padding: 0;
}

#bbpress-forums.l2j-bbp-search-page .l2j-bbp-search-card .bbp-topic-title h3,
#bbpress-forums.l2j-bbp-search-page .l2j-bbp-search-card .bbp-reply-title h3,
#bbpress-forums.l2j-bbp-search-page .l2j-bbp-search-card .bbp-forum-title h3 {
  margin: 0;
  color: var(--bbp-text);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
}

#bbpress-forums.l2j-bbp-search-page .l2j-bbp-search-card .bbp-topic-title h3 a,
#bbpress-forums.l2j-bbp-search-page .l2j-bbp-search-card .bbp-reply-title h3 a,
#bbpress-forums.l2j-bbp-search-page .l2j-bbp-search-card .bbp-forum-title h3 a {
  color: var(--bbp-gold);
}

#bbpress-forums.l2j-bbp-search-page .l2j-bbp-search-card .bbp-topic-title-meta {
  margin-top: 8px;
  font-size: 12px;
  color: var(--bbp-muted);
  line-height: 1.4;
}

/* Строка автор | текст — как ul.bbp-replies (170px + контент) */
#bbpress-forums.l2j-bbp-search-page .l2j-bbp-search-card > div[id^="post-"].bbp-topic,
#bbpress-forums.l2j-bbp-search-page .l2j-bbp-search-card > div[id^="post-"].bbp-reply {
  display: grid !important;
  grid-template-columns: 170px minmax(0, 1fr);
  align-items: stretch;
  float: none !important;
  clear: both !important;
  width: 100% !important;
  box-sizing: border-box;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: var(--bbp-surface) !important;
  overflow: hidden;
}

#bbpress-forums.l2j-bbp-search-page .l2j-bbp-search-card > div[id^="post-"].bbp-forum {
  display: block !important;
  float: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: var(--bbp-surface) !important;
  overflow: hidden;
}

#bbpress-forums.l2j-bbp-search-page .l2j-bbp-search-card > div[id^="post-"].bbp-forum > .bbp-forum-content {
  padding: 16px 18px !important;
  float: none !important;
  width: 100% !important;
  margin: 0 !important;
  color: var(--bbp-text);
}

#bbpress-forums.l2j-bbp-search-page .l2j-bbp-search-card div.bbp-topic-author,
#bbpress-forums.l2j-bbp-search-page .l2j-bbp-search-card div.bbp-reply-author {
  min-height: 0 !important;
  min-width: 0;
  padding: 14px 12px !important;
  margin: 0 !important;
  border-right: 1px solid rgba(255, 255, 255, 0.1) !important;
  align-self: stretch;
}

#bbpress-forums.l2j-bbp-search-page .l2j-bbp-search-card div.bbp-topic-content,
#bbpress-forums.l2j-bbp-search-page .l2j-bbp-search-card div.bbp-reply-content {
  min-height: 0 !important;
  min-width: 0;
  padding: 14px 18px !important;
  margin: 0 !important;
}

#bbpress-forums.l2j-bbp-search-page .bbp-pagination {
  margin: 16px 0;
  clear: both;
}

#bbpress-forums.l2j-bbp-search-page .l2j-bbp-search-empty {
  margin-top: 12px;
  border-radius: var(--bbp-radius);
  border: var(--bbp-border-accent);
  background: var(--bbp-card);
  padding: 14px 16px;
}

#bbpress-forums.l2j-bbp-search-page .l2j-bbp-search-empty ul,
#bbpress-forums.l2j-bbp-search-page .l2j-bbp-search-empty li {
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--bbp-gold-soft);
}

/* bbPress bbpress.css: even/odd #fff */
#bbpress-forums.l2j-bbp-search-page ul.bbp-search-results .l2j-bbp-search-card div.even,
#bbpress-forums.l2j-bbp-search-page ul.bbp-search-results .l2j-bbp-search-card div.odd,
#bbpress-forums.l2j-bbp-search-page ul.bbp-search-results .l2j-bbp-search-card ul.even,
#bbpress-forums.l2j-bbp-search-page ul.bbp-search-results .l2j-bbp-search-card ul.odd {
  background: transparent !important;
  background-color: transparent !important;
}

#bbpress-forums.l2j-bbp-search-page .l2j-bbp-search-card > div[id^="post-"].even,
#bbpress-forums.l2j-bbp-search-page .l2j-bbp-search-card > div[id^="post-"].odd,
#bbpress-forums.l2j-bbp-search-page .l2j-bbp-search-card > div[id^="post-"].bbp-topic,
#bbpress-forums.l2j-bbp-search-page .l2j-bbp-search-card > div[id^="post-"].bbp-reply,
#bbpress-forums.l2j-bbp-search-page .l2j-bbp-search-card > div[id^="post-"].bbp-forum {
  background: var(--bbp-surface) !important;
  background-color: var(--bbp-surface) !important;
  background-image: none !important;
}

#bbpress-forums.l2j-bbp-search-page .l2j-bbp-search-card div.bbp-topic-content,
#bbpress-forums.l2j-bbp-search-page .l2j-bbp-search-card div.bbp-reply-content,
#bbpress-forums.l2j-bbp-search-page .l2j-bbp-search-card .bbp-forum-content {
  background: transparent !important;
  background-color: transparent !important;
  color: var(--bbp-text) !important;
}

#bbpress-forums.l2j-bbp-search-page ul.bbp-search-results .entry-content,
#bbpress-forums.l2j-bbp-search-page ul.bbp-search-results .bbp-topic-content .entry-content,
#bbpress-forums.l2j-bbp-search-page ul.bbp-search-results .bbp-reply-content .entry-content {
  background: transparent !important;
  background-color: transparent !important;
  color: var(--bbp-text) !important;
}

#bbpress-forums.l2j-bbp-search-page .l2j-bbp-search-card .bbp-topic-content p,
#bbpress-forums.l2j-bbp-search-page .l2j-bbp-search-card .bbp-reply-content p,
#bbpress-forums.l2j-bbp-search-page .l2j-bbp-search-card .bbp-topic-content li,
#bbpress-forums.l2j-bbp-search-page .l2j-bbp-search-card .bbp-reply-content li,
#bbpress-forums.l2j-bbp-search-page .l2j-bbp-search-card .bbp-forum-content p {
  color: var(--bbp-text) !important;
}

#bbpress-forums.l2j-bbp-search-page .l2j-bbp-search-card .bbp-topic-content a,
#bbpress-forums.l2j-bbp-search-page .l2j-bbp-search-card .bbp-reply-content a,
#bbpress-forums.l2j-bbp-search-page .l2j-bbp-search-card .bbp-forum-content a {
  color: var(--bbp-gold) !important;
}

#bbpress-forums.l2j-bbp-search-page .l2j-bbp-search-card .bbp-author-name {
  color: var(--bbp-gold) !important;
}

#bbpress-forums.l2j-bbp-search-page .l2j-bbp-search-card .bbp-author-role {
  color: var(--bbp-muted) !important;
}

@media (max-width: 640px) {
  #bbpress-forums.l2j-bbp-search-page .l2j-bbp-search-card > div[id^="post-"].bbp-topic,
  #bbpress-forums.l2j-bbp-search-page .l2j-bbp-search-card > div[id^="post-"].bbp-reply {
    grid-template-columns: 1fr !important;
  }

  #bbpress-forums.l2j-bbp-search-page .l2j-bbp-search-card div.bbp-topic-author,
  #bbpress-forums.l2j-bbp-search-page .l2j-bbp-search-card div.bbp-reply-author {
    border-right: none !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
  }
}

#bbpress-forums li.bbp-body ul.forum,
#bbpress-forums li.bbp-body ul.topic,
#bbpress-forums li.bbp-body ul.reply {
  background: var(--bbp-surface);
  border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
}

#bbpress-forums .bbp-forums-list {
  border-left: 1px solid rgba(255, 255, 255, 0.08) !important;
}

/* bbPress: div.bbp-*-header { border-top: 1px solid #ddd } */
#bbpress-forums div.bbp-forum-header,
#bbpress-forums div.bbp-topic-header,
#bbpress-forums div.bbp-reply-header {
  border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
}

#bbpress-forums li.bbp-body ul:nth-child(even).forum,
#bbpress-forums li.bbp-body ul:nth-child(even).topic,
#bbpress-forums li.bbp-body ul:nth-child(even).reply {
  background: var(--bbp-surface-alt);
}

#bbpress-forums .bbp-forum-title,
#bbpress-forums .bbp-topic-permalink {
  font-weight: 700;
}

#bbpress-forums .bbp-forum-info .bbp-forum-content,
#bbpress-forums .bbp-topic-content,
#bbpress-forums .bbp-reply-content {
  color: var(--bbp-text);
}

#bbpress-forums .bbp-template-notice {
  color: var(--bbp-gold-soft);
}

#bbpress-forums .bbp-forum-info {
  width: 56%;
}

#bbpress-forums .bbp-forum-info .bbp-forum-content,
#bbpress-forums .bbp-topic-content {
  margin-top: 4px;
  font-size: 13px;
  opacity: 0.9;
}

#bbpress-forums .bbp-forum-title {
  font-size: 15px;
  letter-spacing: 0.1px;
}

#bbpress-forums .bbp-forum-freshness,
#bbpress-forums .bbp-topic-freshness {
  font-size: 12px;
  color: var(--bbp-muted);
}

#bbpress-forums li.bbp-body ul.forum {
  padding: 8px 0;
}

#bbpress-forums .bbp-forum-topic-count,
#bbpress-forums .bbp-forum-reply-count {
  font-weight: 700;
}

#bbpress-forums .bbp-template-notice,
#bbpress-forums div.indicator-hint {
  background: rgba(36, 20, 33, 0.95);
  border: var(--bbp-border-accent);
  color: var(--bbp-gold-soft);
  border-radius: var(--bbp-radius-sm);
}

#bbpress-forums p.bbp-topic-meta,
#bbpress-forums .bbp-topic-started-by,
#bbpress-forums .bbp-admin-links {
  color: var(--bbp-muted);
  font-size: 12px;
}

#bbpress-forums div.bbp-topic-tags,
#bbpress-forums .bbp-topic-tags {
  color: var(--bbp-muted);
}

#bbpress-forums .bbp-topic-freshness-author img,
#bbpress-forums .bbp-reply-author img {
  border-radius: 50%;
  border: 1px solid rgba(255, 159, 58, 0.4);
}

.bbp-forum-description-bottom {
  margin-top: 16px;
  padding: 12px 14px;
  border: var(--bbp-border);
  border-radius: var(--bbp-radius);
  background: var(--bbp-card);
  color: var(--bbp-muted);
  font-size: 12px;
}

.bbp-forum-description-bottom .bbp-template-notice,
.bbp-forum-description-bottom p {
  color: var(--bbp-muted);
  margin: 0;
}

.bbp-topic-create-trigger-wrap {
  margin-top: 10px;
  margin-bottom: 8px;
  display: flex;
  justify-content: flex-end;
}

.bbp-topic-create-trigger-wrap-top {
  margin-top: 6px;
  margin-bottom: 10px;
  justify-content: flex-end;
}

.bbp-topic-create-trigger-wrap .bbp-topic-create-trigger {
  min-width: 180px;
}

.bbp-topic-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.46);
  z-index: 9998;
}

.bbp-topic-modal {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(980px, 94vw);
  max-height: 88vh;
  overflow: auto;
  background: linear-gradient(180deg, #1b1119 0%, #140d17 100%);
  color: #ffffff;
  border-radius: 14px;
  border: 1px solid rgba(255, 159, 58, 0.28);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.38);
  z-index: 9999;
  padding: 18px;
}

.bbp-topic-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(255, 159, 58, 0.35);
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  cursor: pointer;
}

.bbp-topic-modal .bbp-form legend,
.bbp-topic-modal .bbp-form label,
.bbp-topic-modal .bbp-form p,
.bbp-topic-modal .bbp-template-notice,
.bbp-topic-modal .wp-editor-wrap {
  color: #ffffff;
}

.bbp-topic-modal #bbp_topic_title,
.bbp-topic-modal #bbp_topic_tags,
.bbp-topic-modal select,
.bbp-topic-modal textarea {
  background: #1b1420;
  color: #f7efe3;
  border: 1px solid rgba(255, 159, 58, 0.35);
  border-radius: 10px;
}

/* Unified style for nested forum/topic/reply pages */
#bbpress-forums .bbp-topic-header,
#bbpress-forums .bbp-reply-header,
#bbpress-forums .bbp-topic-title,
#bbpress-forums .bbp-reply-title,
#bbpress-forums .bbp-topic-content,
#bbpress-forums .bbp-reply-content {
  color: #ffffff;
}

/* Основной текст — без глобального !important (ломает иерархию muted / gold) */
#bbpress-forums p,
#bbpress-forums li,
#bbpress-forums label,
#bbpress-forums legend {
  color: var(--bbp-text);
}

#bbpress-forums .bbp-breadcrumb a,
#bbpress-forums .bbp-topic-freshness a,
#bbpress-forums .bbp-forum-freshness a,
#bbpress-forums .bbp-author-name,
#bbpress-forums .bbp-topic-meta a {
  color: var(--bbp-gold);
}

#bbpress-forums .bbp-breadcrumb a:hover,
#bbpress-forums .bbp-topic-freshness a:hover,
#bbpress-forums .bbp-forum-freshness a:hover,
#bbpress-forums .bbp-author-name:hover,
#bbpress-forums .bbp-topic-meta a:hover {
  color: #fff0d6;
}

#bbpress-forums .bbp-template-notice,
#bbpress-forums .bbp-template-notice p,
#bbpress-forums .bbp-template-notice li {
  color: var(--bbp-gold-soft);
}

#bbpress-forums .bbp-pagination,
#bbpress-forums .bbp-pagination-count,
#bbpress-forums .bbp-pagination-links {
  color: var(--bbp-muted);
}

#bbpress-forums .bbp-pagination-links a,
#bbpress-forums .bbp-pagination-links span {
  display: inline-block;
  min-width: 2rem;
  padding: 6px 10px;
  margin: 2px;
  text-align: center;
  border-radius: var(--bbp-radius-sm);
  border: var(--bbp-border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--bbp-gold-soft);
  font-weight: 600;
}

#bbpress-forums .bbp-pagination-links a:hover {
  background: rgba(255, 159, 58, 0.12);
  color: #ffffff;
  border-color: rgba(255, 159, 58, 0.4);
}

#bbpress-forums .bbp-pagination-links span.current {
  background: linear-gradient(180deg, #ffd06a 0%, #ff7a3d 100%);
  color: #1b130d;
  border-color: rgba(255, 159, 58, 0.55);
  font-weight: 800;
}

#bbpress-forums #subscription-toggle a,
#bbpress-forums #favorite-toggle a {
  color: var(--bbp-gold);
  font-weight: 600;
}

#bbpress-forums #subscription-toggle a:hover,
#bbpress-forums #favorite-toggle a:hover {
  color: #fff0d6;
}

#bbpress-forums .bbp-topic-content code,
#bbpress-forums .bbp-reply-content code,
#bbpress-forums .bbp-topic-content pre,
#bbpress-forums .bbp-reply-content pre {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 159, 58, 0.2);
  border-radius: 8px;
  color: var(--bbp-gold-soft);
}

#bbpress-forums .bbp-topic-content blockquote,
#bbpress-forums .bbp-reply-content blockquote {
  margin: 10px 0;
  padding: 10px 14px;
  border-left: 3px solid rgba(255, 159, 58, 0.45);
  background: rgba(255, 159, 58, 0.06);
  color: var(--bbp-text);
}

#bbpress-forums .bbp-topic-content a,
#bbpress-forums .bbp-reply-content a {
  color: var(--bbp-gold);
}

#bbpress-forums .bbp-topic-content a:hover,
#bbpress-forums .bbp-reply-content a:hover {
  color: #fff0d6;
}

#bbpress-forums .bbp-topic-form,
#bbpress-forums .bbp-reply-form {
  border: var(--bbp-border);
  border-radius: var(--bbp-radius);
  background: var(--bbp-card);
  padding: 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
}

#bbpress-forums .bbp-topic-form fieldset.bbp-form,
#bbpress-forums .bbp-reply-form fieldset.bbp-form {
  border-color: rgba(255, 159, 58, 0.2);
}

#bbpress-forums .bbp-topic-form legend,
#bbpress-forums .bbp-reply-form legend {
  color: #ffffff;
  font-weight: 700;
}

#bbpress-forums #bbp_reply_content,
#bbpress-forums #bbp_topic_content,
#bbpress-forums #bbp_reply_title,
#bbpress-forums #bbp_topic_title,
#bbpress-forums #bbp_topic_tags {
  background: #1b1420;
  color: #f7efe3;
  border: 1px solid rgba(255, 159, 58, 0.35);
  border-radius: 10px;
}

#bbpress-forums .wp-editor-container,
.bbp-topic-modal .wp-editor-container {
  border: var(--bbp-border);
  border-radius: var(--bbp-radius-sm);
  overflow: hidden;
  background: #140d17;
}

/* Quicktags (BBCode) toolbar — тёмная плашка + кнопки как на сайте */
#bbpress-forums .quicktags-toolbar,
.bbp-topic-modal .quicktags-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  margin: 0;
  background: linear-gradient(180deg, #1e1522 0%, #16101a 100%);
  border-bottom: 1px solid rgba(255, 159, 58, 0.18);
}

#bbpress-forums .quicktags-toolbar input.ed_button,
.bbp-topic-modal .quicktags-toolbar input.ed_button {
  margin: 0 !important;
  min-height: 30px;
  padding: 5px 11px !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border-radius: 8px !important;
  border: 1px solid rgba(255, 159, 58, 0.5) !important;
  background: linear-gradient(180deg, #ffd06a 0%, #ff7a3d 100%) !important;
  color: #1b130d !important;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

#bbpress-forums .quicktags-toolbar input.ed_button:hover,
.bbp-topic-modal .quicktags-toolbar input.ed_button:hover {
  filter: brightness(1.09);
  border-color: rgba(255, 210, 140, 0.75) !important;
  color: #0a0604 !important;
}

#bbpress-forums .quicktags-toolbar input.ed_button:active,
.bbp-topic-modal .quicktags-toolbar input.ed_button:active {
  filter: brightness(0.95);
  transform: translateY(1px);
}

/* Вкладки Visual / Text */
#bbpress-forums .wp-editor-tabs,
.bbp-topic-modal .wp-editor-tabs {
  background: #1a111d;
  border-bottom: 1px solid rgba(255, 159, 58, 0.2);
  padding: 4px 6px 0;
}

#bbpress-forums .wp-editor-tabs .switch-tmce,
#bbpress-forums .wp-editor-tabs .switch-html,
.bbp-topic-modal .wp-editor-tabs .switch-tmce,
.bbp-topic-modal .wp-editor-tabs .switch-html {
  color: var(--bbp-gold-soft) !important;
  border: 1px solid transparent;
  border-radius: 8px 8px 0 0;
  padding: 6px 12px !important;
  background: transparent !important;
}

#bbpress-forums .wp-editor-tabs .switch-tmce:hover,
#bbpress-forums .wp-editor-tabs .switch-html:hover,
.bbp-topic-modal .wp-editor-tabs .switch-tmce:hover,
.bbp-topic-modal .wp-editor-tabs .switch-html:hover {
  color: #ffffff !important;
  background: rgba(255, 159, 58, 0.1) !important;
}

#bbpress-forums .wp-editor-tabs .switch-tmce.active,
#bbpress-forums .wp-editor-tabs .switch-html.active,
.bbp-topic-modal .wp-editor-tabs .switch-tmce.active,
.bbp-topic-modal .wp-editor-tabs .switch-html.active {
  background: linear-gradient(180deg, #2a1f30 0%, #1e1522 100%) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 159, 58, 0.35);
  border-bottom-color: transparent;
}

#bbpress-forums .mce-toolbar .mce-btn button {
  color: #1b130d !important;
}

#bbpress-forums .mce-toolbar .mce-btn:hover button {
  color: #0a0604 !important;
}

#bbpress-forums .bbp-submit-wrapper .button.submit,
#bbpress-forums .bbp-topic-admin-links a,
#bbpress-forums .bbp-reply-admin-links a {
  background: linear-gradient(180deg, #ffd06a 0%, #ff7a3d 100%);
  color: #1b130d;
  border: 1px solid rgba(255, 159, 58, 0.55);
  border-radius: 10px;
  font-weight: 800;
  padding: 6px 12px;
}

/* Single topic/replies: рамка задана общим блоком ul.bbp-* выше */
#bbpress-forums ul.bbp-replies {
  border-radius: var(--bbp-radius);
  overflow: hidden;
}

#bbpress-forums ul.bbp-replies li.bbp-header {
  background: #2a1728 !important;
  color: #ffffff !important;
  border-color: rgba(255, 159, 58, 0.22) !important;
}

#bbpress-forums ul.bbp-replies li.bbp-body {
  background: #140d17 !important;
}

#bbpress-forums .bbp-replies .bbp-reply-header {
  background: #211221 !important;
  border-top: 1px solid rgba(255, 255, 255, 0.04) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04) !important;
  color: #ffffff !important;
}

#bbpress-forums .bbp-replies .bbp-reply-author,
#bbpress-forums .bbp-replies .bbp-reply-content {
  background: #170f1a !important;
  color: #ffffff !important;
}

#bbpress-forums .bbp-replies .bbp-reply-author {
  border-right: 1px solid rgba(255, 255, 255, 0.06) !important;
}

#bbpress-forums .bbp-replies .bbp-reply-author .bbp-author-name,
#bbpress-forums .bbp-replies .bbp-reply-author .bbp-author-role {
  color: #f1d9b5 !important;
}

#bbpress-forums .bbp-reply-content p {
  color: #ffffff !important;
}

#bbpress-forums .bbp-reply-post-date,
#bbpress-forums .bbp-reply-permalink,
#bbpress-forums .bbp-topic-permalink {
  color: #f1d9b5 !important;
}

#bbpress-forums .bbp-reply-header .bbp-admin-links a {
  color: #ffd8a0 !important;
}

/* Force clean two columns: Author | Post */
#bbpress-forums ul.bbp-replies li.bbp-header .bbp-reply-author {
  width: 170px !important;
}

#bbpress-forums ul.bbp-replies li.bbp-header .bbp-reply-content {
  margin-left: 170px !important;
}

#bbpress-forums ul.bbp-replies li.bbp-body div.hentry {
  display: grid !important;
  grid-template-columns: 170px 1fr;
  border-top: 1px solid rgba(255, 255, 255, 0.05) !important;
  background: #170f1a !important;
}

#bbpress-forums ul.bbp-replies li.bbp-body div.hentry:nth-child(even) {
  background: #1a111d !important;
}

/* Remove duplicated/empty footer bar on thread pages */
#bbpress-forums.bbp-view-topic ul.bbp-replies > li.bbp-header,
#bbpress-forums.single-topic ul.bbp-replies > li.bbp-header,
.single-topic #bbpress-forums ul.bbp-replies > li.bbp-header {
  display: none !important;
}

/* Remove duplicated/empty footer bar on thread pages */
#bbpress-forums ul.bbp-replies > li.bbp-footer {
  display: none !important;
}

#bbpress-forums div.bbp-reply-author,
#bbpress-forums div.bbp-topic-author {
  grid-column: 1;
  width: auto !important;
  min-height: 130px;
  padding: 14px 10px !important;
  border-right: 1px solid rgba(255, 255, 255, 0.08) !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

#bbpress-forums div.bbp-reply-content,
#bbpress-forums div.bbp-topic-content {
  grid-column: 2;
  margin-left: 0 !important;
  min-height: 130px;
  padding: 14px 16px !important;
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
}

/* Safety: hide accidental empty block generated by plugin/theme conflicts */
#bbpress-forums ul.bbp-replies li.bbp-body > div:empty {
  display: none !important;
}

#bbpress-forums .l2j-bbp-notice-bottom {
  margin-top: 14px;
}

#bbpress-forums div.bbp-reply-author img.avatar,
#bbpress-forums div.bbp-topic-author img.avatar {
  border: 1px solid rgba(255, 159, 58, 0.35) !important;
  border-radius: 50% !important;
  margin-bottom: 8px;
}

#bbpress-forums .bbp-reply-header,
#bbpress-forums .bbp-topic-header {
  padding: 8px 12px !important;
}

/* Forum hero header */
/* bbPress floats .bbp-breadcrumb left; hero must clear floats or it sits beside crumbs */
#bbpress-forums .forum-hero {
  clear: both;
  width: 100%;
  max-width: 100%;
  float: none;
  display: block;
  box-sizing: border-box;
  border-radius: var(--bbp-radius);
  border: var(--bbp-border);
}

/* First block in forum wrapper: sits under site header; crumbs go below banner */
#bbpress-forums > .forum-hero:first-child {
  margin-top: 0;
}

/* Subscribe / favorite: separate row under crumbs (stock float:right stuck beside Create Topic) */
#bbpress-forums #subscription-toggle,
#bbpress-forums #favorite-toggle {
  float: none;
  clear: both;
  display: block;
  width: 100%;
  text-align: right;
  margin: 6px 0 14px;
  box-sizing: border-box;
}

.forum-hero {
  position: relative;
  margin: 8px 0 14px;
  border: 1px solid rgba(255, 159, 58, 0.22);
  border-radius: 12px;
  overflow: hidden;
  background:
    linear-gradient(110deg, rgba(8, 5, 8, 0.66) 0%, rgba(22, 11, 10, 0.52) 45%, rgba(9, 6, 10, 0.66) 100%),
    url('assets/images/forum-hero-war-council.png') center 28% / cover no-repeat,
    radial-gradient(circle at 18% 22%, rgba(255, 170, 78, 0.36), transparent 38%),
    radial-gradient(circle at 82% 76%, rgba(130, 54, 40, 0.28), transparent 42%),
    linear-gradient(120deg, #1a0f16 0%, #2a1513 52%, #170f1a 100%);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.34), inset 0 0 0 1px rgba(255, 159, 58, 0.08);
}

.forum-hero-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.08) 0%, rgba(0, 0, 0, 0.42) 100%);
}

.forum-hero-content {
  position: relative;
  z-index: 2;
  padding: 20px 22px;
  min-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.forum-hero-kicker {
  color: #ffd8a0;
  font-size: 12px;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  font-weight: 700;
  opacity: 0.92;
}

.forum-hero-title {
  margin: 4px 0 6px;
  color: #ffffff;
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.12;
  text-shadow: 0 6px 22px rgba(255, 159, 58, 0.32);
}

.forum-hero-subtitle {
  margin: 0;
  color: #f1d9b5;
  font-size: 14px;
  max-width: 760px;
}

/* Поиск по форуму: главная /forums/, разделы, темы */
.l2j-forum-search-toolbar {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 159, 58, 0.22);
  background: linear-gradient(145deg, rgba(18, 12, 20, 0.92) 0%, rgba(10, 8, 14, 0.88) 100%);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25), inset 0 0 0 1px rgba(255, 159, 58, 0.06);
  box-sizing: border-box;
}

.l2j-forum-search-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: stretch;
  margin: 0;
}

.l2j-forum-search-form input[type="search"],
.l2j-forum-search-form input[type="text"] {
  flex: 1 1 220px;
  min-width: 0;
  margin: 0;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255, 159, 58, 0.28);
  background: rgba(0, 0, 0, 0.35);
  color: #f5e6d6;
  font-size: 14px;
}

.l2j-forum-search-form input[type="search"]::placeholder,
.l2j-forum-search-form input[type="text"]::placeholder {
  color: rgba(241, 217, 181, 0.45);
}

.l2j-forum-search-submit {
  flex: 0 0 auto;
  margin: 0;
  padding: 10px 20px;
  white-space: nowrap;
}

#bbpress-forums .l2j-forum-search-toolbar {
  clear: both;
  float: none;
  width: 100%;
  max-width: 100%;
}

/* Custom forum index cards (requested layout) */
.forum-shell {
  display: grid;
  gap: 16px;
  margin-top: 6px;
}

.forum-card {
  border: 1px solid rgba(255, 159, 58, 0.22);
  border-radius: 12px;
  background: linear-gradient(180deg, #1b1119 0%, #140d17 100%);
  overflow: hidden;
}

.forum-card-title {
  margin: 0;
  padding: 10px 14px;
  font-size: 16px;
  border-bottom: 1px solid rgba(255, 159, 58, 0.2);
  background: linear-gradient(180deg, rgba(255, 159, 58, 0.10), rgba(255, 159, 58, 0.02));
  color: #ffffff;
}

.forum-card-link {
  color: #ffd8a0;
}

.forum-card-link:hover {
  color: #ffe5b8;
  text-decoration: underline;
}

.forum-list {
  display: grid;
}

.forum-row {
  display: grid;
  grid-template-columns: 1fr 170px 260px;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.forum-row:first-child {
  border-top: none;
}

.forum-row:nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}

.forum-main {
  min-width: 0;
}

.forum-link {
  display: inline-block;
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 2px;
}

.forum-sub {
  color: #ffffff;
  font-size: 12px;
  opacity: 0.86;
}

.forum-meta {
  display: grid;
  gap: 3px;
  color: #ffffff;
  font-size: 12px;
  opacity: 0.92;
}

.forum-meta b {
  color: #ffd8a0;
  font-size: 14px;
}

.forum-meta span {
  color: #f1d9b5;
}

.forum-last a {
  color: #ffd8a0;
  font-size: 13px;
  line-height: 1.35;
}

@media (max-width: 980px) {
  .forum-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
  min-height: 40px;
  width: 150px;
  position: relative;
  overflow: visible;
}

.brand-logo {
  display: block;
  position: absolute;
  left: -34px;
  top: -74px;
  height: 172px;
  width: auto;
  max-width: none;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(255, 170, 70, 0.25));
  pointer-events: none;
}

.main-nav > ul,
.main-nav .header-nav-cluster .header-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 18px;
}

.main-nav .header-menu a:not(.nav-pill):not(.lang-link) {
  color: #f3ddbb;
  font-size: 14px;
  font-weight: 600;
  opacity: 0.92;
}

.main-nav .header-menu a:not(.nav-pill):not(.lang-link):hover {
  opacity: 1;
  text-shadow: 0 0 12px rgba(255, 159, 58, 0.38), 0 0 16px rgba(255, 204, 102, 0.18);
}

/* WP primary menu: same as text links unless pill */
.main-nav > ul.header-menu--wp > li > a {
  color: #f3ddbb;
  font-size: 14px;
  font-weight: 600;
  opacity: 0.92;
}

.main-nav > ul.header-menu--wp > li > a:hover {
  opacity: 1;
  text-shadow: 0 0 12px rgba(255, 159, 58, 0.38), 0 0 16px rgba(255, 204, 102, 0.18);
}

.lang-link {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.hero {
  margin-top: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 16%, rgba(255, 159, 58, 0.14), transparent 34%),
    #120a18;
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.36);
  position: relative;
}

.inner-mini-hero {
  --mini-pan-x: 0px;
  --mini-pan-y: 0px;
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(90deg, rgba(7, 10, 19, 0.84) 0%, rgba(7, 10, 19, 0.50) 56%, rgba(7, 10, 19, 0.78) 100%);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.26);
  position: relative;
  min-height: 256px;
}

.inner-mini-hero::before {
  content: "";
  position: absolute;
  inset: -7%;
  z-index: 0;
  background: url("./assets/inner-mini-hero.png") center 58%/cover no-repeat;
  transform: translate3d(var(--mini-pan-x), var(--mini-pan-y), 0);
  transition: transform 0.18s ease-out;
  will-change: transform;
  filter: brightness(0.72) saturate(0.9);
}

.inner-mini-hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 18%, rgba(255, 159, 58, 0.08), transparent 44%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.24) 0%, rgba(0, 0, 0, 0.50) 100%);
}

/* Decorative only: no text overlay in inner mini hero. */

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(130deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0.01) 28%, transparent 38%);
}

.hero-inner {
  min-height: 460px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  position: relative;
  align-items: stretch;
}

.hero-copy {
  position: relative;
  z-index: 2;
  padding: 52px;
  padding-right: 64px;
  /* Fade into art column (overlap below) */
  background: linear-gradient(
    90deg,
    rgba(7, 10, 19, 0.98) 0%,
    rgba(7, 10, 19, 0.95) 46%,
    rgba(7, 10, 19, 0.84) 72%,
    rgba(7, 10, 19, 0.45) 90%,
    rgba(7, 10, 19, 0) 100%
  );
}

.hero-kicker {
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.hero h1 {
  margin: 8px 0 10px;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.12;
  letter-spacing: 0.4px;
  text-shadow: 0 6px 26px rgba(255, 159, 58, 0.22);
}

.hero p {
  margin: 0;
  color: var(--muted);
  max-width: 620px;
}

.hero-metrics {
  margin-top: 18px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.metric-pill {
  min-height: 48px;
  border: 1px solid rgba(255, 159, 58, 0.40);
  border-radius: 12px;
  background:
    radial-gradient(circle at 25% 10%, rgba(255, 159, 58, 0.14), transparent 55%),
    linear-gradient(180deg, rgba(25, 39, 71, 0.86) 0%, rgba(18, 29, 54, 0.82) 100%);
  padding: 8px 12px;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
}

.metric-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: #bdeeff;
}

.metric-pill b {
  font-size: 16px;
  letter-spacing: 0.2px;
}

.metric-pill--status {
  text-decoration: none;
  transition: filter 0.15s ease, transform 0.15s ease;
}

.metric-pill--status:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.metric-pill--status.is-online {
  border-color: rgba(120, 200, 140, 0.45);
  background:
    radial-gradient(circle at 25% 10%, rgba(140, 220, 160, 0.18), transparent 55%),
    linear-gradient(180deg, rgba(20, 48, 28, 0.78) 0%, rgba(14, 37, 22, 0.82) 100%);
}

.metric-pill--status.is-online .metric-label {
  color: #c8f5c4;
}

.metric-pill--status.is-online b {
  color: #b8ffb0;
}

.metric-pill--status.is-offline {
  border-color: rgba(220, 90, 90, 0.45);
  background:
    radial-gradient(circle at 25% 10%, rgba(240, 110, 110, 0.15), transparent 55%),
    linear-gradient(180deg, rgba(58, 18, 24, 0.8) 0%, rgba(40, 13, 18, 0.84) 100%);
}

.metric-pill--status.is-offline .metric-label {
  color: #ffb6b6;
}

.metric-pill--status.is-offline b {
  color: #ffd0d0;
  font-size: 14px;
}

.hero-actions {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 11px;
  border: 1px solid transparent;
  font-weight: 700;
  font-size: 14px;
  transition: transform 0.18s ease, box-shadow 0.22s ease, filter 0.2s ease;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: linear-gradient(180deg, #ffd06a 0%, #ff7a3d 100%);
  color: #041224;
  box-shadow: 0 8px 22px rgba(255, 159, 58, 0.36);
  border-color: rgba(255, 159, 58, 0.42);
}
.btn-primary::after,
.btn-ghost::after {
  content: "";
  position: absolute;
  top: -40%;
  left: -120%;
  width: 70%;
  height: 180%;
  transform: rotate(20deg);
  background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,0.24), rgba(255,255,255,0));
  transition: left 0.55s ease;
}
.btn-primary:hover::after,
.btn-ghost:hover::after {
  left: 140%;
}

.btn-primary:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(255, 159, 58, 0.52);
}

.btn-ghost {
  border-color: rgba(255, 159, 58, 0.35);
  background: rgba(19, 33, 58, 0.55);
  color: #ffe7c5;
}

.btn-ghost:hover {
  border-color: rgba(255, 159, 58, 0.35);
  background: rgba(29, 47, 81, 0.82);
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(255, 159, 58, 0.18);
}

.hero-inner .hero-art {
  position: relative;
  z-index: 1;
  margin-left: -84px;
  width: calc(100% + 84px);
  min-height: 100%;
  background-color: #160e13;
  /* Image + soft fade from left (meets hero-copy gradient) */
  background-image:
    linear-gradient(
      90deg,
      rgba(10, 7, 15, 0.90) 0%,
      rgba(10, 7, 15, 0.62) 20%,
      rgba(10, 7, 15, 0.28) 42%,
      transparent 62%
    ),
    var(--l2j-hero-art-image, url("./assets/ref-art.png"));
  background-position: center, center 24%;
  background-size: cover, cover;
  background-repeat: no-repeat;
  will-change: transform;
}

.section {
  margin-top: 24px;
}

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

.card {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--card) 0%, #1a0f1e 100%);
  border-radius: var(--radius);
  padding: 18px;
  transition: transform 0.18s ease, border-color 0.2s ease, box-shadow 0.22s ease;
}
.card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 159, 58, 0.45);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
}

.card h3 {
  margin: 0 0 8px;
  font-size: 17px;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.card-inner {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: 0;
}

.card--spotlight {
  position: relative;
  padding-left: 20px;
  border-left: 3px solid rgba(255, 184, 77, 0.85);
  background:
    linear-gradient(135deg, rgba(255, 159, 58, 0.07) 0%, transparent 42%),
    linear-gradient(180deg, #24182c 0%, #140d18 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.card--spotlight:hover {
  border-left-color: rgba(255, 200, 120, 0.95);
  border-color: rgba(255, 159, 58, 0.5);
}

.card-spotlight-icon {
  font-size: 2rem;
  line-height: 1;
  margin-bottom: 10px;
  filter: drop-shadow(0 2px 8px rgba(255, 159, 58, 0.25));
}

.card-spotlight-link {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  margin-top: 14px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #ffb84d;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 184, 77, 0.35);
  transition: color 0.15s ease, border-color 0.15s ease;
}

.card-spotlight-link:hover {
  color: #ffd08a;
  border-bottom-color: rgba(255, 208, 138, 0.55);
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.banner {
  min-height: 240px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
}
.banner:hover {
  border-color: rgba(255, 159, 58, 0.45);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.25);
}

.banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(7, 10, 19, 0.55) 0%, rgba(7, 10, 19, 0.22) 100%);
}

.banner.features::after,
.banner.news::after {
  background: linear-gradient(90deg, rgba(7, 10, 19, 0.62) 0%, rgba(7, 10, 19, 0.20) 58%, rgba(7, 10, 19, 0.38) 100%);
}

.banner.donate::after {
  background: linear-gradient(90deg, rgba(7, 10, 19, 0.70) 0%, rgba(7, 10, 19, 0.22) 58%, rgba(7, 10, 19, 0.45) 100%);
}

.banner-content {
  position: absolute;
  inset: 0;
  z-index: 2;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.banner h3 {
  margin: 0 0 6px;
  font-size: 23px;
}

.banner p {
  margin: 0;
  color: var(--muted);
}

.banner.features,
.banner.news {
  background:
    linear-gradient(90deg, rgba(7, 10, 19, 0.82) 0%, rgba(7, 10, 19, 0.30) 55%, rgba(7, 10, 19, 0.78) 100%),
    url("./assets/ref-art.png") 70% 18%/cover no-repeat;
}

a.banner {
  display: block;
  text-decoration: none;
  color: inherit;
}

a.banner:hover .banner-content h3 {
  color: #ffe4b8;
}
.banner.donate {
  background:
    linear-gradient(90deg, rgba(7, 10, 19, 0.88) 0%, rgba(7, 10, 19, 0.28) 55%, rgba(7, 10, 19, 0.84) 100%),
    url("./assets/ref-art.png") 28% 78%/cover no-repeat;
}

.content-shell {
  margin-top: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #1a0f22 0%, #120a18 100%);
  padding: 22px;
}

/* Страница «О сервере» (page-about-ru.php) */
.l2j-about-page {
  padding: 28px 24px 32px;
}

.l2j-about-hero {
  margin: 0 0 28px;
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(255, 159, 58, 0.15);
}

.l2j-about-title {
  margin: 0 0 12px;
  font-size: clamp(1.55rem, 2.5vw, 2rem);
  line-height: 1.2;
  color: var(--primary-2);
  text-shadow: 0 0 24px rgba(255, 179, 71, 0.2);
}

.l2j-about-lead {
  margin: 0;
  max-width: 52rem;
  font-size: 15px;
  line-height: 1.65;
  color: var(--muted);
}

/* «О сервере»: masonry через about-masonry.js */
.l2j-about-masonry {
  position: relative;
  width: 100%;
}

/* до/без JS и на узком экране — обычная колонка (masonry.js) */
.l2j-about-masonry > .l2j-about-card {
  margin-bottom: 18px;
}

.l2j-about-masonry > .l2j-about-card:last-child {
  margin-bottom: 0;
}

.l2j-about-masonry--stack > .l2j-about-card {
  margin-bottom: 18px;
}

.l2j-about-masonry--stack > .l2j-about-card:last-child {
  margin-bottom: 0;
}

/* Fallback: простая сетка, если где-то остался старый класс */
.l2j-about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 18px;
}

.l2j-about-card {
  margin: 0;
  padding: 18px 20px;
  border-radius: var(--radius);
  border: 1px solid rgba(58, 37, 63, 0.85);
  background: linear-gradient(165deg, rgba(36, 17, 31, 0.95) 0%, rgba(15, 10, 22, 0.88) 100%);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.25);
}

.l2j-about-card--accent {
  border-color: rgba(255, 159, 58, 0.35);
  background: linear-gradient(165deg, rgba(45, 22, 28, 0.95) 0%, rgba(20, 12, 22, 0.92) 100%);
}

.l2j-about-card h2 {
  margin: 0 0 10px;
  font-size: 1.08rem;
  color: #ffd4a8;
  letter-spacing: 0.02em;
}

.l2j-about-card p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
  opacity: 0.92;
}

.l2j-about-card p + p {
  margin-top: 10px;
}

.l2j-about-card code {
  font-size: 0.92em;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 159, 58, 0.2);
}

.l2j-about-list {
  margin: 0;
  padding-left: 1.15rem;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
  opacity: 0.92;
}

.l2j-about-list li {
  margin-bottom: 8px;
}

.l2j-about-list li:last-child {
  margin-bottom: 0;
}

.l2j-about-list--rates {
  margin-top: 10px;
}

.l2j-about-note {
  margin: 12px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
  opacity: 0.95;
}

.l2j-about-editor {
  margin-top: 22px;
}

.l2j-about-editor .entry-content {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
}

.l2j-about-editor .entry-content p:first-child {
  margin-top: 0;
}

.l2j-donate-actions {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.l2j-donate-actions--bottom {
  margin-top: 18px;
  padding-top: 6px;
}

.l2j-donate-rules-btn {
  border-color: rgba(255, 159, 58, 0.72) !important;
  color: #ffe5bf !important;
  background: linear-gradient(180deg, rgba(74, 45, 14, 0.55) 0%, rgba(48, 29, 10, 0.58) 100%);
  box-shadow: 0 0 0 1px rgba(255, 159, 58, 0.25), 0 0 18px rgba(255, 159, 58, 0.18);
}

.l2j-donate-rules-btn:hover {
  color: #fff4df !important;
  border-color: rgba(255, 190, 96, 0.88) !important;
  box-shadow: 0 0 0 1px rgba(255, 190, 96, 0.38), 0 0 22px rgba(255, 190, 96, 0.24);
}

.l2j-donate-col-warning {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(224, 92, 92, 0.55);
  background: linear-gradient(180deg, rgba(66, 20, 26, 0.52) 0%, rgba(44, 15, 20, 0.56) 100%);
  color: #ffd0d0 !important;
  box-shadow: inset 0 0 0 1px rgba(255, 120, 120, 0.08);
}

.l2j-donate-col-warning strong {
  color: #ffdede;
}

.l2j-about-manifesto {
  text-align: center;
}

.l2j-about-manifesto .entry-content {
  max-width: 46rem;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.l2j-about-manifesto .entry-content p {
  margin-bottom: 1.05em;
  text-align: center;
}

.l2j-about-manifesto .entry-content p:last-child {
  margin-bottom: 0;
}

.news-feed-page h1 {
  margin-top: 0;
}

.news-flash {
  margin: 0 0 18px;
  padding: 14px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  line-height: 1.45;
}

.news-flash--ok {
  border: 1px solid rgba(46, 204, 113, 0.45);
  background: rgba(23, 35, 24, 0.92);
  color: #c8f0d0;
}

.news-flash--err {
  border: 1px solid rgba(231, 76, 60, 0.45);
  background: rgba(35, 27, 27, 0.92);
  color: #f0c8c4;
}

.news-flash a {
  color: #ffd8a0;
  text-decoration: underline;
}

.news-compose-launch {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 0 0 22px;
}

.news-compose-launch .btn {
  min-width: 240px;
  justify-content: center;
  text-align: center;
}

.l2j-news-modal-root {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10050;
  align-items: center;
  justify-content: center;
  padding: min(4vw, 20px);
  box-sizing: border-box;
}

.l2j-news-modal-root.is-open {
  display: flex;
}

.l2j-news-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 8, 16, 0.75);
  backdrop-filter: blur(8px);
}

.l2j-news-modal {
  position: relative;
  z-index: 1;
  width: min(640px, 100%);
  max-height: min(88vh, 860px);
  overflow: auto;
  margin: auto;
  padding: 48px 22px 22px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 159, 58, 0.28);
  background:
    linear-gradient(145deg, rgba(255, 159, 58, 0.1) 0%, transparent 42%),
    linear-gradient(180deg, rgba(19, 33, 58, 0.94) 0%, rgba(10, 14, 26, 0.98) 100%);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.5);
  -webkit-overflow-scrolling: touch;
}

.l2j-news-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid rgba(39, 50, 82, 0.9);
  background: rgba(6, 10, 20, 0.9);
  color: #f3ddbb;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s, color 0.15s;
}

.l2j-news-modal-close:hover {
  border-color: rgba(255, 159, 58, 0.45);
  color: #ffe4b8;
}

body.l2j-news-modal-open {
  overflow: hidden;
}

.news-compose-head {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(39, 50, 82, 0.85);
}

.news-compose-kicker {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 159, 58, 0.85);
  margin-bottom: 6px;
}

.news-compose-title {
  margin: 0 0 10px;
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  color: #f3ddbb;
  letter-spacing: 0.02em;
}

.news-compose-sub {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

.news-compose-sub a {
  color: #ffd8a0;
}

.news-compose-sub a:hover {
  color: #ffe4b8;
}

.l2j-news-form-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.l2j-news-field--full {
  width: 100%;
}

.l2j-news-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #e8d9c4;
  margin-bottom: 8px;
}

.l2j-news-optional {
  font-weight: 500;
  color: var(--muted);
}

.l2j-news-input,
.l2j-news-textarea {
  width: 100%;
  box-sizing: border-box;
  background: rgba(6, 10, 20, 0.72);
  border: 1px solid rgba(39, 50, 82, 0.95);
  color: var(--text);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 14px;
  font-family: inherit;
  line-height: 1.45;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.l2j-news-textarea {
  min-height: 160px;
  resize: vertical;
}

.l2j-news-input::placeholder,
.l2j-news-textarea::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.l2j-news-input:focus,
.l2j-news-textarea:focus {
  border-color: rgba(255, 159, 58, 0.45);
  box-shadow: 0 0 0 3px rgba(255, 159, 58, 0.12);
}

.l2j-news-hint {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.l2j-news-hint code {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--line);
  color: #d4c4a8;
}

.l2j-news-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(39, 50, 82, 0.65);
}

.l2j-news-actions .btn {
  min-height: 44px;
  padding-left: 20px;
  padding-right: 20px;
  min-width: 190px;
  justify-content: center;
  text-align: center;
}

.news-admin-hint {
  margin: 0 0 18px;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 159, 58, 0.28);
  background: rgba(19, 33, 58, 0.45);
  font-size: 14px;
  line-height: 1.45;
  color: var(--muted);
}

.news-admin-hint p {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 14px;
}

.news-admin-hint-text strong {
  color: #f3ddbb;
}

.news-page-intro {
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
}

.news-feed-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.news-feed-item {
  margin: 0;
  padding: 0 0 18px;
  border-bottom: 1px solid rgba(39, 50, 82, 0.65);
}

.news-feed-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.news-feed-date {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}

.news-feed-title {
  margin: 0 0 8px;
  font-size: 1.25rem;
  line-height: 1.3;
  color: #f3ddbb;
}

.news-feed-lead {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.news-feed-lead p {
  margin: 0 0 8px;
}

.news-feed-lead p:last-child {
  margin-bottom: 0;
}

.news-feed-item.is-expanded .news-feed-lead {
  display: none;
}

.news-feed-body {
  margin-top: 0;
  padding-top: 4px;
}

.news-feed-body-inner {
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.news-feed-body-inner > *:first-child {
  margin-top: 0;
}

.news-feed-body-inner h1,
.news-feed-body-inner h2,
.news-feed-body-inner h3,
.news-feed-body-inner h4 {
  font-size: 1.2rem;
  line-height: 1.35;
  margin: 0 0 8px;
}

.news-feed-body-inner table {
  display: block;
  width: 100%;
  overflow-x: auto;
}

.news-feed-item .news-toggle {
  margin-top: 12px;
}

.news-item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  margin-top: 12px;
  align-items: stretch;
  justify-content: flex-start;
}

.news-item-actions .l2j-news-delete-form {
  margin: 0;
  display: inline-flex;
  align-items: stretch;
}

.news-item-actions .btn {
  margin: 0 !important;
  width: 188px !important;
  min-width: 188px !important;
  max-width: 188px !important;
  height: 44px;
  min-height: 44px;
  box-sizing: border-box;
  white-space: nowrap;
  justify-content: center !important;
  text-align: center !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.news-item-actions .l2j-news-delete-btn {
  color: rgba(255, 150, 140, 0.95) !important;
  border-color: rgba(255, 120, 100, 0.35) !important;
}

.news-item-actions .btn:hover {
  transform: none !important;
}

@media (max-width: 560px) {
  .news-item-actions { width: 100%; }
  .news-item-actions .btn,
  .news-item-actions .l2j-news-delete-form {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
  }
  .news-item-actions .l2j-news-delete-form .btn {
    width: 100% !important;
  }
}

.news-feed-empty {
  color: var(--muted);
  margin: 0;
}

.news-feed-pagination {
  margin-top: 24px;
}

.news-feed-pagination ul.page-numbers {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
}

.news-feed-pagination ul.page-numbers li {
  margin: 0;
}

.news-feed-pagination ul.page-numbers a,
.news-feed-pagination ul.page-numbers span {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  color: #f3ddbb;
  font-size: 13px;
}

.news-feed-pagination a:hover {
  border-color: rgba(255, 159, 58, 0.45);
  color: #ffe4b8;
}

.news-feed-pagination span.current {
  background: rgba(255, 159, 58, 0.15);
  border-color: rgba(255, 159, 58, 0.4);
}

.section-title {
  margin: 0 0 10px;
  font-size: clamp(20px, 2vw, 28px);
  line-height: 1.2;
  letter-spacing: 0.4px;
  text-shadow: 0 4px 18px rgba(75, 139, 228, 0.2);
}
.section-subtitle {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
}

.servers-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.server-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  background: linear-gradient(180deg, var(--card-2) 0%, #121a2f 100%);
  transition: transform 0.18s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.server-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 159, 58, 0.50);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24);
}
.server-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.server-icon {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  border: 1px solid rgba(255, 159, 58, 0.40);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  margin-right: 8px;
  color: #fff2df;
  background: rgba(255, 159, 58, 0.14);
  box-shadow: inset 0 0 12px rgba(255, 159, 58, 0.14);
}
.server-rate {
  font-size: 20px;
  font-weight: 800;
}
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 23px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.4px;
}
.badge-new {
  background: rgba(255, 159, 58, 0.18);
  color: #ffe4b8;
  border: 1px solid rgba(255, 159, 58, 0.40);
}
.badge-old {
  background: rgba(255, 159, 58, 0.18);
  color: #ffd8a8;
  border: 1px solid rgba(255, 159, 58, 0.40);
}
.online {
  color: #f0dfc2;
  font-size: 13px;
}
.online b { color: #fff; }

.split-wide {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 14px;
}
.table-card,
.news-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  background: linear-gradient(180deg, #1f0f22 0%, #140a18 100%);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}
.mini-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.mini-table th,
.mini-table td {
  padding: 10px 8px;
  border-bottom: 1px solid rgba(50, 66, 103, 0.6);
  text-align: left;
}
.mini-table th {
  color: #f0dfc2;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.mini-table tr:last-child td { border-bottom: none; }
.mini-table tr:hover td {
  background: rgba(53, 85, 142, 0.16);
}
.news-item {
  padding: 10px 0;
  border-bottom: 1px solid rgba(50, 66, 103, 0.6);
}
.news-item:last-child { border-bottom: none; }
.news-date {
  font-size: 12px;
  color: #d9b989;
}

.download-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 85% 5%, rgba(255, 159, 58, 0.14), transparent 33%),
    linear-gradient(180deg, #24101f 0%, #180a1a 100%);
  padding: 18px;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.2);
}

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

.download-card {
  display: block;
  border: 1px solid rgba(255, 159, 58, 0.25);
  border-radius: 12px;
  background: linear-gradient(180deg, #2a1422 0%, #1d0f1c 100%);
  padding: 16px;
  color: #fff2df;
  position: relative;
  overflow: hidden;
  transition: transform 0.18s ease, border-color 0.22s ease, box-shadow 0.22s ease, background 0.2s ease;
}

.download-card::after {
  content: "";
  position: absolute;
  inset: auto -35% -45% auto;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 159, 58, 0.18) 0%, rgba(255, 159, 58, 0) 70%);
  pointer-events: none;
}

.download-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 159, 58, 0.55);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.26);
  background: linear-gradient(180deg, #1a2a49 0%, #14203a 100%);
}

.download-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(255, 159, 58, 0.45);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 159, 58, 0.20);
  margin-bottom: 10px;
}

.download-title {
  font-size: 17px;
  font-weight: 800;
  margin-bottom: 5px;
}

.download-text {
  color: #e8d2a8;
  font-size: 13px;
}

.content-shell h1,
.content-shell h2,
.content-shell h3 {
  margin-top: 0;
}

.content-shell p,
.content-shell li {
  color: #e8d2a8;
}

.site-footer {
  margin-top: 26px;
  border-top: 1px solid var(--line);
  padding: 18px 0 26px;
  color: #d2bd9f;
  font-size: 13px;
}

@media (max-width: 980px) {
  .hero-inner,
  .cards-3,
  .split,
  .split-wide,
  .servers-grid,
  .download-grid { grid-template-columns: 1fr; }
  .hero-copy {
    padding: 28px;
    padding-right: 28px;
    background: linear-gradient(180deg, rgba(7, 10, 19, 0.96) 0%, rgba(7, 10, 19, 0.88) 100%);
  }
  .hero-inner .hero-art {
    margin-left: 0;
    width: 100%;
    min-height: 260px;
  }
  .main-nav > ul,
  .main-nav .header-nav-cluster .header-menu {
    gap: 8px 10px;
    flex-wrap: wrap;
    justify-content: center;
  }
  .header-nav-cluster {
    justify-content: center;
  }
  .header-inner {
    justify-content: center;
    gap: 14px;
  }
  .nav-divider {
    display: none;
  }
  .top-pages-nav {
    font-size: 11px;
  }
  .hero-metrics { gap: 8px; }
  .metric-pill { width: 100%; }
}

/* --- Журнал COL (админ-статистика): сортировка, пагинация, цвет строк по типу --- */
.l2j-col-audit-table-wrap { margin-top: 6px; }
.l2j-col-audit-sort {
  color: var(--primary-2, #ffcc66);
  text-decoration: none;
  border-bottom: 1px dotted rgba(255, 204, 102, 0.45);
}
.l2j-col-audit-sort:hover { color: #fff6e0; border-bottom-color: rgba(255, 246, 224, 0.6); }
.l2j-col-audit-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin-top: 14px;
  padding: 10px 0 4px;
  font-size: 13px;
}
.l2j-col-audit-page {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid rgba(201, 162, 39, 0.35);
  background: rgba(0, 0, 0, 0.25);
  color: var(--muted, #e4c59f);
  text-decoration: none;
}
.l2j-col-audit-page:hover {
  border-color: rgba(201, 162, 39, 0.65);
  color: #fff6e0;
}
.l2j-col-audit-page.is-current {
  font-weight: 700;
  color: #1a1208;
  background: linear-gradient(180deg, #e8c56a 0%, #c9a227 100%);
  border-color: #c9a227;
  cursor: default;
}
.l2j-col-audit-ellipsis { opacity: 0.55; padding: 0 4px; }
.l2j-col-audit-table tbody tr.l2j-col-audit-row { transition: background 0.12s ease; }
.l2j-col-audit-row--receive { background: rgba(46, 125, 90, 0.14) !important; }
.l2j-col-audit-row--transfer { background: rgba(70, 110, 180, 0.14) !important; }
.l2j-col-audit-row--destroy { background: rgba(180, 70, 70, 0.14) !important; }
.l2j-col-audit-row--drop { background: rgba(160, 120, 50, 0.16) !important; }
.l2j-col-audit-row--other { background: rgba(120, 120, 140, 0.1) !important; }

.l2j-col-audit-human-inline { color: #f0e6d4; font-weight: 600; }
.l2j-col-audit-human { color: #f5ebe0; font-weight: 600; font-size: 12px; line-height: 1.35; }
.l2j-col-audit-tech {
  display: inline-block;
  margin-top: 3px;
  font-size: 10px;
  line-height: 1.3;
  opacity: 0.72;
  color: #c4b89a;
}
.l2j-col-audit-tech code {
  background: rgba(0, 0, 0, 0.25);
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 10px;
}
.l2j-col-audit-details summary { user-select: none; }
.l2j-col-audit-details summary::-webkit-details-marker { color: #c9a227; }
.l2j-col-audit-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 8px 14px;
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(201, 162, 39, 0.28);
  background: rgba(0, 0, 0, 0.22);
  font-size: 12px;
  line-height: 1.45;
  color: #e8d2a8;
}
.l2j-col-audit-legend-title {
  display: block;
  width: 100%;
  font-weight: 700;
  color: #ffcc66;
  margin-bottom: 2px;
}
.l2j-col-audit-legend-item {
  display: inline-flex;
  align-items: flex-start;
  gap: 8px;
  max-width: 100%;
}

a.l2j-col-audit-filter-link {
  text-decoration: none;
  color: inherit;
  border-radius: 8px;
  padding: 6px 8px;
  margin: 0 2px 4px 0;
  border: 1px solid transparent;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
a.l2j-col-audit-filter-link:hover {
  border-color: rgba(201, 162, 39, 0.45);
  background: rgba(0, 0, 0, 0.2);
  color: #fff6e0;
}
a.l2j-col-audit-filter-link.is-active {
  border-color: rgba(232, 197, 106, 0.85);
  background: rgba(201, 162, 39, 0.12);
  box-shadow: 0 0 0 1px rgba(232, 197, 106, 0.25);
}
a.l2j-col-audit-filter-link:focus-visible {
  outline: 2px solid #e8c56a;
  outline-offset: 2px;
}
.l2j-col-audit-swatch--all {
  background: repeating-linear-gradient(
    -45deg,
    rgba(90, 90, 110, 0.5),
    rgba(90, 90, 110, 0.5) 4px,
    rgba(50, 50, 65, 0.55) 4px,
    rgba(50, 50, 65, 0.55) 8px
  );
}
.l2j-col-audit-swatch {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border-radius: 5px;
  margin-top: 2px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.2);
}
.l2j-col-audit-swatch--receive { background: rgba(46, 125, 90, 0.55); }
.l2j-col-audit-swatch--transfer { background: rgba(70, 110, 180, 0.55); }
.l2j-col-audit-swatch--destroy { background: rgba(180, 70, 70, 0.55); }
.l2j-col-audit-swatch--drop { background: rgba(160, 120, 50, 0.6); }
.l2j-col-audit-swatch--other { background: rgba(120, 120, 140, 0.45); }

/* --- Админ: вкладка «Общий COL» — крупная сумма монет на сервере --- */
.l2j-admin-col-total-hero {
  margin: 0 0 8px;
  padding: 22px 20px 20px;
  border-radius: 14px;
  border: 1px solid rgba(201, 162, 39, 0.4);
  background: linear-gradient(165deg, rgba(40, 28, 18, 0.95) 0%, rgba(18, 14, 22, 0.92) 100%);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 220, 140, 0.08);
  text-align: center;
}
.l2j-admin-col-total-hero-label {
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #c9a227;
  font-weight: 700;
  margin-bottom: 6px;
  opacity: 0.95;
}
.l2j-admin-col-total-hero-value {
  font-size: clamp(2.25rem, 6vw, 3.75rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: 0.02em;
  background: linear-gradient(180deg, #fff8e8 0%, #e8c56a 45%, #c9a227 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: #f5e6c8;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 12px rgba(201, 162, 39, 0.35));
  font-variant-numeric: tabular-nums;
}
@supports not (-webkit-background-clip: text) {
  .l2j-admin-col-total-hero-value {
    color: #e8c56a;
    -webkit-text-fill-color: unset;
  }
}
.l2j-admin-col-total-hero-hint {
  margin: 14px 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: #b8a078;
  opacity: 0.92;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.l2j-admin-col-total-breakdown {
  margin: 12px auto 0;
  padding: 0 0 0 1.15em;
  max-width: 560px;
  text-align: left;
  font-size: 12px;
  line-height: 1.5;
  color: #d4c4a4;
  opacity: 0.95;
}
.l2j-admin-col-total-breakdown li {
  margin-bottom: 6px;
}
.l2j-admin-col-total-breakdown li:last-child {
  margin-bottom: 0;
}

