/* Community uses the existing light/dark tokens. Keep navigation and content above decorative media. */
.community-header { display:flex; align-items:center; justify-content:space-between; gap:1rem; margin-bottom:1rem; }
.community-header h1 { margin:0; font-size:clamp(1.45rem,3vw,2rem); line-height:1.25; color:var(--text); }
.community-header p { margin:.35rem 0 0; max-width:45rem; color:var(--text-muted); font-size:.88rem; }
.community-header>.btn { flex-shrink:0; }
.journal-toolbar { box-shadow:none; margin-bottom:.75rem!important; padding:.75rem; }
.journal-toolbar .comm-search { max-width:none; }
.journal-toolbar #region-select { flex:0 0 165px; }
.community-match { padding:.75rem 1rem; border:1px solid var(--border); border-radius:var(--radius); background:var(--bg-elev-1); }
.community-match__heading { display:flex; align-items:center; gap:.45rem; color:var(--accent); margin-bottom:.3rem; }
.community-match__heading h2 { font-size:.83rem; margin:0; font-weight:700; }
.community-match__body { display:flex; justify-content:space-between; align-items:start; gap:1rem; }
.community-match__copy { min-width:0; flex:1; }
.community-match__title { display:inline-block; font-size:1.1rem; font-weight:700; color:var(--text); text-decoration:none; overflow-wrap:anywhere; }
.community-match__title:hover { color:var(--accent); }
.community-match__body>.btn { flex-shrink:0; }
.community-match__reasons { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.15rem 1.2rem; margin:.2rem 0 .3rem; padding-left:1rem; font-size:.76rem; line-height:1.45; color:var(--text-muted); }
.community-match__explanation>summary { cursor:pointer; }
.community-match__explanation>ul { margin-bottom:.3rem; }
.journal-card__media { aspect-ratio:16/9; }
.journal-card__title { overflow-wrap:anywhere; }
.journal-card__body { padding:1rem; }
.journal-card__region { white-space:normal; }
.community-detail-header { border-bottom:1px solid var(--border); padding-bottom:1rem; margin-bottom:1rem; }
.community-detail-header h1 { font-size:clamp(1.6rem,4vw,2.3rem); line-height:1.25; margin:.35rem 0 .7rem; overflow-wrap:anywhere; color:var(--text); }
.community-detail-header .story-author { color:var(--text-muted); }
.community-detail-header .story-author__handle { color:var(--text-subtle); }
.community-detail-header .story-hero__kicker { color:var(--accent); margin-bottom:.4rem; letter-spacing:.03em; }
.community-gallery { margin-bottom:1rem; border:1px solid var(--border); border-radius:var(--radius); background:var(--bg-elev-1); }
.community-gallery>summary { cursor:pointer; padding:.8rem 1rem; color:var(--text-muted); font-size:.85rem; }
.community-gallery .story-hero { border:0; border-radius:0 0 var(--radius) var(--radius); box-shadow:none; }
.community-gallery .photo-carousel,.community-gallery .photo-carousel .carousel-item,.community-gallery .photo-carousel img,.community-gallery .story-hero__placeholder { height:clamp(180px,30vw,340px); min-height:0; }
.community-gallery .photo-carousel img { object-fit:contain; background:var(--bg-elev-2); }
.community-gallery .photo-carousel::after { display:none; }
.story-meta { margin-bottom:1rem; }
.community-evidence__period { display:flex; flex-wrap:wrap; gap:.3rem 1rem; font-size:.83rem; margin-bottom:.65rem; }
.community-evidence__period span { color:var(--text-muted); }
.community-evidence__facts { display:flex; flex-wrap:wrap; gap:.4rem; margin-bottom:.7rem; }
.community-evidence__facts span { background:var(--bg-elev-2); padding:.25rem .45rem; border-radius:6px; color:var(--text-muted); font-size:.74rem; }
.community-evidence__table { font-size:.76rem; color:var(--text); }
.community-evidence__table th { white-space:normal; min-width:4rem; }
.community-evidence__table td { white-space:nowrap; }
.community-evidence__relation { padding:.65rem .8rem; border-left:3px solid var(--warning); background:color-mix(in srgb,var(--warning) 7%,var(--bg-elev-1)); font-size:.82rem; color:var(--text); }
.community-history-controls { display:flex; flex-wrap:wrap; gap:.65rem; align-items:end; }
.community-history-controls label { display:block; font-size:.8rem; margin-bottom:.3rem; }
.community-history-preview { margin-top:.8rem; }
.community-history-preview:empty { display:none; }
.community-history-title { margin:0 0 .7rem; font-size:1.1rem; }
@media(max-width:575px) {
 .community-header { align-items:flex-start; flex-wrap:wrap; gap:.65rem; }
 .community-header h1 { font-size:1.5rem; }
 .community-header p { font-size:.8rem; }
 .community-header>.btn { padding:.4rem .65rem; font-size:.8rem; }
 .journal-toolbar .feed-tabs { width:100%; justify-content:center; }
 .journal-toolbar .comm-search { min-width:0; flex-basis:calc(100% - 130px); }
 .journal-toolbar #region-select { flex-basis:120px; font-size:.8rem; }
 .community-match { padding:.7rem .8rem; }
 .community-match__body { flex-wrap:wrap; gap:.6rem; }
 .community-match__body>.btn { margin-left:auto; }
 .community-match__reasons { gap:.2rem .8rem; }
 .community-detail-header .story-author__place { margin-left:0; width:auto; }
 .community-evidence__table { font-size:.7rem; }
 .community-evidence__table th { min-width:3.6rem; }
 .community-history-controls .btn { white-space:normal; }
}
@media(prefers-reduced-motion:reduce) { .journal-card:hover { transform:none; } }

.community-history-controls[hidden] { display:none!important; }
