/**
 * UM 프로필 — Figma: 헤더(아바타·사용자명·생년월일) + (h1 + 사주 카드) + 「정보 수정」
 * 톱니 숨김: body.saju-um-own-profile (hyegwang-um-style)
 */

/* WP 블록 그룹(constrained) 안에서도 UM이 가로 전체 쓰도록 */
.wp-block-group.has-global-padding.is-layout-constrained .um.um-profile.um-viewing,
.wp-block-group.is-layout-constrained .um.um-profile.um-viewing {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
}

/* UM 메타 안: 블록 그룹 + h1 + 사주 카드 (에디터 블록과 동일 클래스) */
.um.um-profile.um-viewing .um-profile-meta .saju-profile-figma-block-group {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
}

/* 카드·대운/세운이 부모보다 넓어지지 않게 — 가로 스크롤은 extras__scroll 안에서만 */
.um.um-profile.um-viewing .um-profile-meta .saju-profile-figma-block-group > div {
	min-width: 0;
	max-width: 100%;
	box-sizing: border-box;
}

.um.um-profile.um-viewing .saju-profile-figma-h1,
.um.um-profile.um-viewing .saju-profile-figma-h1.wp-block-heading,
.um.um-profile.um-viewing .saju-profile-figma-header-stack__text .saju-profile-figma-h1 {
	margin: 0;
	padding: 0;
	width: 100%;
	box-sizing: border-box;
	font-size: 1.25rem;
	font-weight: 600;
	line-height: 1.3;
	letter-spacing: -0.02em;
	color: #000000;
	text-align: right !important;
	align-self: stretch;
}

/* ---- 헤더 카드: 1행 = [.saju-profile-figma-header-stack: 아바타 | h1+부제] / 2행 = 사주 테이블 ----
 * JS로 .saju-profile-figma-header-stack 생성(아바타·h1·부제 묶음)
 * display:contents 로 메타·블록 그룹 자식을 그리드에 평탄화
 */
.um.um-profile.um-viewing .um-header {
	--saju-header-avatar: 4.5rem;

	position: relative;
	display: grid;
	grid-template-columns: 1fr;
	grid-template-rows: auto auto auto auto;
	column-gap: 1rem;
	row-gap: 1rem;
	align-items: start;
	background: #ffffff;
	color: #000000;
	border-bottom: none !important;
	border-radius: 12px;
	padding: 1.25rem 1rem 1rem;
	margin-bottom: 0;
	box-sizing: border-box;
	min-width: 0;
}

/* 본인 전용 상단 링크(생년월일 정보 입력) 있을 때 행 하나 추가 */
.um.um-profile.um-viewing .um-header:has(.saju-profile-figma-account-head) {
	grid-template-rows: auto auto auto auto auto;
}

.um.um-profile.um-viewing .um-header::after {
	display: none !important;
	content: none !important;
}

