/* Discourse-style forum, scoped so Home and Profile keep their existing layout. */
body[data-view="forum"] { background: #030f1a !important; font-weight: 300; }
body[data-view="forum"] > #app > main { min-height: calc(100vh - 300px); }
body[data-view="forum"] .soc_fixed { display: none !important; }
.forum-nav-search, .forum-mobile-menu { background: none; border: 0; color: #bbc0c4; padding: 6px; cursor: pointer; font-size: 25px; }
.forum-mobile-menu { display: none; }
body[data-view="forum"] .fas, body[data-view="forum"] .far { font-family: 'Dearsense Account Icons' !important; font-weight: 900; }
body[data-view="forum"] .far { font-weight: 400; }
.forum-shell { max-width: 1382px; padding: 0 10.72px; margin: 100px auto 0; display: grid; grid-template-columns: 272px minmax(0,1fr); gap: 32px; font: 300 16px/1.4 'MuseoSans', sans-serif; color: #d5d7d8; }
.forum-shell *, .forum-shell *::before, .forum-shell *::after { box-sizing: border-box; }
.forum-shell > #forum-composer-host { display: contents; }
.forum-shell button, .forum-shell input, .forum-shell select, .forum-shell textarea { font: inherit; }
.forum-shell button, .forum-nav-search, .forum-mobile-menu { cursor: pointer; }
.forum-shell button:disabled { opacity: .5; cursor: wait; }
.forum-shell a:hover { color: #0095b9; }
.forum-shell :focus-visible, .forum-nav-search:focus-visible, .forum-mobile-menu:focus-visible { outline: 2px solid #00b4df; outline-offset: 3px; }
.forum-shell h1, .forum-shell h2, .forum-shell h3, .forum-shell p { margin: 0; }
.forum-shell .forum-sr-only, .forum-skip { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.forum-skip:focus { clip: auto; width: auto; height: auto; padding: 12px; background: #051a2d; z-index: 1001; }
.forum-sidebar { border-right: 1px solid #283139; position: sticky; top: 100px; height: calc(100vh - 100px); display: flex; flex-direction: column; justify-content: space-between; padding: 16px 8px 8px; min-width: 0; }
.forum-sidebar-link { display: flex; align-items: center; gap: 12px; height: 36px; padding: 6px 8px; color: #a6a6a6; margin-bottom: 2px; }
.forum-sidebar-link > i { width: 16px; text-align: center; }
.forum-sidebar-link.is-active { background: #062c3d; box-shadow: inset 3px 0 #0095b9; border: 1px solid #18455a; color: #fff; }
.forum-sidebar-link .forum-badge { font-size: 16px; }
.forum-sidebar-link .forum-color { width: 13px; height: 13px; border-radius: 2px; }
.forum-more summary, .forum-sidebar-categories summary { list-style: none; color: #999fa3; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 12px 8px; }
.forum-more summary::-webkit-details-marker, .forum-sidebar-categories summary::-webkit-details-marker { display: none; }
.forum-more summary { justify-content: center; padding-block: 8px; }
.forum-sidebar-categories { border-top: 1px solid #283139; margin-top: 4px; }
.forum-sidebar-categories summary { font-size: 13px; font-weight: 700; letter-spacing: .3px; }
.forum-sidebar-categories summary i { font-size: 10px; transition: transform .2s; }
.forum-sidebar-categories:not([open]) summary i { transform: rotate(-90deg); }
.forum-sidebar-bottom { display: flex; justify-content: flex-end; padding-top: 12px; }
.forum-main { padding-top: 40px; min-width: 0; }
.forum-tools { display: flex; justify-content: flex-end; align-items: center; gap: 12px; min-height: 44px; margin-bottom: 16px; }
.forum-tools .forum-mobile-menu { margin-right: auto; }
.forum-tools button { min-height: 44px; min-width: 44px; }
.forum-content { min-width: 0; padding-bottom: 60px; }
.forum-toolbar { display: flex; align-items: center; gap: 8px 12px; min-height: 40px; margin-bottom: 12px; }
.forum-category-filter { position: relative; }
.forum-category-filter::after { content: '\f054'; font: 900 12px 'Dearsense Account Icons'; color: #a6a6a6; position: absolute; right: 10px; top: 12px; pointer-events: none; }
.forum-category-filter select { width: 121px; height: 38px; padding: 7px 25px 7px 8px; appearance: none; border: 1px solid #174056; border-radius: 3px; background: #051a2d; color: #fff; font-weight: 700; cursor: pointer; text-overflow: ellipsis; }
.forum-shell select option { background: #051a2d; color: #fff; }
.forum-tabs { display: flex; gap: 8px; }
.forum-tabs a { padding: 5px 10px; font-weight: 700; white-space: nowrap; color: #fff; border-radius: 2px; }
.forum-tabs a.is-active { background: #0095b9; }
.forum-tabs a:hover { color: #fff; background: #063145; }
.forum-button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid rgba(0,149,185,.3); border-radius: 3px; background: #051a2d; color: #d5d7d8; font-weight: 700 !important; padding: 8px 10px; min-height: 36px; line-height: 20px; text-decoration: none; }
.forum-button:hover { background: #073147; color: #fff !important; }
.forum-shell .forum-button { line-height: 20px; }
.forum-primary { background: #0095b9; border-color: #0095b9; color: #fff; }
.forum-primary:hover { background: #00a4c9; }
.forum-new-topic { margin-left: auto; white-space: nowrap; }
.forum-icon-button { display: inline-flex; align-items: center; justify-content: center; background: none; color: #89949c; border: 0; padding: 8px; min-width: 32px; min-height: 32px; line-height: 1; }
.forum-icon-button:hover { color: #fff; background: #051a2d; }
.forum-icon-button.forum-primary { background: #0095b9; color: #fff; }
.forum-online { display: flex; align-items: center; gap: 4px; height: 26px; color: #92999e; }
.forum-online > span { display: flex; }
.forum-online .forum-avatar { width: 25px; height: 25px; margin-left: -3px; border: 1px solid #030f1a; }
.forum-dot { width: 8px; height: 8px; background: #0095b9; border-radius: 50%; display: inline-block; margin-left: 6px; flex-shrink: 0; }
.forum-color { width: 9px; height: 9px; background: var(--category-color); display: inline-block; flex-shrink: 0; }
.forum-badge { display: inline-flex; align-items: center; gap: 4px; color: #a6a6a6; font-size: 14px; line-height: 20px; }
.forum-category-columns { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 32px; }
.forum-list-heading { display: flex; justify-content: space-between; color: #d5d7d8; height: 36.484px; padding: 8px 12px; font-size: 14px; border-bottom: 2px solid #16738d; }
.forum-category-row { display: grid; grid-template-columns: minmax(0,1fr) 48px; gap: 10px; border-bottom: 1px solid #29333b; border-left: 3px solid var(--category-color); padding: 12.25px 12px; min-height: 78px; }
.forum-category-title { display: flex; align-items: center; gap: 6px; font-size: 18px; font-weight: 700; color: #a6a6a6; line-height: 25.328px; }
.forum-category-title .forum-color { width: 13px; height: 13px; border-radius: 2px; }
.forum-category-title i { font-size: 14px; }
.forum-category-row p { color: #a6a6a6; margin-top: 8px; line-height: 22.4px; }
.forum-category-count { color: #a6a6a6; font-size: 18px; font-weight: 700; text-align: right; }
.forum-subcategories { display: flex; flex-wrap: wrap; gap: 8px 12px; margin-top: 6px; }
.forum-subcategories .forum-badge { font-size: 14px; font-weight: 300; }
.forum-avatar { width: 25px; height: 25px; border-radius: 50%; object-fit: cover; display: inline-flex; flex-shrink: 0; vertical-align: middle; background: #082237; }
.forum-avatar-letter { align-items: center; justify-content: center; color: #66c3d8; font-size: 15px; font-weight: 700; }
.forum-avatar-medium { width: 48px; height: 48px; }
.forum-avatar-large { width: 48px; height: 48px; font-size: 24px; }
.forum-latest-card { display: flex; gap: 16px; padding: 16px; border-bottom: 1px solid #29333b; align-items: center; min-height: 96px; }
.forum-latest-info { flex: 1; min-width: 0; }
.forum-latest-info .forum-topic-title { font-weight: 500; line-height: 25px; }
.forum-latest-activity { width: 58px; flex-shrink: 0; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; color: #276578; font-size: 14px; }
.forum-latest-activity .forum-reply-count { align-self: flex-end; color: #276578; }
.forum-topic-title { font-size: 18px; color: #e1e2e3; font-weight: 700; line-height: 22px; overflow-wrap: anywhere; }
.forum-topic-title > i, .forum-topic-heading h1 > i { color: #347185; font-size: 14px; margin-right: 5px; }
.forum-latest-info time { font-size: 14px; color: #a6a6a6; }
.forum-reply-count { color: #93999e; font-weight: 700; font-size: 16px; align-self: flex-start; }
.forum-more-topics { display: block; text-align: right; font-weight: 700; padding: 12px 16px; color: #a6a6a6; }
.forum-topic-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.forum-topic-table th { color: #c5c7c8; font-size: 14px; text-align: left; padding: 8px 12px; border-bottom: 1px solid #29333b; font-weight: 500; }
.forum-topic-table th:first-child { width: auto; }
.forum-topic-table th.forum-posters { width: 115px; }
.forum-topic-table th:not(:first-child):not(.forum-posters) { width: 72px; text-align: center; }
.forum-topic-table th button { font-size: inherit; color: inherit; font-weight: inherit; background: none; border: none; padding: 0; }
.forum-topic-table td { border-bottom: 1px solid #29333b; padding: 14px 12px; vertical-align: middle; }
.forum-topic-table td.forum-posters { text-align: center; }
.forum-numeric { text-align: center; font-size: 14px; color: #b2b4b7; }
.forum-numeric a { font-weight: 700; }
.forum-excerpt { margin-top: 5px !important; color: #989fa3; line-height: 22px; }
.forum-view-title { font-size: 24px; color: #e1e2e3; margin: 18px 12px !important; font-weight: 700; }
.forum-empty, .forum-error, .forum-loading { padding: 45px 20px; text-align: center; color: #a6a6a6; }
.forum-empty > i { font-size: 32px; color: #0095b9; }
.forum-empty p, .forum-error p { margin: 15px 0 !important; }
.forum-error h1 { font-size: 24px; color: #fff; }
.forum-error .forum-button { margin: 5px; }
.forum-pagination { display: flex; justify-content: center; align-items: center; gap: 16px; padding: 24px 0; }
.forum-topic-heading { margin-bottom: 30px; }
.forum-topic-heading h1 { font-size: 28px; font-weight: 700; line-height: 1.25; color: #fff; overflow-wrap: anywhere; }
.forum-topic-heading > a { display: inline-block; margin-top: 8px; }
.forum-thread-layout { display: grid; grid-template-columns: minmax(0,760px) minmax(90px,1fr); gap: 60px; }
.forum-post { display: flex; gap: 10px; padding: 20px 0; border-top: 1px solid #29333b; scroll-margin-top: 120px; }
.forum-post-main { min-width: 0; flex: 1; }
.forum-post-main > header { display: flex; gap: 6px; align-items: baseline; color: #a6a6a6; flex-wrap: wrap; }
.forum-post-main > header strong { color: #0095b9; font-weight: 700; }
.forum-post-main > header > a { margin-left: auto; font-size: 14px; }
.forum-parent-post { display: inline-block; margin-top: 12px; font-size: 14px; color: #a6a6a6; }
.forum-post-body { color: #e1e2e3; padding: 24px 0 28px; line-height: 1.55; overflow-wrap: anywhere; }
.forum-post-body p, .forum-markdown-preview p { margin-bottom: 16px; }
.forum-post-body a, .forum-markdown-preview a { color: #0095b9; text-decoration: underline; }
.forum-post-body code, .forum-markdown-preview code { font-family: 'RobotoMono', monospace; font-size: 14px; background: #051a2d; padding: 2px 5px; }
.forum-post-body pre, .forum-markdown-preview pre { background: #051a2d; white-space: pre-wrap; padding: 14px; }
.forum-post-body blockquote, .forum-markdown-preview blockquote { border-left: 4px solid #0095b9; background: #051a2d; margin: 8px 0; padding: 14px; }
.forum-post-body h3, .forum-markdown-preview h3 { font-weight: 700; margin: 12px 0; }
.forum-post-image { display: block; max-width: 100%; max-height: 600px; object-fit: contain; margin: 12px 0; border-radius: 3px; }
.forum-topic-stats { display: flex; flex-wrap: wrap; gap: 12px 24px; padding: 12px 0; font-size: 13px; color: #92999e; border-top: 1px solid #29333b; margin-bottom: 16px; }
.forum-post-actions { display: flex; justify-content: flex-end; align-items: center; gap: 4px; }
.forum-like-total { margin-right: auto; color: #8e969b; }
.forum-like-total i, .is-liked { color: #d92b45; }
.forum-topic-bottom { display: flex; gap: 12px; margin-top: 25px; }
.forum-timeline { position: sticky; top: 150px; align-self: start; color: #276578; font-size: 14px; }
.forum-timeline > div { border-left: 2px solid #0095b9; min-height: 220px; margin: 12px 8px; padding: 24px 10px; display: flex; flex-direction: column; gap: 4px; }
.forum-timeline strong { color: #fff; font-size: 16px; }
.forum-timeline > button { display: block; margin-top: 20px; }
.forum-search-panel { position: fixed; z-index: 1000; top: 85px; right: max(20px,calc((100vw - 1382px)/2)); background: #051a2d; border: 1px solid #18455a; border-radius: 4px; padding: 20px; width: 420px; box-shadow: 0 10px 35px #0008; }
.forum-search-panel label { display: block; margin-bottom: 10px; font-weight: 700; }
.forum-search-panel > div { display: flex; gap: 8px; }
.forum-search-panel input { min-width: 0; flex: 1; background: #030f1a; color: #fff; border: 1px solid #18455a; padding: 10px; }
.forum-composer { position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; width: 760px; max-width: calc(100vw - 24px); z-index: 1000; background: #030f1a; border: 1px solid #29333b; border-radius: 7px 7px 0 0; box-shadow: 0 0 30px #0008; animation: forum-compose-in .22s ease-out; }
@keyframes forum-compose-in { from { opacity: 0; translate: 0 40px; } to { opacity: 1; translate: 0 0; } }
.forum-composer-handle { width: 48px; height: 4px; border-radius: 2px; background: #858a8c; margin: 4px auto 0; }
.forum-composer > header { display: flex; align-items: center; justify-content: space-between; height: 56px; padding: 0 15px; }
.forum-composer > header strong { color: #a6a6a6; font-weight: 700; }
.forum-composer > header strong i { margin-right: 5px; }
.forum-composer form { margin: 0; }
.forum-composer form > select, .forum-composer form > input { width: 100%; border: 0; border-block: 1px solid #29333b; padding: 12px 15px; height: 46px; background: #051a2d; color: #d5d7d8; border-radius: 0; }
.forum-composer form > input { background: #030f1a; }
.forum-editor-area { height: 190px; }
.forum-editor-area textarea { display: block; width: 100%; height: 100%; resize: none; border: 0; background: #051a2d; color: #e1e2e3; padding: 10px 15px; border-radius: 0; line-height: 1.5; }
.forum-markdown-preview { height: 100%; overflow: auto; padding: 12px 15px; background: #051a2d; color: #d5d7d8; }
.forum-shell [hidden] { display: none !important; }
.forum-shell .forum-composer footer { position: static !important; width: 100% !important; display: flex !important; justify-content: space-between; align-items: center; gap: 8px; border-top: 1px solid #29333b; background: #030f1a !important; padding: 8px 15px !important; margin: 0 !important; min-height: 54px; box-shadow: none !important; }
.forum-composer footer > div { display: flex; gap: 8px; }
.forum-editor-tools { flex-wrap: wrap; gap: 5px !important; }
.forum-tool { width: 28px; height: 28px; background: #0095b9; border: 0; border-radius: 3px; color: #fff; }
.forum-tool:hover { background: #00b4df; }
.forum-compose-error { color: #f57676; padding: 0 15px; font-size: 14px; }
.forum-compose-error:not(:empty) { padding-block: 10px; }
.forum-composer.is-minimized form { display: none; }
.forum-composer.is-fullscreen { top: 100px; width: calc(100vw - 40px); display: flex; flex-direction: column; }
.forum-composer.is-fullscreen form { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.forum-composer.is-fullscreen .forum-editor-area { flex: 1; min-height: 0; }
body[data-view="forum"] #app > footer { position: static !important; background: #051a2d !important; padding: 55px 0 30px !important; }
@media (max-width: 1150px) {
  .forum-shell { grid-template-columns: 220px minmax(0,1fr); gap: 24px; padding-inline: 20px; }
  .forum-sidebar { padding-inline: 0 8px; }
  .forum-toolbar { flex-wrap: wrap; }
  .forum-category-columns { gap: 24px; }
  .forum-category-title { font-size: 18px; }
  .forum-topic-table .forum-posters { display: none; }
  .forum-thread-layout { grid-template-columns: minmax(0,1fr) 90px; gap: 25px; }
}
@media (max-width: 900px) {
  .forum-category-columns { grid-template-columns: 1fr; }
  .forum-latest-list { margin-top: 16px; }
  .forum-tabs { gap: 2px; }
  .forum-tabs a { padding-inline: 8px; }
}
@media (max-width: 700px) {
  .forum-nav-search, .forum-mobile-menu { font-size: 21px; padding: 4px; }
  .forum-mobile-menu { display: block; }
  .forum-shell { display: block; margin-top: 70px; padding: 0 12px; }
  .forum-main { padding-top: 28px; }
  .forum-content { padding-bottom: 36px; }
  .forum-sidebar { position: fixed; width: 272px; left: 0; top: 70px; height: calc(100dvh - 70px); padding: 16px 8px; background: #030f1a; z-index: 1000; transform: translateX(-100%); transition: transform .2s; }
  .sidebar-open .forum-sidebar { transform: translateX(0); box-shadow: 20px 0 40px #0008; }
  .forum-toolbar { gap: 10px; }
  .forum-category-filter select { max-width: 145px; font-size: 14px; }
  .forum-tabs { order: 3; width: 100%; margin-top: 5px; }
  .forum-tabs a { padding: 6px 10px; font-size: 15px; }
  .forum-new-topic { font-size: 14px !important; }
  .forum-topic-table th, .forum-topic-table td { padding-inline: 6px; }
  .forum-topic-table th:not(:first-child):not(.forum-posters) { width: 46px; font-size: 11px; }
  .forum-topic-table th:nth-child(4), .forum-topic-table td:nth-child(4) { display: none; }
  .forum-topic-title { font-size: 16px; line-height: 21px; }
  .forum-excerpt { font-size: 14px; line-height: 20px; }
  .forum-topic-heading h1 { font-size: 24px; }
  .forum-thread-layout { display: block; }
  .forum-timeline { display: none; }
  .forum-avatar-large { width: 36px; height: 36px; }
  .forum-post { gap: 8px; }
  .forum-member-role { font-size: 12px; }
  .forum-post-main > header > a { font-size: 12px; }
  .forum-post-body { padding-top: 18px; font-size: 15px; }
  .forum-post-actions { gap: 0; }
  .forum-search-panel { top: 70px; left: 12px; right: 12px; width: auto; padding: 16px; }
  .forum-composer { max-width: 100vw; width: 100vw; }
  .forum-composer > header { height: 45px; padding-inline: 12px; }
  .forum-composer > header strong { max-width: 60%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .forum-editor-area { height: min(210px,30dvh); }
  .forum-shell .forum-composer footer { align-items: flex-end; padding: 8px !important; }
  .forum-composer footer > div:last-child { flex-shrink: 0; gap: 3px; }
  .forum-composer footer .forum-button { padding-inline: 8px; font-size: 13px; }
  .forum-composer.is-fullscreen { top: 70px; width: 100vw; }
  body[data-view="forum"] #app > footer .container { width: calc(100% - 32px) !important; }
  body[data-view="forum"] #app > footer .footer_links { grid-template-columns: 1fr !important; gap: 24px !important; }
  body[data-view="forum"] #app > footer .useful_links { width: 100%; grid-template-columns: 1fr 1fr !important; gap: 10px !important; }
  body[data-view="forum"] #app > footer .separator { display: none !important; }
  body[data-view="forum"] #app > footer a { font-size: 14px !important; }
}
@media (prefers-reduced-motion: reduce) { .forum-composer { animation: none; } .forum-sidebar { transition: none; } }
