/* ============================================================
   홈 — 최신 소식 옆 "공식 SNS" 패널 (js/social.js, 2026-10-05)
   style.css 와 따로 둔다 (홈을 여러 세션이 같이 고치므로 충돌을 줄이려고)
   ============================================================ */

.home-feed { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; align-items: start; }
.home-feed > section { min-width: 0; }

.social {
  position: sticky; top: 77px; max-height: calc(100vh - 92px); overflow-y: auto;
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 0 14px 12px; overscroll-behavior: contain;
}
.social-top {
  position: sticky; top: 0; z-index: 2; background: var(--panel);
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  padding: 12px 0 8px; border-bottom: 1px solid var(--border);
}
.social-top .section-title { margin: 0; font-size: 1.25rem; }
.social-tabs button { padding: 5px 12px; font-size: 0.86rem; }

.social-kinds { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 10px 0 4px; }
.social-kinds button {
  background: none; border: 1px solid var(--border); border-radius: 12px; padding: 2px 10px;
  color: var(--muted); font-family: inherit; font-size: 0.78rem; cursor: pointer;
}
.social-kinds button.on { border-color: var(--tan); color: var(--text-strong); background: var(--panel-2); }
.social-kinds span { margin-left: auto; color: var(--muted); font-size: 0.74rem; font-family: var(--font-mono); }

