:root {
  --hlp-bg: #0a0808;
  --hlp-surface: #170d0d;
  --hlp-surface2: #1f1010;
  --hlp-primary: #c0392b;
  --hlp-orange: #e05a00;
  --hlp-cta: #ff4500;
  --hlp-text: #f5f0f0;
  --hlp-muted: #9a8080;
  --hlp-border: #2d1515;
  --hlp-discord: #5865f2;

  --hlptn-h: 0px;
  --hlptn-border: 0px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--hlp-bg);
  color: var(--hlp-text);
  font-family: "Inter", sans-serif;
  font-size: 0.95rem;
}


body:has(hlp-topnav) {
  --hlptn-h: 48px;
  --hlptn-border: 1px;
  padding-top: var(--hlptn-h);
}

/* matches the component's own breakpoint */
@media (max-width: 720px) {
  body:has(hlp-topnav) {
    --hlptn-h: 44px;
  }
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Rajdhani", sans-serif;
}

/* ── NAVBAR ─────────────────────────────────────────── */
.hlp-navbar {
  background: rgba(10, 8, 8, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--hlp-border);
  padding: 0.6rem 0;
  top: calc(var(--hlptn-h) + var(--hlptn-border));
}

.hlp-navbar .navbar-brand img {
  height: 42px;
}

.hlp-navbar-username {
  color: var(--hlp-text);
  font-size: 0.9rem;
}

.hlp-search-wrap {
  flex: 1;
  max-width: 380px;
  margin: 0 1.5rem;
}

.hlp-search,
.hlp-field {
  background: rgba(23, 13, 13, 0.85);
  border: 1px solid var(--hlp-border);
  color: var(--hlp-text);
  width: 100%;
  outline: none;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

.hlp-search {
  border-radius: 50px;
  padding: 0.42rem 1.1rem 0.42rem 2.7rem;
  font-size: 0.87rem;
}

.hlp-search::placeholder,
.hlp-field::placeholder {
  color: var(--hlp-muted);
}
.hlp-search:focus,
.hlp-field:focus {
  border-color: var(--hlp-primary);
  box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.22);
}

.hlp-search-icon {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--hlp-muted);
  font-size: 0.88rem;
  pointer-events: none;
}

.btn-hlp-signin {
  color: var(--hlp-text);
  border: 1px solid var(--hlp-border);
  background: transparent;
  border-radius: 6px;
  padding: 0.38rem 1rem;
  font-size: 0.87rem;
  text-decoration: none;
  transition:
    border-color 0.2s,
    color 0.2s;
}
.btn-hlp-signin:hover {
  border-color: var(--hlp-primary);
  color: var(--hlp-primary);
}

.btn-hlp-signup {
  background: var(--hlp-primary);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.38rem 1.1rem;
  font-size: 0.87rem;
  font-weight: 600;
  text-decoration: none;
  transition:
    background 0.2s,
    box-shadow 0.2s;
}
.btn-hlp-signup:hover {
  background: var(--hlp-cta);
  box-shadow: 0 0 14px rgba(255, 69, 0, 0.45);
  color: #fff;
}

/* ── HERO ───────────────────────────────────────────── */
.hero {
  position: relative;
  height: calc(100vh - var(--hlptn-h));
  min-height: 520px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(10, 8, 8, 0.2) 0%,
    rgba(10, 8, 8, 0.55) 55%,
    rgba(10, 8, 8, 0.93) 100%
  );
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 1.5rem;
}

.hero-tagline {
  font-family: "Rajdhani", sans-serif;
  font-size: 0.82rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--hlp-muted);
  margin-bottom: 0.5rem;
}

.hero-title {
  font-family: "Rajdhani", sans-serif;
  font-size: clamp(2.4rem, 6.5vw, 4.8rem);
  font-weight: 700;
  color: var(--hlp-text);
  line-height: 1.08;
  margin-bottom: 2rem;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.9);
}
.hero-title span {
  color: var(--hlp-cta);
}

