.social { --social-avatar-size: 36px; --social-gutter: 52px; --social-content-gap: 1rem; --social-meta-size: .8rem; }
.social .site-main { max-width: 732px; margin-inline: auto; }
.social-meta { color: var(--muted); font-size: var(--social-meta-size); line-height: 1.6; }
.social-meta a { color: inherit; text-decoration: none; }
.social-meta a:hover { text-decoration: underline; }
.social-thread { --social-entry-top: 2.4rem; position: relative; padding: var(--social-entry-top) 0 2.4rem var(--social-gutter); border-top: 1px solid var(--border); }
.social-thread:first-child { --social-entry-top: 1rem; border-top: 0; }
.social time { font-style: normal; }
.social-published time { display: inline; }
.social-date { font-size: inherit; font-weight: 400; color: var(--muted); }
.social-clock { font-size: inherit; color: var(--muted); white-space: nowrap; }
.social-content { margin-top: var(--social-content-gap); overflow-wrap: anywhere; }
.social-content p { margin: 1rem 0; }
.social-content > :first-child { margin-top: 0; }
.social-content > :last-child { margin-bottom: 0; }
.social-content .invisible { display: none; }
.social-content .ellipsis::after { content: "…"; }
.social-continuation { margin-top: 2rem; }
.social-media { display: grid; gap: .65rem; margin-top: 1rem; }
.social-photo-row { display: grid; grid-template-columns: var(--photo-columns); gap: .65rem; align-items: start; }
.social-photo-row > .social-image { width: 100%; min-width: 0; }
.social-media .social-image { display: block; width: min(100%, calc(42rem * var(--social-image-ratio, 1))); max-width: 100%; margin-inline: auto; border-radius: var(--radius-small); overflow: hidden; cursor: zoom-in; }
.social-media .social-image img { display: block; width: 100%; max-width: 100%; height: auto; margin: 0; border-radius: var(--radius-small); }
/* The link owns the photo ratio and height cap. A definite image width reserves
   its height before decode, including delayed imported and authored photos. */
.social-media:not(.social-gallery) .social-image img { max-height: 42rem; margin-inline: auto; object-fit: contain; }
.social-media figure { margin: 0; min-width: 0; }
.social-media video, .social-media audio { width: 100%; max-height: 42rem; }
.social-media figcaption { color: var(--muted); font-size: .8rem; margin-top: .5rem; }
.social-warning { margin-top: 1rem; }
.social-warning summary { cursor: pointer; font-weight: 600; padding: .7rem 0; }
.social-warning summary span { font-weight: 400; color: var(--muted); }
.social-pagination { display: flex; justify-content: space-between; gap: 1rem; margin: 2rem 0 3rem; font-size: .9rem; }
@media (max-width: 420px) { .social-photo-row { grid-template-columns: 1fr; } }

