/* SNS 섹션 + 세 캐러셀 (CoverflowCarousel · CardFanCarousel · FeatureCarousel) */

.sns { overflow: hidden; }
.sns-block + .sns-block { margin-top: clamp(80px, 10vw, 128px); }

.sns-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 24px;
  margin-bottom: clamp(20px, 3vw, 32px);
}
.sns-label {
  font: 400 15px/1 var(--font-display);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.sns-head h3 {
  margin-top: 8px;
  font-size: clamp(24px, 2.6vw, 32px);
  font-weight: 800;
  letter-spacing: -0.03em;
}
.sns-link {
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
}
.sns-link:hover { color: var(--accent); }
.sns-updated { margin-top: 48px; font-size: 13px; color: var(--muted); }

/* 계정 연결 전 자리표시 */
.sns-ph {
  display: grid;
  place-content: center;
  gap: 6px;
  width: 100%;
  height: 100%;
  text-align: center;
  color: rgba(243, 241, 236, 0.75);
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 12px),
    linear-gradient(160deg, #3a2c27, #1d1918);
}
.sns-ph strong { font: 400 22px/1 var(--font-display); letter-spacing: 0.04em; color: var(--on-dark); }
.sns-ph span { font-size: 12px; }

/* 공통: 좌우 이동 버튼 · 설명 */
.cf-nav {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  font: 700 18px/1 var(--font-body);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, opacity 0.2s ease, transform 0.12s ease;
}
.cf-nav:hover:not(:disabled) { background: var(--ink); color: var(--on-dark); }
.cf-nav:active:not(:disabled) { transform: scale(0.94); }
.cf-nav:disabled { opacity: 0.25; cursor: default; }
.cf-nav:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.cf-cap { display: grid; justify-items: center; gap: 6px; text-align: center; }
.cf-cap-date { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.cf-cap-title,
.cf-cap-text {
  max-width: 34em;
  font-weight: 700;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.cf-cap-text { font-weight: 500; color: var(--ink-2); }

/* ---------- CoverflowCarousel ---------- */

.cf { --cf-w: clamp(220px, 23vw, 330px); }
.cf-stage {
  position: relative;
  height: calc(var(--cf-w) * 1.25 * 1.22); /* 4:5 카드 + 회전으로 앞으로 나온 가장자리 여유 */
  perspective: 1400px;
  overflow: hidden;
  touch-action: pan-y; /* 세로 스크롤은 브라우저, 가로 드래그는 캐러셀 */
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}
.cf-stage:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.cf-stage.is-dragging { cursor: grabbing; }
.cf-stage.is-dragging a { pointer-events: none; }
.cf-track { position: absolute; inset: 0; transform-style: preserve-3d; }
.cf-card {
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--cf-w);
  max-width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: 6px;
  overflow: hidden;
  background: #2a2826;
  box-shadow: 0 30px 60px -28px rgba(20, 20, 20, 0.55);
  backface-visibility: hidden;
  will-change: transform;
}
.cf-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(20, 20, 20, var(--cf-shade, 0)); /* 중앙에서 멀수록 어둡게 */
  pointer-events: none;
}
.cf-card:not(.is-active) { cursor: pointer; }
.cf-link { position: relative; display: block; width: 100%; height: 100%; }
.cf-link:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.cf-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cf-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(20, 20, 20, 0.7);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}
.cf-bar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  max-width: 760px;
  margin: 12px auto 0;
  padding-inline: var(--gutter);
}
.cf-caption { min-height: 84px; display: grid; align-content: center; }
.cf-counter {
  margin-top: 10px;
  text-align: center;
  font: 400 14px/1 var(--font-display);
  letter-spacing: 0.1em;
  color: var(--muted);
}

/* ---------- CardFanCarousel ---------- */

