/*
 * 테마사주 상세(2026-11-18 rn37-b). 배치는 리뉴얼 화면 Version 40 #v-detail(테마: 목차 줄 · 무료 칸 · 버튼 하나), 값은 기준표 이름만.
 * 위 표지 칸 크기는 상품 상세와 같은 기준표 값(--umsh-pd-*)을 쓴다.
 * 2026-11-24 사용자: 아래 큰 버튼을 뺐다. 목차 줄마다 오른쪽 작은 '보기'(공용 .umsh-chip-line.is-sm)로 연다.
 */
.th-page {
  margin: 0;
  background: var(--umsh-color-bg);
}

.th {
  width: min(100%, var(--umsh-page-width));
  min-height: 100svh;
  margin: 0 auto;
  padding: 0 0 env(safe-area-inset-bottom);
  background: var(--umsh-page-glow), var(--umsh-color-bg);
  color: var(--umsh-ink);
  font-family: var(--umsh-font-sans);
}

.th *,
.th *::before,
.th *::after {
  box-sizing: border-box;
}

/* 위: 흐린 바탕 + 가운데 세로 표지 */
.th-hero {
  position: relative;
  display: grid;
  place-items: center;
  height: var(--umsh-pd-hero-h);
  overflow: hidden;
  isolation: isolate;
}

.th-blur {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: var(--umsh-pd-blur);
  opacity: var(--umsh-disabled-opacity);
}

.th-cover {
  width: var(--umsh-pd-cover-w);
  aspect-ratio: var(--umsh-vault-cover-ratio);
  overflow: hidden;
  border-radius: var(--umsh-radius-3xl);
  box-shadow: var(--umsh-glass-edge);
}

.th-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.th-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--umsh-space-2);
  margin: 0;
  padding: var(--umsh-space-5) var(--umsh-space-gutter) 0;
  color: var(--umsh-ink-2);
  font: var(--umsh-font-caption-strong);
}

.th-title {
  margin: 0;
  padding: var(--umsh-space-2) var(--umsh-space-gutter) 0;
  font: var(--umsh-font-section);
  word-break: keep-all;
}

.th-body {
  display: grid;
  gap: var(--umsh-space-3);
  padding: var(--umsh-space-2) var(--umsh-space-gutter) 0;
}

.th-body[hidden],
.th-state[hidden] {
  display: none;
}

.th-lead {
  margin: 0;
  color: var(--umsh-ink-2);
  font: var(--umsh-font-body);
  word-break: keep-all;
}

.th-meta {
  margin: 0;
  color: var(--umsh-muted);
  font: var(--umsh-font-caption);
}

/* 2026-11-24 사용자: 상담자 한마디 카드 · 맨 아래 무료 칸 · 'AI 상담자가…' 줄을 걷고, 위에 상담자 소개 띠(공용 .umsh-minibar) 한 줄. */
.th-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--umsh-space-3);
  margin-top: var(--umsh-space-3);
}

.th-head h2 {
  margin: 0;
  font: var(--umsh-font-meta);
  color: var(--umsh-ink-2);
}

.th-head span {
  color: var(--umsh-muted);
  font: var(--umsh-font-caption-strong);
  white-space: nowrap;
}

/* 목차(시안 #dToc.thc .thrb): 제목 + 작은 설명(받음이면 보라) · 오른쪽 작은 '보기'(잠기면 자물쇠). 2026-11-24 번호 · 꺾쇠 뺌 */
.th-toc {
  margin: 0;
  padding: 0;
  border-top: var(--umsh-hairline) solid var(--umsh-line);
  list-style: none;
}

.th-row {
  border-bottom: var(--umsh-hairline) solid var(--umsh-line);
}

