/* Forum homepage: scoped to the list view so topic/profile layouts remain unchanged. */
body:has(#view-list:not(.hidden)) .wrap {
  max-width: 1920px;
  padding: 30px 40px 72px;
}
body:has(#view-list:not(.hidden)) #btn-mega {
  display: none;
}
.forum-header-noti-dot {
  position: absolute;
  right: 8px;
  top: 6px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #08ae83;
  box-shadow: 0 0 0 2px #fff;
}
.forum-home-grid {
  display: grid;
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr) minmax(
      310px,
      420px
    );
  gap: 28px;
  align-items: start;
}
.forum-home-left,
.forum-home-right {
  display: grid;
  gap: 24px;
  min-width: 0;
}
.forum-home-main {
  min-width: 0;
}
.forum-home-panel {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  background: #fff;
  border: 1px solid #e1e8ec;
  border-radius: 18px;
  padding: 21px 20px;
  box-shadow: 0 5px 22px rgba(15, 60, 65, 0.035);
}
.forum-home-panel h2 {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 18px;
  color: #596974;
  font-size: 16.25px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
.forum-home-panel h2 i {
  color: #089f85;
}
.forum-home-person .forum-home-person-title {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.forum-home-person-title strong {
  min-width: 0;
}
.forum-home-person .forum-bot-mark {
  display: none;
}
.forum-home-filter-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  text-align: left;
  color: #4b5d67;
  font-weight: 600;
  font-size: 16.25px;
  cursor: pointer;
}
.forum-home-filter-item:hover,
.forum-home-filter-item.active {
  background: #e8faf6;
  color: #076a5d;
}
.forum-home-filter-item .forum-home-dot {
  width: 9px;
  height: 9px;
  flex: none;
  border-radius: 50%;
}
.forum-home-filter-item .forum-home-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.forum-home-filter-item .forum-home-count {
  margin-left: auto;
  color: #8a99a2;
  font-size: 13.75px;
}
.forum-home-filter-item.active .forum-home-count {
  color: #087969;
}
.forum-home-text-link {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 9px 12px;
  border-radius: 8px;
  color: #4b5d67;
  cursor: pointer;
  font-size: 16.25px;
}
.forum-home-text-link:hover,
.forum-home-text-link.active {
  color: #087969;
  background: #e8faf6;
}
.forum-home-tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.forum-home-tag-cloud .tag {
  padding: 5px 10px;
}
.forum-home-banner {
  min-height: 214px;
  padding: 31px 32px;
  display: flex;
  align-items: center;
  gap: 24px;
  justify-content: space-between;
  overflow: hidden;
  position: relative;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(112deg, #0b5848 0%, #087a6b 58%, #008d75 100%);
}
.forum-home-banner::after {
  content: "∑   π   ∫   x²   △   ∞";
  position: absolute;
  right: 2%;
  bottom: -14px;
  transform: rotate(-14deg);
  font-size: clamp(54px, 7vw, 115px);
  font-weight: 900;
  color: rgba(255, 255, 255, 0.055);
  white-space: nowrap;
  pointer-events: none;
}
.forum-home-banner-copy,
.forum-home-banner-actions {
  position: relative;
  z-index: 1;
}
.forum-home-banner-copy {
  max-width: 560px;
}
.forum-home-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 100px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.11);
  font-size: 15px;
  font-weight: 800;
}
.forum-home-banner h1 {
  color: #fff;
  margin: 15px 0 10px;
  font-size: clamp(25px, 2.5vw, 33.75px);
  line-height: 1.3;
  letter-spacing: -0.025em;
}
.forum-home-banner p {
  color: #d6eee8;
  margin: 0;
  font-size: 18.75px;
  font-weight: 600;
}
.forum-home-banner-actions {
  display: flex;
  gap: 10px;
  flex: none;
}
.forum-home-banner-actions button {
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 12px;
  padding: 12px 17px;
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
  font-size: 16.25px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}
