/* 壁纸社 v1.8 · 社区模块：公告条 / 求图问答 / 积分兑换 / 公告页 */
:root { --wh-ok: #3f7a5e; --wh-warn: #b4763c; }

/* ---------- 顶部公告条 ---------- */
.wh-noticebar { background: var(--wh-primary-soft); border-bottom: 1px solid var(--wh-border); font-size: 13px; }
.wh-noticebar__inner { display: flex; align-items: center; gap: 12px; min-height: 40px; padding: 6px 0; }
.wh-noticebar__tag { flex: 0 0 auto; padding: 2px 8px; border-radius: 4px; color: #fff; font-size: 11px; background: var(--wh-notice-color, var(--wh-primary)); }
.wh-noticebar__title { flex: 1 1 auto; min-width: 0; color: var(--wh-text); font-weight: 600; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wh-noticebar__title:hover { color: var(--wh-primary); }
.wh-noticebar__date { flex: 0 0 auto; color: var(--wh-text-3); font-size: 11.5px; }
.wh-noticebar__all { flex: 0 0 auto; color: var(--wh-primary); text-decoration: none; font-size: 12px; }
.wh-noticebar__x { flex: 0 0 auto; width: 24px; height: 24px; padding: 0; border: 0; background: transparent; color: var(--wh-text-3); cursor: pointer; border-radius: 4px; }
.wh-noticebar__x:hover { background: var(--wh-surface); color: var(--wh-text); }

/* ---------- 社区通用布局 ---------- */
.wh-community__hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding: 26px 0 22px; border-bottom: 1px solid var(--wh-border); margin-bottom: 22px; }
.wh-community__hero h1 { margin: 0 0 8px; font-size: 26px; letter-spacing: -.02em; }
.wh-community__hero p { margin: 0; max-width: 680px; color: var(--wh-text-2); font-size: 13.5px; line-height: 1.8; }
.wh-community__layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 22px; align-items: start; }
.wh-community__side { display: flex; flex-direction: column; gap: 16px; }
.wh-community__side .wh-panel { padding: 18px; }
.wh-ask-back { display: inline-flex; align-items: center; gap: 6px; margin: 4px 0 16px; color: var(--wh-text-2); text-decoration: none; font-size: 13px; }
.wh-ask-back:hover { color: var(--wh-primary); }
.wh-ask-hint { margin: 8px 0 14px; color: var(--wh-text-3); font-size: 12px; line-height: 1.8; }
.wh-ask-rules { margin: 0; padding-left: 18px; color: var(--wh-text-2); font-size: 12.5px; line-height: 1.9; }
.wh-ask-rules a { color: var(--wh-primary); text-decoration: none; }
.wh-ask-gate { text-align: center; padding: 8px 0; }
.wh-ask-gate p { color: var(--wh-text-2); font-size: 13px; line-height: 1.8; }
.wh-notice-mini { list-style: none; margin: 0 0 10px; padding: 0; }
.wh-notice-mini li { display: flex; justify-content: space-between; gap: 8px; padding: 7px 0; border-bottom: 1px dashed var(--wh-border); font-size: 12.5px; }
.wh-notice-mini a { color: var(--wh-text); text-decoration: none; }
.wh-notice-mini a:hover { color: var(--wh-primary); }
.wh-notice-mini small { color: var(--wh-text-3); white-space: nowrap; }

/* ---------- 求图列表 ---------- */
.wh-ask-filter { display: flex; gap: 6px; margin-bottom: 16px; border-bottom: 1px solid var(--wh-border); }
.wh-ask-filter a { padding: 9px 16px; color: var(--wh-text-2); text-decoration: none; font-size: 13.5px; border-bottom: 2px solid transparent; }
.wh-ask-filter a:hover { color: var(--wh-primary); }
.wh-ask-filter a.is-active { color: var(--wh-primary); border-bottom-color: var(--wh-primary); font-weight: 600; }
.wh-ask-list { display: flex; flex-direction: column; gap: 12px; }
.wh-ask-card { display: block; padding: 16px 18px; border: 1px solid var(--wh-border); border-radius: var(--wh-radius); background: var(--wh-surface); text-decoration: none; color: var(--wh-text); transition: border-color .18s, box-shadow .18s; }
.wh-ask-card:hover { border-color: var(--wh-primary); box-shadow: var(--wh-shadow); }
.wh-ask-card__top { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; }
.wh-ask-card h3 { margin: 0 0 7px; font-size: 16px; font-weight: 600; }
.wh-ask-card p { margin: 0 0 12px; color: var(--wh-text-2); font-size: 13px; line-height: 1.7; }
.wh-ask-card__foot { display: flex; align-items: center; gap: 16px; color: var(--wh-text-3); font-size: 12px; }
.wh-ask-card__foot span { display: inline-flex; align-items: center; gap: 5px; }
.wh-ask-badge { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 600; }
.wh-ask-badge--open { background: var(--wh-primary-soft); color: var(--wh-primary); }
.wh-ask-badge--solved { background: rgba(63,122,94,.12); color: var(--wh-ok); }
.wh-ask-badge--closed { background: var(--wh-surface-2); color: var(--wh-text-3); }
.wh-ask-bounty { display: inline-flex; align-items: center; gap: 4px; color: var(--wh-warn); font-size: 12px; font-weight: 600; }
.wh-ask-empty { padding: 42px 20px; text-align: center; color: var(--wh-text-3); border: 1px dashed var(--wh-border); border-radius: var(--wh-radius); }
.wh-ask-empty i { font-size: 30px; display: block; margin-bottom: 10px; color: var(--wh-text-3); }
.wh-ask-empty h3 { margin: 0 0 6px; font-size: 16px; color: var(--wh-text); }
.wh-ask-empty p { margin: 0; font-size: 13px; }
.wh-pagination { margin-top: 20px; }
.wh-pagination ul { list-style: none; display: flex; gap: 6px; margin: 0; padding: 0; }
.wh-pagination a, .wh-pagination span { display: inline-block; padding: 6px 12px; border: 1px solid var(--wh-border); border-radius: 6px; color: var(--wh-text-2); text-decoration: none; font-size: 13px; }
.wh-pagination .current { background: var(--wh-primary); border-color: var(--wh-primary); color: #fff; }

/* ---------- 求图详情 ---------- */
.wh-ask-post { padding: 22px; margin-bottom: 8px; }
.wh-ask-post__head { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; }
.wh-ask-post h1 { margin: 0 0 14px; font-size: 23px; line-height: 1.4; }
.wh-ask-post__meta { display: flex; align-items: center; gap: 10px; color: var(--wh-text-3); font-size: 12.5px; padding-bottom: 14px; border-bottom: 1px solid var(--wh-border); }
.wh-ask-post__meta b { color: var(--wh-text); }
.wh-ask-post__body { padding: 16px 0 6px; color: var(--wh-text); font-size: 14px; line-height: 1.9; }
.wh-ask-post__ref { font-size: 12.5px; color: var(--wh-text-3); word-break: break-all; }
.wh-ask-post__ref a { color: var(--wh-primary); }
.wh-ask-solved { margin-top: 14px; padding: 10px 14px; border-radius: 6px; background: rgba(63,122,94,.1); color: var(--wh-ok); font-size: 13px; }
.wh-ask-replies { display: flex; flex-direction: column; gap: 12px; margin-bottom: 22px; }
.wh-ask-reply { padding: 16px 18px; border: 1px solid var(--wh-border); border-radius: var(--wh-radius); background: var(--wh-surface); }
.wh-ask-reply.is-accepted { border-color: var(--wh-ok); box-shadow: 0 0 0 2px rgba(63,122,94,.1); }
.wh-ask-reply__flag { margin: -4px 0 12px; color: var(--wh-ok); font-size: 12.5px; font-weight: 600; }
.wh-ask-reply__head { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; font-size: 12.5px; }
.wh-ask-reply__head b { color: var(--wh-text); }
.wh-ask-reply__head span { color: var(--wh-text-3); }
.wh-ask-reply__body { color: var(--wh-text); font-size: 13.5px; line-height: 1.85; }
.wh-ask-reply__img { display: block; margin: 12px 0; max-width: 320px; }
.wh-ask-reply__img img { max-width: 100%; border-radius: 6px; border: 1px solid var(--wh-border); }
.wh-ask-reply__wp { display: flex; align-items: center; gap: 10px; margin: 12px 0; padding: 8px; border: 1px solid var(--wh-border); border-radius: 6px; text-decoration: none; color: var(--wh-text); font-size: 12.5px; }
.wh-ask-reply__wp img { width: 64px; height: 44px; object-fit: cover; border-radius: 4px; }
.wh-ask-reply__wp span { display: inline-flex; align-items: center; gap: 5px; }
.wh-ask-reply-form { padding: 18px; }

/* ---------- 公告页 ---------- */
.wh-notice-list { display: flex; flex-direction: column; gap: 10px; }
.wh-notice-item { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--wh-border); border-radius: var(--wh-radius); background: var(--wh-surface); text-decoration: none; color: var(--wh-text); }
.wh-notice-item:hover { border-color: var(--wh-primary); }
.wh-notice-item > div { flex: 1 1 auto; min-width: 0; }
.wh-notice-item b { font-size: 14.5px; }
.wh-notice-item p { margin: 4px 0 0; color: var(--wh-text-3); font-size: 12.5px; }
.wh-notice-item time { flex: 0 0 auto; color: var(--wh-text-3); font-size: 12px; }
.wh-notice-tag { flex: 0 0 auto; padding: 2px 8px; border-radius: 4px; color: #fff; font-size: 11px; white-space: nowrap; }
.wh-notice-sticky { color: var(--wh-warn); font-size: 11px; }
.wh-notice-detail { padding: 24px; }
.wh-notice-detail__meta { display: flex; align-items: center; gap: 12px; color: var(--wh-text-3); font-size: 12.5px; margin-bottom: 14px; }
.wh-notice-detail h2 { margin: 0 0 18px; font-size: 22px; }
.wh-notice-detail__body { color: var(--wh-text); font-size: 14px; line-height: 1.9; }

/* ---------- 积分兑换 ---------- */
.wh-shop__balance { color: var(--wh-text-2); font-size: 13px; }
.wh-shop__balance b { color: var(--wh-primary); font-size: 15px; }
.wh-shop__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; margin: 16px 0 8px; }
.wh-goods-card { border: 1px solid var(--wh-border); border-radius: var(--wh-radius); background: var(--wh-surface); overflow: hidden; }
.wh-goods-card__img { aspect-ratio: 4 / 3; background: var(--wh-surface-2); }
.wh-goods-card__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wh-goods-card__body { padding: 13px; }
.wh-goods-card__body > b { display: block; font-size: 14px; margin-bottom: 5px; }
.wh-goods-card__body > p { margin: 0 0 12px; color: var(--wh-text-3); font-size: 12px; line-height: 1.6; min-height: 2.6em; }
.wh-goods-card__foot { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; font-size: 12px; }
.wh-goods-card__cost { color: var(--wh-warn); font-weight: 600; }
.wh-goods-card__foot small { color: var(--wh-text-3); }

@media (max-width: 900px) {
  .wh-community__layout { grid-template-columns: 1fr; }
  .wh-community__side { order: -1; }
  .wh-community__hero { flex-direction: column; align-items: flex-start; }
  .wh-noticebar__date, .wh-noticebar__all { display: none; }
}
