/* HashBR Community Theme v1.10.0 — Flarum 1.8.x / R33.14 */
:root {
  --hashbr-bg: #040a12;
  --hashbr-bg2: #071522;
  --hashbr-card: rgba(8, 25, 40, .78);
  --hashbr-card2: rgba(6, 18, 30, .70);
  --hashbr-line: rgba(154, 229, 255, .14);
  --hashbr-teal: #18edbf;
  --hashbr-cyan: #25c8ff;
  --hashbr-text: #f5fbff;
  --hashbr-muted: #99afbf;
  --hashbr-shadow: 0 22px 70px rgba(0, 0, 0, .34);

  --primary-color: #18edbf;
  --secondary-color: #25c8ff;
  --body-bg: #040a12;
  --body-bg-shaded: #07121d;
  --body-bg-light: #0a1927;
  --body-bg-faded: rgba(4, 10, 18, .94);
  --text-color: #f5fbff;
  --link-color: #52d8ff;
  --heading-color: #f5fbff;
  --muted-color: #99afbf;
  --muted-color-light: #afc1cc;
  --muted-color-dark: #728896;
  --shadow-color: rgba(0, 0, 0, .42);
  --control-bg: rgba(255, 255, 255, .07);
  --control-bg-light: rgba(255, 255, 255, .10);
  --control-bg-shaded: rgba(255, 255, 255, .045);
  --control-color: #b7cad6;
  --header-bg: rgba(5, 16, 27, .86);
  --header-color: #f5fbff;
  --header-control-bg: rgba(255, 255, 255, .07);
  --header-control-color: #c9dbe5;
  --overlay-bg: rgba(2, 8, 14, .90);
  --code-bg: rgba(0, 0, 0, .28);
  --code-color: #c8f8ef;
  --hero-bg: rgba(8, 25, 40, .74);
  --hero-color: #f5fbff;
  --discussion-title-color: #f3fbff;
  --discussion-list-item-bg-hover: rgba(24, 237, 191, .055);
  --button-color: #c8d9e2;
  --button-bg: rgba(255, 255, 255, .07);
  --button-bg-hover: rgba(255, 255, 255, .11);
  --button-bg-active: rgba(255, 255, 255, .14);
  --button-primary-color: #03131b;
  --button-primary-bg: #18edbf;
  --button-primary-bg-hover: #35f3c9;
  --button-primary-bg-active: #18dcb1;
  --button-inverted-color: #dceaf2;
  --button-inverted-bg: rgba(255, 255, 255, .06);
  --button-inverted-bg-hover: rgba(255, 255, 255, .10);
  --usercard-bg: rgba(7, 24, 39, .82);
  --tooltip-bg: rgba(1, 8, 13, .96);
  --border-radius: 14px;
}

html { background: var(--hashbr-bg); }
body {
  background:
    radial-gradient(circle at 18% 12%, rgba(24, 237, 191, .10), transparent 28%),
    radial-gradient(circle at 82% 20%, rgba(37, 200, 255, .08), transparent 30%),
    linear-gradient(145deg, var(--hashbr-bg), var(--hashbr-bg2));
  color: var(--hashbr-text);
  min-height: 100vh;
}