.social-link-preview { display: grid; grid-template-columns: minmax(0, 1fr); margin-top: 1.25rem; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-small); color: var(--text-color); text-decoration: none; }
.social-link-preview > img { width: 100%; height: auto; max-height: 20rem; object-fit: cover; }
.social-link-copy { display: grid; gap: .4rem; padding: 1rem; font-size: .9rem; overflow-wrap: anywhere; }
.social-link-copy strong { font-size: 1rem; line-height: 1.4; }
.social-link-preview:hover strong { text-decoration: underline; }
.social-link-heading { display: flex; align-items: center; gap: .6rem; min-width: 0; }
.social-link-title { min-width: 0; }
.social-link-description { color: var(--muted); }
.social-external-arrow { font-size: .9rem; line-height: 1; font-weight: 400; color: var(--muted); }
.social-link-arrow { margin-left: auto; flex: none; }
.social-movie-card { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: 14px; margin-top: 1.25rem; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius-small); color: var(--text-color); text-decoration: none; }
.social-movie-cover { display: block; width: 48px; height: 72px; object-fit: cover; margin: 0; border-radius: 0; }
.social-movie-placeholder { display: grid; place-items: center; background: var(--border); color: var(--muted); font-size: .8rem; }
.social-movie-copy { display: grid; gap: .35rem; min-width: 0; }
.social-movie-title { font-family: var(--font-heading, inherit); font-size: 1rem; font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }
.social-movie-meta { color: var(--muted); font-size: .8rem; line-height: 1.5; }
.social-movie-rating { flex: none; white-space: nowrap; line-height: 1.3; }
.social-movie-rating strong { font-size: 1.3rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.social-movie-rating > span { font-size: .75rem; color: var(--muted); margin-left: .1rem; }
.social-movie-card:hover { opacity: 1; }
.social-movie-title:hover { text-decoration: underline; text-underline-offset: .15em; }
.social-movie-title:focus-visible, .social-movie-art:focus-visible { outline: var(--focus-ring); outline-offset: 4px; }
.social-movie-credit { margin: .35rem 0 0; color: var(--muted); font-size: .7rem; }
.social-favicon { flex: none; width: 20px; height: 20px; object-fit: contain; }

html { scrollbar-gutter: stable; }
html.social-lightbox-open { overflow: hidden; }
.social-lightbox { position: fixed; inset: 0; margin: 0; padding: 0; width: 100vw; max-width: none; height: 100dvh; max-height: none; border: 0; background: transparent; color: var(--text-color); overflow: hidden; }
.social-lightbox[open] { display: grid; grid-template-rows: 4rem minmax(0, 1fr) auto; }
.social-lightbox::backdrop { background: transparent; }
.social-lightbox-shade { position: absolute; inset: 0; background: var(--background-color); pointer-events: none; z-index: -1; }
.social-lightbox-toolbar { display: flex; align-items: center; justify-content: space-between; padding-inline: 1rem; }
.social-lightbox button { width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--background-color); color: var(--text-color); cursor: pointer; font: 2rem/1 system-ui, sans-serif; }
.social-lightbox button:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.social-lightbox-stage { display: grid; place-items: center; position: relative; min-height: 0; }
.social-lightbox-image { display: block; width: auto; height: auto; max-width: calc(100vw - 7rem); max-height: calc(100dvh - 11rem); object-fit: contain; touch-action: pan-y pinch-zoom; }
.social-lightbox-previous, .social-lightbox-next { position: absolute; top: calc(50% - 22px); z-index: 1; }
.social-lightbox-previous { left: .5rem; }
.social-lightbox-next { right: .5rem; }
.social-lightbox-caption { margin: 0; padding: 1rem 1.5rem; min-height: 3rem; max-height: 6rem; overflow-y: auto; text-align: center; font-size: .85rem; line-height: 1.5; }
@media (max-width: 600px) { .social-lightbox-image { max-width: calc(100vw - 1rem); } }
.social-back { display: inline-block; margin: 1rem 0; }
/* Quotes continue the journal rail with their own author, rather than a nested card. */
.social-quote-origin { position: relative; }
.social-quote-origin::before { content: ""; position: absolute; left: calc(var(--social-avatar-size) / 2 - var(--social-gutter)); top: calc(4px - var(--social-avatar-size)); bottom: calc(4px - 2rem); border-left: 1px dashed var(--muted); opacity: .6; pointer-events: none; }
.social-continuation .social-quote-origin::before { top: 0; }
.social-quote { position: relative; margin-top: 2rem; }
.social-quote-avatar { position: absolute; left: calc(-1 * var(--social-gutter)); top: 0; width: var(--social-avatar-size); height: var(--social-avatar-size); border-radius: 50%; z-index: 1; }
.social-quote-avatar, .social-quote-avatar:hover { text-decoration: none; }
.social-quote-avatar:focus-visible { outline: var(--focus-ring); outline-offset: 5px; }
.social-quote-avatar .social-quote-initials { display: grid; place-items: center; background: var(--border); color: var(--text-color); font-size: .75rem; }
.social-quote-heading { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .4rem; min-height: var(--social-avatar-size); font-size: var(--social-meta-size); color: var(--muted); overflow-wrap: anywhere; }
.social-quote-label { display: flex; align-items: center; gap: .35em; }
.social-quote-author { color: inherit; text-decoration: none; }
.social-quote-date { color: inherit; text-decoration: none; white-space: nowrap; }
.social-quote-date:hover { text-decoration: underline; }
.social-quote-author:hover { text-decoration: underline; }
.social-thread-connected .social-post--quote:not(:last-child)::after { display: none; }
.social-thread-connected .social-post--quote:not(:last-child) .social-quote::after { content: ""; position: absolute; left: calc(var(--social-avatar-size) / 2 - var(--social-gutter)); top: calc(var(--social-avatar-size) + 4px); bottom: -42px; border-left: 1px solid var(--border); pointer-events: none; }