.btn-hero-forums {
  background: var(--hlp-primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.78rem 2.1rem;
  font-family: "Rajdhani", sans-serif;
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  transition:
    background 0.2s,
    box-shadow 0.2s,
    transform 0.15s;
}
.btn-hero-forums:hover {
  background: var(--hlp-cta);
  box-shadow: 0 0 22px rgba(255, 69, 0, 0.55);
  transform: translateY(-3px);
  color: #fff;
}

.btn-hero-discord {
  background: transparent;
  color: #fff;
  border: 2px solid var(--hlp-discord);
  border-radius: 8px;
  padding: 0.76rem 2.1rem;
  font-family: "Rajdhani", sans-serif;
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  transition:
    background 0.2s,
    box-shadow 0.2s,
    transform 0.15s;
}
.btn-hero-discord:hover {
  background: var(--hlp-discord);
  box-shadow: 0 0 22px rgba(88, 101, 242, 0.48);
  transform: translateY(-3px);
  color: #fff;
}

/* ── SECTION TITLES ─────────────────────────────────── */
.section-title {
  font-family: "Rajdhani", sans-serif;
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--hlp-text);
  border-left: 4px solid var(--hlp-primary);
  padding-left: 0.85rem;
  margin-bottom: 1.5rem;
}

/* ── GAMES & MODS ────────────────────────────────────── */
.games-section {
  padding: 3.5rem 0 2.5rem;
}

.games-scroll-wrap {
  overflow-x: auto;
  overflow-y: visible;
  padding-bottom: 0.5rem;
  padding-top: 0.25rem;
  cursor: grab;
  user-select: none;
}
.games-scroll-wrap:active {
  cursor: grabbing;
}

.games-scroll-wrap::-webkit-scrollbar {
  height: 4px;
}
.games-scroll-wrap::-webkit-scrollbar-track {
  background: var(--hlp-surface);
  border-radius: 10px;
}
.games-scroll-wrap::-webkit-scrollbar-thumb {
  background: var(--hlp-primary);
  border-radius: 10px;
}

.games-row {
  display: flex;
  gap: 1rem;
  padding: 0.25rem 0.1rem 0.4rem;
  width: max-content;
}

.game-card {
  width: 195px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--hlp-surface);
  border: 1px solid var(--hlp-border);
  flex-shrink: 0;
  text-decoration: none;
  color: inherit;
  display: block;
  transition:
    transform 0.2s,
    box-shadow 0.2s,
    border-color 0.2s;
}
.game-card:hover {
  transform: translateY(-5px) scale(1.025);
  box-shadow: 0 10px 30px rgba(192, 57, 43, 0.28);
  border-color: var(--hlp-primary);
  color: inherit;
}

.game-card-thumb {
  width: 100%;
  aspect-ratio: 2 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #2a0a08 0%, #8a1e14 55%, #3d0e08 100%);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.game-card-logo {
  width: 44px;
  height: 44px;
  object-fit: contain;
  opacity: 0.16;
  filter: grayscale(1);
}

.game-card-body {
  padding: 0.6rem 0.75rem 0.75rem;
}