.fan { --fan-w: clamp(150px, 14vw, 200px); }
.fan-stage {
  position: relative;
  height: calc(var(--fan-w) * 16 / 9 + 110px); /* 9:16 카드 + 들어올림·곡선 여유 */
}
.fan-card {
  position: absolute;
  left: 50%;
  top: 34px;
  width: var(--fan-w);
  aspect-ratio: 9 / 16;
  border: 3px solid var(--paper);
  border-radius: 12px;
  overflow: hidden;
  background: #222;
  box-shadow: 0 18px 40px -16px rgba(20, 20, 20, 0.55);
  will-change: transform;
}
.fan-card.is-hidden { pointer-events: none; }
.fan-card:not(.is-active) { cursor: pointer; }
.fan-link { position: relative; display: block; width: 100%; height: 100%; }
.fan-link:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.fan-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fan-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(20, 20, 20, 0.7);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.fan-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 48px;
  height: 48px;
  margin: -24px 0 0 -24px;
  border-radius: 50%;
  background: rgba(255, 79, 31, 0.92);
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.fan-play::after {
  content: "";
  position: absolute;
  left: 19px;
  top: 15px;
  border-left: 14px solid #fff;
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
}
.fan-card.is-active .fan-play,
.fan-card:hover .fan-play { opacity: 1; transform: scale(1); }
.fan-bar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  max-width: 640px;
  margin: 8px auto 0;
}
.fan-caption { min-height: 84px; display: grid; align-content: center; }

/* ---------- FeatureCarousel ---------- */

.fc {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
}
.fc-list { position: relative; display: grid; gap: 4px; }
.fc-indicator {
  position: absolute;
  left: 0;
  top: 0;
  border-radius: 6px;
  background: var(--ink);
  pointer-events: none;
}
.fc-tab {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 16px;
  min-height: 72px;
  padding: 14px 18px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: color 0.35s ease, background 0.2s ease;
}
.fc-tab:hover:not(.is-active) { background: rgba(20, 20, 20, 0.05); }
.fc-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.fc-tab.is-active { color: var(--on-dark); }
.fc-tab-cat { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); }
.fc-tab-date { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; transition: color 0.35s ease; }
.fc-tab.is-active .fc-tab-date { color: var(--on-dark-muted); }
.fc-tab-title {
  grid-column: 1 / -1;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.fc-panel { min-width: 0; }
.fc-media {
  position: relative;
  aspect-ratio: 16 / 10; /* 전환 중에도 높이 고정 */
  overflow: hidden;
  border-radius: 6px;
  background: var(--paper-2);
  touch-action: pan-y;
  user-select: none;
}
.fc-slide { position: absolute; inset: 0; }
.fc-media-link { display: block; width: 100%; height: 100%; }
.fc-media-link:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.fc-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fc-text { padding-top: 22px; }
.fc-copy { display: grid; gap: 8px; justify-items: start; }
.fc-meta { font-size: 13px; color: var(--muted); }
.fc-title {
  font-size: clamp(19px, 1.8vw, 22px);
  font-weight: 800;
  line-height: 1.4;
  letter-spacing: -0.02em;
  min-height: 2.8em; /* 두 줄 자리 확보 → 글이 바뀌어도 높이 유지 */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.fc-desc {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
  min-height: 4.95em;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- 반응형 ---------- */

@media (max-width: 860px) {
  .fc { grid-template-columns: 1fr; }
  .fc-list {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    padding-bottom: 6px;
    margin-inline: calc(var(--gutter) * -1);
    padding-inline: var(--gutter);
    scrollbar-width: thin;
  }
  .fc-tab { flex: 0 0 min(260px, 72vw); min-height: 88px; scroll-snap-align: start; }
}

@media (max-width: 760px) {
  .cf { --cf-w: 64vw; }
  .cf-bar { gap: 12px; }
  .fan { --fan-w: 38vw; }
  .fan-bar { gap: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .fan-play { transition: opacity 0.15s ease; transform: none; }
}
