/* Feed cards share the town dashboard's surface, accent and typography. */
.social-feed .section-title .more-link{display:inline-flex;align-items:center;gap:.35rem;white-space:nowrap}
.social-feed #socialStream{display:grid;align-content:start;grid-auto-rows:max-content;gap:8px;min-height:0;min-width:0;overflow:hidden!important;overflow:clip!important;container-type:inline-size}
.social-story[hidden]{display:none!important}
.social-story{
 min-width:0;padding:16px;border:1px solid var(--line,#006ea6);border-radius:15px;
 background:linear-gradient(145deg,var(--panel,#001a30),var(--bg,#001020));
 color:var(--text,#e6f3ff);box-shadow:0 6px 16px #00102024;
}
.social-story-header,.social-story-footer{display:flex;align-items:center;gap:10px;min-width:0}
.social-story-header{margin-bottom:12px}
.social-story-avatar{
 display:grid;place-items:center;overflow:hidden;flex:0 0 42px;aspect-ratio:1;
 color:var(--text);background:color-mix(in srgb,var(--blue) 14%,var(--panel));
 border:1px solid color-mix(in srgb,var(--blue) 45%,var(--panel));
 border-radius:50%;font-size:14px;font-weight:750;
}
.social-story-avatar img{width:100%;height:100%;object-fit:cover}
.social-story-byline{display:grid;gap:3px;flex:1;min-width:0}
.social-story-byline strong{display:block;font-size:clamp(.92rem,2vw,1.08rem);line-height:1.25;overflow-wrap:anywhere}
.social-story-byline time{font-size:.75rem;line-height:1.25;color:var(--muted)}
.social-story-network{
 border:1px solid color-mix(in srgb,var(--blue) 55%,var(--panel));border-radius:999px;
 background:color-mix(in srgb,var(--blue) 11%,var(--panel));padding:3px 8px;
 font-size:.68rem;line-height:1.2;font-weight:750;white-space:nowrap;
}
.social-story-content{display:grid;grid-template-columns:minmax(0,1fr);gap:16px;align-items:start}
.social-story-copy{display:grid;gap:7px;min-width:0;overflow-wrap:anywhere}
.social-story-copy:empty{display:none}
.social-story .social-story-copy h2{margin:0;font-size:clamp(1rem,2vw,1.3rem);line-height:1.25}
.social-story .social-story-copy p{margin:0;white-space:pre-wrap;line-height:1.55;font-size:.96rem;color:var(--muted)}
.social-story-media{min-width:0;overflow:hidden;border-radius:10px}
.social-story-media img,.social-story-media video,.social-story-media iframe{display:block;width:100%;max-width:100%}
.social-story-media img{aspect-ratio:16/9;object-fit:cover}
.social-story-media video,.social-story-media iframe{height:auto;aspect-ratio:16/9;background:var(--bg)}
.social-story-media .facebook-media-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:3px}
.social-story-media .facebook-media-grid.media-count-1{grid-template-columns:1fr}
.social-story-media .facebook-post-media:has(.facebook-media-grid):has(.facebook-video-media) .facebook-media-grid,
.social-story-media .facebook-post-media:has(.facebook-media-grid):has(.facebook-video-embed) .facebook-media-grid{margin-top:3px}
.social-post-preview,.social-story-media .facebook-video-poster{position:relative;display:grid;place-items:center;width:100%;aspect-ratio:16/9;background:var(--bg)}
.social-post-preview img{width:100%;height:100%;position:absolute;inset:0}
.social-play,.social-story-media .facebook-play-mark{
 position:absolute;display:grid;place-items:center;width:32px;aspect-ratio:1;
 border:1px solid var(--blue);border-radius:50%;background:#001020db;color:#fff;
 font-size:13px;line-height:1;
}
.social-story-footer{flex-wrap:wrap;border-top:1px solid var(--line);margin-top:13px;padding-top:11px;font-size:.76rem}
.social-source-link{color:var(--blue);font-size:.82rem;font-weight:750;text-decoration:none}
.social-source-link:hover,.social-source-link:focus-visible{text-decoration:underline}
.social-story-footer .social-source-link{margin-inline-start:auto}
.social-page-panel{min-width:0}
#socialPageFeed.social-page-feed{display:grid;grid-template-columns:minmax(0,1fr);gap:14px;max-width:980px;margin:0 auto;container-type:inline-size}
@container (min-width:620px){
 .social-page-feed .social-story-content.has-media:has(.social-story-copy:not(:empty)){grid-template-columns:minmax(0,1.35fr) minmax(0,1fr)}
}
@media(max-width:780px){
 .home-layout-grid>.social-feed[data-home-card="facebook"]:not([data-mobile-sized="true"]){height:clamp(290px,46svh,460px)!important;min-height:0!important}
 .home-layout-grid>.social-feed #socialStream{flex:1 1 0;min-height:0!important;max-height:none!important}
}
@media(max-width:560px){
 .social-page-feed .social-story{padding:12px}
 .social-page-feed .social-story-header{margin-bottom:10px}
 .social-page-feed .social-story-copy p{font-size:.9rem}
}
#socialStream .social-story{padding:8px;border-radius:10px}
#socialStream .social-story-header{gap:7px;margin-bottom:6px}
#socialStream .social-story-avatar{flex-basis:28px;font-size:10px}
#socialStream .social-story-byline{gap:2px}
#socialStream .social-story-byline strong{font-size:.79rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#socialStream .social-story-byline time{font-size:.66rem}
#socialStream .social-story-network{font-size:.61rem;padding:2px 5px}
#socialStream .social-story-content{gap:8px}
#socialStream .social-story-content.has-media{grid-template-columns:minmax(0,28%) minmax(0,1fr)}
#socialStream .social-story-content.has-media:has(.social-story-copy:empty){grid-template-columns:1fr}
#socialStream .social-story-copy{gap:3px}
#socialStream .social-story-copy h2,#socialStream .social-story-copy p{
 display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;white-space:normal;
 font-size:.75rem;line-height:1.35;
}
#socialStream .social-source-link{font-size:.66rem;line-height:1.4}
#socialStream .social-story-media{border-radius:6px}
#socialStream .social-story-content.has-media:has(.social-story-copy:empty) .social-post-preview{max-height:78px}
#socialStream.social-feed-tight .social-post-preview{max-height:52px}
#socialStream.social-feed-tight .social-story-copy p{-webkit-line-clamp:1}
@container (min-width:420px){
 #socialStream .social-story-content.has-media{grid-template-columns:minmax(0,38%) minmax(0,1fr)}
 #socialStream .social-story-copy p{-webkit-line-clamp:3}
}

.social-page-feed .social-story{position:relative;isolation:isolate;overflow:hidden;border-radius:16px;transition:border-color .18s ease,box-shadow .18s ease}
.social-page-feed .social-story:has(.social-post-hit-area):hover{border-color:#42c7eb;box-shadow:0 10px 24px #00142142}
/* Town themes can style links as tiles. This link is only the card's click target. */
.social-page-feed .social-story > a.social-post-hit-area{
 position:absolute;inset:0;z-index:2;border-radius:inherit;
 background:transparent;border:0;box-shadow:none;
}
.social-page-feed .social-story:focus-within{outline:2px solid #67dcff;outline-offset:3px}
.social-page-feed .content-rating-footer{position:relative;z-index:3}
.social-page-feed .social-story-footer{background:transparent!important;border-top:1px solid #337c923d;display:flex;flex-wrap:wrap;align-items:center;gap:.65rem;padding:.65rem 0 0;margin-top:.85rem}
.social-page-feed .social-post-preview{z-index:3}
.social-page-feed .social-post-preview img{object-fit:contain}
.social-page-feed .social-source-link{position:relative;z-index:3}
.social-story-media[hidden]{display:none}
.social-story-content:has(.social-story-media[hidden]){grid-template-columns:minmax(0,1fr)!important}

/* The Social Media page uses its own palette inside the existing town shell. */
.social-page-panel{
 --feed-ink:#f1f8ff;--feed-muted:#c3d9ec;--feed-accent:#50efff;--feed-line:#1983ab;
 width:100%;max-width:1120px;margin:0 auto 20px;padding:clamp(10px,1.6vw,20px);
 border:1px solid #20cfea;border-radius:22px;
 background:radial-gradient(ellipse at top,#083a54 0%,#001420 48%,#00111d 100%);
 box-shadow:0 0 22px #00cfff30,inset 0 0 18px #009bcc1c;color:var(--feed-ink);
}
.social-feed-heading{
 display:flex;align-items:center;gap:clamp(12px,2vw,26px);padding:14px 10px 20px;
 border-bottom:1px solid #3c96be45;margin-bottom:14px;
}
.social-feed-heading>svg{width:46px;height:46px;flex-shrink:0;color:var(--feed-accent);filter:drop-shadow(0 0 7px #11d5ff85)}
.social-feed-heading>div{padding-inline-start:clamp(12px,2vw,26px);border-inline-start:2px solid #08cde1}
.social-feed-heading h2{color:var(--feed-ink);margin:0;font-size:clamp(1.1rem,3.4vw,1.9rem);line-height:1.1;text-transform:uppercase}
.social-feed-heading p{color:var(--feed-muted);margin:.35rem 0 0;font-size:clamp(.8rem,1.7vw,1.05rem)}
#socialPageFeed.social-page-feed{max-width:none;gap:16px}
.social-page-feed .social-story{
 padding:clamp(12px,2vw,20px);color:var(--feed-ink);border-color:var(--feed-line);
 background:linear-gradient(145deg,#062d43,#031a2b 57%,#052338);
 box-shadow:inset 0 0 16px #0095cb23;
}
.social-page-feed .social-story-header{gap:14px;margin-bottom:14px}
#socialPageFeed .social-story-avatar{flex-basis:clamp(38px,5vw,60px);background:#e6f7ff;color:#073655!important;border-color:#79b4cf}
.social-page-feed .social-story-byline strong{font-size:clamp(1rem,2.2vw,1.32rem);color:var(--feed-ink)}
.social-story-meta{display:flex;align-items:center;flex-wrap:wrap;gap:9px}
.social-story-meta time{color:var(--feed-muted);font-size:.85rem}
.social-story-meta .social-story-network{
 display:inline-flex;align-items:center;gap:5px;font-size:.76rem;padding:3px 9px;
 color:var(--feed-ink);background:#052842;border-color:#2877ad;
}
.social-network-mark{display:grid;place-items:center;width:16px;aspect-ratio:1;border-radius:50%;background:#137bed;color:#fff;font-weight:800}
.social-page-feed .social-story-content{gap:18px}
.social-page-feed .social-story-copy{gap:9px}
.social-page-feed .social-story-copy h3{margin:0;color:var(--feed-ink);font-size:clamp(1rem,2.2vw,1.5rem);line-height:1.25}
.social-page-feed .social-story-copy p{color:var(--feed-muted);font-size:clamp(.9rem,1.8vw,1.03rem)}
.social-page-feed .social-source-link{justify-self:start;color:var(--feed-accent);font-size:.94rem;padding-block:3px}
.social-page-feed .social-story-media{border-radius:14px}
.social-page-feed .social-post-preview{aspect-ratio:2.13;background:#001822;overflow:hidden}
.social-page-feed .social-post-preview img{object-fit:cover}
.social-page-feed .social-post-preview .social-portrait{object-fit:contain}
.social-page-feed .social-play{
 width:clamp(40px,7vw,68px);border:2px solid #7df4ff;box-shadow:0 0 12px #20def272;
 background:#001824d9;font-size:clamp(15px,3vw,24px);
}
.social-video-label{
 justify-self:start;display:inline-flex;align-items:center;gap:7px;padding:5px 10px;
 color:var(--feed-accent);background:#07354b;border:1px solid #15a6cc;border-radius:999px;
 font-size:.73rem;font-weight:800;text-transform:uppercase;
}
.social-video-label svg{width:15px;height:15px}
.social-page-feed .social-text-icon{
 display:grid;place-items:center;width:clamp(40px,7vw,65px);aspect-ratio:1;
 border-radius:14px;background:#093a53;color:var(--feed-accent);
}
.social-text-icon svg{width:55%;height:55%}
.social-page-feed .has-media .social-text-icon{display:none}
.social-page-feed .social-story-content:not(.has-media){grid-template-columns:auto minmax(0,1fr)}
.social-page-feed .social-story-content:not(.has-media) .social-story-copy{border-inline-start:1px solid #477c9b;padding-inline-start:12px}
.social-page-feed .social-story-footer{
 gap:clamp(16px,4vw,44px);border-color:#477c9b;color:var(--feed-ink);padding-top:10px;
}
.social-metric{display:inline-flex;align-items:center;gap:7px;font-size:.9rem}
.social-metric svg{width:19px;height:19px}
.social-metric[data-metric="views"]{margin-inline-start:auto}
.social-page-feed .content-rating-footer{margin-top:8px}
.social-page-panel>button{display:block;margin:16px auto 0;background:#07354b;color:var(--feed-accent);border:1px solid #0baac9;border-radius:999px}
.social-page-panel>button[hidden]{display:none}
@container (min-width:660px){
 .social-page-feed .social-story-content.has-media:has(.social-story-copy:not(:empty)){grid-template-columns:minmax(0,1.65fr) minmax(0,1fr);align-items:start}
}
@container (max-width:480px){
 .social-page-feed .social-post-preview{aspect-ratio:16/9}
 .social-page-feed .social-story-content{gap:12px}
 .social-page-feed .social-story-footer{gap:14px}
}
