/* Forum layout; the existing formatting toolbar retains its own styles. */
.forum-layout { width: 100%; table-layout: fixed; border-spacing: 0; }
.forum-layout > tbody > tr > td:first-child { width: 170px; }
.forum-layout > tbody > tr > td:last-child:not(.forum-main) { width: 230px; }
.forum-main { min-width: 0; padding: 0 22px 28px; vertical-align: top; color: #303b36; }
.forum-heading { padding: 12px 0 20px; border-bottom: 1px solid #dfe5d5; margin-bottom: 20px; }
.forum-heading h1 { margin: 0 0 8px; font: 700 28px Tahoma, sans-serif; color: #435b25; }
.forum-heading p { margin: 0; color: #697465; font: 13px/1.5 Tahoma, sans-serif; }
.forum-notices:empty { display:none; }
.forum-editor { width: 100%; padding: 18px; background: #f7f9ef; border: 1px solid #dce3c9; border-radius: 10px; margin-bottom: 20px; box-sizing: border-box; }
.forum-editor label[for] { display: inline-block; font: bold 13px Tahoma, sans-serif; margin: 6px 0; color: #435b25; }
.forum-editor #ntopic, .forum-editor #mess { width: 100% !important; max-width: 100%; box-sizing: border-box; padding: 10px; border: 1px solid #bac5a9; border-radius: 5px; background: white; color: #26352d; font: 14px/1.5 Tahoma, sans-serif !important; }
.forum-editor #mess { min-height: 150px; resize: vertical; }
.forum-editor td { vertical-align: top; }
.forum-editor tr > td:last-child:not([colspan]) { padding-left: 12px; }
.forum-editor #new_topic { padding: 9px 20px; background: #56742d; border: 1px solid #486522; color: white; border-radius: 5px; cursor: pointer; }
.forum-pagination { margin: 14px 0; padding: 9px 14px; background: #f2f5e9; border-radius: 6px; }
.forum-threads { display: grid; gap: 20px; min-width: 0; }
.forum-thread { border: 1px solid #dce2d3; border-radius: 10px; background: #fff; overflow: hidden; box-shadow: 0 2px 5px #3547190a; }
.forum-thread-header { display: flex; align-items: center; gap: 14px; padding: 16px; background: #f4f7e9; border-bottom: 1px solid #e2e8d5; }
.forum-thread-header .avatar-frame { flex-shrink: 0; }
.forum-author { display: grid; gap: 5px; min-width: 0; }
.forum-author a { font: bold 14px Tahoma, sans-serif; color: #435b25; overflow-wrap: anywhere; }
.forum-author span, .forum-thread time { font: 11px/1.5 Tahoma, sans-serif; color: #75806d; }
.forum-actions { margin-left: auto; display: flex; align-items: center; gap: 14px; font: 12px Tahoma, sans-serif; }
.forum-actions label { white-space: nowrap; cursor: pointer; }
.forum-message { padding: 20px; }
.forum-message h2 { margin: 0 0 14px; color: #354a21; font: bold 17px/1.4 Tahoma, sans-serif; overflow-wrap: anywhere; }
.forum-message-text { font: 14px/1.65 Tahoma, sans-serif; overflow-wrap: anywhere; word-break: normal; min-width: 0; }
.forum-message-text img { max-width: 100%; height: auto; }
.forum-message-text a { overflow-wrap: anywhere; }
.forum-message-text table { max-width: 100%; }
.forum-reply { margin: 0 20px 16px 34px; padding: 14px 16px; border-left: 3px solid #c9d5ac; background: #f8f9f4; border-radius: 0 6px 6px 0; }
.forum-reply header { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.forum-reply header > a:first-child { font: bold 13px Tahoma, sans-serif; color: #435b25; }
.forum-delete { margin-left: auto; }
.forum-private { display: inline-block; margin-bottom: 8px; font: 11px Tahoma, sans-serif; padding: 4px 8px; background: #eee9d6; color: #74683c; border-radius: 4px; }

/* Keep the site's three-column desktop layout at every breakpoint. */
.forum-layout { min-width: 780px; }
.forum-layout > tbody > tr > td:first-child { width: 165px; }
.forum-layout > tbody > tr > td:last-child:not(.forum-main) { width: 232px; }
.forum-main { padding: 0 5px 12px; color: #4F4F4F; }
.forum-heading { margin: 0 0 12px; padding: 0; border: 1px solid #B8B8B8; border-radius: 8px; overflow: hidden; background: #FFFFDD; box-shadow: 2px 2px 6px rgba(0,0,0,.14); }
.forum-heading h1 { margin: 0; padding: 8px 12px; font: bold 12px Verdana,Tahoma,Arial,sans-serif; color: #FFFF80; background: linear-gradient(0deg,rgba(62,114,0,1) 3%,rgba(98,149,0,1) 10%,rgba(71,115,0,1) 87%,rgba(138,189,52,1) 98%); }
.forum-heading p { margin: 0; padding: 12px; text-align: left; color: #4F4F4F; font: 12px/1.45 Tahoma,Arial,sans-serif; }
.forum-editor { padding: 10px; background: #FFFFDD; border: 1px solid #B8B8B8; border-radius: 8px; box-shadow: 2px 2px 6px rgba(0,0,0,.14); margin-bottom: 12px; }
.forum-editor label[for] { color: #6D2E00; font-size: 12px; }
.forum-editor #ntopic, .forum-editor #mess { border-color: #BDBDBD; border-radius: 4px; padding: 5px 10px; color: #333; font-size: 12px !important; }
.forum-editor #ntopic { height: 34px; }
.forum-editor #new_topic { height: 34px; padding: 0 16px; border: 1px solid #5E8700; border-radius: 4px; background: linear-gradient(0deg,#6E9300 0%,#83AA1A 55%,#95BF2E 100%); color: #FFFFCC; font-weight: bold; }
.forum-threads { gap: 12px; }
.forum-thread { border: 1px solid #B8B8B8; border-radius: 8px; background: #FFFFDD; box-shadow: 2px 2px 6px rgba(0,0,0,.10); }
.forum-thread-header { padding: 10px; gap: 10px; background: #FFFFCF; border-bottom: 1px solid #DDD5AF; flex-wrap: wrap; }
.forum-author a { color: #6D2E00; font-size: 12px; }
.forum-author span, .forum-thread time { color: #666; }
.forum-actions { font-size: 11px; }
.forum-message { padding: 12px; }
.forum-message h2 { color: #6D2E00; font-size: 14px; margin-bottom: 10px; }
.forum-message-text { font: 12px/1.55 Tahoma,Arial,sans-serif; color: #4F4F4F; }
.forum-reply { margin: 0 12px 12px 22px; padding: 10px 12px; background: #F7F7E2; border-left: 3px solid #DDD5AF; }
.forum-reply header > a:first-child { color: #6D2E00; font-size: 12px; }
.forum-private { background: #F0EACB; color: #6D2E00; }
.forum-pagination { margin: 12px 0; padding: 7px 10px; border: 1px solid #DDD5AF; background: #F7F7E2; border-radius: 6px; }
@media (max-width: 1400px) {
 .forum-editor, .forum-editor > tbody, .forum-editor tr, .forum-editor td { display: block; width: auto; }
 .forum-editor tr > td:last-child:not([colspan]) { padding-left: 0; width: 230px; max-width: 100%; }
}
@media (max-width: 1000px) {
 .forum-actions { width: 100%; justify-content: flex-end; }
 .forum-reply { margin-left: 12px; }
}

@media (max-width: 900px) {
 body > table:nth-of-type(2) > tbody > tr { display: flex; flex-wrap: wrap; align-items: center; gap: 3px; }
 body > table:nth-of-type(2) > tbody > tr > td { width: auto; }
}

/* Compact conversation layout shared visually with the personal mailbox. */
.forum-threads { gap: 10px; }
.forum-thread { display: grid; grid-template-columns: 98px minmax(0,1fr); grid-template-rows: auto 1fr; border: 1px solid #E3D77B; border-radius: 4px; background: #FAFAD2; box-shadow: none; overflow: hidden; }
.forum-avatar { grid-column: 1; grid-row: 1 / 100; padding: 5px 8px; border-right: 1px solid #E3D77B; }
.forum-thread-header { grid-column: 2; padding: 2px 4px; gap: 4px; flex-wrap: nowrap; align-items: flex-start; background: transparent; border-bottom: 1px solid #E3D77B; }
.forum-author { display: block; font: 12px/1.4 Tahoma,Arial,sans-serif; }
.forum-author time { padding-right: 5px; margin-right: 5px; border-right: 1px solid #E3D77B; color: #000; }
.forum-author a { color: #800000; }
.forum-author span { margin-left: 4px; }
.forum-actions { flex: 0 0 auto; width: auto; gap: 5px; align-items: center; }
.forum-actions input { margin: 0; vertical-align: middle; }
.forum-actions > a { border-left: 1px solid #E3D77B; padding-left: 5px; }
.forum-message { grid-column: 2; padding: 4px; }
.forum-message h2 { margin: 0 4px 6px; padding: 4px 0 6px; border-bottom: 1px solid #E3D77B; font: bold 13px/1.4 Tahoma,Arial,sans-serif; color: #526D13; }
.forum-message-text { color: #000; font: 12px/1.3 Tahoma,Arial,sans-serif; }
.forum-reply { grid-column: 2; position: relative; margin: 0 19px 2px 4px; padding: 4px; border: 1px solid #CCCCFF; border-radius: 4px; background: #E6E6FA; min-width: 0; }
.forum-reply header { gap: 4px; margin: 0; }
.forum-reply header > a:not(.forum-delete) { font: bold 12px Tahoma,Arial,sans-serif; color: #800000; }
.forum-reply time { color: #000; font-size: 12px; }
.forum-reply .forum-delete { position: absolute; right: -16px; top: 0; }
.forum-private { margin: 0 3px 2px 0; padding: 0; border-radius: 0; background: transparent; }

.forum-editor #ntopic:focus, .forum-editor #mess:focus { border-color: #ff9900; outline: none; box-shadow: none; }
.forum-editor #new_topic:disabled { opacity: .45; cursor: default; }

/* Explicit control geometry avoids browser-dependent inline baselines. */
.forum-submit-controls { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.forum-hide-option { display: flex; align-items: center; gap: 6px; margin: 0; padding: 0; min-height: 18px; font: 12px/18px Tahoma,Arial,sans-serif; }
.forum-hide-option #hide { flex: 0 0 auto; margin: 0; padding: 0; width: 13px; height: 13px; }
.forum-editor #new_topic { display: block; box-sizing: border-box; margin: 0; line-height: normal; }
.forum-editor #new_topic::-moz-focus-inner { border: 0; padding: 0; }

.forum-hide-option #hide:disabled + span { color: #999; }

.forum-delete-slot { display: inline-block; flex: 0 0 15px; width: 15px; min-height: 12px; border-left: 1px solid #E3D77B; padding-left: 5px; box-sizing: content-box; }
.forum-delete-button { appearance: none; display: inline-flex; align-items: center; justify-content: center; width: 12px; height: 12px; padding: 0; margin: 0; border: 0; background: transparent; cursor: pointer; }
.forum-delete-button:focus-visible { outline: 1px solid #ff9900; }

.forum-counter { margin-top: 5px; text-align: right; color: #666666; font-size: 11px; }
.forum-counter.is-over-limit { color: #cc0000; }

.forum-editor #forum-topic-heading.is-disabled label { color: #999; }
.forum-editor #forum-topic-heading.is-disabled img { opacity: .45; }
.forum-editor #ntopic:disabled { background: #eee; color: #999; border-color: #ccc; cursor: default; }