.forum-home-banner-actions button:first-child {
  background: #fff;
  border-color: #fff;
  color: #076c5c;
}
.forum-home-banner-actions button:hover {
  transform: translateY(-2px);
}
.forum-home-search-row {
  display: flex;
  gap: 14px;
  margin: 21px 0 15px;
}
.forum-home-search-field {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 0 17px;
  border: 1px solid #dbe5e9;
  border-radius: 13px;
  background: #fff;
  color: #94a3ad;
}
.forum-home-search-field:focus-within {
  border-color: #0da68e;
  box-shadow: 0 0 0 3px rgba(13, 166, 142, 0.11);
}
.forum-home-search-field input {
  width: 100%;
  min-width: 0;
  min-height: 49px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #243c46;
  font-size: 17.5px;
}
.forum-home-search-row .btn-new {
  border-radius: 12px;
  padding: 0 22px;
  background: linear-gradient(120deg, #0ca586, #087d6d);
  box-shadow: none;
}
#view-list .filterbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 0;
  padding-bottom: 11px;
  border-bottom: 1px solid #dfe7e8;
}
#view-list .sort-tabs {
  margin-left: 0;
  gap: 7px;
}
#view-list .sort-tab {
  padding: 9px 14px;
  color: #4c5e69;
  font-size: 17.5px;
}
#view-list .sort-tab.active {
  background: #079a80;
  color: #fff;
}
.forum-home-result-count {
  margin-left: auto;
  color: #82909c;
  font-size: 15px;
  white-space: nowrap;
}
.forum-home-mod-btn {
  border: 1px solid #d8ccef;
  background: #f8f4ff;
  color: #643e9d;
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
  font-weight: 700;
  font-size: 15px;
}
.forum-home-active-filter {
  margin-top: 10px;
  color: #49616a;
  font-size: 15px;
}
.forum-home-active-filter button {
  margin-left: 8px;
  border: 0;
  background: transparent;
  color: #087969;
  text-decoration: underline;
  cursor: pointer;
}
#view-list .ttable {
  margin-top: 18px;
  border-radius: 15px;
}
#view-list .thead {
  padding: 15px 22px;
  border-bottom: 1px solid #e4eaed;
  color: #6d7b87;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 13.75px;
}
#view-list .trow {
  padding: 19px 22px;
  min-height: 94px;
}
#view-list .trow:hover {
  background: #f6fcfa;
}
#view-list .t-title {
  font-size: 18.75px;
  color: #20343b;
}
/* Ordinary hashtags only. Categories/subtopics/status keep their semantic mapping. */
body .tag,
body .tagbox .chip,
body .subtag,
#view-list .tag,
#view-topic .tag {
  background: var(--tag-bg, var(--eme-tag-bg, #e6f7f1));
  color: var(--tag-tone, var(--eme-tag-text, #076d5b));
  border: 1px solid var(--tag-border, var(--eme-tag-border, #b7e0d2));
}
body .tag:hover,
body .tagbox .chip:hover,
body .subtag:hover {
  background: var(--eme-tag-bg, #e6f7f1);
  color: var(--eme-tag-text, #076d5b);
}
.forum-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 20px 0;
}
.forum-pagination button {
  border: 1px solid #d7e2e5;
  border-radius: 8px;
  min-width: 35px;
  height: 35px;
  background: #fff;
  color: #49616a;
  font-weight: 700;
  cursor: pointer;
}
.forum-pagination button:hover,
.forum-pagination button[aria-current="page"] {
  background: #087d6d;
  border-color: #087d6d;
  color: #fff;
}
.forum-pagination button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.forum-home-online-list {
  display: grid;
  gap: 5px;
  max-height: 430px;
  overflow-y: auto;
  padding-right: 4px;
}
.forum-home-person {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 11px;
  padding: 10px 2px;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.forum-home-avatar {
  position: relative;
  flex: none;
}
.forum-home-person img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}
.forum-home-presence {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 2px solid #fff;
}
.forum-home-presence.online {
  background: #12b886;
}
.forum-home-presence.offline {
  background: #9ca3af;
}
.forum-home-person span {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.forum-home-person strong {
  color: #243d47;
  font-size: 16.25px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.forum-home-person small {
  color: #0e927a;
  font-size: 13.75px;
}
.forum-home-person:has(.offline) small {
  color: #8b99a3;
}
.forum-home-online-list p,
#forum-home-activity p {
  color: #83929a;
  font-size: 15px;
}
.forum-home-activity-item {
  display: flex;
  width: 100%;
  gap: 10px;
  padding: 11px 0;
  border: 0;
  border-bottom: 1px solid #edf0f0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  color: #40555e;
}
.forum-home-activity-item i {
  color: #0ca385;
  padding-top: 2px;
}
.forum-home-activity-item span {
  line-height: 1.4;
  font-size: 15px;
}
.forum-home-activity-item small {
  display: block;
  color: #91a0a8;
  margin-top: 5px;
}
.forum-home-moderation {
  margin-top: 16px;
}
.forum-home-report {
  display: flex;
  align-items: center;
  gap: 9px;
  border-top: 1px solid #e5eaed;
  padding: 10px 0;
  font-size: 15px;
}
.forum-home-report span {
  flex: 1;
}
.forum-home-report button,
.forum-home-visibility {
  border: 1px solid #d7e2e5;
  border-radius: 7px;
  background: #fff;
  color: #38535e;
  padding: 6px 9px;
  font-size: 13.75px;
  font-weight: 700;
  cursor: pointer;
}
.forum-home-hidden-label {
  display: inline-block;
  margin-right: 6px;
  border-radius: 5px;
  padding: 2px 6px;
  background: #fff3e5;
  color: #9a5200;
  font-size: 13.75px;
}
.forum-home-visibility {
  grid-column: 1 / -1;
  justify-self: start;
  margin-top: 8px;
}
.ttable:has(.forum-topic-menu) {
  overflow: visible;
}
.trow:has(.forum-topic-menu) {
  position: relative;
}
.trow:has(.forum-topic-menu[open]) {
  z-index: 20;
}
.t-col.c-a:has(.forum-topic-menu) {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  white-space: nowrap;
  min-width: 0;
}
.t-col.c-a:has(.forum-topic-menu) > span {
  flex: 1;
  min-width: 0;
  text-align: right;
}
.forum-topic-menu {
  position: relative;
  flex: none;
  text-align: left;
}
.forum-topic-menu summary {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 7px;
  cursor: pointer;
  list-style: none;
  color: #64748b;
}
.forum-topic-menu summary::-webkit-details-marker {
  display: none;
}
.forum-topic-menu summary:hover,
.forum-topic-menu[open] summary {
  background: #e8faf6;
  color: #087969;
}
.forum-topic-menu-pop {
  position: absolute;
  z-index: 30;
  top: 39px;
  right: 0;
  min-width: 225px;
  padding: 7px;
  border: 1px solid #dbe6e9;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(16, 52, 66, 0.16);
}
.forum-topic-menu-pop button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #304b56;
  text-align: left;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}
.forum-topic-menu-pop button:hover {
  background: #eefaf7;
}
.forum-topic-menu-pop button.danger {
  color: #c53030;
}
html[data-theme="dark"] .forum-topic-menu-pop {
  background: #172234;
  border-color: #304456;
}
html[data-theme="dark"] .forum-topic-menu-pop button {
  color: #e1eeeb;
}
html[data-theme="dark"] .forum-topic-menu-pop button.danger {
  color: #ff8b8b;
}
html[data-theme="dark"] .pf-trash-copy p,
html[data-theme="dark"] .pf-trash-copy small {
  color: #a8b9c6;
}
html[data-theme="dark"] .pf-trash-item {
  border-color: #304456;
}
html[data-theme="dark"] .pf-trash-restore {
  background: #183f3b;
  color: #9af4df;
  border-color: #35685e;
}
html[data-theme="dark"] .forum-home-panel,
html[data-theme="dark"] .forum-home-search-field,
html[data-theme="dark"] .forum-pagination button {
  background: #172234;
  border-color: #304456;
  color: #e8f4f1;
}
html[data-theme="dark"] .forum-home-panel h2,
html[data-theme="dark"] .forum-home-filter-item,
html[data-theme="dark"] .forum-home-text-link,
html[data-theme="dark"] .forum-home-person strong,
html[data-theme="dark"] .forum-home-activity-item span,
html[data-theme="dark"] .forum-home-search-field input,
html[data-theme="dark"] #view-list .t-title {
  color: #e1eeeb;
}
html[data-theme="dark"] .forum-home-filter-item:hover,
html[data-theme="dark"] .forum-home-filter-item.active,
html[data-theme="dark"] .forum-home-text-link:hover {
  background: #21413e;
}
html[data-theme="dark"]
  :is(#view-list .tag, #view-topic .tag, .tag, .tagbox .chip, .subtag) {
  --eme-tag-bg: #193d35;
  --eme-tag-text: #b7f2dd;
  --eme-tag-border: #467064;
  background: var(--tag-bg, var(--eme-tag-bg));
  border-color: var(--tag-border, var(--eme-tag-border));
  color: var(--tag-tone, var(--eme-tag-text));
}
@media (max-width: 1450px) {
  .forum-home-grid {
    grid-template-columns: 280px minmax(0, 1fr) 310px;
    gap: 18px;
  }
  .forum-home-banner {
    flex-wrap: wrap;
  }
}
@media (max-width: 1100px) {
  .forum-home-grid {
    grid-template-columns: 250px minmax(0, 1fr);
  }
  .forum-home-right {
    display: grid;
    grid-column: 1 / -1;
  }
  .forum-home-right > .forum-home-panel:not(:first-child) {
    display: none;
  }
}
@media (max-width: 980px) {
  #view-list .thead,
  #view-list .trow {
    grid-template-columns: minmax(0, 1fr) 72px 130px;
  }
  #view-list .t-posters,
  #view-list .c-v,
  #view-list .thead .c-c {
    display: none;
  }
}
@media (max-width: 760px) {
  body:has(#view-list:not(.hidden)) .wrap {
    padding: 18px 14px 55px;
  }
  .forum-home-grid {
    display: block;
  }
  .forum-home-left {
    display: block;
    margin-bottom: 14px;
  }
  .forum-home-left .forum-home-panel:not(:first-child) {
    display: none;
  }
  #forum-home-categories {
    display: flex;
    gap: 5px;
    overflow-x: auto;
  }
  #forum-home-categories .forum-home-filter-item {
    width: auto;
    flex: none;
  }
  #forum-home-categories .forum-home-count {
    display: none;
  }
  .forum-home-banner {
    padding: 24px 20px;
  }
  .forum-home-banner-actions {
    flex-wrap: wrap;
  }
  .forum-home-search-row .btn-new {
    padding: 0 12px;
    white-space: nowrap;
  }
  #view-list .thead {
    display: none;
  }
  #view-list .trow {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .forum-home-result-count {
    display: none;
  }
}