.game-card-title {
  font-family: "Rajdhani", sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 0.22rem;
  color: var(--hlp-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── FEED ────────────────────────────────────────────── */
.feed-section {
  padding: 3rem 0 4.5rem;
}

.post-card {
  background: var(--hlp-surface);
  border: 1px solid var(--hlp-border);
  border-radius: 10px;
  padding: 1.3rem 1.5rem;
  margin-bottom: 1rem;
  scroll-margin-top: calc(var(--hlptn-h) + var(--hlptn-border) + 1rem);
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}
.post-card:hover {
  border-color: rgba(192, 57, 43, 0.38);
  box-shadow: 0 4px 22px rgba(0, 0, 0, 0.38);
}

.post-avatar {
  position: relative;
  overflow: hidden;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Rajdhani", sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
}

/* The forum avatar covers the whole circle, hiding the fallback underneath it.
   When it fails to load the script in layout.html removes it, uncovering the
   fill below. */
.hlp-avatar-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Shown when a user has no forum avatar, or it could not be fetched. */
.hlp-avatar-default {
  background: linear-gradient(135deg, #c0392b, #7a1508);
}

.hlp-avatar-sm {
  width: 30px;
  height: 30px;
  font-size: 0.72rem;
}

.hlp-avatar-nav {
  width: 32px;
  height: 32px;
  font-size: 0.75rem;
}

.post-author {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--hlp-text);
}

.post-time {
  font-size: 0.77rem;
  color: var(--hlp-muted);
}

.post-badge {
  font-size: 0.71rem;
  padding: 0.16em 0.65em;
  border-radius: 50px;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.post-badge-mod {
  background: rgba(192, 57, 43, 0.18);
  color: #e06050;
  border: 1px solid rgba(192, 57, 43, 0.38);
}

.post-title {
  font-family: "Rajdhani", sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0.8rem 0 0.45rem;
  color: var(--hlp-text);
}

.post-title-link {
  color: inherit;
  text-decoration: none;
}

.post-title-link:hover {
  color: var(--hlp-primary);
  text-decoration: underline;
}

.post-excerpt {
  font-size: 0.88rem;
  color: #c0acac;
  line-height: 1.7;
  margin-bottom: 0.85rem;
}

.post-image {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

/* ── POST BODY (rendered markdown) ───────────────────── */
.post-body > *:first-child {
  margin-top: 0;
}

.post-body > *:last-child {
  margin-bottom: 0;
}

.post-body h3,
.post-body h4,
.post-body h5,
.post-body h6 {
  font-family: "Rajdhani", sans-serif;
  font-weight: 700;
  color: var(--hlp-text);
  margin: 1.2rem 0 0.5rem;
}

.post-body h3 {
  font-size: 1.1rem;
}

.post-body h4 {
  font-size: 1rem;
}

.post-body h5,
.post-body h6 {
  font-size: 0.92rem;
}

.post-body p {
  margin-bottom: 0.85rem;
}

.post-body ul,
.post-body ol {
  padding-left: 1.4rem;
  margin-bottom: 0.85rem;
}

.post-body li + li {
  margin-top: 0.2rem;
}

.post-body a {
  color: var(--hlp-primary);
  text-decoration: underline;
}

.post-body a:hover {
  color: var(--hlp-cta);
}

.post-body img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

.post-body .hlp-embed {
  margin-bottom: 0.85rem;
  border-radius: 8px;
  overflow: hidden;
}

/* The playlist link sits directly under its player, so the two read as one
   unit: the embed gives up its own bottom margin to the link below it. */
.post-body .hlp-embed:has(+ .hlp-embed-link) {
  margin-bottom: 0.35rem;
}

.post-body .hlp-embed-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.85rem;
  color: var(--hlp-muted);
  font-size: 0.85em;
  text-decoration: none;
}

.post-body .hlp-embed-link:hover,
.post-body .hlp-embed-link:focus-visible {
  color: var(--hlp-primary);
  text-decoration: underline;
}

.post-body .hlp-embed-error {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.85rem;
  padding: 0.5rem 0.9rem;
  border: 1px dashed var(--hlp-border);
  border-radius: 6px;
  color: var(--hlp-muted);
  font-size: 0.85em;
}

.post-body blockquote {
  border-left: 3px solid var(--hlp-primary);
  background: rgba(255, 255, 255, 0.03);
  color: var(--hlp-muted);
  margin: 0 0 0.85rem;
  padding: 0.5rem 0.9rem;
  border-radius: 0 6px 6px 0;
}

.post-body code {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  padding: 0.1rem 0.35rem;
  font-size: 0.85em;
  color: var(--hlp-text);
}

.post-body pre {
  background: var(--hlp-surface2);
  border: 1px solid var(--hlp-border);
  border-radius: 6px;
  padding: 0.75rem 0.9rem;
  margin-bottom: 0.85rem;
  overflow-x: auto;
}

.post-body pre code {
  background: none;
  padding: 0;
}

.post-body hr {
  border: 0;
  border-top: 1px solid var(--hlp-border);
  opacity: 1;
  margin: 1.2rem 0;
}

.post-body table {
  width: 100%;
  margin-bottom: 0.85rem;
  border-collapse: collapse;
  display: block;
  overflow-x: auto;
}

.post-body th,
.post-body td {
  border: 1px solid var(--hlp-border);
  padding: 0.35rem 0.6rem;
  text-align: left;
}

.post-body th {
  background: rgba(255, 255, 255, 0.04);
  color: var(--hlp-text);
}

/* Feed cards cut long posts; home.html reveals "Read more" when they overflow. */
.post-body-clamp {
  position: relative;
  max-height: 22rem;
  overflow: hidden;
}

/* Measured in the 791px feed column: a 16:9 embed is 445px tall (458px with its
   margin) and a line of body text is 38px. The default clamp would therefore
   push every video behind "Read more". This budget fits a player plus roughly
   four lines of text; genuinely long posts still clamp. Text-only posts keep
   the tighter clamp above. */
.post-body-clamp:has(.hlp-embed) {
  max-height: 38rem;
}

.post-body-clamp.is-clamped::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 5rem;
  background: linear-gradient(
    to bottom,
    rgba(23, 13, 13, 0),
    var(--hlp-surface)
  );
  pointer-events: none;
}

.post-read-more {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.85rem;
  font-size: 0.85rem;
  color: var(--hlp-primary);
  text-decoration: none;
}

.post-read-more:hover {
  color: var(--hlp-cta);
  text-decoration: underline;
}

.post-thumb {
  width: 100%;
  height: 220px;
  border-radius: 8px;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.post-actions {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.btn-action {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--hlp-border);
  color: var(--hlp-muted);
  border-radius: 6px;
  padding: 0.33rem 0.9rem;
  font-size: 0.82rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  text-decoration: none;
  transition:
    background 0.15s,
    color 0.15s,
    border-color 0.15s;
  font-family: "Inter", sans-serif;
}

.btn-action.heart:hover,
.btn-action.heart.liked {
  color: #e8637a;
  border-color: rgba(232, 99, 122, 0.55);
  background: rgba(232, 99, 122, 0.1);
}

.btn-action.comment:hover {
  color: #4dabf7;
  border-color: rgba(77, 171, 247, 0.55);
  background: rgba(77, 171, 247, 0.08);
}

.hlp-discord-link {
  display: inline-flex;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--hlp-discord);
  text-decoration: none;
}

a.hlp-discord-link:hover,
a.hlp-discord-link:focus-visible {
  color: #7d8bf5;
  text-decoration: underline;
}

.hlp-discord-link-muted {
  color: var(--hlp-muted);
  text-decoration: none;
}

.btn-action.share:hover {
  color: #51cf66;
  border-color: rgba(81, 207, 102, 0.55);
  background: rgba(81, 207, 102, 0.08);
}

.btn-action.delete:hover {
  border-color: rgba(70, 70, 70, 0.55);
  background: rgba(50, 50, 50, 0.12);
}

/* ── COMMENTS ────────────────────────────────────────── */
.comments-section {
  margin-top: 2rem;
  scroll-margin-top: calc(var(--hlptn-h) + var(--hlptn-border) + 1rem);
}

.comments-title {
  font-family: "Rajdhani", sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--hlp-text);
  margin-bottom: 1rem;
}

.comment-form {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}

.comment-input {
  width: 100%;
  min-height: 90px;
  resize: vertical;
  background: rgba(23, 13, 13, 0.85);
  border: 1px solid var(--hlp-border);
  color: var(--hlp-text);
  border-radius: 8px;
  padding: 0.7rem 0.9rem;
  font-size: 0.88rem;
  font-family: "Inter", sans-serif;
  outline: none;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}
.comment-input::placeholder {
  color: var(--hlp-muted);
}
.comment-input:focus {
  border-color: var(--hlp-primary);
  box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.22);
}