.th-row-btn {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--umsh-space-2);
  width: 100%;
  min-height: var(--umsh-th-row-h);
  padding: var(--umsh-space-3) 0;
  border: 0;
  background: none;
  color: var(--umsh-ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.th-row-btn:focus-visible {
  outline: var(--umsh-focus-ring);
  outline-offset: var(--umsh-focus-offset);
  border-radius: var(--umsh-radius-sm);
}

.th-row-text {
  display: grid;
  gap: var(--umsh-space-1);
  min-width: 0;
}

.th-row-text strong {
  font: var(--umsh-font-item);
  word-break: keep-all;
}

.th-row-text small {
  color: var(--umsh-muted);
  font: var(--umsh-font-caption);
  word-break: keep-all;
}

.th-row.is-got .th-row-text small {
  color: var(--umsh-accent-text);
  font: var(--umsh-font-caption-strong);
}

/* '보기'는 줄 버튼 안의 모양(누르는 칸은 줄 전체). 회색 글자 · 가는 테두리는 공용 칩 값 그대로 */
.th-row-view {
  pointer-events: none;
}

.th-lock {
  width: var(--umsh-space-4);
  height: var(--umsh-space-4);
  color: var(--umsh-muted);
}

.th-lock {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.th-state {
  margin: 0;
  color: var(--umsh-muted);
  font: var(--umsh-font-caption);
}

.th-state {
  margin: var(--umsh-space-2) var(--umsh-space-gutter) 0;
}

/* 목차 안내 시트(시안 sh-th): 위 작은 이름 · 설명 2~3줄 · 캐릭터 얼굴 + '월하가 대화방에서 풀어 줘요' · 버튼 둘 */
.th-sheet-kick {
  margin: calc(-1 * var(--umsh-space-2)) 0 var(--umsh-space-3);
  color: var(--umsh-sheet-muted);
  font: var(--umsh-font-caption-strong);
}

.th-sheet-notes {
  display: grid;
  gap: var(--umsh-space-1);
  margin: 0;
  padding: 0 0 0 var(--umsh-space-5);
  color: var(--umsh-sheet-ink);
  font: var(--umsh-font-body);
}

.th-sheet-who {
  display: flex;
  align-items: center;
  gap: var(--umsh-space-3);
  margin: var(--umsh-space-4) 0;
  padding: var(--umsh-space-3);
  border-radius: var(--umsh-radius-lg);
  background: var(--umsh-surface-2);
}

.th-sheet-who img {
  flex: none;
  width: var(--umsh-th-face);
  height: var(--umsh-th-face);
  border-radius: var(--umsh-radius-full);
  object-fit: cover;
}

.th-sheet-who p {
  display: grid;
  margin: 0;
}

.th-sheet-who small {
  color: var(--umsh-sheet-muted);
  font: var(--umsh-font-caption);
}

.th-sheet-who span {
  font: var(--umsh-font-item);
}

/* 2026-11-19 웹판: '이 테마는' 소개(서버가 채움) · 상담자 소개 · 읽을거리 링크 */
.th-about {
  display: grid;
  gap: var(--umsh-space-2);
  margin-top: var(--umsh-space-3);
}

.th-about[hidden] {
  display: none;
}

.th-about h2 {
  margin: 0;
  font: var(--umsh-font-meta);
  color: var(--umsh-ink-2);
}

.th-about p {
  margin: 0;
  color: var(--umsh-ink-2);
  font: var(--umsh-font-body);
  word-break: keep-all;
}

.th-about .th-about-more {
  color: var(--umsh-muted);
  font: var(--umsh-font-caption);
}

.th-about a {
  color: var(--umsh-accent-text);
}

/* 2026-11-20 윤곽: 그림이 칸 끝까지 닿아 안쪽 테두리가 덮이던 것 → 테두리를 그림 위에 한 번 더 */
.th-cover { position: relative; }
.th-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: var(--umsh-z-edge);
  border-radius: inherit;
  box-shadow: var(--umsh-glass-edge);
  pointer-events: none;
}

/* 2026-11-20 목차 내용 시트: 무엇을 보는지(작은 글) · 풀이 글 · 준비 중 안내 → '○○와/과 대화하기' */
.th-read {
  display: grid;
  gap: var(--umsh-space-2);
  margin: 0 0 var(--umsh-space-3);
  padding: var(--umsh-space-4);
  border-radius: var(--umsh-radius-card);
  background: var(--umsh-surface-2);
}

.th-read-sub {
  color: var(--umsh-accent-text);
  font: var(--umsh-font-caption-strong);
}

.th-read p {
  margin: 0;
  color: var(--umsh-sheet-ink);
  font: var(--umsh-font-body);
  word-break: keep-all;
}

.th-read-note {
  margin: 0 0 var(--umsh-space-3);
  color: var(--umsh-sheet-muted);
  font: var(--umsh-font-caption);
  text-align: center;
}

/* 2026-11-24 목차 시트의 흐린 답 자리(비회원 · 준비 중): 글 없는 줄 모양만 흐리게 — 가입하면 대화방에서 내 사주로 받는다. */
.th-read-blur {
  display: grid;
  gap: var(--umsh-space-2);
  filter: blur(3px);
  user-select: none;
}

.th-read-blur i {
  display: block;
  height: var(--umsh-space-3);
  border-radius: var(--umsh-radius-full);
  background: var(--umsh-line-2);
}

.th-read-blur i:nth-child(2) { width: 88%; }
.th-read-blur i:nth-child(3) { width: 64%; }
