:root { --board-ink: #17243a; --board-muted: #6f7d92; --board-line: #dbe2eb; --board-red: #cf3f4b; --board-teal: #157f96; }
body, .app-frame { background: #edf1f5; }
.message-board-page { width: min(1400px, calc(100% - 40px)); margin: 0 auto; padding: 28px 0 54px; }
.board-heading-band { min-height: 126px; display: flex; align-items: center; justify-content: space-between; gap: 28px; padding: 26px 30px; color: #fff; background: #202a3b; border-left: 5px solid var(--board-red); box-shadow: 0 14px 34px rgba(24, 36, 56, .12); }
.board-heading-band p, .board-section-heading p, .message-composer header p, .my-message-section header p { margin: 0 0 5px; color: #d7a8ad; font-size: 10px; font-weight: 800; }
.board-heading-band h1 { margin: 0; font-size: 28px; }
.board-heading-band > div:first-child > span { display: block; margin-top: 8px; color: rgba(255,255,255,.62); font-size: 13px; }
.board-account-state { min-width: 210px; display: flex; align-items: center; gap: 11px; padding: 12px 15px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); }
.board-account-state i { width: 9px; height: 9px; background: #94a0b2; border-radius: 50%; box-shadow: 0 0 0 4px rgba(148,160,178,.12); }
.board-account-state.authenticated i { background: #38c896; box-shadow: 0 0 0 4px rgba(56,200,150,.13); }
.board-account-state strong, .board-account-state small { display: block; }
.board-account-state strong { font-size: 13px; }
.board-account-state small { margin-top: 3px; color: rgba(255,255,255,.55); font-size: 10px; }
.board-image-ad { position: relative; isolation: isolate; width: 100%; min-height: 48px; height: auto; aspect-ratio: 20 / 3; display: block; margin-top: 18px; overflow: hidden; background: #17243a; border: 1px solid var(--board-line); }
.board-image-ad[hidden], .board-text-ads[hidden] { display: none; }
.board-image-ad::before { content: ""; position: absolute; inset: -18px; z-index: 0; background-image: linear-gradient(rgba(13,25,45,.35), rgba(13,25,45,.35)), var(--board-ad-image, linear-gradient(#17243a,#17243a)); background-position: center; background-repeat: no-repeat; background-size: cover; filter: blur(12px) saturate(.82); transform: scale(1.04); }
.board-image-ad img { position: relative; z-index: 1; width: 100%; height: 100%; display: block; object-fit: contain; }
.board-text-ads { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1px; margin-top: 12px; background: #dce3ec; border: 1px solid #dce3ec; }
.board-text-ads a { min-height: 38px; display: grid; place-items: center; padding: 5px 8px; color: #46566f; text-align: center; background: #fff; font-size: 12px; font-weight: 700; }
.board-text-ads a:hover { color: #b8303e; background: #fff8f8; }
.board-workspace { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(360px, .75fr); gap: 22px; margin-top: 22px; }
.public-message-section, .message-composer, .my-message-section { background: #fff; border: 1px solid var(--board-line); box-shadow: 0 7px 22px rgba(28, 43, 68, .045); }
.public-message-section { min-height: 620px; padding: 24px; }
.board-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding-bottom: 18px; border-bottom: 1px solid var(--board-line); }
.board-section-heading h2, .message-composer h2, .my-message-section h2 { margin: 0; color: var(--board-ink); font-size: 19px; }
.board-section-heading span { display: block; margin-top: 6px; color: var(--board-muted); font-size: 12px; }
.board-icon-button { width: 38px; height: 38px; display: grid; place-items: center; color: #596a82; background: #f8fafc; border: 1px solid var(--board-line); }
.board-icon-button:hover { color: var(--board-teal); border-color: #8bbac4; }
.board-icon-button svg { width: 18px; height: 18px; }
.public-message-list { display: grid; gap: 12px; margin-top: 18px; }
.public-message-card { padding: 17px 18px; border: 1px solid #e0e6ee; border-left: 3px solid #9eacbd; }
.public-message-card > header, .my-message-card > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.public-message-card > header strong { color: #33435c; font-size: 13px; }
.public-message-card time, .my-message-card time { color: #929cab; font-size: 10px; }
.public-message-card > p, .my-message-card > p { margin: 13px 0 0; color: #303d50; font-size: 14px; line-height: 1.8; white-space: pre-wrap; overflow-wrap: anywhere; }
.admin-reply { margin-top: 15px; padding: 13px 14px; background: #f4f8fa; border-left: 3px solid var(--board-teal); }
.admin-reply strong { display: block; color: #156d80; font-size: 11px; }
.admin-reply p { margin: 6px 0 0; color: #46566b; font-size: 13px; line-height: 1.75; white-space: pre-wrap; overflow-wrap: anywhere; }
.board-member-column { min-width: 0; display: grid; align-content: start; gap: 18px; }
.message-composer { padding: 22px; position: sticky; top: 100px; }
.message-composer > header { display: flex; align-items: center; gap: 12px; padding-bottom: 17px; border-bottom: 1px solid var(--board-line); }
.message-composer > header > svg { width: 26px; height: 26px; color: var(--board-red); }
.message-composer form { margin-top: 17px; }
.message-composer textarea { width: 100%; min-height: 156px; resize: vertical; padding: 13px 14px; color: var(--board-ink); background: #fbfcfd; border: 1px solid #cfd8e4; outline: 0; font: inherit; line-height: 1.7; }
.message-composer textarea:focus { border-color: #5b9cac; box-shadow: 0 0 0 3px rgba(21,127,150,.09); }
.composer-actions { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 12px; }
.composer-actions > span { color: var(--board-muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.composer-actions button, .guest-message-gate button { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 17px; color: #fff; background: #c93d49; border: 0; font-weight: 800; }
.composer-actions button:hover, .guest-message-gate button:hover { background: #ad2f3b; }
.composer-actions button svg { width: 16px; height: 16px; }
.composer-status { min-height: 18px; margin: 10px 0 0; color: #b3313d; font-size: 11px; }
.guest-message-gate { min-height: 210px; display: grid; place-content: center; justify-items: center; gap: 13px; text-align: center; }
.guest-message-gate[hidden] { display: none; }
.guest-message-gate svg { width: 34px; height: 34px; color: #7b899c; }
.guest-message-gate strong { color: #3a4860; font-size: 15px; }
.my-message-section { padding: 20px; }
.my-message-section > header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 15px; border-bottom: 1px solid var(--board-line); }
.my-message-section > header > span { color: #7c899c; font-size: 11px; }
.my-message-list { display: grid; gap: 10px; margin-top: 14px; }
.my-message-card { padding: 13px; background: #fafbfd; border: 1px solid #e1e6ed; }
.my-message-card b { padding: 3px 6px; color: #756031; background: #fff7df; border: 1px solid #ebdba9; font-size: 9px; }
.my-message-card b.public { color: #156c55; background: #ecfaf5; border-color: #c4e9dd; }
.my-message-card .admin-reply { margin-top: 11px; }
.board-loading, .board-empty { padding: 70px 20px; color: #8793a4; text-align: center; border: 1px dashed #d5dce6; }
.board-login-dialog { width: min(420px, calc(100% - 32px)); padding: 0; border: 0; box-shadow: 0 24px 70px rgba(15, 25, 42, .28); }
.board-login-dialog::backdrop { background: rgba(16, 25, 40, .56); }
.board-login-dialog form { position: relative; display: grid; justify-items: center; padding: 34px 30px 30px; text-align: center; }
.board-login-dialog form > svg { width: 38px; height: 38px; color: var(--board-red); }
.board-login-dialog h2 { margin: 15px 0 8px; font-size: 21px; }
.board-login-dialog p { margin: 0; color: var(--board-muted); font-size: 13px; line-height: 1.7; }
.board-login-dialog a { min-height: 42px; display: inline-flex; align-items: center; margin-top: 22px; padding: 0 22px; color: #fff; background: var(--board-red); font-weight: 800; }
.dialog-close { position: absolute; top: 9px; right: 11px; width: 32px; height: 32px; color: #7d8796; background: transparent; border: 0; font-size: 24px; }
.board-toast { position: fixed; right: 24px; bottom: 24px; z-index: 100; max-width: 360px; padding: 12px 17px; color: #fff; background: #223149; opacity: 0; pointer-events: none; transform: translateY(10px); transition: .2s ease; }
.board-toast.show { opacity: 1; transform: translateY(0); }
.board-toast.error { background: #b93440; }
@media (max-width: 1180px) { .board-workspace { grid-template-columns: 1fr; } .message-composer { position: static; } .board-member-column { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 820px) { .message-board-page { width: min(100% - 24px, 1400px); padding-top: 16px; } .board-heading-band { align-items: flex-start; flex-direction: column; padding: 22px; } .board-account-state { width: 100%; } .board-text-ads { grid-template-columns: repeat(3, minmax(0, 1fr)); } .board-member-column { grid-template-columns: 1fr; } .public-message-section { min-height: 0; padding: 18px 14px; } }
@media (max-width: 520px) { .board-text-ads { grid-template-columns: repeat(2, minmax(0, 1fr)); } .board-heading-band h1 { font-size: 24px; } .composer-actions { align-items: stretch; flex-direction: column; } .composer-actions button { width: 100%; } }

@media (max-width: 720px) {
  .message-board-page { width: calc(100% - 24px); padding: 14px 0 30px; }
  .board-heading-band { min-height: 0; gap: 15px; padding: 19px 17px; }
  .board-heading-band h1 { font-size: 24px; }
  .board-heading-band > div:first-child > span { font-size: 12px; line-height: 1.6; }
  .board-account-state { min-width: 0; padding: 10px 12px; }
  .board-workspace { gap: 12px; margin-top: 12px; }
  .public-message-section, .message-composer, .my-message-section { border-radius: 6px; }
  .message-composer { padding: 18px 15px; }
  .guest-message-gate { min-height: 180px; }
  .board-image-ad { aspect-ratio: 20 / 4; margin-top: 12px; }
  .board-text-ads { gap: 2px 4px; background: transparent; border: 0; }
  .board-text-ads a { min-height: 34px; overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
}
