/* ==========================================================================
   Avalis S54 — community: forums index/boards, topics, composers, videos
   Scoped to body.forum-hub (forums.php, topic.php, new-topic.php,
   edit-post.php) and body.videos-page (youtube.php). Builds on avalis.css.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Shared forum pieces
   -------------------------------------------------------------------------- */
.forum-hub .icon { width: 18px; height: 18px; flex: none; }

/* Board "sapphire" medallion: rotated facet with the board icon upright */
.forum-hub .board-gem {
  position: relative; isolation: isolate; display: grid; place-items: center; flex: none;
  width: 52px; height: 52px; color: #fff;
}
.forum-hub .board-gem::before {
  content: ""; position: absolute; inset: 8px; z-index: -1; transform: rotate(45deg); border-radius: 9px;
  background: linear-gradient(135deg, #7aaaff 0%, #3a74ff 38%, #1d44c2 72%, #11298a 100%);
  box-shadow: 0 0 0 1px rgba(190, 222, 255, .55), 0 0 0 4px rgba(7, 16, 34, .95), 0 0 0 5px var(--line-2), 0 10px 22px rgba(18, 60, 200, .38);
}
.forum-hub .board-gem svg { width: 22px; height: 22px; filter: drop-shadow(0 1px 1px rgba(0, 10, 40, .6)); }
.forum-hub .board-gem--lg { width: 70px; height: 70px; }
.forum-hub .board-gem--lg::before { inset: 11px; border-radius: 12px; }
.forum-hub .board-gem--lg svg { width: 28px; height: 28px; }
.forum-hub .board-group--staff .board-gem::before { background: linear-gradient(135deg, #b9c6dc 0%, #6b7c9c 45%, #36445f 100%); box-shadow: 0 0 0 1px rgba(220, 230, 245, .45), 0 0 0 4px rgba(7, 16, 34, .95), 0 0 0 5px var(--line-2), 0 10px 22px rgba(0, 0, 0, .4); }

/* In-game badges from forum_badges(): tiny pixel icons with an accessible tooltip */
.forum-hub .game-badges { display: inline-flex; align-items: center; gap: 2px; vertical-align: middle; }
.forum-hub .game-badges:empty { display: none; }
.forum-hub .game-badge { position: relative; display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 5px; cursor: help; }
.forum-hub .game-badge img { width: auto; height: 13px; max-width: 20px; image-rendering: pixelated; }
.forum-hub .game-badge:hover, .forum-hub .game-badge:focus-visible { background: rgba(147, 214, 255, .1); }
.forum-hub .game-badge:focus-visible { outline-offset: 1px; }
.forum-hub .game-badge::after {
  content: attr(data-tooltip); position: absolute; z-index: 20; left: 50%; bottom: calc(100% + 7px); transform: translate(-50%, 4px);
  padding: 5px 9px; border-radius: 6px; white-space: nowrap; pointer-events: none; opacity: 0; visibility: hidden;
  font: 700 .72rem/1.2 var(--font-text); letter-spacing: 0; text-transform: none; color: var(--frost);
  background: #0d1d3b; border: 1px solid var(--line-2); box-shadow: 0 8px 20px rgba(0, 0, 0, .45);
  transition: opacity .15s, transform .15s var(--ease), visibility 0s .15s;
}
.forum-hub .game-badge:hover::after, .forum-hub .game-badge:focus-visible::after { opacity: 1; visibility: visible; transform: translate(-50%, 0); transition: opacity .15s, transform .15s var(--ease); }

/* Avatars (forum_avatar) */
.forum-hub .avatar.player-headshot { --avatar: 42px; }
.forum-hub .avatar img { image-rendering: pixelated; }

/* Status chips on topics */
.forum-hub .topic-flag {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px;
  font: 700 .76rem/1.3 var(--font-display); white-space: nowrap;
  color: var(--ice-2); background: rgba(47, 107, 255, .14); border: 1px solid rgba(110, 160, 255, .3);
}
.forum-hub .topic-flag svg { width: 12px; height: 12px; }
.forum-hub a.topic-flag:hover { color: #fff; border-color: var(--line-3); background: rgba(47, 107, 255, .26); }
.forum-hub .topic-flag--pinned { color: #d7f0ff; background: rgba(147, 214, 255, .12); border-color: rgba(147, 214, 255, .4); }
.forum-hub .topic-flag--locked { color: #ffdcaa; background: rgba(255, 183, 77, .1); border-color: rgba(255, 183, 77, .38); }
.forum-hub .topic-flag--staff { color: var(--mist); background: rgba(255, 255, 255, .05); border-color: var(--line-2); }

/* Side cards (sidebar + composer aside) */
.forum-hub .side-card {
  position: relative; padding: 20px; border-radius: var(--r-lg);
  background: linear-gradient(180deg, rgba(16, 33, 62, .66), rgba(9, 20, 40, .78)); border: 1px solid var(--line);
}
.forum-hub .side-card > :last-child { margin-bottom: 0; }
.forum-hub .side-card__title { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; font: 700 1rem/1.25 var(--font-display); color: var(--frost); }
.forum-hub .side-card__heading { margin: 0 0 8px; font-size: 1.3rem; line-height: 1.15; }
.forum-hub .side-card p { font-size: .92rem; }
.forum-hub .side-card__foot { margin: 12px 0 0; text-align: center; color: var(--dim); font-size: .86rem; }

/* --------------------------------------------------------------------------
   Forum hero (index, board, search)
   -------------------------------------------------------------------------- */
.forum-hub .forum-hero { padding: clamp(30px, 4.4vw, 52px) 0 clamp(26px, 3.6vw, 40px); }
.forum-hub .forum-hero .page-hero__art { opacity: .78; background-position: center 72%; transform: scaleX(-1); }
.forum-hub .forum-hero__inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 400px); gap: clamp(24px, 4vw, 56px); align-items: end; }
.forum-hub .forum-hero h1 { margin-bottom: 10px; text-shadow: 0 4px 24px rgba(0, 0, 0, .5); }
.forum-hub .forum-hero .lede { color: #d0dcef; }
.forum-hub .forum-hero__board { display: flex; align-items: center; gap: 18px; margin-bottom: 12px; }
.forum-hub .forum-hero__board .eyebrow { margin-bottom: 6px; }
.forum-hub .forum-hero__board h1 { margin: 0; max-width: none; }
.forum-hub .forum-hero__stats { display: flex; flex-wrap: wrap; margin: 22px 0 0; }
.forum-hub .forum-hero__stats > div { display: flex; flex-direction: column-reverse; gap: 4px; padding: 0 22px; border-left: 1px solid var(--line-2); }
.forum-hub .forum-hero__stats > div:first-child { padding-left: 0; border-left: 0; }
.forum-hub .forum-hero__stats dt { font: 700 .78rem/1.2 var(--font-display); color: var(--dim); }
.forum-hub .forum-hero__stats dd { margin: 0; font: 700 1.53rem/1 var(--font-display); color: var(--frost); font-variant-numeric: tabular-nums; letter-spacing: .02em; }

.forum-hub .forum-hero__side {
  display: grid; gap: 14px; padding: 18px; border-radius: var(--r-lg);
  background: var(--glass); border: 1px solid var(--line-2); box-shadow: var(--shadow-2);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.forum-hub .forum-search { margin: 0; }
.forum-hub .forum-search label { display: block; margin-bottom: 8px; font: 700 .82rem/1.2 var(--font-display); color: var(--ice); }
.forum-hub .forum-search__box { position: relative; display: flex; gap: 8px; }
.forum-hub .forum-search__icon { position: absolute; left: 14px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--dim); pointer-events: none; }
.forum-hub .forum-search__box input { flex: 1; min-width: 0; padding-left: 42px !important; }
.forum-hub .forum-search__box .btn { min-height: 46px; padding-inline: 18px; }
.forum-hub .forum-hero__action { display: flex; }
.forum-hub .forum-hero__action .btn { flex: 1; }

.forum-hub .forum-alerts { padding-top: 22px; }
.forum-hub .forum-alerts .alert { margin: 0; }

/* --------------------------------------------------------------------------
   Index / board layout
   -------------------------------------------------------------------------- */
.forum-hub .forum-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: clamp(24px, 3vw, 40px); align-items: start; padding-top: clamp(24px, 3vw, 36px); }
.forum-hub .forum-content { min-width: 0; }

/* Board groups: each root board heads its own list of sub-boards */
.forum-hub .board-groups { display: grid; gap: 16px; }
.forum-hub .board-group {
  border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(15, 31, 60, .72), rgba(8, 18, 37, .84)); box-shadow: var(--shadow-1);
}
.forum-hub .board-row {
  position: relative; display: grid; grid-template-columns: 52px minmax(0, 1fr) 128px 240px; gap: 18px; align-items: center;
  padding: 16px 22px; transition: background .18s;
}
.forum-hub .board-row:hover { background: rgba(47, 107, 255, .07); }
.forum-hub .board-row__link::after { content: ""; position: absolute; inset: 0; z-index: 0; }
.forum-hub .board-row__link:focus-visible { outline: none; }
.forum-hub .board-row__link:focus-visible::after { border-radius: inherit; box-shadow: inset 0 0 0 2px var(--ice); }
.forum-hub .board-row__title { min-width: 0; }
.forum-hub .board-row__title p { margin: 3px 0 0; color: var(--dim); font-size: .9rem; line-height: 1.45; }
.forum-hub .board-row--root { padding-block: 20px; background: linear-gradient(90deg, rgba(47, 107, 255, .1), transparent 55%); }
.forum-hub .board-row--root:hover { background: linear-gradient(90deg, rgba(47, 107, 255, .16), rgba(47, 107, 255, .04) 70%); }
.forum-hub .board-row--root h3 { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0; font: 700 1.28rem/1.15 var(--font-display); }
.forum-hub .board-row--root h3 a { color: var(--frost); }
.forum-hub .board-row:hover .board-row__link { color: #fff; }
.forum-hub .board-staff { position: relative; z-index: 1; }
.forum-hub .board-staff svg { width: 12px; height: 12px; }

.forum-hub .subboard-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); background: rgba(3, 9, 22, .22); }
.forum-hub .board-row--child { padding-block: 12px; }
.forum-hub .board-row--child + .board-row--child { border-top: 1px solid var(--line); }
.forum-hub .board-row__icon {
  display: grid; place-items: center; width: 36px; height: 36px; margin-left: 8px; border-radius: 10px;
  color: var(--ice); background: rgba(47, 107, 255, .13); border: 1px solid var(--line-2); transition: color .18s, background .18s;
}
.forum-hub .board-row__icon svg { width: 19px; height: 19px; }
.forum-hub .board-row--child:hover .board-row__icon { color: #fff; background: var(--sapphire); border-color: rgba(160, 200, 255, .6); }
.forum-hub .board-row--child .board-row__title > a { color: var(--frost); font-weight: 700; font-size: 1rem; }
.forum-hub .board-row--child .board-row__title p { font-size: .86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.forum-hub .board-counts { display: flex; justify-content: flex-end; gap: 18px; margin: 0; }
.forum-hub .board-counts > div { display: flex; flex-direction: column-reverse; align-items: center; gap: 3px; min-width: 48px; }
.forum-hub .board-counts dt { font: 700 .74rem/1.2 var(--font-display); color: var(--dim); }
.forum-hub .board-counts dd { margin: 0; font: 700 1.15rem/1 var(--font-display); color: var(--frost); font-variant-numeric: tabular-nums; }
.forum-hub .board-row--child .board-counts dd { font-size: 1rem; color: var(--mist); }

.forum-hub .board-latest { position: relative; z-index: 1; display: flex; align-items: center; gap: 10px; min-width: 0; padding-left: 16px; border-left: 1px solid var(--line); }
.forum-hub .board-latest .avatar { --avatar: 34px; box-shadow: none; }
.forum-hub .board-latest__text { display: grid; gap: 2px; min-width: 0; }
.forum-hub .board-latest__title { color: var(--frost); font-weight: 700; font-size: .9rem; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.forum-hub .board-latest__title:hover { color: var(--ice-2); text-decoration: underline; }
.forum-hub .board-latest__meta { display: flex; flex-wrap: wrap; gap: 0 6px; color: var(--dim); font-size: .8rem; line-height: 1.35; }
.forum-hub .board-latest__meta a { color: var(--mist); }
.forum-hub .board-latest__meta a:hover .player-name { text-decoration: underline; }
.forum-hub .board-latest__meta .player-name { font-weight: 700; }
.forum-hub .board-latest--empty span { color: var(--dim); font-size: .85rem; font-style: italic; }

/* Sub-board strip on a board page */
.forum-hub .subboard-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 24px; }
.forum-hub .subboard-strip__label { margin-right: 4px; font: 700 .8rem/1 var(--font-display); color: var(--dim); }
.forum-hub .subboard-strip a {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 8px 0 14px; border-radius: 999px;
  background: rgba(14, 30, 58, .62); border: 1px solid var(--line-2); color: var(--frost); font-weight: 700; font-size: .9rem;
  transition: border-color .15s, background .15s;
}
.forum-hub .subboard-strip a svg { width: 17px; height: 17px; color: var(--ice); }
.forum-hub .subboard-strip a b { display: inline-grid; place-items: center; min-width: 26px; height: 24px; padding: 0 7px; border-radius: 999px; background: rgba(47, 107, 255, .2); color: var(--ice-2); font: 700 .78rem/1 var(--font-display); }
.forum-hub .subboard-strip a:hover { border-color: var(--line-3); background: rgba(30, 60, 110, .7); color: #fff; }

/* --------------------------------------------------------------------------
   Topic list (board + search)
   -------------------------------------------------------------------------- */
.forum-hub .topic-list-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; margin: 0 0 12px; }
.forum-hub .topic-list-head h2 { margin: 0; font-size: 1.5rem; }
.forum-hub .topic-list-head p { margin: 0; color: var(--dim); font-size: .88rem; }
.forum-hub .topic-list { border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); background: linear-gradient(180deg, rgba(15, 31, 60, .7), rgba(8, 18, 37, .82)); box-shadow: var(--shadow-1); }
.forum-hub .topic-list > .forum-empty { border: 0; border-radius: 0; background: none; }
.forum-hub .topic-list__cols,
.forum-hub .topic-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) 70px 70px 180px; column-gap: 16px; align-items: center; padding-inline: 20px; }
.forum-hub .topic-list__cols { padding-block: 11px; background: rgba(3, 9, 22, .45); border-bottom: 1px solid var(--line); font: 700 .76rem/1.2 var(--font-display); color: var(--dim); }
.forum-hub .topic-list__cols span:first-child { grid-column: 1 / 3; }
.forum-hub .topic-list__cols span:nth-child(2), .forum-hub .topic-list__cols span:nth-child(3) { text-align: center; }
.forum-hub .topic-row { position: relative; padding-block: 14px; transition: background .18s; }
.forum-hub .topic-row + .topic-row { border-top: 1px solid var(--line); }
.forum-hub .topic-row:hover { background: rgba(47, 107, 255, .07); }
.forum-hub .topic-row.is-pinned { background: linear-gradient(90deg, rgba(147, 214, 255, .09), transparent 65%); }
.forum-hub .topic-row.is-pinned::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: linear-gradient(180deg, var(--ice), var(--sapphire)); box-shadow: 0 0 10px rgba(110, 170, 255, .7); }
.forum-hub .topic-row__avatar .avatar { --avatar: 44px; }
.forum-hub .topic-row__main { min-width: 0; }
.forum-hub .topic-row__flags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 6px; position: relative; z-index: 1; }
.forum-hub .topic-row h3 { margin: 0; font: 700 1.03rem/1.35 var(--font-text); }
.forum-hub .topic-row__link { color: var(--frost); }
.forum-hub .topic-row__link::after { content: ""; position: absolute; inset: 0; z-index: 0; }
.forum-hub .topic-row:hover .topic-row__link { color: #fff; }
.forum-hub .topic-row__link:focus-visible { outline: none; }
.forum-hub .topic-row__link:focus-visible::after { box-shadow: inset 0 0 0 2px var(--ice); }
.forum-hub .topic-row.is-locked .topic-row__link { color: var(--mist); }
.forum-hub .topic-row__author { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; margin: 4px 0 0; color: var(--dim); font-size: .84rem; }
.forum-hub .topic-row__author .badged-name { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 4px; }
.forum-hub .topic-row__author a { color: var(--mist); }
.forum-hub .topic-row__author a:hover .player-name { text-decoration: underline; }
.forum-hub .topic-row__time::before { content: "·"; margin-right: 6px; }
.forum-hub .topic-row__stats { display: contents; }
.forum-hub .topic-row__stats > div { display: flex; flex-direction: column-reverse; align-items: center; margin: 0; }
.forum-hub .topic-row__stats dt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.forum-hub .topic-row__stats dd { margin: 0; font: 700 1.1rem/1 var(--font-display); color: var(--frost); font-variant-numeric: tabular-nums; }
.forum-hub .topic-row__latest { position: relative; z-index: 1; display: grid; gap: 1px; min-width: 0; font-size: .82rem; line-height: 1.35; color: var(--dim); }
.forum-hub .topic-row__latest-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.forum-hub .topic-row__latest b { color: var(--frost); font-size: .88rem; }
.forum-hub .topic-row__latest span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* --------------------------------------------------------------------------
   Sidebar
   -------------------------------------------------------------------------- */
.forum-hub .forum-sidebar { display: grid; gap: 16px; min-width: 0; }
.forum-hub .side-card--account { background: linear-gradient(160deg, rgba(47, 107, 255, .2), rgba(12, 26, 52, .82) 55%); border-color: rgba(110, 160, 255, .3); }
.forum-hub .side-card--account .btn-block { margin-top: 16px; }
.forum-hub .side-account { display: flex; align-items: center; gap: 14px; }
.forum-hub .side-account .avatar { --avatar: 58px; box-shadow: 0 0 0 3px rgba(7, 16, 34, .9), 0 0 0 4px var(--line-3); }
.forum-hub .side-account small { display: block; font: 700 .76rem/1.2 var(--font-display); color: var(--dim); }
.forum-hub .side-account__name { margin: 3px 0 2px; font-size: 1.1rem; line-height: 1.2; }
.forum-hub .side-account__links { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }

.forum-hub .side-boards { list-style: none; margin: 0 -8px; padding: 0; display: grid; gap: 2px; }
.forum-hub .side-boards a { position: relative; display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 40px; padding: 6px 10px; border-radius: var(--r-sm); color: var(--mist); font-size: .92rem; font-weight: 700; }
.forum-hub .side-boards a svg { width: 18px; height: 18px; color: var(--ice); }
.forum-hub .side-boards a b { font: 700 .8rem/1 var(--font-display); color: var(--dim); font-variant-numeric: tabular-nums; }
.forum-hub .side-boards a:hover { background: rgba(47, 107, 255, .12); color: #fff; }
.forum-hub .side-boards a.is-current { background: rgba(47, 107, 255, .18); color: #fff; }
.forum-hub .side-boards a.is-current::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 3px; background: var(--ice); box-shadow: 0 0 8px var(--ice); }

.forum-hub .side-links { list-style: none; margin: 0 -8px; padding: 0; display: grid; gap: 2px; }
.forum-hub .side-links a { display: grid; grid-template-columns: 34px minmax(0, 1fr); align-items: center; gap: 12px; min-height: 44px; padding: 6px 8px; border-radius: var(--r-sm); color: var(--mist); }
.forum-hub .side-links__icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; color: var(--ice); background: rgba(47, 107, 255, .13); border: 1px solid var(--line); transition: color .15s, background .15s; }
.forum-hub .side-links__icon svg { width: 18px; height: 18px; }
.forum-hub .side-links b { display: block; color: var(--frost); font-size: .92rem; line-height: 1.25; }
.forum-hub .side-links small { display: block; color: var(--dim); font-size: .78rem; line-height: 1.3; }
.forum-hub .side-links a:hover { background: rgba(47, 107, 255, .1); }
.forum-hub .side-links a:hover .side-links__icon { color: #fff; background: var(--sapphire); }
.forum-hub .latest-list { list-style: none; margin: 0; padding: 0; }
.forum-hub .latest-list li { display: grid; gap: 3px; padding: 10px 0; border-top: 1px solid var(--line); }
.forum-hub .latest-list li:first-child { padding-top: 0; border-top: 0; }
.forum-hub .latest-list li:last-child { padding-bottom: 0; }
.forum-hub .latest-list a { color: var(--frost); font-weight: 700; font-size: .92rem; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.forum-hub .latest-list a:hover { color: var(--ice-2); }
.forum-hub .latest-list span { color: var(--dim); font-size: .78rem; }

.forum-hub .active-members { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.forum-hub .active-members li { display: flex; align-items: center; gap: 6px; min-height: 32px; }
.forum-hub .active-members a { display: inline-flex; align-items: center; gap: 10px; color: var(--mist); font-size: .92rem; }
.forum-hub .active-members a:hover .player-name { text-decoration: underline; }
.forum-hub .active-dot { width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--aurora); box-shadow: 0 0 0 3px rgba(69, 227, 207, .15), 0 0 8px var(--aurora); }

/* --------------------------------------------------------------------------
   Topic page
   -------------------------------------------------------------------------- */
.forum-hub .topic-hero { position: relative; isolation: isolate; overflow: hidden; padding: clamp(22px, 3.2vw, 36px) 0 clamp(20px, 2.8vw, 30px); border-bottom: 1px solid var(--line); }
.forum-hub .topic-hero__art { position: absolute; inset: 0; z-index: -2; background-size: cover; background-position: center 35%; opacity: .32; }
.forum-hub .topic-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(6, 13, 29, .97) 0%, rgba(6, 13, 29, .86) 50%, rgba(6, 13, 29, .55) 100%), linear-gradient(0deg, var(--night-1), transparent 70%); }
.forum-hub .topic-hero .breadcrumbs { margin-bottom: 14px; }
.forum-hub .topic-hero .breadcrumbs span[aria-current] { max-width: 42ch; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.forum-hub .topic-hero__row { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px 32px; }
.forum-hub .topic-hero__copy { min-width: 0; }
.forum-hub .topic-flags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.forum-hub .topic-hero h1 { margin: 0 0 14px; max-width: 44ch; font-size: clamp(1.38rem, 2.24vw, 1.94rem); line-height: 1.1; overflow-wrap: anywhere; }
.forum-hub .topic-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; margin: 0; color: var(--dim); font-size: .88rem; }
.forum-hub .topic-meta > span { display: inline-flex; align-items: center; gap: 7px; }
.forum-hub .topic-meta svg { width: 15px; height: 15px; color: var(--sapphire-2); }
.forum-hub .topic-meta__author a { color: var(--frost); }
.forum-hub .topic-meta .avatar { --avatar: 26px; box-shadow: none; }
.forum-hub .topic-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; flex: none; }
.forum-hub .topic-tools .btn-sm { min-height: 40px; }