.comment-login-prompt {
  font-size: 0.88rem;
  color: var(--hlp-muted);
  margin-bottom: 1.5rem;
}
.comment-login-prompt a {
  color: var(--hlp-primary);
  text-decoration: none;
}
.comment-login-prompt a:hover {
  text-decoration: underline;
}

.comment-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.comment-item {
  background: var(--hlp-surface);
  border: 1px solid var(--hlp-border);
  border-radius: 10px;
  padding: 0.9rem 1.1rem;
}

.comment-body {
  font-size: 0.88rem;
  color: #c0acac;
  line-height: 1.6;
  margin: 0.5rem 0 0.6rem;
  white-space: pre-wrap;
}

.comment-empty {
  font-size: 0.88rem;
  color: var(--hlp-muted);
}

.btn-back {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--hlp-border);
  color: var(--hlp-text);
  border-radius: 6px;
  padding: 0.45rem 1.1rem;
  font-size: 0.88rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
  transition:
    border-color 0.2s,
    background 0.2s;
}

.btn-back:hover {
  color: var(--hlp-text);
  border-color: rgba(192, 57, 43, 0.55);
  background: rgba(192, 57, 43, 0.1);
}

.btn-page {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-page-current {
  border: 2px solid var(--hlp-primary);
}

.btn-page-clickable {
  border: 2px solid var(--hlp-border);
  transition: border-color 0.2s;
}

.btn-page-clickable:hover {
  cursor: pointer;
  border-color: rgba(192, 57, 43, 0.38);
}

/* ── MOD MANAGEMENT───────────────────────────────────── */
.mod-management {
}

.btn-hlp-mod-update {
  position: fixed;
  bottom: 40px;
  right: 40px;
  z-index: 2;
  background: var(--hlp-primary);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.38rem 1.1rem;
  font-size: 0.87rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  transition:
    background 0.2s,
    box-shadow 0.2s;
}

.btn-hlp-mod-update:hover {
  background: var(--hlp-cta);
  box-shadow: 0 0 14px rgba(255, 69, 0, 0.45);
  color: #fff;
}

/* ── FOOTER ──────────────────────────────────────────── */
.hlp-footer {
  background: var(--hlp-surface);
  border-top: 2px solid var(--hlp-primary);
  padding: 2rem 0 1.75rem;
}

.hlp-footer img {
  height: 34px;
  opacity: 0.85;
}

.hlp-footer-links a {
  color: var(--hlp-muted);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.2s;
}
.hlp-footer-links a:hover {
  color: var(--hlp-primary);
}

.hlp-copyright {
  font-size: 0.77rem;
  color: var(--hlp-muted);
  margin-top: 0.85rem;
}

/* ── OVERLAY ─────────────────────────────────────────── */
.hlp-overlay {
  position: fixed;
  inset: 0;
  z-index: 1050;
  display: none;
  align-items: center;
  justify-content: center;
}

.hlp-overlay-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  cursor: pointer;
}

