/* 공개 커뮤니티 Q&A (/community) — 목업 "물음표" 레이아웃, F2R 셸 재사용 */
:root {
  --c-ink: #1b1e24; --c-sub: #6b727c; --c-mute: #9aa1ab; --c-line: #f1f2f4;
  --c-line2: #e3e6ea; --c-accent: #3b5bdb; --c-bg: #fff;
}
* { box-sizing: border-box; }
body.community-body {
  margin: 0; background: var(--c-bg);
  font-family: 'Pretendard Variable','Pretendard',-apple-system,BlinkMacSystemFont,sans-serif;
  -webkit-font-smoothing: antialiased; color: var(--c-ink);
}

/* topbar (F2R 셸) */
.community-topbar {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 16px;
  height: 64px; padding: 0 28px; background: rgba(255,255,255,.92);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--c-line);
}
.community-topbar .brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--c-ink); }
.community-topbar .brand img { height: 26px; }
.community-topbar .brand b { font-size: 17px; font-weight: 800; letter-spacing: -.02em; }
.community-topbar .spacer { flex: 1; }
.btn-ask {
  display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 18px;
  background: var(--c-ink); color: #fff; border: none; border-radius: 99px;
  font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none;
}
.btn-ask:hover { background: #000; }

.community-wrap { max-width: 1180px; margin: 0 auto; }
.community-hero { padding: 38px 28px 0; }
.community-hero h1 { margin: 0 0 8px; font-size: 26px; font-weight: 800; letter-spacing: -.03em; }
.community-hero p { margin: 0 0 22px; font-size: 14.5px; color: var(--c-sub); }

/* category tabs */
.cat-tabs { display: flex; gap: 8px; flex-wrap: wrap; border-bottom: 1px solid var(--c-line); padding-bottom: 22px; }
.cat-tab {
  font-size: 13.5px; color: #3a3f48; background: var(--c-line); padding: 8px 16px;
  border-radius: 99px; cursor: pointer; border: none; font-family: inherit;
}
.cat-tab:hover { background: #e7e9ed; }
.cat-tab.active { color: #fff; background: var(--c-ink); font-weight: 600; }

.community-main-row { display: flex; gap: 40px; padding: 22px 28px 64px; }
.community-feed { flex: 1; min-width: 0; }

.feed-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.feed-head .count { font-size: 13px; color: var(--c-mute); }
.feed-search { display: flex; gap: 8px; }
.feed-search input {
  height: 34px; padding: 0 12px; border: 1px solid var(--c-line2); border-radius: 8px;
  font-size: 13px; font-family: inherit; width: 180px;
}
.feed-search select { height: 34px; border: 1px solid var(--c-line2); border-radius: 8px; font-size: 13px; padding: 0 8px; font-family: inherit; }

.feed-list { border-top: 1px solid var(--c-line); }
.q-card { display: block; text-decoration: none; color: inherit; padding: 22px 0; border-bottom: 1px solid var(--c-line); cursor: pointer; }
.q-card-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; }
.cat-badge { font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 6px; }
.q-card-meta .who { font-size: 12px; color: var(--c-mute); }
.q-card h3 { margin: 0 0 8px; font-size: 16.5px; font-weight: 700; line-height: 1.4; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.q-card:hover h3 { color: var(--c-accent); }
.q-card-stats { display: flex; align-items: center; gap: 18px; font-size: 13px; color: var(--c-mute); }
.q-card-stats .answers { color: #1f9d57; font-weight: 600; }
.q-card-stats span { display: inline-flex; align-items: center; gap: 5px; }

.feed-empty, .feed-error { padding: 48px 0; text-align: center; color: var(--c-mute); font-size: 14px; }
.feed-error { color: #c53030; }
.feed-more { display: flex; justify-content: center; margin-top: 24px; }

/* detail */
.detail-wrap { max-width: 820px; margin: 0 auto; padding: 28px 28px 64px; }
.breadcrumb { display: flex; gap: 8px; font-size: 12.5px; color: var(--c-mute); margin-bottom: 18px; }
.breadcrumb a { color: var(--c-mute); text-decoration: none; }
.breadcrumb a:hover { color: var(--c-accent); }
.detail-title { font-size: 23px; font-weight: 800; letter-spacing: -.02em; margin: 8px 0 12px; line-height: 1.35; }
.detail-meta { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--c-mute); margin-bottom: 18px; }
.content-html { font-size: 15px; line-height: 1.75; color: #2a2e35; word-break: break-word; }
.content-html img { max-width: 100%; border-radius: 8px; }
.content-html pre { background: #f4f5f7; padding: 12px 14px; border-radius: 8px; overflow-x: auto; }
.content-html code { background: #f4f5f7; padding: 1px 5px; border-radius: 4px; font-size: 13px; }
.content-html blockquote { border-left: 3px solid var(--c-line2); margin: 0; padding-left: 14px; color: var(--c-sub); }

.detail-actions { display: flex; align-items: center; gap: 8px; margin: 20px 0 8px; flex-wrap: wrap; }
.like-btn { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 16px; border: 1px solid #c3cdf3; background: #eef1ff; color: var(--c-accent); border-radius: 99px; font-size: 13px; font-weight: 700; cursor: pointer; }
.like-btn.liked { background: var(--c-accent); color: #fff; }
.like-btn:disabled { opacity: .55; cursor: default; }
.like-closed { font-size: 11.5px; color: var(--c-mute); }
.txt-btn { background: none; border: none; color: var(--c-sub); font-size: 13px; cursor: pointer; }
.txt-btn:hover { color: #c53030; }

.section-title { font-size: 16px; font-weight: 800; margin: 32px 0 14px; }
.answer-item { border-top: 1px solid var(--c-line); padding: 18px 0; }
.answer-meta { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--c-mute); margin-bottom: 8px; }
.answer-actions { display: flex; gap: 10px; margin-top: 8px; }

.btn-ghost { background: #fff; color: #3a3f48; border: 1px solid var(--c-line2); }
.login-hint { font-size: 13px; color: var(--c-mute); margin-top: 10px; }

/* write */
.write-wrap { max-width: 760px; margin: 0 auto; padding: 32px 28px 64px; }
.write-wrap h1 { font-size: 22px; font-weight: 800; margin: 0 0 6px; }
.write-wrap .lead { font-size: 13.5px; color: var(--c-sub); margin: 0 0 24px; }
.field { margin-bottom: 22px; }
.field label { display: block; font-size: 14px; font-weight: 700; margin-bottom: 8px; }
.field label .req { color: #e03131; margin-left: 2px; }
.field .hint { font-size: 12.5px; color: var(--c-mute); margin: -4px 0 10px; }
.field input[type=text] { width: 100%; height: 46px; padding: 0 14px; border: 1px solid var(--c-line2); border-radius: 10px; font-size: 15px; font-family: inherit; }
.cat-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.cat-pick .cat-tab.active { background: var(--c-accent); }
.editor-toolbar { display: flex; gap: 4px; padding: 8px; border: 1px solid var(--c-line2); border-bottom: none; border-radius: 10px 10px 0 0; background: #fafbfc; }
.editor-toolbar button { width: 32px; height: 32px; border: none; background: none; border-radius: 6px; cursor: pointer; font-size: 14px; color: #3a3f48; }
.editor-toolbar button:hover { background: #eef0f3; }
.editor-toolbar button.is-active { background: #e4e8f8; color: var(--c-accent); }
.editor-box { border: 1px solid var(--c-line2); border-radius: 0 0 10px 10px; min-height: 240px; padding: 14px; }
.editor-box .ProseMirror { outline: none; min-height: 210px; font-size: 15px; line-height: 1.7; }
.editor-box .ProseMirror img { max-width: 100%; height: auto; border-radius: 8px; }
.editor-box .ProseMirror p.is-editor-empty:first-child::before { content: attr(data-placeholder); color: var(--c-mute); float: left; height: 0; pointer-events: none; }
.write-actions { display: flex; gap: 10px; margin-top: 24px; }
.btn-primary { display: inline-flex; align-items: center; justify-content: center; height: 44px; padding: 0 22px; border: none; border-radius: 99px; background: var(--c-ink); color: #fff; font-size: 14px; font-weight: 600; cursor: pointer; font-family: inherit; text-decoration: none; box-sizing: border-box; }
.btn-primary:hover { background: #000; }

@media (max-width: 900px) {
  .community-main-row { flex-direction: column; padding: 22px 18px 48px; }
  .community-hero { padding: 28px 18px 0; }
}
