.forum-panel {
    height: min(82vh, 860px);
    width: min(680px, calc(100vw - 110px));
}
.forum-title-actions { display: flex; align-items: center; gap: 10px; }
.forum-create-button {
    border: 1px solid rgba(255,255,255,.45); background: #ffc000; color: #092d4d;
    border-radius: 5px; padding: 8px 12px; font: 700 12px 'Open Sans', sans-serif; cursor: pointer;
}
.forum-create-button:hover { background: #ffd044; }
.forum-feed-body { overflow-y: auto; padding: 0; background: #eef1f4; }
.forum-sortbar { display: flex; align-items: center; gap: 5px; padding: 8px 10px; border-bottom: 1px solid #dbe1e8; background: #fff; }
.forum-sort-button { display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 0 13px; border: 0; border-radius: 999px; background: transparent; color: #52606d; font: 700 12px 'Open Sans',sans-serif; cursor: pointer; }
.forum-sort-button:hover { background: #f0f2f4; color: #172b3a; }
.forum-sort-button.active { background: #e7ebef; color: #092d4d; }
.forum-sort-button.active i { color: #d12e2e; }
.forum-status { padding: 28px 18px; text-align: center; color: #64748b; font-size: 13px; }
.forum-list { display: grid; gap: 10px; padding: 10px; }
.forum-post { display: block; background: #fff; border: 1px solid #dbe1e8; border-radius: 6px; overflow: hidden; }
.forum-vote { background: #f7f8fa; display: flex; align-items: center; padding: 2px; gap: 2px; border-radius: 5px; }
.forum-vote button { width: 30px; height: 28px; border: 0; background: transparent; color: #64748b; border-radius: 4px; cursor: pointer; font-size: 14px; }
.forum-vote button:hover { background: #e6ebf0; color: #092d4d; }
.forum-vote button.active-up { color: #d12e2e; background: #fff1f2; }
.forum-vote button.active-down { color: #174f78; background: #eff6ff; }
.forum-score { font-size: 12px; font-weight: 800; color: #334155; }
.forum-post-main { min-width: 0; padding: 13px 14px 12px; }
.forum-post-meta { font-size: 11px; color: #64748b; margin-bottom: 5px; }
.forum-profile-link { border: 0; padding: 0; background: transparent; color: #174f78; font: inherit; font-weight: 800; cursor: pointer; }
.forum-profile-link:hover { color: #003366; text-decoration: underline; }
.forum-post-title { margin: 0; color: #172033; font: 700 18px/1.25 'Roboto Condensed', sans-serif; letter-spacing: 0; }
.forum-post-body { margin: 8px 0 0; color: #334155; font-size: 13px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.forum-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; }
.forum-tag { border: 1px solid #bfd1df; background: #edf6fc; color: #174f78; border-radius: 999px; padding: 3px 8px; font-size: 10px; font-weight: 700; }
.forum-media { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 3px; margin-top: 10px; border-radius: 5px; overflow: hidden; background: #dbe1e8; }
.forum-media.one { grid-template-columns: 1fr; }
.forum-media img, .forum-media video { width: 100%; height: 210px; object-fit: cover; display: block; background: #e2e8f0; }
.forum-media.one img { height: auto; max-height: min(680px,70vh); object-fit: contain; background: #f8fafc; }
.forum-media.one video { height: min(390px,45vh); object-fit: contain; background: #111827; }
.forum-post-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.forum-post-vote .forum-score { min-width: 24px; text-align: center; }
.forum-action { border: 0; background: transparent; color: #526174; padding: 6px 8px; border-radius: 4px; font-size: 11px; font-weight: 700; cursor: pointer; }
.forum-action:hover { background: #eef2f6; color: #092d4d; }
.forum-comments { border-top: 1px solid #e2e8f0; margin-top: 5px; padding-top: 8px; }
.forum-comment { margin-top: 8px; border-left: 2px solid #ccd6e0; padding-left: 10px; }
.forum-comment-head { font-size: 10px; color: #64748b; }
.forum-comment-body { margin: 4px 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; line-height: 1.45; color: #263445; }
.forum-comment-actions { display: flex; align-items: center; gap: 4px; }
.forum-comment-actions button { border: 0; background: transparent; color: #64748b; font-size: 10px; font-weight: 700; padding: 3px 5px; cursor: pointer; }
.forum-comment-actions button.active-up { color: #d12e2e; }
.forum-comment-actions button.active-down { color: #174f78; }
.forum-reply-form { display: flex; gap: 7px; margin-top: 7px; }
.forum-reply-form textarea { min-height: 54px; flex: 1; resize: vertical; border: 1px solid #bdc8d3; border-radius: 5px; padding: 8px; font: 12px 'Open Sans', sans-serif; }
.forum-reply-form button { align-self: flex-end; border: 0; border-radius: 5px; padding: 8px 11px; background: #003366; color: white; font-weight: 700; cursor: pointer; }
.forum-load-more { margin: 0 10px 14px; width: calc(100% - 20px); border: 1px solid #bac6d1; background: white; color: #174f78; border-radius: 5px; padding: 10px; font-weight: 700; cursor: pointer; }
.forum-post-link { display: block; cursor: pointer; }
.forum-post-link:focus-visible { outline: 3px solid #ffc000; outline-offset: -3px; }
.forum-detail-open { overflow: hidden; }
.forum-detail-overlay { position: fixed; inset: 0; z-index: 5100; display: grid; place-items: center; padding: 22px; background: rgba(9,29,45,.76); }
.forum-detail-overlay[hidden] { display: none; }
.forum-detail-dialog { width: min(900px,100%); max-height: calc(100dvh - 44px); display: flex; flex-direction: column; overflow: hidden; border-radius: 7px; background: #eef1f4; box-shadow: 0 24px 70px rgba(0,0,0,.4); }
.forum-detail-header { flex: 0 0 auto; min-height: 48px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; padding: 0 14px; border-bottom: 4px solid #ffc000; background: #092d4d; color: #fff; }
.forum-detail-header strong { font: 700 15px 'Roboto Condensed',sans-serif; letter-spacing: 0; }
.forum-detail-back,.forum-detail-close { border: 0; background: transparent; color: #fff; cursor: pointer; }
.forum-detail-back { justify-self: start; padding: 8px 0; font-size: 12px; font-weight: 700; }
.forum-detail-close { justify-self: end; padding: 4px; font-size: 27px; line-height: 1; }
.forum-detail-content { min-height: 180px; overflow-y: auto; padding: 14px; }
.forum-detail-content .forum-post { border-color: #cbd5e1; }
.forum-detail-content .forum-media.one img { height: auto; max-height: min(760px,75vh); }
.forum-detail-content .forum-media.one video { height: min(600px,60vh); }
.forum-detail-content .forum-comments { margin-top: 12px; padding-top: 12px; }
.forum-profile-open { overflow: hidden; }
.forum-profile-overlay { position: fixed; inset: 0; z-index: 5150; display: grid; place-items: center; padding: 22px; background: rgba(9,29,45,.76); }
.forum-profile-overlay[hidden] { display: none; }
.forum-profile-dialog { width: min(900px,100%); max-height: calc(100dvh - 44px); display: flex; flex-direction: column; overflow: hidden; border-radius: 7px; background: #eef1f4; box-shadow: 0 24px 70px rgba(0,0,0,.4); }
.forum-profile-dialog .forum-detail-header { grid-template-columns: 1fr auto; }
.forum-profile-dialog .forum-detail-header strong { justify-self: start; }
.forum-profile-content { min-height: 220px; overflow-y: auto; padding: 14px; }
.forum-profile-card { overflow: hidden; border: 1px solid #cbd5e1; border-radius: 7px; background: #fff; }
.forum-profile-identity { display: flex; align-items: center; gap: 14px; padding: 18px; background: #092d4d; color: #fff; }
.forum-profile-avatar { width: 76px; height: 76px; flex: 0 0 auto; border: 3px solid rgba(255,255,255,.35); border-radius: 50%; object-fit: cover; background: #fff; }
.forum-profile-initial { display: grid; place-items: center; background: #174f78; color: #fff; font-size: 31px; font-weight: 800; }
.forum-profile-identity h2 { margin: 0 0 3px; font: 700 23px 'Roboto Condensed',sans-serif; }
.forum-profile-identity div div { color: rgba(255,255,255,.78); font-size: 12px; }
.forum-profile-member { margin-top: 4px; }
.forum-profile-bio { margin: 0; padding: 15px 18px; border-bottom: 1px solid #e2e8f0; color: #334155; font-size: 13px; line-height: 1.55; white-space: pre-wrap; }
.forum-profile-stats { display: grid; grid-template-columns: repeat(4,1fr); border-bottom: 1px solid #e2e8f0; }
.forum-profile-stats div { padding: 12px 8px; border-right: 1px solid #e2e8f0; text-align: center; }
.forum-profile-stats div:last-child { border-right: 0; }
.forum-profile-stats strong,.forum-profile-stats span { display: block; }
.forum-profile-stats strong { color: #003366; font-size: 18px; }
.forum-profile-stats span { color: #64748b; font-size: 10px; font-weight: 700; text-transform: uppercase; }
.forum-profile-details { display: grid; grid-template-columns: repeat(auto-fit,minmax(170px,1fr)); gap: 12px; padding: 14px 18px; }
.forum-profile-field > strong { display: block; margin-bottom: 4px; color: #64748b; font-size: 10px; text-transform: uppercase; }
.forum-profile-field > span { color: #334155; font-size: 12px; }
.forum-profile-field .forum-tags { margin-top: 0; }
.forum-profile-timeline-heading { margin: 18px 0 8px; color: #092d4d; font: 700 19px 'Roboto Condensed',sans-serif; text-transform: uppercase; }
.forum-profile-timeline { display: grid; gap: 10px; }
.forum-report-open { overflow: hidden; }
.forum-report-overlay { position: fixed; inset: 0; z-index: 5250; display: grid; place-items: center; padding: 16px; background: rgba(9,29,45,.76); }
.forum-report-overlay[hidden] { display: none; }
.forum-report-dialog { width: min(480px,100%); overflow: hidden; border-radius: 7px; background: #fff; box-shadow: 0 24px 70px rgba(0,0,0,.4); }
.forum-report-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 15px; border-bottom: 4px solid #ffc000; background: #092d4d; color: #fff; }
.forum-report-head strong { font: 700 17px 'Roboto Condensed',sans-serif; }
.forum-report-close { border: 0; background: transparent; color: #fff; font-size: 26px; cursor: pointer; }
.forum-report-dialog > label { display: grid; gap: 5px; padding: 12px 15px 0; color: #334155; font-size: 12px; font-weight: 700; }
.forum-report-dialog label span { color: #94a3b8; font-weight: 400; }
.forum-report-dialog select,.forum-report-dialog textarea { width: 100%; box-sizing: border-box; border: 1px solid #b8c4d0; border-radius: 5px; padding: 9px 10px; background: #fff; color: #172b3a; font: 13px 'Open Sans',sans-serif; }
.forum-report-dialog textarea { resize: vertical; }
.forum-report-error { margin: 12px 15px 0; padding: 8px 10px; border: 1px solid #fecaca; border-radius: 5px; background: #fff1f2; color: #b91c1c; font-size: 12px; }
.forum-report-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 15px; }
.forum-report-actions button { border: 1px solid #aab6c1; border-radius: 5px; padding: 8px 12px; background: #fff; color: #334155; font-weight: 700; cursor: pointer; }
.forum-report-actions button[type="submit"] { border-color: #b91c1c; background: #b91c1c; color: #fff; }
#notifications-icon { position: relative; }
#notifications-icon.has-unread::after { content: attr(data-unread-count); position: absolute; top: 2px; right: 2px; min-width: 16px; height: 16px; display: grid; place-items: center; padding: 0 3px; border: 2px solid #092d4d; border-radius: 999px; background: #d12e2e; color: #fff; font: 700 9px/1 'Open Sans',sans-serif; }
.notifications-item { width: 100%; font-family: inherit; text-align: left; }
.notifications-item.clickable { cursor: pointer; }
.notifications-item.clickable:hover { border-color: #7fa1ba; background: #f3f8fb; }
.notifications-item:disabled { opacity: 1; cursor: default; }
.feed-create-overlay { position: fixed; inset: 0; z-index: 20050; background: rgba(15,23,42,.68); display: grid; place-items: center; padding: 16px; backdrop-filter: blur(2px); }
.feed-create-overlay[hidden] { display: none; }
.forum-composer-open { overflow: hidden; }
.feed-create-dialog { width: min(640px,100%); max-height: calc(100dvh - 32px); display: flex; flex-direction: column; overflow: hidden; background: #fff; border: 1px solid #cbd5e1; border-radius: 8px; box-shadow: 0 24px 70px rgba(0,0,0,.34); }
.feed-create-header { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 16px; border-bottom: 1px solid #dbe1e8; background: #fff; color: #172b3a; }
.feed-create-title { font: 700 19px 'Roboto Condensed',sans-serif; margin: 0; letter-spacing: 0; }
.feed-create-subtitle { margin: 2px 0 0; font-size: 11px; color: #64748b; }
.feed-create-close { display: grid; width: 34px; height: 34px; place-items: center; border: 0; border-radius: 50%; background: #f1f3f5; color: #475569; font-size: 24px; line-height: 1; cursor: pointer; }
.feed-create-close:hover { background: #e2e8f0; color: #172b3a; }
.feed-create-form { min-height: 0; flex: 1 1 auto; display: grid; gap: 12px; padding: 14px 16px 0; overflow-y: auto; }
.feed-post-type { display: flex; align-items: center; gap: 4px; padding: 4px; border: 1px solid #cbd5e1; border-radius: 6px; background: #f4f6f8; }
.feed-post-type button { min-height: 36px; flex: 1; border: 0; border-radius: 4px; background: transparent; color: #526174; padding: 7px 10px; font-weight: 700; cursor: pointer; }
.feed-post-type button.active { background: #fff; color: #003366; box-shadow: 0 1px 4px rgba(15,23,42,.14); }
.feed-create-field { display: grid; gap: 6px; }
.feed-create-field > label { color: #334155; font-size: 12px; font-weight: 700; }
.feed-create-optional { color: #94a3b8; font-weight: 600; }
.feed-create-input,.feed-create-textarea { width: 100%; border: 1px solid #bdc8d3; border-radius: 5px; padding: 10px 11px; font: 13px 'Open Sans',sans-serif; box-sizing: border-box; }
.feed-create-textarea { min-height: 110px; resize: vertical; }
#feed-create-title { min-height: 62px; }
.feed-create-content-wrap { position: relative; }
.feed-create-dialog--feed .feed-create-content-wrap .feed-create-textarea { padding-right: 52px; }
.feed-create-media-input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; clip-path: inset(50%); }
.feed-create-camera { position: absolute; right: 8px; bottom: 8px; display: grid; width: 36px; height: 36px; place-items: center; border: 1px solid #cbd5e1; border-radius: 50%; background: #fff; color: #003366; cursor: pointer; }
.feed-create-camera:hover { background: #edf6fc; }
#feed-create-media { width: 100%; box-sizing: border-box; padding: 9px; border: 1px dashed #aebbc7; border-radius: 6px; background: #fafbfc; color: #526174; font-size: 12px; }
#feed-create-media::file-selector-button { margin-right: 10px; border: 1px solid #bdc8d3; border-radius: 5px; padding: 7px 10px; background: #fff; color: #003366; font-weight: 700; cursor: pointer; }
.feed-create-meta-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
.feed-create-autocomplete { position: relative; }
.feed-create-suggestions { position: absolute; z-index: 5; top: calc(100% + 3px); left: 0; right: 0; max-height: 180px; overflow-y: auto; background: white; border: 1px solid #bdc8d3; border-radius: 5px; box-shadow: 0 8px 20px rgba(15,23,42,.16); }
.feed-create-suggestions:empty { display: none; }
.feed-create-suggestions button { width: 100%; border: 0; border-bottom: 1px solid #edf0f3; background: white; color: #334155; padding: 8px 9px; text-align: left; font-size: 11px; cursor: pointer; }
.feed-create-suggestions button:hover { background: #edf6fc; color: #003366; }
.feed-create-checks { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: #334155; }
.feed-create-checks label { display: flex; align-items: center; gap: 6px; }
.feed-create-tip { margin: 0; color: #64748b; font-size: 10px; }
.feed-create-tags { border: 1px solid #d7dee7; border-radius: 6px; background: #fafbfc; }
.feed-create-tags summary { display: flex; align-items: center; gap: 8px; padding: 10px 11px; color: #334155; font-size: 12px; font-weight: 700; cursor: pointer; list-style: none; }
.feed-create-tags summary::-webkit-details-marker { display: none; }
.feed-create-tags summary i { color: #64748b; }
.feed-create-tags summary span { margin-left: auto; color: #94a3b8; font-size: 10px; text-transform: uppercase; letter-spacing: .5px; }
.feed-create-tags[open] summary { border-bottom: 1px solid #e2e8f0; }
.feed-create-tags > .feed-create-field { padding: 11px; }
.feed-create-error { padding: 9px 10px; border: 1px solid #fecaca; background: #fff1f2; color: #b91c1c; border-radius: 5px; font-size: 12px; }
.feed-create-footer { position: sticky; z-index: 2; bottom: 0; display: flex; justify-content: flex-end; gap: 8px; margin: 0 -16px; padding: 12px 16px; border-top: 1px solid #e2e8f0; background: #fff; }
.feed-header-button { border-radius: 5px; padding: 9px 14px; font-weight: 700; cursor: pointer; }
.feed-header-button.outline { border: 1px solid #aab6c1; background: white; color: #334155; }
.feed-header-button.primary { border: 1px solid #003366; background: #003366; color: white; }
.feed-header-button:disabled { opacity: .55; cursor: wait; }
@media (max-width: 820px) {
    .forum-panel { width: 100%; height: calc(100dvh - 50px); }
    .forum-post-main { padding: 11px; }
    .forum-media img, .forum-media video { height: 150px; }
    .forum-media.one img { height: auto; max-height: min(600px,65vh); }
    .forum-media.one video { height: min(330px,42vh); }
    .feed-create-meta-grid { grid-template-columns: 1fr; }
    .forum-create-button { padding: 7px 9px; }
    .forum-detail-overlay { padding: 0; }
    .forum-detail-dialog { width: 100%; max-height: 100dvh; height: 100dvh; border-radius: 0; }
    .forum-profile-overlay { padding: 0; }
    .forum-profile-dialog { width: 100%; max-height: 100dvh; height: 100dvh; border-radius: 0; }
    .forum-profile-content { padding: 8px; }
    .forum-profile-stats { grid-template-columns: repeat(2,1fr); }
    .forum-profile-stats div:nth-child(2) { border-right: 0; }
    .forum-profile-stats div:nth-child(-n+2) { border-bottom: 1px solid #e2e8f0; }
    .forum-detail-header { grid-template-columns: 1fr auto; }
    .forum-detail-header strong { display: none; }
    .forum-detail-content { padding: 8px; }
    .forum-detail-content .forum-media.one img { height: auto; max-height: min(680px,70vh); }
    .forum-detail-content .forum-media.one video { height: min(480px,55vh); }
}
@media (max-width: 600px) {
    .feed-create-overlay { padding: 0; place-items: stretch; }
    .feed-create-dialog { width: 100%; height: 100dvh; max-height: none; border: 0; border-radius: 0; }
    .feed-create-header { min-height: 58px; padding: 10px 14px; }
    .feed-create-subtitle { display: none; }
    .feed-create-close { width: 40px; height: 40px; }
    .feed-create-form { gap: 10px; padding: 12px 12px 0; overscroll-behavior: contain; }
    .feed-post-type { padding: 3px; }
    .feed-post-type button { min-height: 42px; font-size: 13px; }
    .feed-create-field { gap: 5px; }
    .feed-create-field > label { font-size: 13px; }
    .feed-create-input,
    .feed-create-textarea { font-size: 16px; }
    #feed-create-title { min-height: 48px; }
    .feed-create-textarea { min-height: 120px; line-height: 1.45; }
    .feed-create-tags summary { min-height: 48px; padding: 10px 11px; font-size: 13px; }
    .feed-create-checks { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
    .feed-create-checks .feed-create-input { grid-column: 1 / -1; }
    .feed-create-footer {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        margin: 0 -12px;
        padding: 12px max(12px, env(safe-area-inset-right)) calc(12px + env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
    }
    .feed-create-footer .feed-header-button { min-height: 46px; padding: 10px 12px; font-size: 14px; }
    .feed-create-dialog--feed .feed-create-header { min-height: 48px; padding: 7px 12px; }
    .feed-create-dialog--feed .feed-create-title { font-size: 17px; }
    .feed-create-dialog--feed .feed-create-close { width: 34px; height: 34px; font-size: 22px; }
    .feed-create-dialog--feed .feed-create-form { gap: 8px; padding: 10px 10px 0; align-content: start; }
    .feed-create-dialog--feed .feed-create-field > label {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
        clip-path: inset(50%);
    }
    .feed-create-overlay--feed { padding: 16px; place-items: center; }
    .feed-create-dialog--feed {
        width: min(420px, 100%);
        height: auto;
        max-height: calc(100dvh - 32px);
        border: 1px solid rgba(203,213,225,.7);
        border-radius: 16px;
        background: #fcfdff;
        box-shadow: 0 18px 50px rgba(15,23,42,.25);
    }
    .feed-create-dialog--feed .feed-create-header {
        border-bottom: 0;
        background: transparent;
    }
    .feed-create-dialog--feed .feed-create-input,
    .feed-create-dialog--feed .feed-create-textarea {
        border-color: transparent;
        border-radius: 10px;
        background: #f1f5f9;
        color: #1e293b;
        box-shadow: inset 0 1px 1px rgba(15,23,42,.02);
    }
    .feed-create-dialog--feed .feed-create-input::placeholder,
    .feed-create-dialog--feed .feed-create-textarea::placeholder { color: #94a3b8; }
    .feed-create-dialog--feed .feed-create-input:focus,
    .feed-create-dialog--feed .feed-create-textarea:focus {
        border-color: #93c5fd;
        background: #fff;
        outline: 3px solid rgba(147,197,253,.28);
    }
    .feed-create-dialog--feed .feed-create-tags {
        border: 0;
        background: transparent;
    }
    .feed-create-dialog--feed .feed-create-tags summary {
        min-height: 38px;
        padding: 6px 2px;
        color: #64748b;
    }
    .feed-create-dialog--feed .feed-create-camera {
        border: 0;
        background: transparent;
        color: #64748b;
    }
    .feed-create-dialog--feed .feed-create-camera:hover,
    .feed-create-dialog--feed .feed-create-camera:active {
        background: #e2e8f0;
        color: #174f78;
    }
    .feed-create-dialog--feed #feed-create-title { height: 42px; min-height: 42px; }
    .feed-create-dialog--feed .feed-create-textarea {
        height: calc(5 * 1.4em + 18px);
        min-height: 0;
        resize: none;
    }
    .feed-create-camera:active { background: #edf6fc; }
    .feed-create-dialog--feed .feed-create-footer {
        display: flex;
        justify-content: flex-end;
        margin: 0 -10px;
        padding-top: 8px;
        padding-right: 10px;
        padding-bottom: 8px;
    }
    .feed-create-dialog--feed .feed-create-footer .feed-header-button {
        min-height: 36px;
        padding: 7px 13px;
        border-radius: 999px;
        font-size: 12px;
    }
}