.hashbr-background {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background: linear-gradient(145deg, rgba(4,10,18,.18), rgba(7,21,34,.16));
}
.hashbr-background__grid {
  position: absolute;
  inset: 0;
  opacity: .15;
  background-image:
    linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent 96%);
  mask-image: linear-gradient(to bottom, #000, transparent 96%);
}
.hashbr-background__aurora {
  position: absolute;
  width: 54vw;
  height: 54vw;
  min-width: 520px;
  min-height: 520px;
  border-radius: 50%;
  filter: blur(92px);
  opacity: .16;
  animation: hashbrFloat 16s ease-in-out infinite alternate;
}
.hashbr-background__aurora--one {
  top: -22vw;
  left: -12vw;
  background: radial-gradient(circle, rgba(24,237,191,.74), transparent 68%);
}
.hashbr-background__aurora--two {
  top: 6vh;
  right: -26vw;
  background: radial-gradient(circle, rgba(37,200,255,.55), transparent 68%);
  animation-duration: 21s;
  animation-direction: alternate-reverse;
}
.hashbr-background__nodes {
  position: absolute;
  inset: 0;
  opacity: .30;
  background-image:
    radial-gradient(circle at 12% 24%, rgba(24,237,191,.85) 0 1px, transparent 2px),
    radial-gradient(circle at 28% 64%, rgba(37,200,255,.72) 0 1px, transparent 2px),
    radial-gradient(circle at 62% 22%, rgba(24,237,191,.72) 0 1px, transparent 2px),
    radial-gradient(circle at 78% 72%, rgba(37,200,255,.72) 0 1px, transparent 2px),
    radial-gradient(circle at 92% 42%, rgba(24,237,191,.72) 0 1px, transparent 2px);
  background-size: 420px 420px, 520px 520px, 610px 610px, 460px 460px, 570px 570px;
  animation: hashbrNodes 30s linear infinite;
}
@keyframes hashbrFloat { to { transform: translate3d(4%, 5%, 0) scale(1.08); } }
@keyframes hashbrNodes { to { transform: translate3d(30px, 18px, 0); } }
@media (prefers-reduced-motion: reduce) {
  .hashbr-background__aurora,
  .hashbr-background__nodes { animation: none !important; }
}

.App { background: transparent !important; }
.App-content { border-top-color: rgba(154,229,255,.08); background: transparent !important; }

/* Header */
.App-header,
.App-navigation {
  background: rgba(4, 14, 24, .84) !important;
  border-bottom: 1px solid var(--hashbr-line) !important;
  -webkit-backdrop-filter: blur(18px) saturate(130%);
  backdrop-filter: blur(18px) saturate(130%);
  box-shadow: 0 10px 34px rgba(0,0,0,.16);
}
.scrolled .App-header,
.scrolled .App-navigation { box-shadow: 0 12px 38px rgba(0,0,0,.30) !important; }
.Header-title a {
  color: var(--hashbr-text) !important;
  font-weight: 850;
  letter-spacing: -.02em;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none !important;
}
.hashbr-header-icon {
  width: 28px;
  height: 28px;
  object-fit: contain;
  filter: drop-shadow(0 7px 14px rgba(0,0,0,.28));
}
.hashbr-quicklinks {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 4px;
  vertical-align: middle;
}
.hashbr-quicklinks a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 10px;
  color: #bcd0dc;
  font-size: 11px;
  font-weight: 760;
  text-decoration: none !important;
  border: 1px solid transparent;
  transition: .16s ease;
}
.hashbr-quicklinks a:hover {
  color: #effcff;
  border-color: rgba(24,237,191,.18);
  background: rgba(24,237,191,.06);
}
.hashbr-quicklinks a.hashbr-home {
  color: #06151d;
  background: linear-gradient(100deg, var(--hashbr-teal), var(--hashbr-cyan));
  box-shadow: 0 8px 22px rgba(24,237,191,.13);
}
.Header-secondary .Search-input,
.Search-input {
  border: 1px solid rgba(154,229,255,.12) !important;
  background: rgba(255,255,255,.055) !important;
  color: var(--hashbr-text) !important;
  border-radius: 12px !important;
}
.Search-input:focus {
  border-color: rgba(24,237,191,.40) !important;
  box-shadow: 0 0 0 3px rgba(24,237,191,.07) !important;
}

/* Buttons and form controls */
.Button,
.FormControl,
.Dropdown-menu,
.Select select {
  border-radius: 12px;
}
.Button {
  border: 1px solid rgba(154,229,255,.09);
  box-shadow: none;
}
.Button--primary {
  background: linear-gradient(100deg, var(--hashbr-teal), var(--hashbr-cyan)) !important;
  color: #03131b !important;
  border-color: transparent !important;
  font-weight: 850;
  box-shadow: 0 10px 24px rgba(24,237,191,.12);
}
.Button--primary:hover { filter: brightness(1.04); }
.FormControl,
.ComposerBody textarea,
.TextEditor-editor {
  background: rgba(3, 13, 22, .82) !important;
  border: 1px solid rgba(154,229,255,.12) !important;
  color: var(--hashbr-text) !important;
}
.FormControl:focus,
.ComposerBody textarea:focus,
.TextEditor-editor:focus {
  border-color: rgba(24,237,191,.45) !important;
  box-shadow: 0 0 0 3px rgba(24,237,191,.06) !important;
}