.social-list { display: flex; flex-direction: column; }
.sc-card { padding: 12px 0; border-bottom: 1px solid var(--border); }
.sc-card:last-child { border-bottom: none; }
.sc-head { display: flex; align-items: center; gap: 9px; margin-bottom: 6px; }
.sc-avatar { width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0; object-fit: cover; border: 1px solid var(--border-strong); }
.sc-ph { display: grid; place-items: center; background: var(--panel-2); color: var(--tan-bright); font-family: var(--font-head); font-size: 0.8rem; }
.sc-ph.eft { background: #2b2720; color: var(--gold); font-size: 0.72rem; letter-spacing: 0.05em; }
.sc-who { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.sc-who b { color: var(--text-strong); font-size: 0.9rem; }
.sc-who em { font-style: normal; color: var(--muted); font-size: 0.74rem; }
.sc-head time { margin-left: auto; color: var(--muted); font-family: var(--font-mono); font-size: 0.74rem; white-space: nowrap; }

.sc-text { white-space: pre-line; font-size: 0.9rem; line-height: 1.6; color: var(--text); overflow-wrap: anywhere; }
.sc-orig { margin-top: 4px; font-size: 0.8rem; }
.sc-orig summary { cursor: pointer; color: var(--muted); font-family: var(--font-mono); font-size: 0.72rem; }
.sc-orig .sc-text { color: var(--muted); font-size: 0.82rem; }

.sc-codes { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-top: 6px; }
.sc-code {
  font-family: var(--font-mono); font-size: 0.72rem; padding: 4px 6px; text-align: center;
  background: var(--bg-alt); border: 1px dashed var(--border-strong); border-radius: 2px; color: var(--tan-bright); cursor: copy;
}
.sc-code:hover { border-color: var(--tan); }
.sc-code.copied { border-style: solid; border-color: var(--green); color: var(--green); }
.sc-code.copied::after { content: " ✔"; }

.sc-q, .sc-quote {
  margin: 4px 0 8px; padding: 7px 10px; border-left: 3px solid var(--border-strong);
  background: rgba(0, 0, 0, 0.18); border-radius: 0 3px 3px 0;
}
.sc-quote { margin-top: 8px; border-left-color: var(--tan-dim); }
.sc-q .sc-text, .sc-quote .sc-text { font-size: 0.82rem; color: var(--muted); }
.sc-q-who { display: block; color: var(--tan); font-size: 0.72rem; font-family: var(--font-mono); margin-bottom: 2px; }
.sc-card.is-answer > .sc-text { color: var(--text-strong); }

.sc-media { display: grid; gap: 4px; margin-top: 8px; border-radius: 4px; overflow: hidden; }
.sc-media.n2, .sc-media.n4 { grid-template-columns: 1fr 1fr; }
.sc-media.n3 { grid-template-columns: 1fr 1fr; }
.sc-media.n3 > :first-child { grid-row: span 2; }
.sc-media.small { max-width: 160px; }
.sc-photo { position: relative; display: block; padding: 0; border: none; background: var(--bg-alt); cursor: zoom-in; overflow: hidden; }
.sc-photo img, .sc-video { display: block; width: 100%; max-height: 300px; object-fit: cover; }
.sc-media.n2 img, .sc-media.n3 img, .sc-media.n4 img { height: 150px; }
.sc-media.n3 > :first-child img { height: 304px; }
.sc-photo.is-video span {
  position: absolute; left: 8px; bottom: 8px; padding: 2px 8px; border-radius: 2px;
  background: rgba(0, 0, 0, 0.7); color: #fff; font-size: 0.74rem;
}
.sc-video { background: #000; }
.sc-foot { margin-top: 6px; color: var(--muted); font-size: 0.76rem; font-family: var(--font-mono); }

.social-more { width: 100%; margin-top: 8px; }
.social-foot { margin-top: 10px; color: var(--muted); font-size: 0.7rem; font-family: var(--font-mono); line-height: 1.5; }
.sc-empty { color: var(--muted); padding: 14px 0; font-size: 0.86rem; }

.sc-lightbox {
  position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center;
  background: rgba(0, 0, 0, 0.88); padding: 24px; cursor: zoom-out;
}
.sc-lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; cursor: default; box-shadow: var(--shadow); }
.sc-lb-close {
  position: absolute; top: 14px; right: 16px; width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--border-strong); background: var(--panel); color: var(--text-strong); font-size: 1rem; cursor: pointer;
}

@media (max-width: 1060px) {
  .home-feed { grid-template-columns: 1fr; }
  .social { position: static; max-height: none; overflow: visible; }
  .social-top { position: static; }
}

/* 공식 유튜브 탭 (2026-10-06) — 썸네일을 누르면 그 자리에서 임베드 재생 */
.sc-ph.yt { background: #3a1414; color: #ff5a4f; font-size: 0.9rem; }
.sc-yt-frame { margin-top: 8px; border-radius: 4px; overflow: hidden; background: #000; aspect-ratio: 16 / 9; }
.sc-yt.is-short .sc-yt-frame { aspect-ratio: 9 / 16; max-height: 400px; margin-inline: auto; }
.sc-yt-frame iframe { display: block; width: 100%; height: 100%; border: 0; }
.sc-yt-play { position: relative; display: block; width: 100%; height: 100%; padding: 0; border: none; background: #000; cursor: pointer; }
.sc-yt-play img { display: block; width: 100%; height: 100%; object-fit: cover; }
.sc-yt-play span {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 54px; height: 38px; border-radius: 9px; display: grid; place-items: center;
  background: rgba(204, 0, 0, 0.88); color: #fff; font-size: 1rem; transition: background 0.15s;
}
.sc-yt-play:hover span { background: #f00; }
.sc-yt-desc { margin-top: 6px; }

/* 리뉴얼 (css/renewal.css 와 짝) — 레거시(data-design="legacy")에는 영향 없음 */
/* "출처: … 스냅샷 …" 꼬리말 숨김, 부제(BSG 대표 등)는 js/social.js 가 .legacy-only 로 감싼다 */
html[data-design="renewal"] .social-foot { display: none; }
html[data-design="renewal"] .social-kinds:not(:has(button)) { display: none; }
html[data-design="renewal"] .social-kinds button { border-radius: 999px; padding: 3px 11px; }
html[data-design="renewal"] .sc-q-who,
html[data-design="renewal"] .sc-orig summary { font-family: inherit; }
html[data-design="renewal"] .sc-code { border-radius: 6px; }
html[data-design="renewal"] .sc-ph.eft { letter-spacing: 0; }
