.forum-main { width: min(100% - 3rem, 68rem); min-height: 72vh; margin: 0 auto; padding: 10rem 0 2rem; }
.forum-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; margin-bottom: 2rem; }
.forum-eyebrow { display: flex; align-items: center; gap: .75rem; color: #293cff; font-size: .68rem; font-weight: 800; letter-spacing: .16em; }
.forum-heading h1 { margin-top: .75rem; font-size: clamp(2rem, 5vw, 3.25rem); font-weight: 800; letter-spacing: -.045em; line-height: 1.2; }
.forum-description { max-width: 39rem; margin-top: 1rem; color: #64748b; font-size: .95rem; line-height: 1.8; }
.forum-write-button { flex-shrink: 0; white-space: nowrap; }
.forum-card { overflow: hidden; border: 1px solid #e2e8f0; border-radius: 1.25rem; background: #fff; box-shadow: 0 6px 28px rgb(15 23 42 / .035); }
.forum-card-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.4rem 1.65rem; }
.forum-card-heading h2 { font-size: .95rem; font-weight: 750; }
.forum-muted { color: #64748b; font-size: .78rem; }
.forum-table-scroll { overflow-x: auto; }
.forum-table-scroll:focus-visible { outline: 3px solid #277dfc; outline-offset: -3px; }
.forum-table { width: 100%; min-width: 34rem; border-collapse: collapse; table-layout: fixed; text-align: left; font-size: .87rem; }
.forum-table th { padding: .9rem 1.4rem; border-top: 1px solid #e2e8f0; border-bottom: 1px solid #e2e8f0; background: #f8fafc; color: #64748b; font-size: .72rem; font-weight: 650; }
.forum-table td { padding: 1.2rem 1.4rem; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
.forum-table tbody tr:last-child td { border-bottom: 0; }
.forum-table tr[data-forum-href] { transition: background-color .15s; cursor: pointer; }
.forum-table tr[data-forum-href]:hover, .forum-table tr[data-forum-href]:focus-within { background: #f6f8ff; }
.forum-table .forum-id { width: 5.5rem; color: #64748b; font-size: .77rem; font-variant-numeric: tabular-nums; }
.forum-table .forum-nickname { width: 10.5rem; }
.forum-nickname span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.forum-table .forum-views { width: 6.5rem; text-align: right; color: #64748b; font-variant-numeric: tabular-nums; }
.forum-post-link { display: block; overflow-wrap: anywhere; font-weight: 650; line-height: 1.65; }
.forum-post-link:hover { color: #293cff; }
.forum-table td.forum-empty { padding: 4.5rem 1.5rem; text-align: center; }
.forum-empty-icon { margin: 0 auto 1.25rem; color: #94a3b8; }
.forum-empty h3 { font-size: 1.05rem; font-weight: 700; }
.forum-empty p { margin-top: .5rem; color: #64748b; font-size: .85rem; }
.forum-pagination { display: flex; align-items: center; justify-content: center; gap: .35rem; margin-top: 2rem; }
.forum-page { display: inline-flex; align-items: center; justify-content: center; min-width: 2.5rem; height: 2.5rem; padding: 0 .45rem; border: 1px solid transparent; border-radius: .65rem; color: #475569; font-size: .8rem; font-weight: 650; transition: .15s; font-variant-numeric: tabular-nums; }
a.forum-page:hover { border-color: #dbe3ff; background: #f1f5ff; color: #293cff; }
.forum-page-current { background: #293cff; color: #fff; }
.forum-page-arrow { border-color: #e2e8f0; }
.forum-page[aria-disabled="true"] { opacity: .35; }
.forum-page-ellipsis { padding: 0 .15rem; color: #94a3b8; }
.forum-page-summary { margin-top: .85rem; text-align: center; color: #64748b; font-size: .72rem; }
.forum-back { display: inline-flex; align-items: center; gap: .6rem; margin-bottom: 1.75rem; color: #64748b; font-size: .8rem; font-weight: 650; }
.forum-back:hover { color: #293cff; }
.forum-editor-card { padding: 2rem; }
.forum-auth-notice { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.75rem; padding: 1rem 1.2rem; border: 1px solid #dbe4ff; border-radius: .85rem; background: #f5f7ff; color: #475569; font-size: .8rem; line-height: 1.7; }
.forum-text-button { display: inline-flex; align-items: center; gap: .5rem; flex-shrink: 0; color: #293cff; font-size: .8rem; font-weight: 750; }
.forum-author { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.5rem; color: #64748b; font-size: .8rem; }
.forum-author strong { color: #111827; font-weight: 700; overflow-wrap: anywhere; }
.forum-form { display: grid; gap: 1.5rem; }
.forum-field { min-width: 0; }
.forum-field-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .6rem; }
.forum-field-heading label { font-size: .85rem; font-weight: 700; }
.forum-counter { flex-shrink: 0; color: #94a3b8; font-size: .7rem; font-variant-numeric: tabular-nums; }
.forum-input { display: block; width: 100%; border: 1px solid #cbd5e1; border-radius: .8rem; padding: .9rem 1rem; background: #fff; color: #111827; font-size: .9rem; line-height: 1.75; transition: border-color .15s, box-shadow .15s; }
.forum-input:focus { outline: 3px solid rgb(39 125 252 / .18); outline-offset: 2px; border-color: #277dfc; }
.forum-input[aria-invalid="true"] { border-color: #dc2626; }
.forum-input::placeholder { color: #94a3b8; }
.forum-content-input { min-height: 20rem; resize: vertical; }
.forum-comment-input { min-height: 7rem; resize: vertical; }
.forum-form-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .75rem; padding-top: .25rem; }
.forum-form button:disabled { cursor: default; opacity: .5; transform: none; }
.forum-form .primary-button { justify-content: center; min-width: 7rem; }
.forum-error { color: #dc2626; font-size: .8rem; line-height: 1.7; }
.forum-post-heading { padding: 2.25rem 2.5rem 1.75rem; border-bottom: 1px solid #e2e8f0; }
.forum-post-heading h1 { margin-top: 1.1rem; font-size: clamp(1.6rem, 4vw, 2.35rem); font-weight: 750; line-height: 1.5; letter-spacing: -.025em; overflow-wrap: anywhere; }
.forum-post-meta { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem 1.25rem; margin-top: 1.25rem; color: #64748b; font-size: .75rem; }
.forum-post-meta strong { color: #334155; font-weight: 650; }
.forum-post-content { min-height: 12rem; padding: 2.5rem; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .95rem; line-height: 2; }
.forum-comments-card { margin-top: 1.75rem; scroll-margin-top: 8rem; }
.forum-comment-count { display: inline-flex; align-items: center; justify-content: center; min-width: 1.6rem; height: 1.6rem; margin-left: .35rem; padding: 0 .4rem; border-radius: 999px; background: #eef2ff; color: #293cff; font-size: .72rem; font-weight: 750; }
.forum-comments { padding: 0 1.65rem; }
.forum-comment { padding: 1.25rem 0; border-top: 1px solid #e2e8f0; }
.forum-comment-meta { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: .5rem 1rem; }
.forum-comment-meta strong { font-size: .8rem; font-weight: 700; }
.forum-comment-meta time { color: #94a3b8; font-size: .7rem; }
.forum-comment-body { margin-top: .6rem; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .85rem; line-height: 1.9; }
.forum-no-comments { padding: 1rem 0 2rem; color: #94a3b8; font-size: .85rem; }
.forum-comment-editor { border-top: 1px solid #e2e8f0; padding: 1.65rem; background: #fafbfe; }
.dark .forum-eyebrow, .dark .forum-text-button { color: #7ba9ff; }
.dark .forum-card { border-color: rgb(255 255 255 / .1); background: #252d3b; box-shadow: 0 8px 32px rgb(0 0 0 / .06); }
.dark .forum-description, .dark .forum-muted, .dark .forum-page-summary, .dark .forum-back, .dark .forum-author, .dark .forum-empty p, .dark .forum-table .forum-id, .dark .forum-table .forum-views, .dark .forum-post-meta { color: #a9b7cb; }
.dark .forum-table th { background: #2b3444; color: #a9b7cb; border-color: rgb(255 255 255 / .08); }
.dark .forum-table td { border-color: rgb(255 255 255 / .06); }
.dark .forum-table tr[data-forum-href]:hover, .dark .forum-table tr[data-forum-href]:focus-within { background: rgb(123 169 255 / .07); }
.dark .forum-post-link:hover, .dark .forum-back:hover { color: #7ba9ff; }
.dark .forum-page { color: #cbd5e1; }
.dark .forum-page-current { background: #7ba9ff; color: #182438; }
.dark .forum-page-arrow { border-color: rgb(255 255 255 / .12); }
.dark a.forum-page:hover { border-color: rgb(123 169 255 / .4); background: rgb(123 169 255 / .1); color: #7ba9ff; }
.dark .forum-auth-notice { border-color: rgb(123 169 255 / .18); background: rgb(123 169 255 / .06); color: #cbd5e1; }
.dark .forum-author strong, .dark .forum-post-meta strong { color: #e2e8f0; }
.dark .forum-input { border-color: rgb(255 255 255 / .15); background: #1f2531; color: #fff; }
.dark .forum-input:focus { border-color: #7ba9ff; outline-color: rgb(123 169 255 / .22); }
.dark .forum-input[aria-invalid="true"] { border-color: #f87171; }
.dark .forum-error { color: #fca5a5; }
.dark .forum-post-heading, .dark .forum-comment, .dark .forum-comment-editor { border-color: rgb(255 255 255 / .1); }
.dark .forum-comment-editor { background: rgb(0 0 0 / .07); }
.dark .forum-comment-count { background: rgb(123 169 255 / .12); color: #7ba9ff; }
@media (max-width: 639px) {
  .forum-main { width: calc(100% - 2rem); padding-top: 8rem; }
  .forum-heading { align-items: flex-start; flex-direction: column; gap: 1.25rem; margin-bottom: 1.5rem; }
  .forum-heading h1 { font-size: 2.1rem; }
  .forum-description { font-size: .85rem; }
  .forum-write-button { align-self: flex-end; padding: .75rem 1.1rem; font-size: .8rem; }
  .forum-card-heading, .forum-editor-card, .forum-comment-editor { padding: 1.25rem; }
  .forum-table { min-width: 31rem; }
  .forum-table th, .forum-table td { padding-left: 1rem; padding-right: 1rem; }
  .forum-table .forum-id { width: 4rem; }
  .forum-table .forum-nickname { width: 8rem; }
  .forum-table .forum-views { width: 5rem; }
  .forum-pagination { gap: .2rem; }
  .forum-page { min-width: 2rem; height: 2.25rem; font-size: .75rem; }
  .forum-page-arrow { min-width: 2.25rem; }
  .forum-auth-notice { align-items: flex-start; flex-direction: column; gap: .6rem; padding: .85rem 1rem; }
  .forum-post-heading { padding: 1.5rem 1.25rem; }
  .forum-post-content { padding: 1.5rem 1.25rem; font-size: .9rem; }
  .forum-comments { padding: 0 1.25rem; }
  .forum-content-input { min-height: 17rem; }
}