.hlp-overlay-panel {
  position: relative;
  background: var(--hlp-surface);
  border: 1px solid var(--hlp-border);
  border-radius: 12px;
  padding: 2rem;
  max-width: 420px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  text-align: center;
}

.hlp-overlay-body p {
  font-size: 1rem;
  color: var(--hlp-text);
  margin-bottom: 1.5rem;
}

.hlp-overlay-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

/* ── FORMS & PANELS ──────────────────────────────────── */
.hlp-page-center {
  padding-top: 5rem;
  min-height: 80vh;
}

.hlp-form-shell {
  width: 100%;
  padding: 0 1.25rem;
}
.hlp-form-shell-narrow {
  max-width: 420px;
}
.hlp-form-shell-wide {
  max-width: 820px;
}

.hlp-panel {
  background: var(--hlp-surface);
  border: 1px solid var(--hlp-border);
  border-radius: 10px;
  padding: 2rem;
}

.hlp-field {
  border-radius: 6px;
  padding: 0.55rem 1rem;
}

.hlp-textarea {
  resize: vertical;
}

.hlp-field-label {
  color: var(--hlp-text);
  font-size: 0.9rem;
}

.hlp-field-hint {
  color: var(--hlp-text);
  font-size: 0.8rem;
}

.hlp-text-muted {
  color: var(--hlp-muted);
}