/* no-cover: 헤더 박스는 좌우 패딩 없음 — 예전 헤더 1rem 은 스택에만 */
.um.um-profile.um-viewing .um-header.no-cover {
	margin-left: auto;
	margin-right: auto;
	max-width: 100%;
	padding-left: 0;
	padding-right: 0;
	/* 테마 body 배경과 맞춤 — 사주 카드(.saju-profile-pillars--figma)는 아래에서 흰 카드 유지 */
	background: var(--bg, #f6f4f1) !important;
}

/* no-cover 안 사주 카드만(부모 헤더는 페이지 배경색) */
.um.um-profile.um-viewing .um-header.no-cover .saju-profile-pillars.saju-profile-pillars--figma {
	background: var(--saju-bg, #f7f7f6);
}

.um.um-profile.um-viewing .um-header.no-cover .saju-profile-figma-header-stack {
	justify-content: space-between;
	padding-left: 1rem;
	padding-right: 1rem;
	box-sizing: border-box;
}

.um.um-profile.um-viewing .um-header.no-cover .saju-profile-figma-header-stack__text {
	flex: 1 1 auto;
	align-items: flex-end;
	text-align: right;
}

.um.um-profile.um-viewing .um-header.no-cover .saju-profile-figma-h1,
.um.um-profile.um-viewing .um-header.no-cover .saju-profile-figma-subtitle {
	text-align: right !important;
}

.um.um-profile.um-viewing .um-header.no-cover .um-main-meta {
	text-align: right;
}

.um.um-profile.um-viewing .um-header.no-cover .um-profile-status {
	text-align: center;
}

/* 평탄화: 그리드 아이템은 .um-header의 직접 자식처럼 배치 */
.um.um-profile.um-viewing .um-header .um-profile-meta,
.um.um-profile.um-viewing .um-header .um-profile-meta .saju-profile-figma-block-group {
	display: contents;
}

/* 1번 컨테이너: 좌(2) 아바타 | 우(3) h1+부제 세로 */
.um.um-profile.um-viewing .um-header .saju-profile-figma-header-stack {
	grid-column: 1 / -1;
	grid-row: 1;
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: flex-start;
	gap: 1rem;
	width: 100%;
	min-width: 0;
	box-sizing: border-box;
}

.um.um-profile.um-viewing .um-header .saju-profile-figma-header-stack__avatar {
	flex: 0 0 auto;
	min-width: 0;
}

.um.um-profile.um-viewing .um-header .saju-profile-figma-header-stack__text {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	justify-content: center;
	gap: 0.25rem;
	text-align: right;
}

.um.um-profile.um-viewing .um-header .saju-profile-pillars.saju-profile-pillars--figma {
	grid-column: 1 / -1;
	grid-row: 2;
	width: 100%;
	max-width: 100%;
}

.um.um-profile.um-viewing .um-header:has(.saju-profile-figma-account-head) .saju-profile-figma-account-head {
	grid-column: 1 / -1;
	grid-row: 1;
	margin: 0 0 0.25rem;
	padding: 0 1rem 0.75rem;
	border-bottom: 1px solid #e5e5e5;
	text-align: center;
	box-sizing: border-box;
}

.um.um-profile.um-viewing .um-header:has(.saju-profile-figma-account-head) .saju-profile-figma-header-stack {
	grid-row: 2;
}

.um.um-profile.um-viewing .um-header:has(.saju-profile-figma-account-head) .saju-profile-pillars.saju-profile-pillars--figma {
	grid-row: 3;
}

.um.um-profile.um-viewing .um-header .um-main-meta {
	grid-column: 1 / -1;
	grid-row: 3;
	padding-top: 0;
	text-align: right;
}

.um.um-profile.um-viewing .um-header:has(.saju-profile-figma-account-head) .um-main-meta {
	grid-row: 4;
}

/* no-cover UM 기본 무력화 → 스택 안 아바타 크기 */
.um.um-profile.um-viewing .um-header.no-cover .saju-profile-figma-header-stack .um-profile-photo,
.um.um-profile.um-viewing .um-header.no-cover .um-profile-photo {
	float: none !important;
	margin: 0 !important;
	text-align: left !important;
	width: var(--saju-header-avatar) !important;
	min-width: var(--saju-header-avatar);
	max-width: var(--saju-header-avatar);
	height: var(--saju-header-avatar);
	box-sizing: border-box;
	position: relative;
}

.um.um-profile.um-viewing .um-header.no-cover .saju-profile-figma-header-stack a.um-profile-photo-img,
.um.um-profile.um-viewing .um-header.no-cover a.um-profile-photo-img {
	position: relative !important;
	float: none !important;
	display: block !important;
	left: auto !important;
	top: auto !important;
	width: 100% !important;
	height: 100% !important;
	border-radius: 50%;
	border: 2px solid rgba(0, 0, 0, 0.12) !important;
	overflow: hidden;
	text-align: left !important;
	box-sizing: border-box;
}

.um.um-profile.um-viewing .um-header.no-cover .saju-profile-figma-header-stack a.um-profile-photo-img img,
.um.um-profile.um-viewing .um-header.no-cover a.um-profile-photo-img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* UM 폼 인라인 스타일(사진 190px·메타 padding-left 등) 무력화 */
.um.um-profile.um-viewing .um-header .um-profile-meta {
	padding-left: 0 !important;
	padding-right: 0 !important;
}

.um.um-profile.um-viewing .um-header.no-cover .saju-profile-figma-header-stack a.um-profile-photo-img,
.um.um-profile.um-viewing .um-header.no-cover a.um-profile-photo-img {
	width: 100% !important;
	height: 100% !important;
	top: auto !important;
}

.um.um-profile.um-viewing .um-header .um-name {
	float: none !important;
	margin-right: 0 !important;
	width: 100%;
	text-align: right;
}

/* Figma 스택 사용 시 UM 기본 이름(성+전체 표시) 숨김 — h1은 이름만 */
.um.um-profile.um-viewing .um-header[data-saju-figma-stack='1'] .um-main-meta .um-name {
	display: none !important;
}

.um.um-profile.um-viewing .um-header .um-name a {
	font-size: 1.5rem;
	font-weight: 600;
	letter-spacing: -0.02em;
	color: #000000 !important;
}

.um.um-profile.um-viewing .um-header .saju-profile-figma-subtitle {
	margin: 0.25rem 0 0;
	padding: 0;
	font-size: 0.875rem;
	line-height: 1.45;
	font-weight: 400;
	color: #000000;
	opacity: 0.9;
	text-align: right;
}

/* UM float 클리어용 빈 div — flex 레이아웃에서는 불필요 */
.um.um-profile.um-viewing .um-header .um-main-meta .um-clear {
	display: none !important;
	height: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
	overflow: hidden;
}

.um.um-profile.um-viewing .um-header .um-profile-status {
	grid-column: 1 / -1;
	grid-row: 4;
	margin-top: 0;
	color: #525252;
	font-size: 0.8125rem;
}

.um.um-profile.um-viewing .um-header:has(.saju-profile-figma-account-head) .um-profile-status {
	grid-row: 5;
}

.um.um-profile.um-viewing .um-header .um-profile-status span {
	color: inherit;
}

/* JS 전·비활성: 스택 없을 때 기존 2열 그리드(아바타 | h1·부제) */
.um.um-profile.um-viewing .um-header:not([data-saju-figma-stack]) {
	grid-template-columns: auto 1fr;
	grid-template-rows: auto auto auto auto auto;
}

.um.um-profile.um-viewing .um-header:not([data-saju-figma-stack]) > .um-profile-photo {
	grid-column: 1;
	grid-row: 1;
}

.um.um-profile.um-viewing .um-header:not([data-saju-figma-stack]) .saju-profile-figma-h1 {
	grid-column: 2;
	grid-row: 1;
}

.um.um-profile.um-viewing .um-header:not([data-saju-figma-stack]) .saju-profile-figma-block-group .saju-profile-figma-subtitle {
	grid-column: 2;
	grid-row: 2;
	align-self: start;
}

.um.um-profile.um-viewing .um-header:not([data-saju-figma-stack]) .saju-profile-pillars.saju-profile-pillars--figma {
	grid-row: 3;
}

.um.um-profile.um-viewing .um-header:not([data-saju-figma-stack]) .um-main-meta {
	grid-row: 4;
}

.um.um-profile.um-viewing .um-header:not([data-saju-figma-stack]) .um-profile-status {
	grid-row: 5;
}

/* JS 스택 없을 때도 상단 링크가 있으면 행 밀기 */
.um.um-profile.um-viewing .um-header:not([data-saju-figma-stack]):has(.saju-profile-figma-account-head) {
	grid-template-rows: auto auto auto auto auto auto;
}

.um.um-profile.um-viewing .um-header:not([data-saju-figma-stack]):has(.saju-profile-figma-account-head) .saju-profile-figma-account-head {
	grid-column: 1 / -1;
	grid-row: 1;
	margin: 0 0 0.25rem;
	padding: 0 1rem 0.75rem;
	border-bottom: 1px solid #e5e5e5;
	text-align: center;
	box-sizing: border-box;
}

.um.um-profile.um-viewing .um-header:not([data-saju-figma-stack]):has(.saju-profile-figma-account-head) > .um-profile-photo {
	grid-row: 2;
}

.um.um-profile.um-viewing .um-header:not([data-saju-figma-stack]):has(.saju-profile-figma-account-head) .saju-profile-figma-h1 {
	grid-row: 2;
}

.um.um-profile.um-viewing .um-header:not([data-saju-figma-stack]):has(.saju-profile-figma-account-head) .saju-profile-figma-block-group .saju-profile-figma-subtitle {
	grid-row: 3;
}

.um.um-profile.um-viewing .um-header:not([data-saju-figma-stack]):has(.saju-profile-figma-account-head) .saju-profile-pillars.saju-profile-pillars--figma {
	grid-row: 4;
}

.um.um-profile.um-viewing .um-header:not([data-saju-figma-stack]):has(.saju-profile-figma-account-head) .um-main-meta {
	grid-row: 5;
}

.um.um-profile.um-viewing .um-header:not([data-saju-figma-stack]):has(.saju-profile-figma-account-head) .um-profile-status {
	grid-row: 6;
}

.um.um-profile.um-viewing .um-profile-meta .saju-profile-figma-block-group .saju-profile-pillars--figma {
	margin-top: 0;
}

/* 카드 하단: 톱니 메뉴 대신 「정보 수정」 */
.saju-profile-pillars--figma:has(.saju-profile-figma-account-foot) {
	padding-bottom: 0;
}

.saju-profile-figma-account-foot {
	margin: 1.25rem -1rem 0;
	padding: 1rem 1rem 1.25rem;
	border-top: 1px solid #e5e5e5;
	text-align: center;
	box-sizing: border-box;
}

.saju-profile-figma-account-foot__link {
	display: inline-block;
	font-size: 0.875rem;
	font-weight: 500;
	color: #525252 !important;
	text-decoration: none !important;
	letter-spacing: -0.01em;
	transition: color 0.15s ease;
}

.saju-profile-figma-account-foot__link:hover,
.saju-profile-figma-account-foot__link:focus {
	color: #000000 !important;
}

.saju-profile-pillars--figma {
	min-width: 0;
	max-width: 100%;
	/* 순흰에 가까운 옅은 톤 — 오행 칸은 기존처럼 색 유지 */
	--saju-surface: #f7f7f6;
	--saju-bg: var(--saju-surface);
	--saju-card: var(--saju-surface);
	/* 오행 색 없는 한자 칸·스트립 등 나머지 칸 */
	--saju-stem-head: var(--saju-surface);
	--saju-branch-head: var(--saju-surface);
	--saju-strip: var(--saju-surface);
	--saju-hanja-on-stem: #000000;
	--saju-hanja-on-branch: #000000;
	--saju-meta-on-strip: #000000;
	--saju-label: #000000;
	--saju-title: #000000;
	--saju-hint: #525252;
	--saju-radius: 10px;
	--saju-col-min: 4.6875rem; /* 75px */
	--saju-head-h: 3.125rem; /* 50px */
	--saju-strip-h: 1.5625rem; /* 25px */
	/* 천간·지지 한자 크기 — 한글 음은 한자 바로 옆, 비율은 .saju-pillar-col__hanja-read */
	--saju-hanja-font-size: 2.25rem;
	/* 대운·세운 열: 최소 너비(기존 50px 고정과 동일), 여유 시 표가 가로로 채워짐 */
	--saju-daeun-col-min: 50px;
	/* 열 사이 가로 간격(border-spacing) — 줄어들지 않도록 고정 */
	--saju-daeun-col-gap: 5px;

	clear: both;
	margin: 0;
	padding: 1.25rem 1rem 1.5rem;
	max-width: 100%;
	background: var(--saju-bg);
	border-radius: 12px;
	border: 1px solid #e5e5e5;
	box-sizing: border-box;
	font-family: "Noto Sans KR", "Apple SD Gothic Neo", system-ui, sans-serif;
}

.saju-profile-pillars--figma .saju-profile-pillars__err {
	margin: 0 0 1rem;
	font-size: 0.8125rem;
	line-height: 1.5;
	color: #fca5a5;
}

.saju-profile-pillars__scroll {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	padding-bottom: 0.5rem;
}

/* Figma 사주 블록 내 가로 스크롤바: 얇게(2px) + 모서리 둥글게 */
.saju-profile-pillars--figma .saju-profile-pillars__scroll {
	scrollbar-width: thin;
	scrollbar-color: rgba(45, 41, 38, 0.35) rgba(45, 41, 38, 0.08);
}

.saju-profile-pillars--figma .saju-profile-pillars__scroll::-webkit-scrollbar {
	height: 2px;
}

.saju-profile-pillars--figma .saju-profile-pillars__scroll::-webkit-scrollbar-track {
	background: rgba(45, 41, 38, 0.08);
	border-radius: 2px;
}

.saju-profile-pillars--figma .saju-profile-pillars__scroll::-webkit-scrollbar-thumb {
	background: rgba(45, 41, 38, 0.35);
	border-radius: 2px;
}

.saju-profile-pillars--figma .saju-profile-pillars__scroll::-webkit-scrollbar-thumb:hover {
	background: rgba(45, 41, 38, 0.5);
}

/* 4열 + 시·일·월·연 라벨 행 */
.saju-pillar-grid {
	min-width: min(100%, 22rem);
	margin: 0 auto;
}

.saju-pillar-grid__labels {
	display: grid;
	grid-template-columns: repeat(4, minmax(var(--saju-col-min), 1fr));
	gap: 5px;
	margin-bottom: 0.5rem;
	text-align: center;
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--saju-label);
	letter-spacing: 0.02em;
}

.saju-pillar-grid__label {
	display: block;
}

.saju-pillar-grid__cols {
	display: grid;
	grid-template-columns: repeat(4, minmax(var(--saju-col-min), 1fr));
	gap: 5px;
	align-items: start;
}

.saju-pillar-col {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	min-width: 0;
}

/* 천간 / 지지 한자 영역 — 바깥: 상하 패딩 + 세로 중앙 / 안쪽: 한자+한글 가로·아래 정렬 유지 */
.saju-pillar-col__hanja-wrap {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: stretch;
	width: 100%;
	font-size: var(--saju-hanja-font-size);
	min-height: var(--saju-head-h);
	box-sizing: border-box;
	padding: 0.28rem 0.35rem;
	border-radius: 10px;
	overflow: visible;
}

.saju-pillar-col__hanja-inner {
	display: flex;
	flex-direction: row;
	flex-wrap: nowrap;
	align-items: flex-end;
	justify-content: center;
	gap: 0.12em;
	width: 100%;
}

.saju-pillar-col__hanja-wrap--stem {
	background: var(--saju-stem-head);
}

.saju-pillar-col__hanja-wrap--branch {
	background: var(--saju-branch-head);
}

/* 오행별 한자 칸 배경: 갑을·인묘(목), 병정·사오(화), 무기·축진미술(토), 경신·신유(금), 임계·자해(수) */
.saju-profile-pillars--figma .saju-pillar-col__hanja-wrap[data-saju-wx="wood"] {
	background: #8cbeb2 !important;
}

.saju-profile-pillars--figma .saju-pillar-col__hanja-wrap[data-saju-wx="fire"] {
	background: #f06060 !important;
}

.saju-profile-pillars--figma .saju-pillar-col__hanja-wrap[data-saju-wx="earth"] {
	background: #f3b562 !important;
}

.saju-profile-pillars--figma .saju-pillar-col__hanja-wrap[data-saju-wx="metal"] {
	background: #d9d9d9 !important;
}

.saju-profile-pillars--figma .saju-pillar-col__hanja-wrap[data-saju-wx="water"] {
	background: #404040 !important;
}

/* 진한 배경: 한자·지지 글자 밝게 */
.saju-profile-pillars--figma .saju-pillar-col__hanja-wrap[data-saju-wx="fire"] .saju-pillar-col__hanja,
.saju-profile-pillars--figma .saju-pillar-col__hanja-wrap[data-saju-wx="water"] .saju-pillar-col__hanja {
	color: #fafafa !important;
}

/* 한자(천간·지지 큰 글자): Noto Serif HK — 크기는 부모 .saju-pillar-col__hanja-wrap 의 1em (= --saju-hanja-font-size) */
.saju-pillar-col__hanja {
	font-family: "Noto Serif HK", "Noto Serif KR", "Noto Serif SC", serif;
	font-size: 1em;
	font-weight: 400;
	line-height: 1;
	color: var(--saju-hanja-on-stem);
}

/* 한자 바로 옆 한글 음(갑·자 …) — 한자(1em) 대비 약 0.3 */
.saju-pillar-col__hanja-read {
	flex: 0 0 auto;
	font-family: "Noto Sans KR", "Apple SD Gothic Neo", system-ui, sans-serif;
	font-size: 0.3em;
	font-weight: 600;
	line-height: 1;
	letter-spacing: 0;
	color: rgba(0, 0, 0, 0.52);
	pointer-events: none;
	white-space: nowrap;
}

.saju-profile-pillars--figma .saju-pillar-col__branch .saju-pillar-col__hanja-wrap--branch .saju-pillar-col__hanja-read {
	color: rgba(0, 0, 0, 0.45);
}

.saju-profile-pillars--figma .saju-pillar-col__hanja-wrap[data-saju-wx="fire"] .saju-pillar-col__hanja-read,
.saju-profile-pillars--figma .saju-pillar-col__hanja-wrap[data-saju-wx="water"] .saju-pillar-col__hanja-read {
	color: rgba(250, 250, 250, 0.88);
}

.saju-pillar-col__branch .saju-pillar-col__hanja-wrap--branch .saju-pillar-col__hanja {
	color: var(--saju-hanja-on-branch);
}

/* 메타 줄: 한 줄은 반드시 .saju-pillar-col__strip > .saju-pillar-col__strip-txt (strip 중첩 금지) */
.saju-pillar-col__strip {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: var(--saju-strip-h);
	background: var(--saju-strip);
	box-sizing: border-box;
	padding: 0 0.125rem;
	border-radius: 10px;
	overflow: hidden;
}

/* 양의 목·음의 토 다음 줄: 천간·지지 십성 */
.saju-profile-pillars--figma .saju-pillar-col__strip--sipseong .saju-pillar-col__strip-txt {
	font-weight: 500;
	letter-spacing: -0.02em;
}

.saju-pillar-col__strip > .saju-pillar-col__strip-txt {
	display: block;
	width: 100%;
}

.saju-pillar-col__strip-txt {
	font-size: 0.75rem; /* 12px */
	font-weight: 400;
	line-height: 1.25;
	color: var(--saju-meta-on-strip);
	text-align: center;
	word-break: keep-all;
	overflow-wrap: anywhere;
}

@media (max-width: 520px) {
	.um.um-profile.um-viewing .um-header {
		padding-right: 1rem;
		padding-left: 0.75rem;
		gap: 0 0.75rem;
		--saju-header-avatar: 3.75rem;
	}

	.um.um-profile.um-viewing .um-header .saju-profile-figma-header-stack {
		margin-bottom: 15px;
		padding-left: 10px;
		padding-right: 10px;
		box-sizing: border-box;
	}

	/* no-cover: 스택만 좌우 10px (헤더 박스는 패딩 없음) */
	.um.um-profile.um-viewing .um-header.no-cover .saju-profile-figma-header-stack {
		padding-left: 10px;
		padding-right: 10px;
	}

	.saju-profile-pillars--figma {
		padding: 1rem 0.75rem 1.25rem;
		margin-left: -0.25rem;
		margin-right: -0.25rem;
		/* 데스크톱 75px 열 → 모바일 50px 정사각형 간지 칸 */
		--saju-col-min: 50px;
		--saju-head-h: 50px;
		--saju-hanja-font-size: 1.875rem;
	}

	.saju-pillar-col__strip-txt {
		font-size: 0.6875rem;
	}

	.saju-profile-extras__scroll {
		margin-left: -0.25rem;
		margin-right: -0.25rem;
	}
}

/* ---- 대운·세운 (사주 표 아래) ---- */
.saju-profile-pillars--figma .saju-profile-extras {
	margin-top: 1.25rem;
	width: 100%;
	box-sizing: border-box;
	min-width: 0;
	max-width: 100%;
}

.saju-profile-extras__h3 {
	margin: 1rem 0 0.5rem;
	padding: 0;
	font-size: 1.0625rem;
	font-weight: 600;
	line-height: 1.3;
	letter-spacing: -0.02em;
	color: #000000;
}

.saju-profile-extras__h3:first-child {
	margin-top: 0;
}

/* 대운 블록: 제목·순역행·기운세 좌측 정렬 */
.saju-profile-extras__daeun-head {
	text-align: left;
}

.saju-profile-extras__daeun-head .saju-profile-extras__h3 {
	margin-top: 0;
	text-align: left;
}

.saju-profile-extras__daeun-head .saju-profile-extras__meta {
	text-align: left;
	margin-bottom: 0.5rem;
}

/* 대운 표 아래 → 세운 블록 상단 간격 */
.saju-profile-pillars--figma .saju-profile-extras > .saju-profile-extras__scroll + .saju-profile-extras__daeun-head {
	margin-top: 1.25rem;
}

.saju-profile-extras__meta {
	margin: 0 0 0.5rem;
	font-size: 0.75rem;
	line-height: 1.35;
	color: #666666;
}

.saju-profile-extras__note {
	margin: 0 0 0.5rem;
	font-size: 0.8125rem;
	line-height: 1.4;
	color: #666666;
}

/* 대운·세운: 가로만 스크롤 · 세로 스크롤바 없음(max-height 미지정이면 표 높이만큼 늘어나 잘리지 않음) */
.saju-profile-extras__scroll {
	width: 100%;
	max-width: 100%;
	min-width: 0;
	overflow-x: auto;
	overflow-y: hidden;
	-webkit-overflow-scrolling: touch;
	box-sizing: border-box;
	overscroll-behavior-x: contain;
	overscroll-behavior-y: none;
}

/* 대운·세운 가로 스크롤바 — pillars--figma 안에서만 동일 두께 */
.saju-profile-pillars--figma .saju-profile-extras__scroll {
	scrollbar-width: thin;
	scrollbar-color: rgba(45, 41, 38, 0.35) rgba(45, 41, 38, 0.08);
}

.saju-profile-pillars--figma .saju-profile-extras__scroll::-webkit-scrollbar {
	height: 2px;
}

.saju-profile-pillars--figma .saju-profile-extras__scroll::-webkit-scrollbar-track {
	background: rgba(45, 41, 38, 0.08);
	border-radius: 2px;
}

.saju-profile-pillars--figma .saju-profile-extras__scroll::-webkit-scrollbar-thumb {
	background: rgba(45, 41, 38, 0.35);
	border-radius: 2px;
}

.saju-profile-pillars--figma .saju-profile-extras__scroll::-webkit-scrollbar-thumb:hover {
	background: rgba(45, 41, 38, 0.5);
}

/*
 * 대운 표: 좌측 설명 열 없음 · 테두리 없음
 * table-layout: auto — 열별 min-width·border-spacing이 좁은 뷰에서도 유지(겹침 방지). 부모보다 넓으면 가로 스크롤.
 * 가로 간격: --saju-daeun-col-gap / 세로: 행마다 padding-top 5px
 */
.saju-profile-pillars--figma .saju-profile-daeun-table {
	width: 100%;
	min-width: max-content;
	table-layout: auto;
	border-collapse: separate;
	border-spacing: var(--saju-daeun-col-gap, 5px) 0;
	margin: 0;
	padding: 0;
	font-size: 0.75rem;
	line-height: 1.25;
	font-weight: 400;
	font-family: 'Noto Sans KR', 'Apple SD Gothic Neo', system-ui, sans-serif;
	color: var(--saju-meta-on-strip, #000000);
	background: transparent;
	border: none;
}

.saju-profile-pillars--figma .saju-profile-daeun-table th,
.saju-profile-pillars--figma .saju-profile-daeun-table td {
	border: none;
	box-shadow: none;
}

.saju-profile-pillars--figma .saju-profile-daeun-table .saju-daeun-data-td {
	width: auto;
	min-width: var(--saju-daeun-col-min, 50px);
	max-width: none;
	padding: 0;
	margin: 0;
	text-align: center;
	vertical-align: middle;
	word-break: keep-all;
	background: transparent;
	font-size: 0.75rem;
	font-weight: 400;
	line-height: 1.25;
	color: var(--saju-meta-on-strip, #000000);
	box-sizing: border-box;
	/* fixed 레이아웃 압축 시 겹침 방지 */
	overflow: visible;
}

/* 상단 스트립 십성과 동일 가중치 (대운 + 세운 매트릭스) */
.saju-profile-pillars--figma .saju-profile-daeun-table__row--gan-sip .saju-daeun-data-td,
.saju-profile-pillars--figma .saju-profile-daeun-table__row--ji-sip .saju-daeun-data-td,
.saju-profile-pillars--figma .saju-profile-sewoon-matrix__row--gan-sip .saju-daeun-data-td,
.saju-profile-pillars--figma .saju-profile-sewoon-matrix__row--ji-sip .saju-daeun-data-td {
	font-weight: 500;
	letter-spacing: -0.02em;
}

.saju-profile-pillars--figma .saju-profile-daeun-table .saju-daeun-ganji-td {
	min-width: var(--saju-daeun-col-min, 50px);
	padding: 0;
	vertical-align: middle;
	background: transparent;
}

/* 행 사이 세로 간격 5px — padding:0 다음에 두어 덮어씀 (간지 행 포함) */
.saju-profile-pillars--figma .saju-profile-daeun-table tbody tr:not(:first-child) > .saju-daeun-data-td {
	padding-top: 5px;
}

/* 기본 .saju-pillar-col { min-width:0 } 보다 구체적으로 — 간지 열이 압축되지 않게 */
.saju-profile-pillars--figma .saju-profile-daeun-table .saju-pillar-col.saju-pillar-col--daeun-gap {
	width: 100%;
	min-width: var(--saju-daeun-col-min, 50px);
	max-width: none;
	flex-shrink: 0;
	--saju-head-h: var(--saju-daeun-col-min, 50px);
	--saju-strip-h: 0;
	margin: 0 auto;
	box-sizing: border-box;
}

/* 대운 간지 행: 천간·지지 사이 시각 간격 (상단 사주 카드와 분리) */
.saju-profile-pillars--figma .saju-profile-daeun-table__row--ganji .saju-pillar-col--daeun-gap .saju-pillar-col__stem {
	margin-bottom: 3px;
}

.saju-profile-pillars--figma .saju-profile-daeun-table .saju-pillar-col--daeun-gap .saju-pillar-col__hanja-wrap {
	min-height: var(--saju-daeun-col-min, 50px);
	border-radius: var(--saju-radius, 10px);
	/* 상단 만세력과 동일 토큰 — 한글 음 비율 유지 */
	font-size: var(--saju-hanja-font-size);
}

.saju-profile-pillars--figma .saju-profile-daeun-table .saju-pillar-col--daeun-gap .saju-pillar-col__hanja {
	font-family: 'Noto Serif HK', 'Noto Serif KR', 'Noto Serif SC', serif;
	font-size: 1em;
	font-weight: 400;
	line-height: 1;
	color: var(--saju-hanja-on-stem, #000000);
}

.saju-profile-pillars--figma .saju-profile-daeun-table .saju-pillar-col--daeun-gap .saju-pillar-col__branch .saju-pillar-col__hanja-wrap--branch .saju-pillar-col__hanja {
	color: var(--saju-hanja-on-branch, #000000);
}

.saju-profile-pillars--figma .saju-profile-daeun-table .saju-pillar-col--daeun-gap .saju-pillar-col__hanja-wrap[data-saju-wx='fire'] .saju-pillar-col__hanja,
.saju-profile-pillars--figma .saju-profile-daeun-table .saju-pillar-col--daeun-gap .saju-pillar-col__hanja-wrap[data-saju-wx='water'] .saju-pillar-col__hanja {
	color: #fafafa !important;
}

/* 대운: 기준일 행 — 「기준」뱃지 + 숫자 레이아웃(열 배경 없음) */
.saju-profile-pillars--figma .saju-daeun-ref-cell {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.25rem;
	min-height: 100%;
	box-sizing: border-box;
}

.saju-profile-pillars--figma .saju-daeun-ref-cell__badge {
	margin-left: 0;
	margin-bottom: 0;
}

.saju-profile-pillars--figma .saju-daeun-ref-cell__main {
	font-weight: 500;
	line-height: 1.2;
}

/* 세운: 기준 연도 — 양력 행에 기준 뱃지(열 배경 없음) */
.saju-profile-pillars--figma .saju-sewoon-solar-cell {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.25rem;
	min-height: 100%;
	box-sizing: border-box;
}

.saju-profile-pillars--figma .saju-sewoon-solar-cell__badge {
	margin-left: 0;
	margin-bottom: 0;
}

.saju-profile-pillars--figma .saju-sewoon-solar-cell__year {
	font-weight: 500;
	line-height: 1.2;
}

.saju-profile-pillars--figma .saju-sewoon-age-line {
	display: inline-flex;
	align-items: baseline;
	justify-content: center;
	gap: 0.125rem;
	flex-wrap: nowrap;
	max-width: 100%;
}

.saju-profile-pillars--figma .saju-sewoon-age-line__man {
	font-size: 0.625rem;
	font-weight: 500;
	color: #666666;
	letter-spacing: -0.02em;
}

.saju-profile-extras__badge {
	display: inline-block;
	margin-left: 0.125rem;
	padding: 0 0.25rem;
	font-size: 0.625rem;
	font-weight: 600;
	line-height: 1.4;
	color: #1a56db;
	background: rgba(26, 86, 219, 0.1);
	border-radius: 4px;
	vertical-align: middle;
}
