/* Page: Single Post (content-single.php / .ts-single) ------------------- */

.ts-single {
  max-width: var(--container-narrow);
  margin: var(--space-5) auto;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--space-7) var(--space-7);
}

.ts-entry-title { font-size: var(--fs-3xl); font-weight: var(--fw-black); line-height: 1.32; margin: 0 0 var(--space-2); }
.ts-entry-meta { color: var(--color-text-soft); font-size: var(--fs-sm); margin-bottom: var(--space-5); }
.ts-entry-meta span { margin-right: var(--space-2); }

/* 대표 이미지: 카드 좌우 패딩을 상쇄해 끝에서 끝까지(풀블리드) + 라운드 제거 */
.ts-post-thumbnail {
  margin: var(--space-5) calc(-1 * var(--space-7));
  border-radius: 0;
  overflow: hidden;
}
.ts-post-thumbnail img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 0; display: block; }

/* 본문 타이포 */
.ts-entry-content { font-size: var(--fs-base); line-height: var(--lh-base); }
.ts-entry-content > * + * { margin-top: var(--space-4); }
/* 첨부 사진: 비율 축소가 아니라 상하를 잘라(object-fit:cover) 모두 동일 높이 */
.ts-entry-content img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: var(--radius-md);
  display: block;
}
.ts-entry-content a { text-decoration: underline; text-underline-offset: 2px; }

/* H2: 하단 구분선만 (번호 없음) */
.ts-entry-content { counter-reset: h3; }
.ts-entry-content h2 {
  counter-reset: h3;
  font-size: var(--fs-xl);
  margin-top: var(--space-7);
  padding-bottom: var(--space-2);
  border-bottom: 2px solid var(--color-border);
}

/* H3: 동그라미 번호 */
.ts-entry-content h3 {
  counter-increment: h3;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--fs-lg);
  margin-top: var(--space-5);
}
.ts-entry-content h3::before {
  content: counter(h3);
  flex: 0 0 auto;
  width: 1.7em; height: 1.7em;
  border-radius: var(--radius-pill);
  border: 2px solid var(--color-primary);
  color: var(--color-primary);
  font-size: 0.8em;
  display: inline-flex; align-items: center; justify-content: center;
}

.ts-entry-tags { margin-top: var(--space-6); font-size: var(--fs-sm); }
.ts-entry-tags span { color: var(--color-primary); }

@media (max-width: 600px) {
  /* 모바일: 좁은 화면에서 바깥 라운드 카드를 없애고 흰 배경으로 — 본문 폭 확보 */
  .ts-single {
    margin: 0;
    padding: var(--space-4) var(--space-5) var(--space-6);
    background: var(--color-surface);
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
  /* 대표 이미지: 모바일 본문 좌우 패딩(space-5) 상쇄해 화면 끝까지 */
  .ts-post-thumbnail {
    margin-left: calc(-1 * var(--space-5));
    margin-right: calc(-1 * var(--space-5));
  }
  .ts-entry-title { font-size: var(--fs-2xl); }
  .ts-entry-content h2 { font-size: var(--fs-lg); }
}