/* ── MARKDOWN EDITOR (Write / Preview) ───────────────── */
.hlp-editor-tabs {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
}

.hlp-editor-tab {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--hlp-border);
  color: var(--hlp-muted);
  border-radius: 6px;
  padding: 0.28rem 0.85rem;
  font-size: 0.82rem;
  cursor: pointer;
  transition:
    color 0.2s,
    border-color 0.2s,
    background 0.2s;
}

.hlp-editor-tab:hover {
  color: var(--hlp-text);
  border-color: rgba(192, 57, 43, 0.55);
}

.hlp-editor-tab.is-active {
  color: var(--hlp-text);
  border-color: rgba(192, 57, 43, 0.55);
  background: rgba(192, 57, 43, 0.12);
}

.hlp-editor-pane[data-editor-pane="preview"] {
  min-height: 12rem;
}

.hlp-md-hint {
  color: var(--hlp-muted);
  font-size: 0.7rem;
  line-height: 1.6;
  margin: 0.4rem 0 0;
}

.hlp-md-hint code {
  color: var(--hlp-muted);
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
  padding: 0.05rem 0.28rem;
  font-size: 0.95em;
}

.post-card-preview {
  margin-bottom: 0;
}

.post-preview-note {
  color: var(--hlp-muted);
  font-size: 0.82rem;
  font-style: italic;
  margin-bottom: 0.85rem;
}

.post-title-empty {
  color: var(--hlp-muted);
  font-style: italic;
}

.hlp-btn-block {
  display: block;
  width: 100%;
  padding: 0.65rem;
}

.hlp-btn-wide {
  padding: 0.55rem 2rem;
}

.hlp-form-meta {
  font-size: 0.84rem;
  color: var(--hlp-muted);
}
.hlp-form-meta a {
  color: var(--hlp-muted);
}
.hlp-form-meta a.hlp-form-meta-accent {
  color: var(--hlp-primary);
}

.section-title-center {
  border-left: none;
  padding-left: 0;
  text-align: center;
}

.hlp-auth-logo {
  height: 48px;
  margin-bottom: 1rem;
}

/* ── LAYOUT HELPER ───────────────────────────────────── */
.content-wrap {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ---------------------------------------------------------------------------
   Search: navbar dropdown and the /search results page.
   --------------------------------------------------------------------------- */

/* The panel hangs off the field rather than off the viewport, because the forum
   top-nav web component above the navbar has a height this app does not
   control. .hlp-navbar sits at z-index 1030, so the panel has to clear it. */
.hlp-suggest-anchor {
  position: absolute;
  top: calc(100% + 0.4rem);
  left: 0;
  right: 0;
  z-index: 1040;
}

.hlp-suggest {
  background: var(--hlp-surface2);
  border: 1px solid var(--hlp-border);
  border-radius: 12px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
  max-height: min(70vh, 30rem);
  overflow-y: auto;
  padding: 0.4rem;
}

.hlp-suggest-section + .hlp-suggest-section {
  border-top: 1px solid var(--hlp-border);
  margin-top: 0.35rem;
  padding-top: 0.35rem;
}

.hlp-suggest-heading,
.hlp-result-heading {
  font-family: "Rajdhani", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--hlp-muted);
  margin: 0.3rem 0.6rem;
}

.hlp-suggest-empty {
  color: var(--hlp-muted);
  font-size: 0.87rem;
  margin: 0.7rem 0.6rem;
}

.hlp-suggest-all,
.hlp-result-more {
  display: block;
  padding: 0.55rem 0.6rem;
  color: var(--hlp-text);
  font-size: 0.85rem;
  text-decoration: none;
  border-top: 1px solid var(--hlp-border);
  margin-top: 0.35rem;
}

