  /* =============================================================
     ФОРУМ — рич-хедер из v1, развёрнутые разделы из v2,
     сайдбар-виджеты из v1. Создание темы — внутри раздела.
     ============================================================= */

  /* ===== Hero ===== */
  .fhero {
    position: relative;
    overflow: hidden;
    background:
      /* left-dark / right-light overlay so figures stay visible */
      linear-gradient(90deg, rgba(8,10,18,0.78) 0%, rgba(8,10,18,0.45) 35%, rgba(8,10,18,0.10) 65%, rgba(8,10,18,0.05) 100%),
      /* soft top + bottom fade for chrome blending */
      linear-gradient(180deg, rgba(8,10,18,0.35) 0%, rgba(8,10,18,0.05) 25%, rgba(8,10,18,0.05) 70%, rgba(8,10,18,0.55) 100%),
      url('/assets/banners/forum.png') center 25% / cover no-repeat;
    border-bottom: 1px solid var(--line);
    isolation: isolate;
    min-height: 460px;
  }
  .fhero::after {
    content: '';
    position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    opacity: 0.5;
  }
  .fhero__sheen {
    position: absolute; inset: -10%;
    pointer-events: none;
    background: radial-gradient(ellipse 55% 70% at 50% 45%, rgba(231,200,120,0.10), transparent 70%);
    filter: blur(20px);
  }
  .fhero__inner {
    position: relative; z-index: 2;
    max-width: 1440px;
    margin: 0 auto;
    padding: 72px 32px 48px;
  }
  .fhero__col {
    max-width: 820px;
  }
  .fhero h1 {
    font-family: var(--font-head);
    font-weight: 500;
    font-size: 60px;
    line-height: 1.0;
    color: var(--ink);
    margin: 12px 0 14px;
    letter-spacing: 0.01em;
    text-shadow: 0 2px 18px rgba(0,0,0,0.7);
  }
  .fhero__sub {
    font-family: var(--font-head);
    font-style: italic;
    font-weight: 400;
    font-size: 0.52em;
    color: var(--gold-bright);
    letter-spacing: 0.06em;
    margin-left: 14px;
    vertical-align: middle;
    text-shadow: 0 2px 14px rgba(0,0,0,0.65);
  }
  .fhero__lede {
    font-family: var(--font-head);
    font-size: 19px;
    color: var(--parch);
    line-height: 1.45;
    margin: 6px 0 32px;
    max-width: 620px;
    text-shadow: 0 1px 12px rgba(0,0,0,0.7);
    text-wrap: balance;
  }

  /* Search — appearance:none so submit button doesn't render in UA white */
  .fsearch {
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: stretch;
    max-width: 600px;
    background: linear-gradient(180deg, rgba(20,24,33,0.92), rgba(14,17,24,0.92));
    border: 1px solid var(--line);
    box-shadow: 0 12px 36px rgba(0,0,0,0.5), inset 0 0 0 1px var(--line-soft);
    backdrop-filter: blur(6px);
  }
  .fsearch__icon {
    position: absolute;
    left: 18px; top: 50%;
    transform: translateY(-50%);
    color: var(--gold);
    pointer-events: none;
  }
  .fsearch__icon svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.4; }
  .fsearch__input {
    appearance: none;
    background: transparent;
    border: none;
    padding: 16px 18px 16px 50px;
    color: var(--ink);
    font-family: var(--font-ui);
    font-size: 14px;
    letter-spacing: 0.02em;
    outline: none;
    width: 100%;
  }
  .fsearch__input::placeholder { color: var(--ink-faint); }
  .fsearch__hint {
    position: absolute;
    right: 124px;
    top: 50%;
    transform: translateY(-50%);
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: var(--ink-mute);
    letter-spacing: 0.16em;
    border: 1px solid var(--line-soft);
    padding: 2px 6px;
    border-radius: 2px;
    background: rgba(0,0,0,0.3);
  }
  .fsearch__btn {
    -webkit-appearance: none;
       -moz-appearance: none;
            appearance: none;
    padding: 0 26px;
    border: none;
    border-left: 1px solid var(--line);
    background: transparent;
    color: var(--gold-bright);
    font-family: var(--font-ui);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.18s;
  }
  .fsearch__btn:hover { background: rgba(201,164,74,0.10); }
  .fsearch__btn:focus { outline: none; background: rgba(201,164,74,0.10); }

  /* ===== Stats ribbon ===== */
  .fstats {
    max-width: 1440px;
    margin: 24px auto 0;
    padding: 0 32px;
  }
  .fstats__row {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 14px 24px;
    background: linear-gradient(180deg, var(--bg-panel), var(--bg-panel-2));
    border: 1px solid var(--line);
    box-shadow: var(--shadow-card);
  }
  .fstats__cell {
    flex: 1;
    padding: 0 18px;
    text-align: center;
    position: relative;
  }
  .fstats__cell + .fstats__cell::before {
    content: '';
    position: absolute;
    left: 0; top: 10%; bottom: 10%;
    width: 1px;
    background: var(--line-soft);
  }
  .fstats__n {
    font-family: var(--font-head);
    font-size: 22px;
    line-height: 1;
    color: var(--ink);
    font-weight: 500;
    letter-spacing: 0.02em;
  }
  .fstats__l {
    font-family: var(--font-ui);
    font-size: 10.5px;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink-mute);
    margin-top: 5px;
  }
  .fstats__live { color: var(--gold-bright); }
  .fstats__dot {
    display: inline-block;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #6bd57f;
    box-shadow: 0 0 8px #6bd57f;
    margin-right: 6px;
    vertical-align: middle;
  }


  /* ===== Page grid ===== */
  .fwrap {
    max-width: 1440px;
    margin: 0 auto;
    padding: 28px 32px 64px;
    display: grid;
    grid-template-columns: 1fr 332px;
    gap: 32px;
    align-items: start;
  }
  .fmain { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
  .fside { display: flex; flex-direction: column; gap: 18px; position: sticky; top: 16px; }
  .fwrap .crumbs { margin: 0 0 4px; grid-column: 1 / -1; }


  /* ===== Section ===== */
  .sect {
    position: relative;
    background: linear-gradient(180deg, var(--bg-panel) 0%, var(--bg-panel-2) 100%);
    border: 1px solid var(--line);
    border-left: 3px solid var(--sect-color, var(--gold));
    box-shadow: var(--shadow-card);
  }

  .sect__head {
    display: grid;
    grid-template-columns: 48px 1fr auto;
    align-items: center;
    gap: 18px;
    padding: 18px 22px;
    background:
      radial-gradient(120% 100% at 0% 50%, var(--sect-tint, rgba(201,164,74,0.06)), transparent 70%),
      linear-gradient(180deg, rgba(201,164,74,0.05), transparent);
    border-bottom: 1px solid var(--line);
    position: relative;
  }
  .sect__head::after {
    content: '';
    position: absolute;
    left: 22px; right: 22px; bottom: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--sect-color, var(--gold)), transparent);
    opacity: 0.5;
  }
  .sect__icon {
    width: 48px; height: 48px;
    display: grid; place-items: center;
    background:
      radial-gradient(circle at 50% 35%, var(--sect-tint-strong, rgba(201,164,74,0.25)), transparent 70%),
      var(--bg-stripe);
    border: 1px solid var(--line);
    color: var(--sect-color, var(--gold-bright));
  }
  .sect__icon svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.4; }
  .sect__title {
    font-family: var(--font-head);
    font-size: 24px;
    color: var(--ink);
    line-height: 1.15;
    margin: 0 0 2px;
    letter-spacing: 0.005em;
  }
  .sect__desc {
    font-family: var(--font-ui);
    font-size: 12.5px;
    color: var(--ink-mute);
    letter-spacing: 0.02em;
    line-height: 1.4;
  }
  .sect__new {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    font-family: var(--font-ui);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--sect-color, var(--gold-bright));
    background: transparent;
    border: 1px solid var(--sect-color, var(--gold));
    border-radius: 1px;
    text-decoration: none;
    transition: background 0.18s;
    white-space: nowrap;
  }
  .sect__new:hover {
    background: var(--sect-tint-strong, rgba(201,164,74,0.15));
  }
  .sect__new svg { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 2.2; }

  /* Topic rows inside the section */
  .topic {
    display: grid;
    grid-template-columns: 32px 1fr 96px 168px;
    gap: 18px;
    align-items: center;
    padding: 13px 22px;
    border-bottom: 1px solid var(--line-soft);
    text-decoration: none;
    color: inherit;
    transition: background 0.14s;
    position: relative;
  }
  .topic:last-child { border-bottom: none; }
  .topic:hover { background: rgba(201,164,74,0.04); }
  .topic.is-unread::before {
    content: '';
    position: absolute;
    left: 0; top: 13px; bottom: 13px;
    width: 2px;
    background: var(--sect-color, var(--gold));
    opacity: 0.85;
  }

  .topic__av {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(201,164,74,0.28), var(--bg-stripe));
    border: 1px solid var(--line);
    display: grid; place-items: center;
    font-family: var(--font-head);
    font-size: 13px;
    color: var(--gold-bright);
    flex-shrink: 0;
  }
  .topic__av--light { background: linear-gradient(135deg, rgba(111,163,200,0.35), rgba(20,40,60,0.7)); color: var(--light-2); }
  .topic__av--fury  { background: linear-gradient(135deg, rgba(217,98,116,0.35), rgba(60,20,30,0.7)); color: var(--fury-2); }
  .topic__av--mod   { border-color: var(--gold); box-shadow: 0 0 0 1px rgba(201,164,74,0.2); }

  .topic__main { min-width: 0; }
  .topic__title {
    font-family: var(--font-head);
    font-size: 17px;
    color: var(--ink);
    line-height: 1.25;
    margin: 0 0 3px;
    letter-spacing: 0.005em;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
  }
  .topic:hover .topic__title { color: var(--gold-bright); }
  .topic.is-unread .topic__title { color: var(--ink); font-weight: 600; }
  .topic__by {
    font-family: var(--font-ui);
    font-size: 11px;
    color: var(--ink-mute);
    letter-spacing: 0.04em;
  }
  .topic__by .author { color: var(--ink-soft); transition: color 0.18s; }
  .topic:hover .topic__by .author { color: var(--gold-bright); }
  .topic__by .sep {
    display: inline-block;
    width: 3px; height: 3px;
    transform: rotate(45deg);
    background: var(--gold);
    opacity: 0.5;
    vertical-align: middle;
    margin: 0 8px 0 6px;
  }

  /* Inline status icons in title */
  .topic__flag {
    display: inline-grid;
    place-items: center;
    color: var(--sect-color, var(--gold));
  }
  .topic__flag svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 1.6; }
  .topic__flag--locked { color: var(--ink-mute); }
  .topic__flag--solved { color: #8fbf8f; }

  .topic__replies {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
  }
  .topic__replies-n {
    font-family: var(--font-head);
    font-size: 18px;
    color: var(--ink);
    line-height: 1;
    font-weight: 500;
  }
  .topic__replies-l {
    font-family: var(--font-ui);
    font-size: 9.5px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ink-mute);
  }

  .topic__last {
    display: grid;
    grid-template-columns: 24px 1fr;
    gap: 10px;
    align-items: center;
    padding-left: 14px;
    border-left: 1px dashed var(--line-soft);
  }
  .topic__last-av {
    width: 24px; height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(201,164,74,0.28), var(--bg-stripe));
    border: 1px solid var(--line);
    display: grid; place-items: center;
    font-family: var(--font-head);
    font-size: 11px;
    color: var(--gold-bright);
  }
  .topic__last-av--light { background: linear-gradient(135deg, rgba(111,163,200,0.4), rgba(20,40,60,0.7)); color: var(--light-2); }
  .topic__last-av--fury  { background: linear-gradient(135deg, rgba(217,98,116,0.4), rgba(60,20,30,0.7)); color: var(--fury-2); }
  .topic__last-name {
    font-family: var(--font-ui);
    font-size: 12px;
    font-weight: 500;
    color: var(--ink);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .topic__last-time {
    font-family: var(--font-ui);
    font-size: 10px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-mute);
    margin-top: 1px;
  }

  /* Section foot: meta + pagination + view all */
  .sect__foot {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 18px;
    padding: 12px 22px;
    border-top: 1px solid var(--line-soft);
    background: linear-gradient(180deg, transparent, rgba(0,0,0,0.18));
  }
  .sect__foot-meta {
    font-family: var(--font-ui);
    font-size: 10.5px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-mute);
  }
  .sect__foot-meta strong { color: var(--ink-soft); font-weight: 600; }
  .sect__pager {
    display: flex;
    align-items: center;
    gap: 4px;
    justify-self: center;
  }
  .sect__pager__btn {
    -webkit-appearance: none; appearance: none;
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    font-family: var(--font-ui);
    font-size: 11px;
    font-weight: 500;
    color: var(--ink-soft);
    background: transparent;
    border: 1px solid var(--line-soft);
    border-radius: 1px;
    cursor: pointer;
    transition: all 0.18s;
    letter-spacing: 0.04em;
  }
  .sect__pager__btn:hover {
    color: var(--sect-color, var(--gold-bright));
    border-color: var(--line-strong);
    background: var(--sect-tint, rgba(201,164,74,0.06));
  }
  .sect__pager__btn.is-active {
    color: #0b0d12;
    background: var(--sect-color, var(--gold-bright));
    border-color: var(--sect-color, var(--gold));
    text-shadow: 0 1px 0 rgba(255,255,255,0.2);
  }
  .sect__pager__sep { color: var(--ink-faint); padding: 0 2px; font-size: 11px; }
  .sect__viewall {
    font-family: var(--font-ui);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ink-soft);
    text-decoration: none;
    transition: color 0.18s;
    white-space: nowrap;
    justify-self: end;
  }
  .sect__viewall:hover { color: var(--sect-color, var(--gold-bright)); }
  .sect__viewall::after {
    content: ' →';
    color: var(--sect-color, var(--gold));
    margin-left: 4px;
  }

  /* Section accent palette */
  .sect--news    { --sect-color: #e7c878; --sect-tint: rgba(231,200,120,0.07); --sect-tint-strong: rgba(231,200,120,0.22); }
  .sect--general { --sect-color: #c9b48a; --sect-tint: rgba(201,180,138,0.06); --sect-tint-strong: rgba(201,180,138,0.18); }
  .sect--support { --sect-color: #6fa3c8; --sect-tint: rgba(111,163,200,0.07); --sect-tint-strong: rgba(111,163,200,0.20); }
  .sect--guild   { --sect-color: #d96274; --sect-tint: rgba(217,98,116,0.07); --sect-tint-strong: rgba(217,98,116,0.20); }
  .sect--offtop  { --sect-color: #b08fc8; --sect-tint: rgba(176,143,200,0.07); --sect-tint-strong: rgba(176,143,200,0.20); }


  /* ===== Sidebar widgets ===== */
  .fside .panel-head__title { font-size: 13.5px; letter-spacing: 0.18em; }
  .fside .panel-head__action { font-size: 10px; }
  .fside .panel-head { padding: 11px 18px; }

  /* Online widget */
  .widget--online .panel-body { padding: 14px 18px 18px; }
  .online-row {
    display: flex; align-items: center; gap: 10px;
    margin-bottom: 14px;
  }
  .online-row__dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: #6bd57f;
    box-shadow: 0 0 8px #6bd57f;
  }
  .online-row__count {
    font-family: var(--font-head);
    font-size: 22px;
    color: var(--ink);
    line-height: 1;
    font-weight: 500;
  }
  .online-row__label {
    font-family: var(--font-ui);
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-mute);
  }
  .av-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }
  .av {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(201,164,74,0.30), var(--bg-stripe));
    border: 1px solid var(--line);
    display: grid; place-items: center;
    font-family: var(--font-head);
    font-size: 11px;
    color: var(--gold-bright);
  }
  .av--sm { width: 28px; height: 28px; font-size: 11px; }
  .av--light { background: linear-gradient(135deg, rgba(111,163,200,0.4), rgba(20,40,60,0.7)); color: var(--light-2); }
  .av--fury  { background: linear-gradient(135deg, rgba(217,98,116,0.4), rgba(60,20,30,0.7)); color: var(--fury-2); }
  .av--mod   { border-color: var(--gold); box-shadow: 0 0 0 1px rgba(201,164,74,0.18); }
  .av-more {
    width: 28px; height: 28px;
    border-radius: 50%;
    border: 1px dashed var(--line);
    display: grid; place-items: center;
    font-family: var(--font-ui);
    font-size: 10px;
    font-weight: 600;
    color: var(--ink-mute);
    letter-spacing: 0.02em;
  }

  /* Top users widget */
  .widget--top .panel-body { padding: 4px 0 8px; }
  .top-user {
    display: grid;
    grid-template-columns: 24px 32px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 10px 18px;
    text-decoration: none;
    color: inherit;
    transition: background 0.14s;
  }
  .top-user:hover { background: rgba(201,164,74,0.04); }
  .top-user__rank {
    font-family: var(--font-head);
    font-size: 18px;
    color: var(--ink-mute);
    text-align: center;
    line-height: 1;
  }
  .top-user__rank.is-top1 { color: var(--gold-bright); text-shadow: 0 0 10px var(--gold); }
  .top-user__rank.is-top2 { color: #c9c4b8; }
  .top-user__rank.is-top3 { color: #c08a3a; }
  .top-user__name {
    font-family: var(--font-ui);
    font-size: 12.5px;
    font-weight: 500;
    color: var(--ink);
    letter-spacing: 0.02em;
    line-height: 1.2;
  }
  .top-user__role {
    display: block;
    font-family: var(--font-ui);
    font-size: 9.5px;
    font-weight: 600;
    color: var(--gold);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    margin-top: 2px;
  }
  .top-user__posts {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--ink-soft);
    letter-spacing: 0.04em;
  }

  /* Guild list widget */
  .widget--guilds .panel-body { padding: 4px 0 8px; }
  .gld {
    display: grid;
    grid-template-columns: 36px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 10px 18px;
    text-decoration: none;
    color: inherit;
    transition: background 0.14s;
  }
  .gld:hover .gld__crest { filter: drop-shadow(0 1px 4px rgba(231,200,120,0.4)); }
  .gld:hover { background: rgba(201,164,74,0.04); }
  .gld__crest {
    width: 36px; height: 36px;
    color: var(--gld-color, var(--gold-bright));
    flex-shrink: 0;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.4));
  }
  .gld__crest svg { width: 100%; height: 100%; display: block; }
  .gld__crest .frame {
    fill: currentColor;
    fill-opacity: 0.10;
    stroke: currentColor;
    stroke-width: 1.1;
  }
  .gld__crest .frame-inner {
    fill: none;
    stroke: currentColor;
    stroke-width: 0.6;
    opacity: 0.6;
  }
  .gld__crest .sigil {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.3;
    stroke-linejoin: round;
    stroke-linecap: round;
  }
  .gld__crest .sigil-fill {
    fill: currentColor;
    fill-opacity: 0.85;
    stroke: none;
  }
  .gld__crest .sigil-dot {
    fill: currentColor;
    stroke: none;
  }
  .gld--light { --gld-color: #6fa3c8; --gld-tint: rgba(111,163,200,0.3); }
  .gld--fury  { --gld-color: #d96274; --gld-tint: rgba(217,98,116,0.3); }
  .gld--gold  { --gld-color: #e7c878; --gld-tint: rgba(231,200,120,0.3); }
  .gld__name {
    font-family: var(--font-head);
    font-size: 15px;
    color: var(--ink);
    line-height: 1.2;
    letter-spacing: 0.005em;
  }
  .gld__faction {
    font-family: var(--font-ui);
    font-size: 9.5px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-mute);
    margin-top: 2px;
  }
  .gld__count {
    font-family: var(--font-ui);
    font-size: 10.5px;
    font-weight: 600;
    color: var(--gold-bright);
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }

  /* Kodeks widget */
  .widget--rules .panel-body {
    padding: 14px 18px 16px;
    font-family: var(--font-ui);
    font-size: 12.5px;
    color: var(--ink-soft);
    line-height: 1.55;
  }
  .widget--rules p { margin: 0 0 8px; }
  .widget--rules p:last-child { margin-bottom: 0; margin-top: 4px; }
  .widget--rules a {
    color: var(--gold-bright);
    border-bottom: 1px dotted var(--gold);
    transition: color 0.18s;
  }
  .widget--rules a:hover { color: var(--gold); }
  .widget--rules em {
    color: var(--parch);
    font-family: var(--font-head);
    font-style: italic;
  }

  /* Mobile clamp */
  @media (max-width: 1200px) {
    .fwrap { grid-template-columns: 1fr; }
    .fside { position: static; flex-direction: row; flex-wrap: wrap; }
    .fside > * { flex: 1 1 280px; }
  }
  @media (max-width: 880px) {
    .topic { grid-template-columns: 32px 1fr 70px; }
    .topic__last { display: none; }
    .sect__head { grid-template-columns: 48px 1fr; }
    .sect__new { grid-column: 1 / -1; justify-content: center; }
    .sect__foot { grid-template-columns: 1fr; gap: 10px; }
    .sect__pager { justify-self: start; }
    .sect__viewall { justify-self: start; }
  }