/* Discussion list */
.IndexPage .DiscussionList-discussions,
.UserPage .DiscussionList-discussions { display: grid; gap: 10px; }
.DiscussionListItem {
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 18px !important;
  border: 1px solid var(--hashbr-line);
  background: linear-gradient(180deg, var(--hashbr-card), var(--hashbr-card2));
  box-shadow: 0 13px 36px rgba(0,0,0,.15);
  overflow: hidden;
  transition: transform .16s ease, border-color .16s ease, background .16s ease;
}
.DiscussionListItem:hover {
  transform: translateY(-1px);
  border-color: rgba(24,237,191,.28);
  background: linear-gradient(180deg, rgba(10,31,48,.86), rgba(7,21,34,.78)) !important;
}
.DiscussionListItem-content { padding: 16px 18px 16px 66px !important; }
.DiscussionListItem-title { color: #eefaff !important; font-weight: 730; letter-spacing: -.01em; }
.DiscussionListItem-info,
.DiscussionListItem-count { color: var(--hashbr-muted) !important; }
.DiscussionListItem .Avatar { box-shadow: 0 8px 24px rgba(0,0,0,.25); }

/* Hero / welcome / tags */
.Hero,
.WelcomeHero,
.DiscussionHero,
.UserCard,
.TagTile {
  border: 1px solid var(--hashbr-line) !important;
  background:
    radial-gradient(circle at 88% 15%, rgba(37,200,255,.08), transparent 35%),
    linear-gradient(180deg, rgba(9,30,47,.80), rgba(5,17,29,.72)) !important;
  box-shadow: var(--hashbr-shadow);
  color: var(--hashbr-text) !important;
}
.Hero { margin-bottom: 18px; }
.WelcomeHero,
.DiscussionHero { border-radius: 0 0 24px 24px; }
.TagTile { border-radius: 17px !important; overflow: hidden; }
.TagTile-info:hover { background: rgba(24,237,191,.05) !important; }
.TagTile-lastPostedDiscussion { border-top-color: rgba(154,229,255,.10) !important; }

/* Side navigation */
.sideNav .Dropdown--select .Dropdown-menu>li>a {
  border-radius: 10px;
  transition: background .15s ease, color .15s ease;
}
.sideNav .Dropdown--select .Dropdown-menu>li>a:hover {
  background: rgba(255,255,255,.035) !important;
  color: #dffbff !important;
}
.sideNav .Dropdown--select .Dropdown-menu>li.active>a { color: var(--hashbr-teal) !important; }

/* Posts */
.PostStream { margin-top: 16px !important; }
.PostStream-item {
  border: 1px solid var(--hashbr-line) !important;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(8,25,40,.72), rgba(5,17,29,.67));
  box-shadow: 0 14px 42px rgba(0,0,0,.14);
  margin-bottom: 12px;
  /* Menus de moderação do Flarum são absolutos e não podem ser recortados pelo card. */
  overflow: visible;
  position: relative;
}
.PostStream-item:not(:last-child) { border-bottom: 1px solid var(--hashbr-line) !important; }
.Post { padding: 20px 20px 16px !important; }
.Post-body { color: #d8e7ee; font-size: 14px; line-height: 1.72; }
.Post-body a { color: #61e5ff; }
.Post-body blockquote {
  border-left-color: var(--hashbr-teal) !important;
  background: rgba(24,237,191,.045);
  border-radius: 0 10px 10px 0;
}
.Post-body pre,
.Post-body code {
  background: rgba(0,0,0,.30) !important;
  border-color: rgba(154,229,255,.10) !important;
  color: #c9fff2 !important;
}

/* Dropdowns, modals and composer */
.Dropdown-menu,
.Modal-content,
.Composer,
.ComposerBody,
.Popover {
  background: rgba(6, 20, 32, .97) !important;
  color: var(--hashbr-text) !important;
  border: 1px solid var(--hashbr-line) !important;
  box-shadow: 0 25px 80px rgba(0,0,0,.48) !important;
}
.Dropdown-menu>li>a,
.Dropdown-menu>li>button { color: #d5e5ed !important; }
.Dropdown-menu>li>a:hover,
.Dropdown-menu>li>button:hover { background: rgba(24,237,191,.065) !important; color: #fff !important; }
.Modal-header { border-bottom-color: rgba(154,229,255,.09) !important; }
.Modal-body { background: rgba(255,255,255,.025) !important; color: #c8d9e2 !important; }
.Modal-footer { border-top-color: rgba(154,229,255,.08) !important; }
.Composer { border-radius: 18px 18px 0 0 !important; }

/* Notifications and misc */
.Alert {
  border: 1px solid rgba(154,229,255,.12);
  border-radius: 14px;
  box-shadow: 0 16px 46px rgba(0,0,0,.18);
}
.Avatar { border: 1px solid rgba(255,255,255,.10); }
.Badge { box-shadow: 0 5px 14px rgba(0,0,0,.20); }
.LoadingIndicator { color: var(--hashbr-teal) !important; }
hr { border-top-color: rgba(154,229,255,.10); }

/* Footer */
.hashbr-forum-footer {
  width: min(1100px, calc(100% - 30px));
  margin: 34px auto 26px;
  padding: 18px 0 8px;
  border-top: 1px solid rgba(154,229,255,.10);
  color: #738a99;
  font-size: 11px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.hashbr-forum-footer__links { display: flex; gap: 12px; flex-wrap: wrap; }
.hashbr-forum-footer a { color: #91cfc1; text-decoration: none; }
.hashbr-forum-footer a:hover { color: #dffdf6; }

/* Scrollbar */
* { scrollbar-color: rgba(24,237,191,.30) rgba(255,255,255,.025); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: rgba(255,255,255,.02); }
::-webkit-scrollbar-thumb { background: rgba(24,237,191,.23); border-radius: 999px; border: 2px solid #07121d; }
::-webkit-scrollbar-thumb:hover { background: rgba(37,200,255,.34); }

@media (max-width: 991.98px) {
  .hashbr-quicklinks a:not(.hashbr-home) { display: none; }
}
@media (max-width: 767.98px) {
  .DiscussionListItem-content { padding: 14px 14px 14px 58px !important; }
  .PostStream-item { border-radius: 0; margin-left: -15px; margin-right: -15px; }
  .hashbr-forum-footer { width: calc(100% - 24px); }
  .hashbr-header-icon { width: 24px; height: 24px; }
}

/* =========================================================
   HashBR Theme v1.1 — Desktop sidebar alignment polish
   ========================================================= */
@media (min-width: 992px) {
  .IndexPage .sideNavContainer,
  .UserPage .sideNavContainer {
    align-items: flex-start;
  }

  .IndexPage .sideNav,
  .UserPage .sideNav {
    width: 210px !important;
    margin-right: 32px !important;
    flex: 0 0 210px !important;
  }

  .IndexPage .sideNav > ul,
  .UserPage .sideNav > ul {
    width: 210px !important;
    margin-top: 30px !important;
  }

  /* Keep the primary action exactly aligned with the navigation card. */
  .IndexPage .sideNav > ul > li,
  .UserPage .sideNav > ul > li {
    width: 100%;
    margin: 0 0 12px !important;
  }

  .IndexPage .sideNav .Button,
  .UserPage .sideNav .Button {
    width: 100%;
  }

  /* Turn Flarum's default navigation into one clean HashBR panel. */
  .IndexPage .sideNav .Dropdown--select,
  .UserPage .sideNav .Dropdown--select {
    width: 100%;
  }

  .IndexPage .sideNav .Dropdown--select .Dropdown-menu,
  .UserPage .sideNav .Dropdown--select .Dropdown-menu {
    width: 100% !important;
    padding: 7px !important;
    border: 1px solid rgba(154,229,255,.14) !important;
    border-radius: 15px !important;
    background: linear-gradient(180deg, rgba(8,25,40,.76), rgba(5,17,29,.68)) !important;
    box-shadow: 0 14px 38px rgba(0,0,0,.16) !important;
    overflow: hidden;
  }

  .IndexPage .sideNav .Dropdown--select .Dropdown-menu > li,
  .UserPage .sideNav .Dropdown--select .Dropdown-menu > li {
    width: 100%;
    margin: 0 !important;
  }

  .IndexPage .sideNav .Dropdown--select .Dropdown-menu > li > a,
  .UserPage .sideNav .Dropdown--select .Dropdown-menu > li > a {
    min-height: 40px;
    width: 100%;
    display: flex !important;
    align-items: center;
    gap: 11px;
    padding: 9px 11px !important;
    border-radius: 10px;
    line-height: 1.2;
  }

  /* Cancel Flarum's negative-margin icon positioning so all labels line up. */
  .IndexPage .sideNav .Dropdown--select .Dropdown-menu > li > a .Button-icon,
  .IndexPage .sideNav .Dropdown--select .Dropdown-menu > li > a .icon,
  .UserPage .sideNav .Dropdown--select .Dropdown-menu > li > a .Button-icon,
  .UserPage .sideNav .Dropdown--select .Dropdown-menu > li > a .icon {
    float: none !important;
    flex: 0 0 18px;
    width: 18px;
    margin: 0 !important;
    text-align: center;
    font-size: 14px;
  }

  .IndexPage .sideNav .Dropdown--select .Dropdown-menu > li.active > a,
  .UserPage .sideNav .Dropdown--select .Dropdown-menu > li.active > a {
    background: rgba(24,237,191,.075) !important;
    box-shadow: inset 2px 0 0 var(--hashbr-teal);
  }

  .IndexPage .sideNav .Dropdown--select .Dropdown-menu > .Dropdown-separator,
  .UserPage .sideNav .Dropdown--select .Dropdown-menu > .Dropdown-separator {
    height: 1px;
    margin: 6px 8px !important;
    background: rgba(154,229,255,.09) !important;
  }

  /* Main column keeps the same visual start position as before. */
  .IndexPage .sideNavOffset,
  .UserPage .sideNavOffset {
    margin-top: 30px !important;
  }
}


/* =========================================================
   HashBR Theme v1.4 — Tag card readability fix
   ========================================================= */
.TagTile,
.TagTile * {
  color: #effbff;
}

.TagTile .TagTile-info,
.TagTile .TagTile-info:hover,
.TagTile .TagTile-lastPostedDiscussion,
.TagTile .TagTile-lastPostedDiscussion:hover {
  color: #effbff !important;
}

.TagTile .TagTile-name,
.TagTile .TagTile-info .TagTile-name,
.TagTile .TagTile-lastPostedDiscussion a,
.TagTile .TagTile-lastPostedDiscussion .DiscussionTitle,
.TagTile .TagTile-lastPostedDiscussion .username,
.TagTile .TagTile-children,
.TagTile .TagTile-children a {
  color: #f7fdff !important;
  opacity: 1 !important;
}

.TagTile .TagTile-description,
.TagTile .TagTile-info p,
.TagTile .TagTile-info .TagDescription,
.TagTile .TagTile-lastPostedDiscussion .PostedBy,
.TagTile .TagTile-lastPostedDiscussion .PostDate,
.TagTile .TagTile-lastPostedDiscussion time,
.TagTile .TagTile-lastPostedDiscussion .TerminalPost-muted,
.TagTile .TagTile-info .Button-label {
  color: #d7e8f0 !important;
  opacity: 1 !important;
}

.TagTile .icon,
.TagTile .TagTile-name .icon,
.TagTile .TagTile-info .icon,
.TagTile .TagTile-info .Button-icon {
  color: #ffffff !important;
  opacity: 1 !important;
}

.TagTile a:hover,
.TagTile .TagTile-lastPostedDiscussion a:hover {
  color: #ffffff !important;
}

/* =========================================================
   HashBR Community Theme v1.5.0 — R33.4 unified ecosystem
   Global HashBR header uses hashbr.online as the visual GOLDEN.
   ========================================================= */
.hashbr-quicklinks { display: none !important; }

/* Keep the Flarum layer below the global HashBR header/dropdowns. */
.App { position: relative; z-index: 1; }
.App-header { z-index: 900 !important; }
.hbr-global-header { z-index: 1400 !important; }

/* Align Forum content width with the approved HashBR portal geometry. */
.App-header > .container,
.App-content > .container,
.App-content .container,
.ComposerBody-header > .container {
  width: min(1180px, calc(100% - 28px));
  max-width: 1180px;
}

/* Flarum's own sticky header remains directly below the 72px global shell. */
@media (min-width: 768px) {
  .affix .App-header,
  .App-header.affix {
    top: 72px !important;
  }
}

@media (max-width: 900px) {
  .App-header > .container,
  .App-content > .container,
  .App-content .container,
  .ComposerBody-header > .container {
    width: min(100% - 18px, 1180px);
  }
}


/* =========================================================
   HashBR Community Theme v1.6.0 — R33.7 forum visual hotfix
   Keep native Flarum action menus above post cards and the composer.
   ========================================================= */
.DiscussionPage .PostStream,
.DiscussionPage .PostStream-item,
.DiscussionPage .Post,
.DiscussionPage .Post-body,
.DiscussionPage .Post-footer {
  overflow: visible !important;
}
.PostStream-item:has(.Dropdown.open),
.PostStream-item:has(.Dropdown-menu[style*="display: block"]) {
  z-index: 80;
}
.PostStream-item .Post-actions,
.PostStream-item .Post-controls,
.PostStream-item .Dropdown {
  position: relative;
  z-index: 90;
}
.PostStream-item .Dropdown-menu,
.DiscussionPage .Dropdown-menu,
.App-header .Dropdown-menu {
  z-index: 2600 !important;
}
.PostStream-item .Dropdown-menu {
  min-width: 190px;
  max-width: min(320px, calc(100vw - 28px));
  max-height: min(70vh, 520px);
  overflow-y: auto !important;
  overflow-x: hidden !important;
}
.DiscussionPage-nav,
.DiscussionPage-list {
  z-index: 4;
}
.Composer {
  z-index: 1200 !important;
}
.hbr-global-header {
  z-index: 3000 !important;
}
/* Keep native Flarum header below the HashBR shell and its dropdowns. */
.App-header {
  z-index: 1100 !important;
}
/* Make action buttons easier to read in the dark theme. */
.Post-actions .Button,
.Post-controls .Button,
.DiscussionControls .Button {
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
@media (max-width: 767.98px) {
  .PostStream-item .Dropdown-menu {
    position: fixed !important;
    left: 12px !important;
    right: 12px !important;
    top: auto !important;
    width: auto !important;
    max-width: none !important;
  }
}

/* =========================================================
   HashBR Community Theme v1.7.0 — R33.8 discussion card / menu polish
   Keep Flarum controls inside the card geometry, but let opened menus float.
   ========================================================= */
@media (min-width: 768px) {
  .DiscussionListItem {
    position: relative !important;
    overflow: visible !important;
    z-index: 1;
  }
  .DiscussionListItem:hover {
    transform: none !important;
    z-index: 2;
  }
  .DiscussionListItem:has(.Dropdown.open),
  .DiscussionListItem:has(.Dropdown-menu.show) {
    z-index: 240 !important;
  }
  .DiscussionListItem-content {
    position: relative !important;
    min-height: 92px;
    padding-top: 16px !important;
    padding-right: 78px !important;
    padding-bottom: 16px !important;
    border-radius: 18px;
    overflow: visible !important;
  }
  .DiscussionListItem-controls {
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    left: auto !important;
    margin: 0 !important;
    z-index: 260 !important;
  }
  .DiscussionListItem-controls .Dropdown,
  .DiscussionListItem-controls .ButtonGroup {
    position: relative !important;
  }
  .DiscussionListItem-controls .Dropdown-toggle,
  .DiscussionListItem-controls > .Button {
    width: 38px !important;
    min-width: 38px !important;
    height: 38px !important;
    padding: 0 !important;
    border-radius: 12px !important;
  }
  .DiscussionListItem-controls .Dropdown-menu {
    position: absolute !important;
    left: auto !important;
    right: 0 !important;
    top: calc(100% + 8px) !important;
    bottom: auto !important;
    width: max-content !important;
    min-width: 210px !important;
    max-width: min(280px, calc(100vw - 36px)) !important;
    max-height: 70vh;
    margin: 0 !important;
    padding: 6px !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    border-radius: 13px !important;
    z-index: 3200 !important;
  }
  .DiscussionListItem-controls .Dropdown-menu > li > a,
  .DiscussionListItem-controls .Dropdown-menu > li > button {
    min-height: 38px;
    white-space: nowrap;
    border-radius: 9px;
  }
  .DiscussionListItem-info {
    padding-right: 6px;
    line-height: 1.45;
  }
  .DiscussionListItem .TagsLabel {
    max-width: calc(100% - 68px);
  }
}

/* Post action menus use the same safe right edge as discussion cards. */
.PostStream-item .Post-actions .Dropdown-menu,
.PostStream-item .Post-controls .Dropdown-menu,
.PostStream-item .Dropdown-menu {
  position: absolute !important;
  left: auto !important;
  right: 0 !important;
  top: calc(100% + 7px) !important;
  bottom: auto !important;
  margin: 0 !important;
}
.PostStream-item:has(.Dropdown.open) {
  z-index: 260 !important;
}

/* Profile/list columns: never let the content column collapse under the nav. */
@media (min-width: 992px) {
  .IndexPage .sideNavOffset,
  .UserPage .sideNavOffset {
    min-width: 0 !important;
    flex: 1 1 auto !important;
  }
  .UserPage .DiscussionListItem-content {
    padding-right: 78px !important;
  }
}

@media (max-width: 767.98px) {
  .DiscussionListItem {
    overflow: visible !important;
  }
  .DiscussionListItem-content {
    padding-right: 58px !important;
    overflow: visible !important;
  }
  .DiscussionListItem-controls {
    right: 8px !important;
  }
  .DiscussionListItem-controls .Dropdown-menu {
    position: fixed !important;
    left: 12px !important;
    right: 12px !important;
    top: auto !important;
    bottom: 12px !important;
    width: auto !important;
    max-width: none !important;
    max-height: min(70vh, 520px) !important;
    z-index: 3600 !important;
  }
}

/* =========================================================
   HashBR Community Theme v1.8.0 — R33.10 profile posts geometry
   Keep profile post avatars/badges inside the main content column.
   ========================================================= */
@media (min-width: 768px) {
  .UserPage .PostsUserPage .PostStream {
    margin-left: 0 !important;
    width: 100% !important;
  }
  .UserPage .PostsUserPage .PostStream-item {
    position: relative !important;
    width: 100% !important;
    margin-left: 0 !important;
    overflow: visible !important;
  }
  .UserPage .PostsUserPage .Post {
    position: relative !important;
    min-height: 112px !important;
    padding: 18px 20px 18px 92px !important;
  }
  /* Flarum normally places the avatar in a negative left gutter. That gutter
     collides with HashBR's fixed profile navigation, so the profile list keeps
     the avatar inside its own card/column instead. */
  .UserPage .PostsUserPage .PostUser {
    position: static !important;
    width: auto !important;
    margin: 0 0 8px !important;
  }
  .UserPage .PostsUserPage .PostUser-avatar {
    position: absolute !important;
    left: 18px !important;
    top: 18px !important;
    margin: 0 !important;
    float: none !important;
    z-index: 3;
  }
  .UserPage .PostsUserPage .PostUser-avatar .Avatar,
  .UserPage .PostsUserPage .PostUser-avatar.Avatar {
    width: 56px !important;
    height: 56px !important;
    line-height: 56px !important;
  }
  .UserPage .PostsUserPage .PostUser-badges {
    position: absolute !important;
    left: 51px !important;
    top: 10px !important;
    width: auto !important;
    margin: 0 !important;
    z-index: 5;
  }
  .UserPage .PostsUserPage .Post-header,
  .UserPage .PostsUserPage .Post-body,
  .UserPage .PostsUserPage .Post-footer,
  .UserPage .PostsUserPage .PostUser-name {
    margin-left: 0 !important;
  }
}

/* =========================================================
   HashBR Community Theme v1.10.0 — R33.14 discussion layout root-cause fix
   R33.7 accidentally changed .DiscussionPage-list from Flarum's absolute/fixed
   pane to position:relative. Because the pane keeps a viewport-height, it then
   occupied normal document flow and pushed the real discussion roughly one
   screen below the fold. Restore Flarum's native pane/sticky semantics.
   ========================================================= */
@media (min-width: 768px) {
  .DiscussionPage-list {
    position: absolute !important;
  }
  .affix .DiscussionPage-list {
    position: fixed !important;
  }
  .DiscussionPage-nav {
    position: sticky !important;
    top: var(--header-height) !important;
  }
}
