.community-shell { padding-bottom: 40px; scroll-margin-top: 150px; overflow-anchor: none; }
.community-shell [hidden] { display: none !important; }
.community-shell fieldset { border: 0; min-width: 0; }
.community-shell button:focus-visible, .community-shell a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.community-toolbar, .community-detail-tools { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.community-toolbar > div:first-child { flex: 1 1 240px; min-width: 0; }
.community-toolbar h2, .community-detail-tools h2 { font-size: 22px; }
.community-toolbar h2 span { margin-left: 7px; color: var(--accent); font-size: 15px; }
.community-toolbar p { margin-top: 5px; font-size: 13px; color: var(--muted); }
.community-button { display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line-strong); padding: 10px 17px; border-radius: 10px; background: #fff; font-size: 13px; font-weight: 750; white-space: nowrap; }
.community-button:hover { border-color: var(--accent); color: var(--accent-strong); }
.community-button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.community-button.danger { background: #fff8f8; border-color: #efc6ca; color: #ba3240; }
.community-button:disabled { cursor: default; opacity: .4; }
.community-search { display: flex; gap: 8px; margin-bottom: 18px; }
.community-search > label { flex: 1; min-width: 0; }
.community-search input, .community-search select, .community-field input, .community-field textarea { width: 100%; min-width: 0; border: 1px solid var(--line-strong); background: #fff; color: var(--fg); border-radius: 10px; padding: 11px 13px; font: inherit; font-size: 14px; }
.community-search select { width: auto; max-width: 150px; }
.community-search input:focus, .community-field input:focus, .community-field textarea:focus { outline: 2px solid #d6c2f0; outline-offset: 1px; }
.community-post-list { display: grid; gap: 10px; }
.community-list-post { display: flex; justify-content: space-between; align-items: center; gap: 22px; padding: 21px 24px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.community-list-post:hover { border-color: #bba0e0; }
.community-list-post > div { min-width: 0; }
.community-list-post strong { display: block; font-size: 16px; overflow-wrap: anywhere; }
.community-list-post p { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 13px; color: var(--muted); margin: 5px 0 8px; white-space: pre-line; overflow-wrap: anywhere; }
.community-list-post small { font-size: 11px; color: var(--faint); }
.community-views { font-size: 12px; color: var(--muted); white-space: nowrap; }
.community-post-badges { display: flex; gap: 5px; margin-bottom: 8px; }
.community-badge { display: inline-flex; font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 5px; background: #f0edf5; color: var(--muted); }
.community-badge.official { background: #eee4fb; color: #7240b5; }
.community-badge.hidden-post { background: #fbe5d2; color: #925721; }
.community-pagination { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 22px; font-size: 12px; color: var(--muted); }
.community-pagination > div, .community-detail-tools > div { display: flex; gap: 7px; }
.community-message { background: var(--accent-soft); color: var(--accent-strong); padding: 13px 16px; border-radius: 10px; margin-bottom: 18px; font-size: 13px; }
.community-message.error { background: #ffeded; color: #b52b38; }
.community-empty { border: 1px dashed var(--line-strong); background: #fff; border-radius: 14px; text-align: center; padding: 48px 20px; color: var(--muted); font-size: 14px; }
.community-detail { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 30px; }
.community-detail h2 { font-size: 25px; line-height: 1.4; overflow-wrap: anywhere; }
.community-detail-meta { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; color: var(--muted); font-size: 12px; padding: 15px 0 22px; border-bottom: 1px solid var(--line); }
.community-body { white-space: pre-wrap; overflow-wrap: anywhere; min-height: 190px; padding: 28px 0 12px; font-size: 15px; line-height: 1.8; }
.community-editor { padding: 27px; border: 1px solid var(--line); background: #fff; border-radius: 16px; }
.community-field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.community-field > span { font-size: 13px; font-weight: 750; }
.community-field small { font-size: 12px; color: var(--muted); }
.community-field input[name="author"], .community-field input[type="password"] { max-width: 380px; }
.community-field textarea { resize: vertical; min-height: 250px; line-height: 1.7; }
.community-character-count { text-align: right; margin-top: -14px; margin-bottom: 22px; font-size: 11px; color: var(--faint); }
.community-checks { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; margin-bottom: 22px; }
.community-checks label { display: flex; align-items: center; gap: 7px; }
.community-form-actions { display: flex; justify-content: flex-end; gap: 8px; border-top: 1px solid var(--line); padding-top: 21px; }
.community-delete-notice { margin-bottom: 24px; font-size: 15px; }
.community-trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 700px) {
  .community-toolbar { align-items: flex-start; gap: 12px; }
  .community-toolbar h2 { font-size: 20px; }
  .community-toolbar p { font-size: 12px; }
  .community-button { padding: 9px 12px; font-size: 12px; }
  .community-search { flex-wrap: wrap; }
  .community-search > label { flex-basis: calc(100% - 70px); }
  .community-search select { flex: 1; max-width: none; }
  .community-list-post { padding: 18px 16px; gap: 10px; }
  .community-list-post strong { font-size: 14px; }
  .community-list-post small { font-size: 10px; }
  .community-views { font-size: 10px; }
  .community-detail, .community-editor { padding: 19px 16px; }
  .community-detail h2 { font-size: 21px; }
  .community-detail-tools { flex-wrap: wrap; gap: 10px; }
  .community-detail-meta { font-size: 11px; }
  .community-body { font-size: 14px; }
  .community-field input, .community-field textarea { font-size: 16px; }
}

/* Board features inherit TT COMPANY's existing shared light theme. */
body[data-page="board"] main > .container { min-height: 70dvh; }
body[data-page="board"] #communityBoard { margin-top: 28px; }
.community-shell { --board-panel: var(--surface, #fff); --board-input: var(--bg, #f7f4ee); --board-font-size: 14px; padding-bottom: 85px; }
.community-button { background: var(--board-panel); color: var(--fg); }
.community-button.selected { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-strong); }
.community-post-list { gap: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--board-panel); overflow: hidden; box-shadow: var(--shadow-soft); }
.community-post { min-width: 0; border-bottom: 1px solid var(--line); scroll-margin-top: 80px; }
.community-post:last-child { border-bottom: 0; }
.community-post.is-current { box-shadow: inset 3px 0 0 var(--accent); }
.community-reader-tools { display: flex; justify-content: flex-end; align-items: center; gap: 10px; padding-bottom: 14px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
/* Posts open in place: the title row closes them again and the next posts follow right below, so a separate
   "목록으로" button only repeated that. The open title shows "접기" instead. */
.community-reader-tools [data-board-action="close-post"] { display: none; }
.community-summary.is-expanded { position: relative; }
.community-summary.is-expanded .community-summary-title { padding-right: 58px; }
.community-summary.is-expanded::after { content: "접기 ▴"; position: absolute; top: 19px; right: 16px; font-size: 11px; font-weight: 700; color: var(--faint); }
.community-summary.is-expanded:hover::after, .community-summary.is-expanded:focus-visible::after { color: var(--accent-strong); }
.community-summary.is-pinned.is-expanded::after { top: 22px; }
.community-reader-tools.bottom { border-top: 1px solid var(--line); border-bottom: 0; padding-top: 14px; padding-bottom: 0; margin-top: 18px; margin-bottom: 0; }
.community-reader-tools .community-button { padding: 7px 12px; min-height: 36px; font-size: 12px; color: var(--accent-strong); background: var(--accent-soft); }
.community-route-status { position: fixed; z-index: 90; bottom: 24px; left: 50%; transform: translateX(-50%); padding: 10px 18px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--muted); box-shadow: var(--shadow); font-size: 12px; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
.community-summary { display: block; padding: 18px 16px; transition: background .15s; }
.community-summary:hover, .community-summary.is-expanded { background: var(--bg-soft); }
.community-summary-title { display: block; font-size: var(--board-font-size); font-weight: 650; line-height: 1.55; overflow-wrap: anywhere; }
.community-summary-meta { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 9px; font-size: 11px; color: var(--faint); }
.community-summary-meta > span:last-child { display: flex; gap: 8px; align-items: center; white-space: nowrap; }
.community-summary-meta i { height: 10px; border-left: 1px solid var(--line-strong); }
.community-summary.is-pinned { padding: 18px 16px 18px 20px; background: var(--accent-soft); box-shadow: inset 4px 0 0 var(--accent-strong); }
.community-summary.is-pinned:hover, .community-summary.is-pinned:focus-visible { background: var(--bg-soft); }
.community-summary.is-pinned .community-summary-title { color: var(--accent-strong); font-weight: 800; }
.community-summary.is-operator:not(.is-pinned) { background: var(--bg-soft); }
.community-summary.is-operator:not(.is-pinned) .community-summary-title { color: var(--accent-strong); font-weight: 750; }
.community-comment-count { color: var(--accent); font-weight: 800; }
.community-pin-icon { display: inline-flex; align-items: center; margin-right: 8px; padding: 4px 8px; border-radius: 6px; background: var(--accent-strong); color: var(--surface); font-size: 11px; font-weight: 800; line-height: 1.4; vertical-align: middle; white-space: nowrap; }
.community-official, .community-hidden-badge { font-size: 10px; margin-right: 5px; padding: 2px 5px; border-radius: 4px; background: var(--accent-soft); color: var(--accent-strong); }
.community-official { border: 1px solid var(--accent); font-weight: 800; }
.community-hidden-badge { color: #c37f42; background: #a36b2620; }
.community-expanded { padding: 18px 16px 22px; }
.community-expanded .community-body { padding: 8px 0 20px; min-height: 0; font-size: var(--board-font-size); }
.community-body-link { color: var(--accent-strong); font-weight: 650; text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
.community-attachments { display: grid; gap: 14px; }
.community-attachments img { max-width: 100%; max-height: none; height: auto; margin: 0 auto; }
.community-attachments iframe { width: 100%; aspect-ratio: 16/9; height: auto; border: 0; border-radius: 6px; }
.community-video-link { padding: 20px; border: 1px solid var(--line-strong); border-radius: 8px; color: var(--accent-strong); font-weight: 700; }
.community-reactions { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; padding: 22px 0 15px; }
.community-reactions > div { display: flex; gap: 6px; flex-wrap: wrap; }
.community-reactions .community-button { font-size: 11px; padding: 7px 10px; min-height: 34px; }
/* Replies sit in their own tinted panel, one card per comment, so the post and its comments never blur together. */
.community-comments { margin-top: 4px; padding: 16px; border: 1px solid var(--line-strong); border-radius: 14px; background: var(--bg-soft); }
.community-comments h3 { display: flex; align-items: center; gap: 7px; font-size: 14px; margin-bottom: 12px; }
.community-comments h3::before { content: ""; width: 4px; height: 15px; border-radius: 2px; background: var(--accent-strong); }
.community-comments h3 span { color: var(--accent); }
.community-comment { padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--board-panel); }
.community-comment + .community-comment { margin-top: 8px; }
.community-comments .comment-write { margin-top: 12px; }
.community-comment > div:first-child { display: flex; align-items: center; gap: 12px; font-size: 12px; }
.community-comment time { color: var(--faint); font-size: 10px; }
.community-comment p { white-space: pre-wrap; overflow-wrap: anywhere; font-size: var(--board-font-size); margin: 6px 0; }
.community-comment .comment-delete { margin-left: auto; padding: 2px 7px; border: 0; min-height: 24px; font-size: 17px; color: var(--faint); }
.community-no-comments { padding: 18px 12px; border: 1px dashed var(--line-strong); border-radius: 10px; background: var(--board-panel); text-align: center; font-size: 12px; color: var(--muted); }
.community-comment-form { padding-top: 12px; }
.community-comment-form textarea { width: 100%; resize: vertical; min-height: 95px; border: 1px solid var(--line-strong); background: var(--board-input); color: var(--fg); border-radius: 7px; padding: 12px; font: inherit; font-size: 14px; }
.community-comment-form fieldset > div, .community-comment-delete fieldset { display: flex; justify-content: space-between; gap: 8px; margin-top: 8px; }
.community-comment-delete fieldset { justify-content: flex-end; }
.community-pin { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.community-pin input { width: 104px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--board-input); color: var(--fg); padding: 10px; font: inherit; font-size: 13px; }
.community-editor { border: 1px solid var(--line); background: var(--board-panel); border-radius: var(--radius); padding: 0; overflow: hidden; box-shadow: var(--shadow-soft); }
.community-editor-content { padding: 16px; }
.community-editor .community-field { margin-bottom: 12px; }
.community-editor input, .community-editor textarea { background: var(--board-input); color: var(--fg); }
.community-attachment-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.community-attachment-tools .community-button { font-size: 13px; padding: 9px 12px; }
.community-attachment-tools label { position: relative; overflow: hidden; cursor: pointer; }
.community-attachment-tools input[type="file"] { position: absolute; opacity: 0; height: 1px; width: 1px; }
.community-attachment-tools label:focus-within { outline: 2px solid var(--accent); }
.community-attachment-tools small { margin-left: auto; font-size: 10px; color: var(--faint); }
.community-compose-body { display: block; position: relative; }
.community-compose-body textarea { display: block; width: 100%; min-height: clamp(360px, calc(100dvh - 260px), 720px); resize: vertical; padding: 14px 14px 34px; border: 1px solid var(--line-strong); border-radius: 8px; font: inherit; font-size: 14px; line-height: 1.75; }
.community-compose-body .community-character-count { position: absolute; bottom: 12px; right: 12px; margin: 0; font-size: 11px; color: var(--muted); pointer-events: none; }
.community-character-count b { font-weight: 400; }
.community-editor-footer { padding: 13px 16px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.community-editor-footer > div { display: flex; gap: 8px; margin-left: auto; }
.community-pin-help { color: var(--faint); font-size: 10px; padding: 0 16px 12px; }
.community-link-input { display: flex; gap: 8px; padding-bottom: 12px; }
.community-link-input input { min-width: 0; flex: 1; border: 1px solid var(--line-strong); border-radius: 8px; padding: 10px; font: inherit; font-size: 13px; }
.community-draft-attachments { display: flex; flex-wrap: wrap; gap: 10px; padding: 5px 0 16px; }
.community-draft-attachments > div { position: relative; border: 1px solid var(--line); border-radius: 8px; padding: 5px; }
.community-draft-attachments img { width: 135px; height: 130px; object-fit: contain; }
.community-draft-attachments .community-button { position: absolute; top: 4px; right: 4px; border-radius: 50%; padding: 3px 8px; background: var(--board-panel); }
.community-draft-link { padding: 12px 42px 12px 12px !important; display: flex; flex-direction: column; gap: 5px; font-size: 12px; }
.community-draft-link a { color: var(--accent); }
.community-editor > fieldset > h2, .community-editor > fieldset > .community-delete-notice { padding: 20px 20px 0; }
.community-empty { background: var(--board-panel); }
.community-empty h2 { font-size: 21px; margin-bottom: 10px; }
.community-empty p { margin-bottom: 20px; }
.community-query { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; font-size: 13px; color: var(--muted); }
.community-admin-tools { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.community-admin-tools select { border-radius: 8px; border: 1px solid var(--line-strong); background: var(--board-panel); color: var(--fg); padding: 8px; }
.community-floating { position: fixed; right: 32px; bottom: 32px; display: flex; flex-direction: column; gap: 12px; z-index: 85; }
.community-floating .fab { display: grid; place-items: center; width: 60px; height: 60px; padding: 0; border: 0; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-size: 31px; box-shadow: var(--shadow); }
.community-floating .fab.secondary { font-size: 34px; }
.community-floating-menu { position: absolute; right: 72px; bottom: 70px; display: grid; gap: 8px; min-width: 132px; }
.community-floating-menu .community-button { justify-content: flex-end; }
.community-more { text-align: center; padding: 15px 0; }
.community-tool-dialog { width: min(420px, calc(100vw - 32px)); max-width: none; margin: auto; padding: 25px; border: 1px solid var(--line-strong); border-radius: 15px; background: var(--board-panel); color: var(--fg); }
.community-tool-dialog::backdrop { background: #21172a70; }
.community-tool-dialog h2 { font-size: 21px; padding-bottom: 20px; }
.community-dialog-close { position: absolute; top: 9px; right: 16px; font-size: 28px; }
.community-tool-dialog form { display: grid; gap: 12px; }
.community-tool-dialog input, .community-tool-dialog select { width: 100%; padding: 11px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--board-input); color: var(--fg); font: inherit; font-size: 14px; }
.community-font-options { display: flex; gap: 8px; }
@media (max-width: 700px) {
  .community-summary { padding: 16px 13px; }
  .community-summary-meta { font-size: 10px; gap: 6px; }
  .community-summary-meta > span:last-child { gap: 6px; }
  .community-expanded { padding: 14px 13px 18px; }
  .community-summary.is-expanded::after { top: 17px; right: 13px; }
  .community-comments { padding: 12px; border-radius: 12px; }
  .community-comment { padding: 10px 12px; }
  .community-editor-content { padding: 13px; }
  .community-editor input, .community-editor textarea, .community-comment-form textarea { font-size: 16px; }
  .community-pin input { font-size: 16px; width: 105px; }
  .community-attachment-tools small { display: none; }
  .community-editor-footer { padding: 12px 13px; gap: 8px; }
  .community-editor-footer .community-button { padding: 10px 12px; }
  .community-floating { right: 16px; bottom: 22px; gap: 10px; }
  .community-floating .fab { width: 52px; height: 52px; font-size: 27px; }
  .community-floating-menu { right: 63px; bottom: 60px; }
  .community-pagination { padding: 0 13px; flex-wrap: wrap; }
  .community-pagination .community-button { font-size: 11px; padding: 8px; }
  .community-message { margin: 0 12px 14px; }
  .community-reactions > div:last-child { gap: 4px; }
  .community-reactions .community-button { padding: 7px 8px; }
  .community-link-input { flex-wrap: wrap; }
  .community-link-input input { flex-basis: 100%; }
}

.community-comment.is-reply { margin-left: 24px; border-left: 2px solid var(--accent-soft); padding-left: 14px; }
.community-author { display: inline-flex; align-items: center; gap: 6px; min-width: 0; max-width: 100%; vertical-align: middle; }
.community-summary-meta > span:first-child { display: flex; min-width: 0; }
.community-author-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.community-author-avatar { position: relative; display: inline-grid; place-items: center; width: 26px; height: 26px; border: 1px solid var(--accent-soft); border-radius: 50%; background: var(--accent-soft); color: var(--accent-strong); font-weight: 800; flex: 0 0 26px; overflow: hidden; }
.community-author-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.community-member.is-designated { color: var(--accent-strong); background: var(--accent-soft); font-weight: 800; white-space: nowrap; }
.community-comment > div:first-child { flex-wrap: wrap; }
.community-review-reason { display: block; padding: 10px 12px; margin: 10px 0 14px; border-left: 3px solid var(--accent); border-radius: 6px; background: var(--accent-soft); color: var(--fg); font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; }
.community-review-reason b { color: var(--accent-strong); margin-right: 8px; }
.community-review-reason small { display: block; color: var(--muted); font-size: 10px; margin-top: 3px; }
.community-summary .community-review-reason { margin-bottom: 0; }