.social-favicon-slot { position: relative; display: inline-flex; width: 20px; height: 20px; flex: none; }
.social-favicon-fallback { width: 20px; height: 20px; opacity: .6; }
.social-favicon-slot .social-favicon { position: absolute; inset: 0; }
.social-favicon-slot:has(.social-favicon:not([hidden])) .social-favicon-fallback { visibility: hidden; }

.social-avatar-placeholder { background: var(--border); }
.social-post { position: relative; }
.social-thread-connected .social-post:not(:last-child)::after { content: ""; position: absolute; left: calc(var(--social-avatar-size) / 2 - var(--social-gutter)); top: calc(var(--social-avatar-size) + 4px); bottom: -42px; border-left: 1px solid var(--border); }
.social-thread-connected .social-continuation:not(:last-child)::after { top: 14px; }
.social-thread-connected .social-continuation::before { content: ""; position: absolute; left: calc(var(--social-avatar-size) / 2 - var(--social-gutter) - 4px); top: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.social-reply-context { display: block; margin-top: .5rem; font-size: var(--social-meta-size); color: var(--muted); text-decoration: none; }
.social-reply-context:hover { text-decoration: underline; }
.social-favicon-slot .social-favicon { margin: 0; border-radius: 0; }
@media (max-width: 480px) {
  .social { --social-avatar-size: 32px; --social-gutter: 44px; --social-content-gap: .75rem; --social-meta-size: .875rem; }
  .social .site-header { margin-bottom: 1.5rem; }
  .social-thread:not(.social-thread-connected):not(.social-thread-quoted) { padding-left: 0; }
  .social-thread:not(.social-thread-connected):not(.social-thread-quoted) .social-published { padding-left: var(--social-gutter); }
  .social-content { font-size: 18px; line-height: 1.6; }
}
/* Some publishers use a black transparent favicon; keep it readable in either theme. */
.social-favicon-slot:has(.social-favicon:not([hidden])) { background: #fff; border-radius: 3px; }
.social-favicon-slot .social-favicon { inset: 2px; width: 16px; height: 16px; }
.social-published { min-height: var(--social-avatar-size); display: flex; align-items: center; }
.social-avatar { display: block; width: 100%; height: 100%; margin: 0; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px var(--text-color); }

.social-detail .social-back { display: inline-flex; align-items: center; min-height: 44px; margin: 0; padding: 0; border: 0; font-size: .9rem; color: var(--muted); text-decoration: underline; text-underline-offset: .2em; }
.social-detail-navigation { margin-bottom: 1.5rem; }
.social-detail .social-back:hover { text-decoration: underline; }
.social-detail .social-thread { --social-entry-top: .75rem; border-top: 0; }
.social-media .social-image:hover, .social-link-preview:hover { opacity: 1; }
@media (hover: hover) and (pointer: fine) {
  .social-media .social-image img { transition: transform 220ms ease-out; }
  .social-media .social-image:hover img { transform: scale(1.015); }
}
@media (prefers-reduced-motion: reduce) {
  .social-media .social-image img { transition: none; }
  .social-media .social-image:hover img { transform: none; }
}

.social-profile { position: absolute; left: 0; top: var(--social-entry-top); z-index: 2; }
.social-profile[open] { z-index: 5; }
.social-avatar-link { list-style: none; cursor: pointer; width: var(--social-avatar-size); height: var(--social-avatar-size); border-radius: 50%; }
.social-avatar-link:hover { opacity: 1; }
.social-avatar-link:focus-visible { outline: var(--focus-ring); outline-offset: 5px; }
.social-article-title { margin: 0 0 .75rem; font-size: 1.3rem; font-weight: 600; line-height: 1.35; }
.social-article-title a { color: var(--heading-color); text-decoration: none; }
.social-article-title a:hover { text-decoration: underline; }
/* Editorial story previews share the journal rail, without a separate card frame. */
.social-story { display: grid; grid-template-columns: minmax(0, 1fr) 114px; gap: 1.5rem; align-items: start; color: var(--text-color); text-decoration: none; }
.social-story--text { grid-template-columns: minmax(0, 1fr); }
.social-story-copy { min-width: 0; grid-column: 1; grid-row: 1; }
.social-story-title { margin: 0; font-size: 1.25rem; font-weight: 600; line-height: 1.3; }
.social-story-copy .social-story-description { margin: .65rem 0 0; font-size: .95rem; line-height: 1.6; color: var(--muted); }
.social-story-cue { display: inline-block; margin-top: 1rem; font-size: .85rem; text-decoration: underline; text-underline-offset: .2em; }
.social-story-art { grid-column: 2; grid-row: 1; position: relative; width: 114px; height: 142px; overflow: hidden; border-radius: var(--radius-small); }
.social-story-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.social-story:hover { opacity: 1; }
.social-story:hover .social-story-title { text-decoration: underline; text-underline-offset: .15em; }
.social-story:focus-visible { outline: var(--focus-ring); outline-offset: 4px; }
@media (max-width: 480px) {
  .social-story { display: flow-root; }
  .social-story-copy { display: contents; }
  .social-story-title { font-size: 1.15rem; }
  .social-story-art { float: right; width: 80px; height: 80px; margin: 0 0 .65rem 1rem; }
}


@media (prefers-reduced-motion: no-preference) {
  .social-avatar { transition: transform 180ms ease-out; }
  .social-profile[open] .social-avatar { transform: rotate(-8deg); }
}

.social-avatar-link::-webkit-details-marker { display: none; }
.social-profile-bubble { position: absolute; left: calc(var(--social-avatar-size) + 14px); top: -8px; width: min(240px, calc(100vw - 88px)); box-sizing: border-box; padding: 16px; background: var(--background-color); color: var(--text-color); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 8px 24px rgb(0 0 0 / .12); font-size: .9rem; line-height: 1.6; }
.social-profile-bubble::before { content: ""; position: absolute; left: -7px; top: var(--social-bubble-arrow, 18px); width: 12px; height: 12px; transform: rotate(45deg); background: var(--background-color); border-left: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.social-profile-bubble p { margin: 0 0 12px; }
.social-profile-bubble p:not(.social-profile-greeting) { text-wrap: pretty; }
.social-profile-bubble .social-profile-greeting { font-size: 1.15rem; font-weight: 600; color: var(--heading-color); }
.social-profile-bubble a { display: inline-flex; align-items: center; gap: .4em; min-height: 32px; text-underline-offset: .2em; }
@media (pointer: coarse) {
  .social-avatar-link { min-width: 44px; min-height: 44px; }
  .social-avatar-link .social-avatar { width: var(--social-avatar-size); height: var(--social-avatar-size); }
  .social-profile-bubble a { min-height: 44px; }
}

.social-profile-links { display: flex; flex-wrap: wrap; column-gap: 1rem; }

/* Preserve the complete frame for authored and imported single photos. */
@media (prefers-color-scheme: dark) {
  .social-quote-origin::before { border-left-color: var(--text-color); opacity: 1; }
  .social-thread-connected .social-post:not(:last-child)::after,
  .social-thread-connected .social-post--quote:not(:last-child) .social-quote::after { border-left-color: var(--text-color); }
}
.social-movie-art { display: block; width: 48px; cursor: zoom-in; }
.social-movie-title { color: inherit; text-decoration: none; }