.hlp-suggest-all:hover,
.hlp-suggest-all:focus-visible,
.hlp-result-more:hover,
.hlp-result-more:focus-visible {
  color: var(--hlp-cta);
}

.hlp-result-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.hlp-result-main {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.5rem 0.6rem;
  border-radius: 8px;
  color: var(--hlp-text);
  text-decoration: none;
}

/* The text column has to be allowed to shrink, or a long unbroken title pushes
   the row wider than the dropdown. */
.hlp-result-text {
  min-width: 0;
  flex: 1;
}

a.hlp-result-main:hover,
a.hlp-result-main:focus-visible,
.hlp-result-active > .hlp-result-main {
  background: rgba(192, 57, 43, 0.16);
  outline: none;
}

/* A mod with no website_url: shown, but not pretending to be a link. */
.hlp-result-inert {
  cursor: default;
}

.hlp-result-title {
  display: block;
  font-family: "Rajdhani", sans-serif;
  font-size: 1rem;
  font-weight: 600;
}

.hlp-result-snippet {
  display: block;
  color: var(--hlp-muted);
  font-size: 0.86rem;
  margin-top: 0.15rem;
}

/* Contrast against the dark surface: a yellow highlight would fail AA here. */
.hlp-result-snippet mark,
.hlp-result-title mark {
  background: rgba(224, 90, 0, 0.28);
  color: var(--hlp-text);
  padding: 0 0.12em;
  border-radius: 3px;
}

.hlp-result-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: 0.3rem;
  font-size: 0.78rem;
  color: var(--hlp-muted);
}

.hlp-result-author {
  color: var(--hlp-text);
}

.hlp-result-action {
  color: var(--hlp-muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.hlp-result-action:hover,
.hlp-result-action:focus-visible {
  color: var(--hlp-cta);
  border-bottom-color: currentColor;
}

.hlp-result-count {
  color: var(--hlp-muted);
  font-weight: 400;
}

.hlp-search-mobile {
  color: var(--hlp-text);
  font-size: 1.05rem;
  padding: 0.35rem 0.5rem;
  text-decoration: none;
}

/* --- results page --- */

.hlp-search-page {
  padding-top: calc(var(--hlptn-h) + 6rem);
  padding-bottom: 4rem;
  max-width: 56rem;
}

.hlp-search-header {
  margin-bottom: 1.2rem;
}

.hlp-search-title {
  font-family: "Rajdhani", sans-serif;
  font-size: 1.6rem;
  margin: 0;
}

.hlp-search-count,
.hlp-search-empty {
  color: var(--hlp-muted);
  margin: 0.4rem 0 0;
}

.hlp-search-tabs {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--hlp-border);
  margin-bottom: 1.2rem;
}

.hlp-search-tab {
  padding: 0.5rem 0.9rem;
  color: var(--hlp-muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  font-family: "Rajdhani", sans-serif;
  letter-spacing: 0.03em;
}

.hlp-search-tab:hover,
.hlp-search-tab:focus-visible {
  color: var(--hlp-text);
}

.hlp-search-tab-active {
  color: var(--hlp-text);
  border-bottom-color: var(--hlp-primary);
}

.hlp-result-section {
  margin-bottom: 1.6rem;
}

.hlp-search-pager {
  margin-top: 1.6rem;
}

/* Mod cover thumbnail in a search result. The container is the placeholder -
   same gradient direction as .game-card-thumb, so a result and a homepage card
   read as the same family - and the cover image sits on top of it. Most mods
   have no cover, so the placeholder is what usually shows. */
.hlp-cover {
  position: relative;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #2a0a08 0%, #8a1e14 55%, #3d0e08 100%);
}

.hlp-cover-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Sits under the cover and shows through when there is none, or when the cover
   failed to load and layout.html removed it. */
.hlp-cover-mark {
  width: 22px;
  height: 22px;
  opacity: 0.7;
}
