.source-media-settings{margin:20px 0;padding:16px 20px;background:#f1f5ed;border:1px solid #dce3d8;border-radius:18px;font-size:1rem;line-height:1.8}.source-media-settings label{display:flex;align-items:center;gap:12px;font-weight:650;min-height:44px}.source-media-settings input{width:22px;height:22px;accent-color:#446548;flex-shrink:0}.source-media-settings p{margin:4px 0 0;color:var(--muted)}
.social-card .social-art.has-thumbnail:not(.embed-active){padding:0;gap:0;min-height:0;background:#f2f2ee;display:block;aspect-ratio:auto}.source-thumbnail{display:block;width:100%;background:#f2f2ee;aspect-ratio:4/3}.source-thumbnail img{display:block;width:100%;height:100%;object-fit:contain}.source-thumbnail:focus-visible{outline:3px solid #a55238;outline-offset:-4px}.social-card .has-thumbnail:not(.embed-active)>.social-embed{display:block;margin:12px auto}.social-card .thumbnail-loading .art-placeholder{position:absolute;inset:0 0 60px;background:#f2f2ee;justify-content:center;pointer-events:none}.social-card .embed-active .source-thumbnail{display:none}.media-original-title{font-size:1rem;line-height:1.7;color:var(--muted);margin:0 0 14px;overflow-wrap:anywhere}.media-original-title:empty{display:none}.embed-error{font-size:1rem;padding:20px;line-height:1.8;overflow-wrap:anywhere}.x-preview.embed-active{scrollbar-gutter:auto}.x-preview .embed-slot{min-height:280px}.source-media-status{margin:0;color:var(--muted)}
@media(max-width:700px){.source-media-settings{padding:14px 16px}.source-media-settings label{align-items:flex-start}.source-media-settings input{margin-top:5px}}

/* Keep the original X post intact in both overview and reading modes. */
.social-card .x-preview.embed-active{max-height:none;overflow:visible;display:block;scrollbar-gutter:auto}
.x-post-viewport{width:100%;height:var(--x-photo-height,320px);overflow:auto;overscroll-behavior:contain;background:#fff;scrollbar-gutter:stable;scroll-behavior:auto;overflow-anchor:none}
.social-card:not([data-x-view=text]) .x-post-viewport{height:var(--x-photo-height,320px)}
.social-card[data-x-view=text] .x-post-viewport{height:var(--x-height,560px)}
.social-art:not(.embed-active) .x-post-viewport,.social-art:not(.embed-active) .x-view-controls{display:none}
.x-post-viewport:focus-visible{outline:3px solid #446548;outline-offset:-3px}
.x-view-controls{padding:12px 14px 6px;border-top:1px solid #e0e5dc;background:#f5f7f1}
.x-view-controls>div{display:flex;gap:8px;justify-content:center;flex-wrap:wrap}
.x-view-controls button{font:inherit;font-size:1rem;line-height:1.6;padding:8px 14px;min-height:44px;border:1px solid #b9cbb2;border-radius:24px;background:#fff;color:#345337;cursor:pointer}
.x-view-controls button[aria-pressed=true]{background:#446548;border-color:#446548;color:#fff}
.x-view-controls button:focus-visible{outline:3px solid #a55238;outline-offset:3px}
.x-view-controls p{margin:7px 0 0;font-size:.9375rem;color:var(--muted);line-height:1.7}
.social-card .x-art.embed-active>.social-embed{font-size:.9375rem;margin:8px auto 12px;min-height:40px;background:transparent;border-color:transparent;text-decoration:underline;text-underline-offset:3px}

/* Same 4:3 comparison window for both sources. Narrow screens shrink it as a unit. */
.social-card .source-thumbnail,
.social-card[data-x-view=photo] .x-post-viewport{
 width:min(100%,var(--preview-width,400px));
 height:auto;
 aspect-ratio:4/3;
 min-height:0;
 margin-inline:auto;
}
.social-card .source-thumbnail img{width:100%;height:100%;object-fit:contain}
.social-card .social-art.has-thumbnail:not(.embed-active){background:#f4f5f0}
.social-card .social-art:not(.embed-active):not(.has-thumbnail){padding:0;min-height:0;display:block}
.social-card .social-art:not(.has-thumbnail)>.art-placeholder{
 width:min(100%,var(--preview-width,400px));aspect-ratio:4/3;min-height:0;margin-inline:auto;padding:20px;justify-content:center
}
.social-card .thumbnail-loading>.art-placeholder{width:min(100%,var(--preview-width,400px));height:auto;aspect-ratio:4/3;inset:0 0 auto;margin-inline:auto}
.social-card .social-art:not(.embed-active):not(.has-thumbnail)>.social-embed{display:block;margin:12px auto}
.social-card[data-x-view=photo] .x-post-viewport{position:relative;overflow:hidden;scrollbar-gutter:auto;overflow-anchor:none}
.social-card[data-x-view=photo] .embed-slot{position:absolute;left:50%;top:var(--x-fit-top,0px);margin:0;display:flow-root;transform:translateX(-50%) scale(var(--x-fit-scale,1));transform-origin:50% 0}
.social-card[data-x-view=full] .x-post-viewport{height:auto;aspect-ratio:auto;overflow:visible;scrollbar-gutter:auto;width:min(100%,var(--preview-width,400px));margin-inline:auto}
.social-card[data-x-view=full] .embed-slot{display:flow-root}
.social-card .social-art.has-x-photos{display:block;padding:0;aspect-ratio:auto;min-height:0;background:#f4f5f0}
.social-card .has-x-photos .source-thumbnail{display:block}
.social-card .has-x-photos .x-photo-gallery img{object-fit:contain;width:100%;height:100%}
.x-photo-nav{display:flex;align-items:center;justify-content:center;gap:12px;padding:10px 12px;background:#f4f5f0}
.x-photo-nav button{font:inherit;font-size:1rem;min-height:44px;border:1px solid #b9cbb2;border-radius:24px;background:#fff;color:#345337;padding:7px 12px;cursor:pointer}
.x-photo-nav button:disabled{opacity:.45;cursor:default}
.x-photo-nav span{font-size:1rem;white-space:nowrap}
.x-media-kind,.x-media-unavailable{font-size:1rem;line-height:1.8;padding:8px 16px;margin:0;color:var(--muted);background:#f4f5f0}
.social-card .has-x-photos>.social-embed{display:block;margin:10px auto;font-size:1rem}
@media(max-width:700px){
 .social-grid{gap:24px}
 .social-card .social-copy{padding:18px}
 .social-card .social-author{font-size:1rem;line-height:1.8}
 .social-card .social-actions a,.social-card .social-actions button{min-height:48px}
 .social-card .social-actions .primary{flex:1 1 100%;justify-content:center}
 .social-card .social-save{margin-left:auto}
}