.forum-hub .mod-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 18px; padding: 10px 14px; border-radius: var(--r-md); border: 1px dashed rgba(255, 183, 77, .45); background: rgba(255, 183, 77, .06); }
.forum-hub .mod-bar__label { display: inline-flex; align-items: center; gap: 8px; font: 700 .82rem/1 var(--font-display); color: #ffd08a; }
.forum-hub .mod-bar__label svg { width: 16px; height: 16px; }
.forum-hub .mod-bar form { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.forum-hub .mod-bar .btn svg { width: 15px; height: 15px; }

.forum-hub .topic-body { padding-top: clamp(20px, 2.6vw, 30px); }
.forum-hub .topic-body > .alert { margin-bottom: 16px; }
.forum-hub .topic-body > .s53-pagination:first-of-type { margin-top: 0; padding-top: 0; border-top: 0; margin-bottom: 16px; }
.forum-hub .topic-missing { padding-block: clamp(48px, 8vw, 96px); }

.forum-hub .post-list { display: grid; gap: 12px; }
.forum-hub .forum-post {
  position: relative; display: grid; grid-template-columns: 188px minmax(0, 1fr); border-radius: var(--r-lg); overflow: hidden;
  border: 1px solid var(--line); background: linear-gradient(180deg, rgba(14, 29, 56, .8), rgba(8, 18, 37, .88)); box-shadow: var(--shadow-1);
  scroll-margin-top: calc(var(--header-h) + 18px); transition: border-color .3s, box-shadow .3s;
}
.forum-hub .forum-post.original { border-color: rgba(110, 160, 255, .36); box-shadow: var(--shadow-1), 0 0 0 1px rgba(47, 107, 255, .1), 0 0 38px rgba(47, 107, 255, .1); }
.forum-hub .forum-post.original::before { content: ""; position: absolute; inset: 0 0 auto; height: 2px; background: linear-gradient(90deg, transparent, var(--sapphire-2) 20%, var(--ice) 50%, var(--sapphire-2) 80%, transparent); opacity: .8; z-index: 1; }
.forum-hub .forum-post:target { border-color: rgba(147, 214, 255, .6); box-shadow: 0 0 0 1px rgba(147, 214, 255, .4), 0 0 36px rgba(47, 107, 255, .28); }

.forum-hub .post-author {
  display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 18px 14px 16px; text-align: center;
  background: linear-gradient(180deg, rgba(47, 107, 255, .07), rgba(3, 9, 22, .35)); border-right: 1px solid var(--line);
}
.forum-hub .post-author .avatar { --avatar: 72px; box-shadow: 0 0 0 3px rgba(7, 16, 34, .9), 0 0 0 4px var(--line-2), 0 12px 26px rgba(0, 0, 0, .4); }
.forum-hub .forum-post.original .post-author .avatar { box-shadow: 0 0 0 3px rgba(7, 16, 34, .9), 0 0 0 4px rgba(147, 214, 255, .55), 0 0 22px rgba(47, 107, 255, .35); }
.forum-hub .post-author__id { display: grid; justify-items: center; gap: 6px; min-width: 0; max-width: 100%; }
.forum-hub .post-author__name { margin: 0; font: 700 1.02rem/1.25 var(--font-text); overflow-wrap: anywhere; }
.forum-hub .post-author__name a { color: var(--frost); }
.forum-hub .post-author__name a:hover .player-name { text-decoration: underline; }
.forum-hub .post-author__tags { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 5px; }
.forum-hub .post-starter { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px; font: 700 .74rem/1.4 var(--font-display); color: var(--ice); border: 1px dashed rgba(147, 214, 255, .45); }
.forum-hub .post-author__stats { display: grid; grid-template-columns: 1fr 1fr; width: 100%; margin: 2px 0 0; padding-top: 10px; border-top: 1px solid var(--line); }
.forum-hub .post-author__stats > div { display: flex; flex-direction: column-reverse; align-items: center; gap: 3px; }
.forum-hub .post-author__stats > div + div { border-left: 1px solid var(--line); }
.forum-hub .post-author__stats dt { font: 700 .74rem/1.2 var(--font-display); color: var(--dim); }
.forum-hub .post-author__stats dd { margin: 0; font: 700 .95rem/1.1 var(--font-display); color: var(--frost); font-variant-numeric: tabular-nums; white-space: nowrap; }

.forum-hub .post-content { display: flex; flex-direction: column; min-width: 0; }
.forum-hub .post-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; min-height: 54px; padding: 8px 12px 8px 22px; border-bottom: 1px solid var(--line); color: var(--dim); font-size: .84rem; }
.forum-hub .post-number { display: inline-flex; align-items: center; min-height: 32px; font: 700 .95rem/1 var(--font-display); color: var(--ice); }
.forum-hub .post-number:hover { color: #fff; }
.forum-hub .post-label { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 999px; font: 700 .74rem/1.3 var(--font-display); color: #fff; background: linear-gradient(180deg, #4a84ff, #2350d8); box-shadow: 0 4px 12px rgba(40, 100, 255, .3); }
.forum-hub .post-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-left: auto; }
.forum-hub .post-actions form { display: flex; margin: 0; }
.forum-hub .post-action {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border-radius: 999px;
  background: transparent; border: 1px solid transparent; color: var(--mist);
  font: 700 .82rem/1 var(--font-display); cursor: pointer;
  transition: color .15s, background .15s, border-color .15s;
}
.forum-hub .post-action svg { width: 15px; height: 15px; }
.forum-hub .post-action:hover { color: #fff; background: rgba(147, 214, 255, .08); border-color: var(--line-2); }
.forum-hub .post-action:focus-visible { outline: none; box-shadow: var(--focus); }
.forum-hub .post-action--danger { color: #ffb8c1; }
.forum-hub .post-action--danger:hover { color: #fff; background: rgba(255, 107, 125, .14); border-color: rgba(255, 107, 125, .45); }
.forum-hub .post-content > .post-body { flex: 1; padding: 20px 26px 26px; }

/* Rendered post content (forum_body) — also the editor preview */
.forum-hub .post-body { font-size: 1rem; line-height: 1.7; }
.forum-hub .post-body h2 { margin: 1.1em 0 .4em; font-size: 1.45rem; }
.forum-hub .post-body h3 { margin: 1em 0 .35em; font-size: 1.12rem; }
.forum-hub .post-body > :first-child { margin-top: 0; }
.forum-hub .post-body .forum-quote { margin: .8em 0; padding: 12px 16px 12px 18px; border-left: 3px solid var(--sapphire-2); border-radius: 0 var(--r-md) var(--r-md) 0; background: rgba(47, 107, 255, .08); color: var(--mist); font-size: .96rem; }
.forum-hub .post-body .forum-quote cite { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font: 700 .8rem/1.2 var(--font-display); font-style: normal; color: var(--ice); }
.forum-hub .post-body .forum-quote cite::before { content: "“"; font: 700 1.35rem/0 Georgia, serif; color: var(--sapphire-2); transform: translateY(4px); }
.forum-hub .post-body .forum-quote .forum-quote { background: rgba(3, 9, 22, .35); }
.forum-hub .post-body .forum-code { margin: .8em 0; padding: 14px 16px; border-radius: var(--r-md); background: #040a18; border: 1px solid var(--line); overflow-x: auto; }
.forum-hub .post-body .forum-code code { display: block; padding: 0; border: 0; background: none; color: #cfe6ff; font-size: .88rem; line-height: 1.55; white-space: pre; }
.forum-hub .post-body .forum-spoiler { margin: .8em 0; border-radius: var(--r-md); border: 1px dashed var(--line-3); background: rgba(3, 9, 22, .4); }
.forum-hub .post-body .forum-spoiler > summary { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 8px 14px; list-style: none; font: 700 .86rem/1.2 var(--font-display); color: var(--ice); border-radius: inherit; }
.forum-hub .post-body .forum-spoiler > summary::-webkit-details-marker { display: none; }
.forum-hub .post-body .forum-spoiler > summary::before { content: ""; width: 8px; height: 8px; flex: none; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform .2s var(--ease); }
.forum-hub .post-body .forum-spoiler[open] > summary::before { transform: rotate(45deg); }
.forum-hub .post-body .forum-spoiler > summary:hover { color: #fff; background: rgba(47, 107, 255, .08); }
.forum-hub .post-body .forum-spoiler > div { padding: 4px 16px 14px; }
.forum-hub .post-body .forum-list { margin: .6em 0; }
.forum-hub .post-body .forum-video { position: relative; max-width: 760px; margin: .9em 0; aspect-ratio: 16 / 9; border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--line-2); background: #000; box-shadow: 0 14px 34px rgba(0, 0, 0, .4); }
.forum-hub .post-body .forum-video iframe { display: block; width: 100%; height: 100%; border: 0; }
.forum-hub .post-body .forum-image { margin: .9em 0; }
.forum-hub .post-body .forum-image img { display: block; width: auto; max-width: 100%; max-height: 560px; }
.forum-hub .post-body .forum-link { color: var(--ice); }
.forum-hub .post-body .forum-link:hover { color: #fff; }
/* A block already ends its line, so the newline typed after it would add a blank line */
.forum-hub .post-body :is(.forum-quote, .forum-code, .forum-spoiler, .forum-list, .forum-video, .forum-image, h2, h3) + br { display: none; }
.forum-hub .forum-signature { margin-top: 18px; padding-top: 12px; border-top: 1px dashed var(--line-2); color: var(--dim); font-size: .88rem; }

/* forum_post_tools() output (reactions / permalink / report), if a page renders it */
.forum-hub .post-extras { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 16px 12px 22px; border-top: 1px solid var(--line); }
.forum-hub .post-reactions, .forum-hub .post-utility { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.forum-hub .post-reactions form { margin: 0; }
.forum-hub .reaction-button, .forum-hub .reaction-readonly { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(14, 30, 58, .5); color: var(--mist); font-size: .84rem; font-weight: 700; }
.forum-hub .reaction-button:hover { color: #fff; border-color: var(--line-3); }
.forum-hub .reaction-button.active { color: #fff; border-color: rgba(147, 214, 255, .6); background: rgba(47, 107, 255, .28); }
.forum-hub .reaction-button b, .forum-hub .reaction-readonly b { font: 700 .8rem/1 var(--font-display); color: var(--ice-2); }
.forum-hub .post-utility > a, .forum-hub .report-menu > summary { display: inline-flex; align-items: center; min-height: 34px; padding: 0 10px; border-radius: 999px; font: 700 .8rem/1 var(--font-display); color: var(--mist); list-style: none; }
.forum-hub .post-utility > a:hover, .forum-hub .report-menu > summary:hover { color: #fff; background: rgba(147, 214, 255, .08); }
.forum-hub .report-menu { position: relative; }
.forum-hub .report-menu > summary::-webkit-details-marker { display: none; }
.forum-hub .report-menu form { position: absolute; right: 0; top: calc(100% + 6px); z-index: 10; display: grid; gap: 8px; width: 240px; padding: 12px; border-radius: var(--r-md); background: #0d1d3b; border: 1px solid var(--line-2); box-shadow: var(--shadow-2); }
.forum-hub .report-menu form button { min-height: 38px; border-radius: var(--r-sm); border: 1px solid rgba(255, 107, 125, .45); background: rgba(120, 20, 40, .35); color: #ffd9de; font: 700 .84rem/1 var(--font-display); }

/* Reply box */
.forum-hub .topic-body > .s53-pagination { margin-bottom: 0; }
.forum-hub .reply-box {
  position: relative; margin-top: 28px; padding: clamp(18px, 2.4vw, 28px); border-radius: var(--r-lg); scroll-margin-top: calc(var(--header-h) + 18px);
  background: linear-gradient(180deg, rgba(18, 36, 68, .74), rgba(10, 22, 42, .86)); border: 1px solid rgba(110, 160, 255, .28); box-shadow: var(--shadow-1);
}
.forum-hub .reply-box::before { content: ""; position: absolute; inset: 0 0 auto; height: 1px; border-radius: inherit; background: linear-gradient(90deg, transparent, rgba(160, 205, 255, .4), transparent); pointer-events: none; }
.forum-hub .reply-box__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; margin-bottom: 16px; }
.forum-hub .reply-box__head h2 { margin: 0; font-size: 1.45rem; }
.forum-hub .reply-identity { display: inline-flex; align-items: center; gap: 10px; color: var(--dim); font-size: .88rem; }
.forum-hub .reply-identity .avatar { --avatar: 32px; box-shadow: none; }
.forum-hub .reply-box > .alert { margin-bottom: 14px; }
.forum-hub .reply-box form { margin: 0; }
.forum-hub .reply-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin-top: 16px; }
.forum-hub .reply-actions > span { color: var(--dim); font-size: .86rem; }
.forum-hub .reply-box--closed { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 18px 22px; border-color: var(--line-2); }
.forum-hub .reply-box__icon { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; color: #fff; background: radial-gradient(circle at 50% 30%, #4c86ff, #1a3fb7 60%, #0d2a7a); box-shadow: 0 0 0 1px rgba(170, 210, 255, .45), 0 0 0 5px rgba(10, 22, 44, .8), 0 0 0 6px var(--line-2); }
.forum-hub .reply-box__icon svg { width: 24px; height: 24px; }
.forum-hub .topic-hero.is-locked ~ .topic-body .reply-box--closed .reply-box__icon { background: radial-gradient(circle at 50% 30%, #8d9bb6, #4a5873 60%, #2a3448); }
.forum-hub .reply-box__copy h2 { margin: 0 0 4px; font-size: 1.3rem; }
.forum-hub .reply-box__copy p { margin: 0; color: var(--dim); }
.forum-hub .reply-box__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }

/* Related topics */
.forum-hub .related-topics { margin-top: clamp(36px, 5vw, 56px); }
.forum-hub .related-topics__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 20px; margin-bottom: 16px; }
.forum-hub .related-topics__head h2 { margin: 0; font-size: clamp(1.16rem, 1.89vw, 1.46rem); }
.forum-hub .related-list { list-style: none; margin: 0; padding: 0; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); background: rgba(10, 22, 42, .5); }
.forum-hub .related-list li + li { border-top: 1px solid var(--line); }
.forum-hub .related-list a { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 13px 18px; color: var(--mist); transition: background .18s; }
.forum-hub .related-list a:hover { background: rgba(47, 107, 255, .08); }
.forum-hub .related-list__icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; color: var(--ice); background: rgba(47, 107, 255, .13); border: 1px solid var(--line); }
.forum-hub .related-list__icon svg { width: 19px; height: 19px; }
.forum-hub .related-list__title { display: grid; gap: 2px; min-width: 0; }
.forum-hub .related-list__title b { font-size: .98rem; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.forum-hub .related-list a:hover b { color: #fff; }
.forum-hub .related-list__title small { color: var(--dim); font-size: .8rem; }
.forum-hub .related-list__stats { color: var(--dim); font-size: .84rem; white-space: nowrap; }

/* --------------------------------------------------------------------------
   Rich editor (forum_editor) — replies, new topics and edits
   -------------------------------------------------------------------------- */
.forum-hub .rich-editor { border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--line-2); background: rgba(3, 9, 22, .72); box-shadow: inset 0 2px 8px rgba(0, 0, 0, .3); transition: border-color .15s, box-shadow .15s; }
.forum-hub .rich-editor:hover { border-color: var(--line-3); }
.forum-hub .rich-editor:focus-within { border-color: var(--ice); box-shadow: var(--focus), inset 0 2px 8px rgba(0, 0, 0, .3); }
.forum-hub .editor-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 3px; padding: 7px 8px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, rgba(20, 40, 76, .65), rgba(12, 26, 50, .65)); }
.forum-hub .editor-toolbar button {
  position: relative; display: inline-grid; place-items: center; min-width: 38px; height: 38px; padding: 0 10px; border-radius: 8px;
  border: 1px solid transparent; background: transparent; color: var(--mist);
  font: 700 .82rem/1 var(--font-display); transition: color .15s, background .15s, border-color .15s;
}
.forum-hub .editor-toolbar button[data-editor-tag] { font: 700 1rem/1 var(--font-text); letter-spacing: 0; text-transform: none; }
.forum-hub .editor-toolbar button[data-editor-tag="h2"] { font: 700 1.02rem/1 var(--font-display); }
.forum-hub .editor-toolbar button b, .forum-hub .editor-toolbar button i, .forum-hub .editor-toolbar button u, .forum-hub .editor-toolbar button s { color: inherit; font-weight: 700; }
.forum-hub .editor-toolbar button:hover { color: #fff; background: rgba(147, 214, 255, .1); border-color: var(--line-2); }
.forum-hub .editor-toolbar button:focus-visible { outline: none; box-shadow: var(--focus); color: #fff; }
.forum-hub .editor-toolbar button:nth-child(6), .forum-hub .editor-toolbar button:nth-child(9) { margin-left: 9px; }
.forum-hub .editor-toolbar button:nth-child(6)::before, .forum-hub .editor-toolbar button:nth-child(9)::before { content: ""; position: absolute; left: -7px; top: 9px; bottom: 9px; width: 1px; background: var(--line-2); }
.forum-hub .rich-editor textarea { display: block; min-height: 200px; padding: 16px 18px; border: 0; border-radius: 0; background: transparent; box-shadow: none; font-size: 1rem; line-height: 1.65; }
.forum-hub .rich-editor textarea:hover, .forum-hub .rich-editor textarea:focus, .forum-hub .rich-editor textarea:focus-visible { border: 0; box-shadow: none; background: transparent; }
.forum-hub .editor-preview { min-height: 200px; padding: 16px 18px; background: rgba(12, 26, 50, .35); }
.forum-hub .editor-preview-empty { margin: 0; color: var(--dim); font-style: italic; }
.forum-hub .rich-editor > footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; padding: 7px 8px 7px 16px; border-top: 1px solid var(--line); background: rgba(12, 26, 50, .5); color: var(--dim); font-size: .8rem; }
.forum-hub .rich-editor > footer b { color: var(--frost); font-variant-numeric: tabular-nums; }
.forum-hub .rich-editor > footer button {
  display: inline-flex; align-items: center; min-height: 36px; padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--line-3); background: rgba(20, 40, 76, .7); color: var(--frost);
  font: 700 .82rem/1 var(--font-display); transition: background .15s, border-color .15s;
}
.forum-hub .rich-editor > footer button:hover { color: #fff; border-color: var(--ice); background: rgba(30, 60, 110, .85); }
.forum-hub .rich-editor > footer button:focus-visible { outline: none; box-shadow: var(--focus); }
.forum-hub .rich-editor.previewing > footer button { color: #fff; border-color: #6c9dff; background: linear-gradient(180deg, #4a84ff, #2350d8); }
.forum-hub .rich-editor.previewing .editor-toolbar button { opacity: .45; }

/* --------------------------------------------------------------------------
   Composer pages (new topic, edit post)
   -------------------------------------------------------------------------- */
.forum-hub .composer-hero { padding: clamp(26px, 3.6vw, 42px) 0 clamp(22px, 3vw, 32px); }
.forum-hub .composer-hero h1 { max-width: none; font-size: clamp(1.63rem, 2.75vw, 2.24rem); margin-bottom: 8px; }
.forum-hub .composer-hero .breadcrumbs span[aria-current] { color: var(--frost); }
.forum-hub .composer-hero .breadcrumbs a { max-width: 36ch; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.forum-hub .composer-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: clamp(22px, 3vw, 36px); align-items: start; padding-top: clamp(22px, 3vw, 32px); }
.forum-hub .composer-card {
  position: relative; min-width: 0; padding: clamp(18px, 2.6vw, 30px); border-radius: var(--r-lg);
  background: linear-gradient(180deg, rgba(18, 36, 68, .74), rgba(10, 22, 42, .86)); border: 1px solid var(--line); box-shadow: var(--shadow-1);
}
.forum-hub .composer-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 1px; border-radius: inherit; background: linear-gradient(90deg, transparent, rgba(160, 205, 255, .35), transparent); pointer-events: none; }
.forum-hub .composer-form { margin: 0; }
.forum-hub .composer-fields { display: grid; grid-template-columns: minmax(0, 17rem) minmax(0, 1fr); gap: 0 16px; }
.forum-hub .composer-fields .field { align-content: start; margin-bottom: 18px; }
.forum-hub .composer-editor { min-width: 0; margin: 0; padding: 0; border: 0; }
.forum-hub .composer-editor legend { margin-bottom: 7px; padding: 0; font: 700 .9rem/1.3 var(--font-text); letter-spacing: 0; text-transform: none; color: var(--frost); }
.forum-hub .composer-editor .rich-editor textarea { min-height: 280px; }
.forum-hub .composer-editor .editor-preview { min-height: 280px; }
.forum-hub .composer-hints { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px; margin-top: 10px; color: var(--dim); font-size: .84rem; }
.forum-hub .composer-hints a { color: var(--ice); font-weight: 700; }
.forum-hub .composer-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.forum-hub .composer-aside { display: grid; gap: 16px; min-width: 0; }
.forum-hub .composer-steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; gap: 14px; }
.forum-hub .composer-steps li { position: relative; counter-increment: step; padding-left: 38px; color: var(--mist); font-size: .9rem; line-height: 1.5; }
.forum-hub .composer-steps li::before {
  content: counter(step); position: absolute; left: 0; top: -1px; display: grid; place-items: center; width: 26px; height: 26px;
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); background: linear-gradient(135deg, #8fb8ff, var(--sapphire) 50%, var(--sapphire-ink));
  color: #fff; font: 700 .8rem/1 var(--font-display);
}
.forum-hub .composer-steps b { display: block; color: var(--frost); }
.forum-hub .format-guide > p { color: var(--dim); font-size: .86rem; }
.forum-hub .format-list { margin: 0; display: grid; }
.forum-hub .format-list > div { display: grid; gap: 3px; padding: 9px 0; border-top: 1px solid var(--line); }
.forum-hub .format-list > div:first-child { border-top: 0; padding-top: 0; }
.forum-hub .format-list dt code { font-size: .8rem; overflow-wrap: anywhere; }
.forum-hub .format-list dd { margin: 0; color: var(--dim); font-size: .82rem; }
.forum-hub .format-list dd code { font-size: .76rem; }
.forum-hub .edit-context__list { margin: 0; display: grid; }
.forum-hub .edit-context__list > div { display: grid; gap: 2px; padding: 9px 0; border-top: 1px solid var(--line); }
.forum-hub .edit-context__list > div:first-child { border-top: 0; padding-top: 0; }
.forum-hub .edit-context__list dt { font: 700 .74rem/1.2 var(--font-display); color: var(--dim); }
.forum-hub .edit-context__list dd { margin: 0; color: var(--frost); font-weight: 700; font-size: .92rem; overflow-wrap: anywhere; }
.forum-hub .edit-context__note { display: flex; align-items: flex-start; gap: 8px; margin: 12px 0 0; padding: 10px 12px; border-radius: var(--r-sm); background: rgba(255, 183, 77, .08); border: 1px solid rgba(255, 183, 77, .3); color: #ffe2b8; font-size: .86rem; line-height: 1.45; }
.forum-hub .edit-context__note svg { width: 16px; height: 16px; margin-top: 2px; flex: none; }
.forum-hub .composer-problem { padding-block: clamp(48px, 8vw, 96px); }
.forum-hub .composer-problem .forum-empty, .forum-hub .topic-missing .forum-empty { max-width: 640px; margin-inline: auto; padding-inline: 24px; }
.forum-hub .forum-empty h1 { margin: 4px 0 0; font-size: clamp(1.38rem, 2.58vw, 1.89rem); }
.forum-hub .forum-empty .btn { margin-top: 10px; }
.forum-hub .empty-state__icon { width: 46px; height: 46px; }
.forum-hub .composer-problem h1 { font-size: clamp(1.38rem, 2.58vw, 1.89rem); margin: 0; }

/* --------------------------------------------------------------------------
   Responsive — forums
   -------------------------------------------------------------------------- */
@media (max-width: 1180px) {
  .forum-hub .board-row { grid-template-columns: 52px minmax(0, 1fr) 118px 200px; gap: 14px; }
  .forum-hub .topic-list__cols, .forum-hub .topic-row { grid-template-columns: 44px minmax(0, 1fr) 60px 60px 150px; column-gap: 12px; }
}
@media (max-width: 1020px) {
  .forum-hub .forum-hero__inner { grid-template-columns: 1fr; align-items: start; }
  .forum-hub .forum-hero__side { max-width: 620px; }
  .forum-hub .forum-layout { grid-template-columns: 1fr; }
  .forum-hub .forum-sidebar { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); align-items: start; }
  .forum-hub .composer-layout { grid-template-columns: 1fr; }
  .forum-hub .composer-aside { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); align-items: start; }
}
@media (max-width: 860px) {
  .forum-hub .board-row { grid-template-columns: 52px minmax(0, 1fr) auto; row-gap: 10px; }
  .forum-hub .board-latest { grid-column: 2 / -1; padding-left: 0; border-left: 0; }
  .forum-hub .board-latest--empty { display: none; }
  .forum-hub .editor-toolbar { flex-wrap: nowrap; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; scrollbar-color: var(--line-3) transparent; }
  .forum-hub .editor-toolbar button { flex: none; }
  .forum-hub .topic-list__cols { display: none; }
  .forum-hub .topic-row { grid-template-columns: 44px minmax(0, 1fr) auto; row-gap: 8px; }
  .forum-hub .topic-row__stats { display: flex; grid-column: 3; grid-row: 1; gap: 14px; margin: 0; }
  .forum-hub .topic-row__latest { grid-column: 2 / -1; grid-row: 2; display: flex; flex-wrap: wrap; gap: 0 6px; }
  .forum-hub .topic-row__latest-label { position: static; width: auto; height: auto; clip: auto; overflow: visible; }
  .forum-hub .topic-row__latest b { font-size: .82rem; font-weight: 400; color: var(--mist); }
  .forum-hub .topic-row__stats dt { position: static; width: auto; height: auto; clip: auto; overflow: visible; font: 700 .74rem/1.2 var(--font-display); color: var(--dim); }
  .forum-hub .topic-row__stats > div { gap: 3px; }
  .forum-hub .forum-post { grid-template-columns: 164px minmax(0, 1fr); }
  .forum-hub .post-author .avatar { --avatar: 60px; }
}
@media (max-width: 720px) {
  .forum-hub .forum-hero__board { gap: 14px; }
  .forum-hub .board-gem--lg { width: 56px; height: 56px; }
  .forum-hub .board-gem--lg::before { inset: 9px; border-radius: 10px; }
  .forum-hub .board-gem--lg svg { width: 24px; height: 24px; }
  .forum-hub .forum-hero__stats dd { font-size: 1.4rem; }
  .forum-hub .forum-hero__stats > div { padding: 0 16px; }
  .forum-hub .forum-hero__side { padding: 0; background: none; border: 0; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .forum-hub .forum-search label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

  .forum-hub .board-row { grid-template-columns: 44px minmax(0, 1fr); gap: 4px 12px; padding: 14px 16px; align-items: start; }
  .forum-hub .board-row--root { padding-block: 16px; }
  .forum-hub .board-gem { width: 44px; height: 44px; }
  .forum-hub .board-gem::before { inset: 7px; border-radius: 8px; }
  .forum-hub .board-gem svg { width: 19px; height: 19px; }
  .forum-hub .board-row--root h3 { font-size: 1.14rem; }
  .forum-hub .board-row__icon { width: 34px; height: 34px; margin: 2px 0 0 6px; }
  .forum-hub .board-row--child .board-row__title p { font-size: .84rem; }
  .forum-hub .board-counts { grid-column: 2; justify-content: flex-start; gap: 14px; margin-top: 4px; }
  .forum-hub .board-counts > div { flex-direction: row-reverse; align-items: baseline; gap: 5px; min-width: 0; }
  .forum-hub .board-counts dd, .forum-hub .board-row--child .board-counts dd { font-size: .95rem; color: var(--frost); }
  .forum-hub .board-latest { grid-column: 2; margin-top: 8px; padding: 9px 10px; border-radius: var(--r-sm); background: rgba(3, 9, 22, .38); border: 1px solid var(--line); }
  .forum-hub .board-latest .avatar { --avatar: 28px; }
  .forum-hub .board-latest--empty { display: none; }

  .forum-hub .subboard-strip { flex-wrap: nowrap; overflow-x: auto; margin-inline: calc(var(--gutter) * -1); padding: 2px var(--gutter) 6px; scrollbar-width: thin; }
  .forum-hub .subboard-strip a { flex: none; }
  .forum-hub .subboard-strip__label { flex: none; }

  .forum-hub .topic-row { grid-template-columns: 36px minmax(0, 1fr); gap: 6px 12px; padding: 14px 16px; align-items: start; }
  .forum-hub .topic-row__avatar .avatar { --avatar: 36px; }
  .forum-hub .topic-row__stats { grid-column: 2; grid-row: auto; gap: 14px; }
  .forum-hub .topic-row__stats > div { flex-direction: row-reverse; align-items: baseline; gap: 5px; }
  .forum-hub .topic-row__stats dd { font-size: .95rem; }
  .forum-hub .topic-row__latest { grid-column: 2; grid-row: auto; }
  .forum-hub .topic-row h3 { font-size: 1rem; }

  /* Topic: author column collapses into a compact header row */
  .forum-hub .topic-hero__row { flex-direction: column; align-items: stretch; }
  .forum-hub .topic-tools { justify-content: flex-start; }
  .forum-hub .topic-tools .btn-primary, .forum-hub .topic-tools .btn-secondary:not(.btn-sm) { flex: 1; }
  .forum-hub .topic-hero .breadcrumbs span[aria-current] { display: none; }
  .forum-hub .mod-bar { padding: 10px 12px; }
  .forum-hub .forum-post { grid-template-columns: minmax(0, 1fr); }
  .forum-hub .post-author {
    display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 0 12px; padding: 12px 14px 12px 16px; text-align: left;
    background: linear-gradient(90deg, rgba(47, 107, 255, .1), rgba(3, 9, 22, .25)); border-right: 0; border-bottom: 1px solid var(--line);
  }
  .forum-hub .post-author .avatar, .forum-hub .forum-post.original .post-author .avatar { --avatar: 44px; box-shadow: 0 0 0 2px rgba(7, 16, 34, .9), 0 0 0 3px var(--line-2); }
  .forum-hub .post-author__id { justify-items: start; gap: 3px; }
  .forum-hub .post-author__tags { justify-content: flex-start; }
  .forum-hub .post-author__stats { display: flex; width: auto; margin: 0; padding: 0; border: 0; gap: 12px; }
  .forum-hub .post-author__stats > div + div { border-left: 0; }
  .forum-hub .post-author__stats > div + div { display: none; }
  .forum-hub .post-author__stats > div { align-items: flex-end; }
  .forum-hub .post-head { min-height: 0; padding: 6px 8px 0 16px; border-bottom: 0; }
  .forum-hub .post-action { min-height: 40px; padding: 0 10px; }
  .forum-hub .post-content > .post-body { padding: 6px 16px 18px; }
  .forum-hub .reply-box { padding: 16px; }
  .forum-hub .reply-box--closed { grid-template-columns: auto minmax(0, 1fr); }
  .forum-hub .reply-box__actions { grid-column: 1 / -1; }
  .forum-hub .reply-box__actions .btn { flex: 1; }
  .forum-hub .reply-actions .btn { flex: 1; }
  .forum-hub .related-list a { grid-template-columns: 34px minmax(0, 1fr); padding: 12px 14px; }
  .forum-hub .related-list__icon { width: 34px; height: 34px; }
  .forum-hub .related-list__stats { grid-column: 2; font-size: .78rem; margin-top: -8px; }
  .forum-hub .related-list__title b { white-space: normal; }

  .forum-hub .editor-toolbar button { min-width: 40px; height: 40px; padding: 0 9px; }
  .forum-hub .rich-editor textarea, .forum-hub .editor-preview { min-height: 180px; }
  .forum-hub .composer-editor .rich-editor textarea, .forum-hub .composer-editor .editor-preview { min-height: 220px; }
  .forum-hub .composer-fields { grid-template-columns: 1fr; }
  .forum-hub .composer-card { padding: 16px; }
  .forum-hub .composer-actions { flex-direction: column-reverse; align-items: stretch; }
  .forum-hub .composer-actions .btn { width: 100%; }
}
@media (max-width: 400px) {
  .forum-hub .forum-search__box .btn { padding-inline: 14px; }
  .forum-hub .forum-hero__stats > div { padding: 0 12px; }
  .forum-hub .forum-hero__stats dd { font-size: 1.25rem; }
  .forum-hub .topic-meta { gap: 4px 12px; font-size: .84rem; }
  .forum-hub .post-author { grid-template-columns: 40px minmax(0, 1fr) auto; gap: 0 10px; }
  .forum-hub .post-author .avatar, .forum-hub .forum-post.original .post-author .avatar { --avatar: 40px; }
}

/* --------------------------------------------------------------------------
   Videos (youtube.php)
   -------------------------------------------------------------------------- */
.videos-page .icon { width: 18px; height: 18px; flex: none; }
.videos-page .videos-hero .page-hero__art { opacity: .6; background-position: center 30%; }
.videos-page .videos-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: clamp(22px, 3vw, 40px); align-items: start; padding-top: clamp(28px, 4vw, 48px); }
.videos-page .video-library {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(20px, 3vw, 36px); align-items: center; padding: clamp(18px, 2.6vw, 28px); border-radius: var(--r-lg);
  background: linear-gradient(180deg, rgba(16, 33, 62, .72), rgba(9, 20, 40, .84)); border: 1px solid var(--line); box-shadow: var(--shadow-1);
}
.videos-page .video-screen {
  position: relative; isolation: isolate; display: grid; place-items: center; align-content: center; gap: 16px; aspect-ratio: 16 / 10; border-radius: var(--r-md); overflow: hidden;
  background: radial-gradient(60% 70% at 50% 45%, rgba(47, 107, 255, .22), transparent 70%), linear-gradient(180deg, #0b1830, #050b18);
  border: 1px solid var(--line-2); box-shadow: inset 0 0 0 6px rgba(3, 8, 20, .6), inset 0 0 60px rgba(0, 0, 0, .6);
}
.videos-page .video-screen::before { content: ""; position: absolute; inset: 0; z-index: -1; background: repeating-linear-gradient(0deg, rgba(147, 214, 255, .035) 0 1px, transparent 1px 4px); }
.videos-page .video-screen::after { content: ""; position: absolute; left: 18px; right: 18px; bottom: 18px; height: 4px; border-radius: 4px; background: rgba(147, 214, 255, .12); }
.videos-page .video-screen__play { display: grid; place-items: center; width: 76px; height: 76px; border-radius: 50%; color: #fff; background: radial-gradient(circle at 50% 30%, #4c86ff, #1a3fb7 60%, #0d2a7a); box-shadow: 0 0 0 1px rgba(170, 210, 255, .5), 0 0 0 6px rgba(10, 22, 44, .8), 0 0 0 7px var(--line-2), 0 0 40px rgba(47, 107, 255, .45); }
.videos-page .video-screen__play svg { width: 32px; height: 32px; margin-left: 4px; }
.videos-page .video-screen__label { font: 700 .84rem/1.2 var(--font-display); color: var(--mist); }
.videos-page .video-library__copy h2 { margin: 0 0 10px; font-size: clamp(1.29rem, 2.06vw, 1.63rem); }
.videos-page .video-library__copy > p { color: var(--mist); }
.videos-page .video-links { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 8px; }
.videos-page .video-links a { display: grid; grid-template-columns: 40px minmax(0, 1fr) 20px; align-items: center; gap: 14px; padding: 12px 14px; border-radius: var(--r-md); background: rgba(8, 18, 36, .6); border: 1px solid var(--line); color: var(--mist); transition: background .18s, border-color .18s; }
.videos-page .video-links a:hover { background: rgba(20, 42, 80, .65); border-color: var(--line-2); }
.videos-page .video-links__icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; color: var(--ice); background: rgba(47, 107, 255, .14); border: 1px solid var(--line); }
.videos-page .video-links__icon svg { width: 20px; height: 20px; }
.videos-page .video-links b { display: block; color: var(--frost); font-size: .98rem; line-height: 1.3; }
.videos-page .video-links small { display: block; color: var(--dim); font-size: .82rem; line-height: 1.35; }
.videos-page .video-links__go { color: var(--ice); transition: transform .2s var(--ease); }
.videos-page .video-links a:hover .video-links__go { transform: translateX(3px); }
.videos-page .creator-card {
  position: relative; display: grid; justify-items: start; padding: clamp(20px, 2.6vw, 28px); border-radius: var(--r-lg);
  background: radial-gradient(420px 220px at 100% 0, rgba(47, 107, 255, .22), transparent 70%), linear-gradient(180deg, rgba(16, 33, 62, .76), rgba(9, 20, 40, .88));
  border: 1px solid rgba(110, 160, 255, .3); box-shadow: var(--shadow-1);
}
.videos-page .creator-card__medallion { display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 16px; border-radius: 50%; color: #fff; background: radial-gradient(circle at 50% 30%, #4c86ff, #1a3fb7 60%, #0d2a7a); box-shadow: 0 0 0 1px rgba(170, 210, 255, .45), 0 0 0 5px rgba(10, 22, 44, .8), 0 0 0 6px var(--line-2), 0 10px 24px rgba(0, 0, 0, .4); }
.videos-page .creator-card__medallion svg { width: 26px; height: 26px; }
.videos-page .creator-card h2 { margin: 0 0 10px; font-size: clamp(1.2rem, 1.89vw, 1.46rem); }
.videos-page .creator-card > p { color: var(--mist); font-size: .95rem; }
.videos-page .creator-card .btn-block { margin-top: 6px; }
.videos-page .creator-card__foot { margin: 14px 0 0; color: var(--dim); font-size: .86rem; }
@media (max-width: 1020px) {
  .videos-page .videos-layout { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .videos-page .video-library { grid-template-columns: 1fr; padding: 16px; }
  .videos-page .video-screen { aspect-ratio: 16 / 9; }
  .videos-page .video-screen__play { width: 62px; height: 62px; }
  .videos-page .video-screen__play svg { width: 26px; height: 26px; }
}
