@charset "UTF-8";
/* =============================================================================
   mypage.css  —  마이페이지 V2 전용 스타일
   -----------------------------------------------------------------------------
   ⚠ 규칙: 기존 사이트 스타일(styles.css, login.css 등)과 절대 겹치지 않도록
           이 파일의 모든 선택자는 반드시 `.mp-` prefix 로 시작한다.
           (전역 태그 선택자 / id 선택자 / 기존 클래스명 재사용 금지)
   ----------------------------------------------------------------------------
   여기에는 "공통 레이아웃 골격"만 정의돼 있다. (1200px 컨테이너 / 사이드바 /
   콘텐츠 / 모바일 햄버거 오프캔버스) 색상·타이포·카드 등 시안 디자인은
   아래 "페이지 콘텐츠" 영역에 직접 추가한다.
   ============================================================================= */

/* ----------------------------------------------------------------------------
   1. 공통 레이아웃 (사이드바 + 콘텐츠, 최대 1200px)
   ---------------------------------------------------------------------------- */
.mp-wrap {
	/* 고정 헤더 높이 보정용 기본값(깜빡임 최소화). 실제값은 sidebar.php 의
	   JS가 헤더 바닥을 측정해 정확히 덮어쓴다.
	   데스크탑 ≈ 상단바 50 + GNB(bt_menu_wrap) 50 = 100 / 모바일 65. */
	--mp-header-h: 100px;
	max-width: 1200px;
	margin: 0 auto;
	padding: calc(var(--mp-header-h) + 24px) 0px 80px;
	/* 콘텐츠 짧은 페이지에서도 화면을 채워 푸터가 위로 뜨지 않게 (푸터 높이는 가변이라 헤더만 차감) */
	min-height: calc(100vh - var(--mp-header-h));
	display: flex;
	align-items: flex-start;
	gap: 40px;
	box-sizing: border-box;
}

.mp-sidebar {
	flex: 0 0 200px;
	width: 200px;
	box-sizing: border-box;
	/* PC: 고정 헤더 아래에 sticky 고정 (모바일은 아래 media query에서 fixed 오프캔버스로 덮음) */
	position: sticky;
	top: calc(var(--mp-header-h) + 26px);
	align-self: flex-start;   /* flex 늘어남 방지 → 자기 높이만큼만, sticky 정상동작 */
	/* 사이드바가 화면보다 길 때 위/아래 잘림 방지: 뷰포트 높이로 제한 + 내부 스크롤 */
	max-height: calc(100vh - var(--mp-header-h) - 32px);
	overflow-y: auto;
	padding-left: 24px;
	padding-top: 16px;
}

.mp-content {
	flex: 1 1 auto;
	min-width: 0; /* flex 자식 overflow 방지 */
	box-sizing: border-box;
	margin-top: 16px;
	padding: 24px;
	padding-top: 0;
}

/* ----------------------------------------------------------------------------
   2. 사이드바 내비게이션 (시안 디자인은 직접 채워넣기)
   ---------------------------------------------------------------------------- */
.mp-nav {
	display: flex;
	flex-direction: column;
}

.mp-nav-item {
	display: block;
	padding: 14px 16px;
	text-decoration: none;
	color: inherit;
}

.mp-nav-item.is-active {
	font-weight: 700;
}

/* ----------------------------------------------------------------------------
   3. 모바일 햄버거 토글 / 오프캔버스 사이드바
       - 데스크탑: 토글 숨김, 사이드바 좌측 고정 컬럼
       - 모바일(<=1024px): 사이드바를 화면 밖으로 빼고 토글로 슬라이드 인
   ---------------------------------------------------------------------------- */
.mp-nav-toggle {
	display: none;
	align-items: center;
	gap: 6px;
	padding: 8px 14px;
	border: 1px solid currentColor;
	background: transparent;
	border-radius: 6px;
	cursor: pointer;
	font-size: 14px;
}

.mp-sidebar-dim {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, .4);
	z-index: 998;
}

/* 데스크탑 숨김(모바일은 아래 ≤1024 미디어쿼리에서 노출). ★ 반드시 미디어쿼리 "앞"에 둘 것
   — 뒤에 두면 같은 명시도에서 나중 규칙이 이겨 모바일에서도 숨겨짐(선택기 안 보임). */
.mp-msel, .mp-sheet, .mp-sheet-dim { display: none; }

@media (max-width: 1024px) {
	.mp-wrap {
		--mp-header-h: 65px; /* 모바일 헤더 높이 */
		display: block;
		padding: 0px;
		padding-top: calc(var(--mp-header-h) + 16px);
		padding-bottom: 80px;
	}

	/* 모바일: 사이드바·햄버거 완전 제거(헤더 슬라이드메뉴와 충돌 방지)
	   → 상단 페이지 선택기 + 바텀시트 메뉴로 대체 */
	.mp-sidebar { display: none; }
	.mp-nav-toggle { display: none; }
	.mp-msel { display: flex; margin: 0 24px 16px; }
	.mp-sheet { display: block; }
	.mp-sheet-dim { display: block; }
}

/* ----------------------------------------------------------------------------
   3-1. 모바일 페이지 선택기(탭 느낌) + 바텀시트 메뉴
        (데스크탑은 display:none, 위 ≤1024 미디어쿼리에서 노출)
   ---------------------------------------------------------------------------- */
.mp-msel {
	width: auto; align-items: center; justify-content: space-between; gap: 10px;
	margin-bottom: 16px; padding: 13px 16px;
	background: #fff; border: 1px solid var(--mp-line); border-radius: 12px;
	color: var(--mp-ink); font-size: 16px; font-weight: 700; cursor: pointer;
}
.mp-msel-cur { display: flex; align-items: center; gap: 10px; min-width: 0; }
.mp-msel-cur .mp-ico { color: var(--mp-purple); flex: 0 0 20px; }
.mp-msel-cur span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mp-msel-arrow { color: var(--mp-muted); font-size: 13px; transition: transform .2s ease; flex: 0 0 auto; }
.mp-msel.is-open .mp-msel-arrow { transform: rotate(180deg); }

.mp-sheet-dim {
	position: fixed; inset: 0; z-index: 1000;
	background: rgba(0,0,0,.42); opacity: 0; pointer-events: none; transition: opacity .25s ease;
}
.mp-sheet-dim.is-open { opacity: 1; pointer-events: auto; }

.mp-sheet {
	position: fixed; left: 0; right: 0; bottom: 0; z-index: 1001;
	background: #fff; border-radius: 18px 18px 0 0;
	padding: 8px 16px calc(16px + env(safe-area-inset-bottom, 0px));
	box-shadow: 0 -8px 30px rgba(0,0,0,.18);
	transform: translateY(100%); transition: transform .28s ease;
}
.mp-sheet.is-open { transform: translateY(0); }
/* 핸들: 드래그로 시트 내리기. touch-action:none → 드래그 중 페이지 스크롤 방지.
   얇은 막대지만 위/아래 여백까지 잡히도록 패딩으로 터치 영역 확대(배경은 가운데 막대만 보이게 clip). */
.mp-sheet-grab {
	height: 4px; border-radius: 2px; background: #dcdce6;
	width: 40px; margin: 0 auto; padding: 14px 0;
	background-clip: content-box; box-sizing: content-box;
	touch-action: none; cursor: grab;
}
.mp-sheet-grab:active { cursor: grabbing; }
.mp-sheet-title { font-size: 13px; font-weight: 700; color: var(--mp-muted); padding: 0 8px 8px; touch-action: none; }
.mp-sheet-nav { display: flex; flex-direction: column; }
.mp-sheet-item {
	display: flex; align-items: center; gap: 14px; padding: 15px 8px;
	color: var(--mp-ink); text-decoration: none; font-size: 16px; font-weight: 600; border-radius: 10px;
}
.mp-sheet-item:active { background: #f3f4f6; }
.mp-sheet-item .mp-ico { width: 20px; height: 20px; flex: 0 0 20px; color: #5c5a6e; }
.mp-sheet-item.is-active { color: var(--mp-purple); }
.mp-sheet-item.is-active .mp-ico { color: var(--mp-purple); }
.mp-sheet-check { margin-left: auto; color: var(--mp-purple); font-weight: 700; }

/* ----------------------------------------------------------------------------
   4. 디자인 토큰 + 공통 요소
   ---------------------------------------------------------------------------- */
.mp-wrap {
	--mp-page:    #fff;
	--mp-card:    #ffffff;
	--mp-line:    #ececf3;
	--mp-ink:     #2a2740;
	--mp-muted:   #9b99ab;
	--mp-navy:    #2b3147;   /* 진한 버튼/강조 */
	--mp-purple:  #2b3147;   /* (호환 유지) 강조 색 — 보라 제거하고 네이비로 통일 */
	--mp-soft:    #eef0f4;   /* 활성 pill / 프로모 / 소프트 배경 (무채색) */
	--mp-gold:    #d9a534;   /* 아이콘 포인트 */

	background: var(--mp-page);
	color: var(--mp-ink);
	font-size: 16px;
	line-height: 1.5;
}

.mp-content { display: flex; flex-direction: column; gap: 28px; padding: 24px; padding-top: 0; }

/* 스코프 리셋 — styles.css 의 bare 태그 전역(nav/main/ul 등)·기본값 영향 차단.
   (.mp-wrap 안에서만 적용되므로 사이트 다른 영역엔 영향 없음) */
.mp-wrap *, .mp-wrap *::before, .mp-wrap *::after { box-sizing: border-box; }
/* li 는 리셋에서 제외 — `.mp-wrap li`(0,1,1)가 `.mp-recent-item`/`.mp-book`/`.mp-stat`
   (0,1,0)보다 명시도가 높아 li 카드들의 padding 을 0으로 덮어쓰기 때문.
   불릿/들여쓰기는 ul·ol 의 list-style·padding 만 제거하면 충분. */
.mp-wrap ul, .mp-wrap ol { list-style: none; margin: 0; padding: 0; }
.mp-wrap button { font-family: inherit; }

.mp-card {
	background: var(--mp-card);
	border: 1px solid var(--mp-line);
	border-radius: 16px;
}

.mp-c-purple { color: var(--mp-purple); }

/* 버튼 */
.mp-btn {
	display: inline-flex; align-items: center; justify-content: center;
	gap: 4px;
	padding: 11px 18px;
	border-radius: 10px;
	font-size: 14px; font-weight: 600;
	text-decoration: none; cursor: pointer; border: 1px solid transparent;
	box-sizing: border-box; white-space: nowrap;
}
.mp-btn-sm    { padding: 8px 14px; font-size: 14px; border-radius: 8px; }
.mp-btn-block { width: 100%; }
.mp-btn-dark  { background: var(--mp-navy); color: #fff; }
.mp-btn-dark:hover  { background: #1f2536; }
.mp-btn-line  { background: #fff; color: var(--mp-ink); border-color: var(--mp-line); }
.mp-btn-line:hover  { border-color: #cfcde0; }

/* PDF 다운로드 + 정사각형 공유 버튼 한 줄 (gap 4px) */
.mp-btn-row { display: flex; gap: 4px; }
.mp-btn-row .mp-btn { flex: 1 1 auto; }
.mp-btn-icon {
	flex: 0 0 auto; align-self: stretch; aspect-ratio: 1; padding: 0;
	display: inline-flex; align-items: center; justify-content: center;
	border: 1px solid var(--mp-line); border-radius: 8px;
	background: #fff; color: var(--mp-ink); cursor: pointer;
}
.mp-btn-icon:hover { border-color: #cfcde0; background: #fafafc; }
.mp-btn-icon svg { width: 16px; height: 16px; }
.mp-share-label { display: none; }   /* 데스크탑: 아이콘만. 모바일에선 '공유하기' 텍스트 노출(≤640) */

/* 섹션 헤더 */
.mp-section-head {
	display: flex; align-items: center; justify-content: space-between;
	margin-bottom: 14px;
}
.mp-section-title { font-size: 18px; font-weight: 700; margin: 0; }
.mp-more { font-size: 14px; color: var(--mp-muted); text-decoration: none; }
.mp-more:hover { color: var(--mp-purple); }

/* ----------------------------------------------------------------------------
   5. 사이드바 (시안)
   ---------------------------------------------------------------------------- */
.mp-side-title { font-size: 22px; font-weight: 700; margin: 4px 0 22px; }

.mp-nav { gap: 4px; }
.mp-nav-item {
	display: flex; align-items: center; gap: 14px;
	padding: 14px 14px; border-radius: 10px;
	color: #5c5a6e; font-weight: 600; font-size: 15px;
}
.mp-nav-item:hover { background: #f3f4f6; }
.mp-nav-item.is-active { background: var(--mp-soft); color: var(--mp-purple); }
.mp-ico { width: 20px; height: 20px; flex: 0 0 20px; }

/* 구독 프로모 카드 */
.mp-promo {
	margin-top: 26px; padding: 20px 18px;
	background: var(--mp-soft); border-radius: 16px; text-align: center;
}
.mp-promo-title { display: block; font-size: 16px; font-weight: 700; }
.mp-promo-desc  { margin: 6px 0 0; font-size: 15px; word-break: keep-all; color: #7c7a90; }
.mp-promo-art {
	display: block;
	width: 140px; height: 140px;   /* 원본 300×300 정사각 */
	max-width: 100%;
	margin: 10px auto 16px;
	object-fit: contain;
}

/* 세로가 짧은 화면(노트북 등): 프로모 카드가 사이드바를 넘쳐 스크롤이 생기므로 숨김.
   높이(뷰포트 세로)만 기준 → aspect-ratio 대신 max-height 사용. 임계값은 필요시 조정. */
@media (max-height: 820px) {
	.mp-promo { display: none; }
}

/* ----------------------------------------------------------------------------
   6. Hero (인사)
   ---------------------------------------------------------------------------- */
.mp-hero {
	position: relative; overflow: hidden;
	background: linear-gradient(120deg, #f5f6f8 0%, #fdfdfe 55%);
	border: 1px solid var(--mp-line); border-radius: 18px;
	padding: 40px 36px; min-height: 150px;
}
.mp-hero-title { margin: 0; font-size: 26px; font-weight: 700; line-height: 1.35; }
.mp-hero-title b { color: var(--mp-purple); }
.mp-hero-sub { margin: 14px 0 0; color: #7c7a90; }
.mp-hero-art {            /* welcome_banner_01.png (700×360) — 우측에 높이 꽉 채워 배치 */
	position: absolute; right: 40px; top: 22%; height: 100%; width: auto;
	object-fit: contain; object-position: right center;
	pointer-events: none;   /* top:50% → 아래로 내려 바닥(그림자)이 hero overflow:hidden 으로 잘림 */
}

/* ----------------------------------------------------------------------------
   7. 요약 카드 (3분할)
   ---------------------------------------------------------------------------- */
.mp-summary {
	display: grid; grid-template-columns: 1fr 1fr 1.2fr;
	background: var(--mp-card); border: 1px solid var(--mp-line);
	border-radius: 16px; overflow: hidden;
}
.mp-summary-item {
	padding: 26px 28px; display: flex; flex-direction: column; gap: 8px;
	border-left: 1px solid var(--mp-line);
}
.mp-summary-item:first-child { border-left: 0; }
.mp-summary-label { color: var(--mp-muted); font-size: 14px; }
.mp-summary-num   { font-size: 26px; font-weight: 700; }
.mp-summary-num span { font-size: 15px; font-weight: 600; margin-left: 2px; }
.mp-summary-foot  { color: var(--mp-muted); font-size: 14px; }
.mp-summary-desc  { margin: 2px 0 14px; color: #7c7a90; font-size: 14px; }
.mp-summary-cta   { flex-direction: row; align-items: center; justify-content: space-between; }
.mp-summary-art {
	width: 76px; height: 76px; flex: 0 0 76px; border-radius: 14px;
	background: radial-gradient(circle at 50% 40%, #fff0cf 0, #f0c873 75%);
	display: flex; align-items: center; justify-content: center;
}
.mp-summary-art svg { width: 38px; height: 38px; }

/* ----------------------------------------------------------------------------
   8. 최근 본 운세 (카드 캐러셀)
   ---------------------------------------------------------------------------- */
.mp-carousel { position: relative; }
.mp-recent {
	display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px;
}
.mp-recent-item {
	background: var(--mp-card); border: 1px solid var(--mp-line);
	border-radius: 14px; padding: 18px 14px; text-align: center;
	display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.mp-recent-thumb {
	width: 84px; height: 84px; border-radius: 50%;
	background: linear-gradient(135deg, #eef0f4, #dcdfe6);
	margin-bottom: 4px;
}
/* 운세결과 썸네일 — 카테고리 아이콘 타일(1안): 네이비 배경 + 흰 아이콘 */
.mp-recent-thumb--ico {
	background: #274D85;
	display: flex; align-items: center; justify-content: center;
}
.mp-recent-thumb--ico img {
	width: 50%; height: 50%; object-fit: contain;
	filter: brightness(0) invert(1);	/* 컬러 SVG → 흰색 */
}
/* 운세결과 썸네일 — 실제 생성 이미지(2안: 미래 배우자 얼굴) */
.mp-recent-thumb--img {
	background: #dcdfe6; overflow: hidden;
}
.mp-recent-thumb--img img {
	width: 100%; height: 100%; object-fit: cover; display: block;
}
/* 운세결과 썸네일 — 제작중(배우자 생성 대기) */
.mp-recent-thumb--wip {
	background: linear-gradient(135deg, #eef0f4, #dcdfe6);
	display: flex; align-items: center; justify-content: center;
}
.mp-recent-thumb--wip span {
	font-size: 12px; font-weight: 700; color: #c07d1a;
	background: #fff3e0; border-radius: 999px; padding: 4px 10px;
}
/* 운세결과 썸네일 — 생성 실패(배우자) */
.mp-recent-thumb--fail {
	background: linear-gradient(135deg, #f7eef0, #e6dcde);
	display: flex; align-items: center; justify-content: center;
}
.mp-recent-thumb--fail span {
	font-size: 12px; font-weight: 700; color: #c0392b;
	background: #fdeaea; border-radius: 999px; padding: 4px 10px;
}
.mp-recent-name { font-size: 14px; font-weight: 700; }
.mp-recent-date { font-size: 14px; color: var(--mp-muted); }
.mp-recent-item .mp-btn { margin-top: 6px; }

.mp-arrow {
	position: absolute; top: 50%; transform: translateY(-50%);
	width: 34px; height: 34px; border-radius: 50%;
	background: #fff; border: 1px solid var(--mp-line);
	color: #8a889c; font-size: 18px; line-height: 1; cursor: pointer;
	box-shadow: 0 2px 8px rgba(0,0,0,.06); z-index: 2;
}
.mp-arrow-prev { left: -16px; }
.mp-arrow-next { right: -16px; }

/* ----------------------------------------------------------------------------
   9. 책 표지 (.mp-bookrow 에서 공용 사용)
   ---------------------------------------------------------------------------- */
/* 실제 PDF 표지 이미지(/img/pdf/coverN.png)를 <img class="mp-book-cover"> 로 사용
   운명한권=cover3 · 정통사주=cover1 · 신년운세=cover5 (A4 세로비율) */
.mp-book-cover {
	flex: 0 0 auto; width: 104px; aspect-ratio: 808 / 1142;  /* 원본 표지 비율 */
	border-radius: 8px; object-fit: cover; display: block; background: #f1f1f4;
	box-shadow: 0 4px 12px rgba(0,0,0,.18);
}

/* ----------------------------------------------------------------------------
   10. 운세 결과 보관함 (6 stat 카드)
   ---------------------------------------------------------------------------- */
.mp-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.mp-stat {
	background: var(--mp-card); border: 1px solid var(--mp-line);
	border-radius: 14px; padding: 20px 14px; text-align: center;
	display: flex; flex-direction: column; align-items: center; gap: 8px;
	text-decoration: none; color: inherit;   /* 카테고리 링크 카드 */
}
.mp-stat:hover { border-color: #cfcde0; background: #fafafc; }
.mp-stat-ico { color: var(--mp-gold); }
.mp-stat-ico svg { width: 30px; height: 30px; }
.mp-stat-ico img { width: 44px; height: 44px; }   /* 그리드 컬러 아이콘 */
.mp-stat-label { font-size: 14px; color: #5c5a6e; }
.mp-stat-num { font-size: 20px; font-weight: 700; color: var(--mp-purple); }
.mp-stat-num span { font-size: 14px; font-weight: 600; margin-left: 1px; }

/* ----------------------------------------------------------------------------
   11. 구독 현황 + 바로가기 (2단)
   ---------------------------------------------------------------------------- */
.mp-grid2 { display: grid; grid-template-columns: 1fr 1.3fr; gap: 20px; }
/* 두 칸 높이 맞춤(큰 쪽 기준): 그리드 셀은 stretch라 동일 높이 → 안의 카드가 그 높이를 채우게 */
.mp-grid2 > .mp-section { display: flex; flex-direction: column; }
.mp-grid2 > .mp-section > .mp-card { flex: 1 1 auto; }

.mp-substatus { padding: 24px; display: flex; align-items: center; justify-content: space-between; }
.mp-substatus-name { font-size: 17px; font-weight: 700; margin: 0; }
.mp-badge {
	display: inline-block; margin-left: 6px; padding: 2px 9px; border-radius: 999px;
	background: var(--mp-soft); color: var(--mp-purple); font-size: 11.5px; font-weight: 700;
	vertical-align: middle;
}
.mp-substatus-price { margin: 14px 0 2px; font-size: 14px; }
.mp-substatus-next  { margin: 0 0 14px; font-size: 14px; color: var(--mp-muted); }
.mp-substatus-art {
	width: 96px; height: 96px; flex: 0 0 96px;   /* promo_01 정사각 일러스트 */
	object-fit: contain;
}

.mp-shortcuts { padding: 24px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.mp-short {
	display: flex; flex-direction: column; align-items: center; gap: 9px;
	text-decoration: none; color: var(--mp-ink); font-size: 14px; font-weight: 600;
}
.mp-short-ico {
	width: 56px; height: 56px; border-radius: 14px;
	display: flex; align-items: center; justify-content: center;
	background: #f3f4f6; color: var(--mp-navy);
}
.mp-short-ico svg { width: 24px; height: 24px; }
.mp-short-ico img { width: 40px; height: 40px; }   /* main_grid_icoN.svg (컬러 일러스트) */
.mp-short:hover .mp-short-ico { background: var(--mp-soft); color: var(--mp-purple); }

/* ----------------------------------------------------------------------------
   12. 반응형
   ---------------------------------------------------------------------------- */
@media (max-width: 1024px) {
	.mp-recent { grid-template-columns: repeat(3, 1fr); }
	.mp-stats  { grid-template-columns: repeat(3, 1fr); }
	.mp-grid2  { grid-template-columns: 1fr; }
	.mp-arrow  { display: none; }
}
@media (max-width: 640px) {
	.mp-summary { grid-template-columns: 1fr; }
	.mp-summary-item { border-left: 0; border-top: 1px solid var(--mp-line); }
	.mp-summary-item:first-child { border-top: 0; }
	.mp-recent { grid-template-columns: repeat(2, 1fr); }
	.mp-shortcuts { grid-template-columns: repeat(3, 1fr); }
	.mp-hero-art { display: none; }
	.mp-hero { padding: 28px 22px; }
}

/* ============================================================================
   13. 서브페이지 공통 (페이지 헤더 / 탭 / 안내 / 빈상태)  — books·results 등 공용
   ============================================================================ */
.mp-page-head { display: flex; align-items: baseline; gap: 16px; margin-bottom: 6px; }
.mp-page-title { font-size: 32px; font-weight: 700; margin: 0; }
.mp-page-count { font-size: 18px; color: var(--mp-muted); }
.mp-page-count b { color: var(--mp-navy); }

.mp-notice {
	display: flex; align-items: center; gap: 6px;
	font-size: 16px; color: var(--mp-purple); 
}

.mp-tabs { display: flex; gap: 8px; flex-wrap: wrap;  }
.mp-tab {
	padding: 8px 16px 7px;
	border-radius: 999px;
	border: 1px solid var(--mp-line);
	background: #fff;
	color: #5c5a6e;
	font-size: 16px;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
}
.mp-tab:hover { border-color: #cfcde0; }
.mp-tab.is-active { background: var(--mp-navy); border-color: var(--mp-navy); color: #fff; }

.mp-empty {
	text-align: center; padding: 64px 20px; color: var(--mp-muted);
	background: var(--mp-card); border: 1px dashed #dcdce6; border-radius: 16px;
}
.mp-empty p { margin: 0 0 16px; font-size: 15px; }

/* ============================================================================
   14. 사주책 목록 (books) — 풀폭 행형 카드
   ============================================================================ */
.mp-bookrow-list { display: flex; flex-direction: column; gap: 16px; }

.mp-bookrow {
	display: flex; gap: 22px; padding: 22px;
	background: var(--mp-card); border: 1px solid var(--mp-line); border-radius: 16px;
}
.mp-bookrow.is-making { opacity: .85; }

/* 표지 (.mp-book-cover 재사용 + 사이즈만 조정 — 비율은 aspect-ratio 유지) */
.mp-bookrow .mp-book-cover { width: 128px; }

.mp-bookrow-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.mp-bookrow-head { display: flex; align-items: center; gap: 10px; }
.mp-bookrow-name { font-size: 24px; font-weight: 600; }
.mp-book-target { font-size: 17px; color: #5c5a6e; margin: 6px 0 2px; font-weight: 500; }
.mp-book-meta   { font-size: 15px; color: var(--mp-muted); }
.mp-book-meta .mp-dot { margin: 0 6px; color: #d6d6df; }

/* 상태 배지 */
.mp-status {
	padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 600;
}
.mp-status-done   { background: var(--mp-soft); color: var(--mp-navy); }
.mp-status-making { background: #fff3e0; color: #c07d1a; }
.mp-status-fail   { background: #fdeaea; color: #c0392b; }

/* 분석항목 태그 */
.mp-book-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.mp-book-chips span {
	font-size: 14px; color: #5c5a6e; background: #f5f5f8;
	border-radius: 6px; padding: 3px 9px;
	font-weight: 500;
}
.mp-book-chips .more { background: transparent; color: var(--mp-muted); }

/* 액션 영역 (우측) */
.mp-bookrow-side {
	flex: 0 0 168px; display: flex; flex-direction: column; gap: 8px;
	padding-left: 22px; border-left: 1px solid var(--mp-line); justify-content: center;
}
.mp-bookrow-side .mp-btn { width: 100%; min-width: 0px; }
.mp-btn.is-disabled { background: #f1f1f4; color: #b9b9c4; border-color: transparent; pointer-events: none; }
.mp-link-receipt { font-size: 14px; color: var(--mp-muted); text-align: center; text-decoration: underline; }
.mp-link-receipt:hover { color: var(--mp-navy); }

@media (max-width: 1024px) {
	.mp-bookrow { flex-wrap: wrap; }
	.mp-bookrow-side {
		flex-basis: 100%; flex-direction: row; padding-left: 0; border-left: 0;
		border-top: 1px solid var(--mp-line); padding-top: 16px; margin-top: 4px;
	}
	.mp-link-receipt { align-self: center; }
}
@media (max-width: 640px) {
	.mp-bookrow { gap: 16px; padding: 16px; }
	.mp-bookrow .mp-book-cover { width: 96px; }
	.mp-bookrow-side { flex-wrap: wrap; }

	/* PDF 다운로드 + 공유 = 2열(반반) 한 줄 */
	.mp-btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; flex-basis: 100%; width: 100%; }
	.mp-btn-row .mp-btn { width: 100%; }
	/* 공유 버튼: 정사각 아이콘 → 일반 버튼(아이콘 + '공유하기') */
	.mp-btn-icon {
		aspect-ratio: auto; width: 100%; height: auto;
		align-self: auto; gap: 6px; padding: 8px 14px;
		font-size: 14px; font-weight: 600;
	}
	.mp-share-label { display: inline; }
}

/* ============================================================================
   15. 결제 내역 (payments) — 테이블
   ============================================================================ */
.mp-table-wrap {
	background: var(--mp-card); border: 1px solid var(--mp-line);
	border-radius: 16px; overflow: hidden;
}
.mp-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.mp-table th {
	text-align: left; padding: 14px 18px;
	background: #f7f7fa; color: #7c7a90; font-weight: 600; font-size: 14px;
	border-bottom: 1px solid var(--mp-line); white-space: nowrap;
}
.mp-table td { padding: 16px 18px; border-bottom: 1px solid var(--mp-line); vertical-align: middle; }
.mp-table tbody tr:last-child td { border-bottom: 0; }
.mp-table tbody tr:hover { background: #fafafc; }
.mp-table .mp-col-amt { text-align: right; font-weight: 700; white-space: nowrap; }
.mp-table .mp-col-c   { text-align: center; white-space: nowrap; }

.mp-pay-prod { display: flex; align-items: center; gap: 10px; }
.mp-pay-dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 8px; background: var(--mp-navy); }
.mp-pay-dot.sub { background: var(--mp-gold); }
.mp-pay-name { font-weight: 600; }
.mp-pay-sub  { font-size: 14px; color: var(--mp-muted); }

.mp-pill {
	display: inline-block; padding: 2px 9px; border-radius: 999px;
	font-size: 11.5px; font-weight: 700; background: var(--mp-soft); color: var(--mp-navy);
}
.mp-pill-sub  { background: #fff3e0; color: #c07d1a; }       /* 정기결제 */
.mp-pill-paid { background: var(--mp-soft); color: var(--mp-navy); }
.mp-pill-refund { background: #fdeaea; color: #c0392b; }

@media (max-width: 768px) {
	/* 모바일: 테이블 → 카드뷰 (각 결제건이 카드 1장). 테이블 구조는 그대로, CSS로만 전환.
	   각 td 의 data-label("결제일/상품/금액/상태/영수증")을 라벨로 표시. */
	.mp-table-wrap { background: transparent; border: 0; border-radius: 0; overflow: visible; }
	.mp-table { font-size: 14px; }
	.mp-table thead { display: none; }                 /* 헤더행 숨김(라벨은 각 셀에) */
	.mp-table, .mp-table tbody, .mp-table tr, .mp-table td { display: block; width: 100%; }

	.mp-table tr {
		background: var(--mp-card); border: 1px solid var(--mp-line); border-radius: 14px;
		padding: 4px 16px; margin-bottom: 12px;
	}
	.mp-table tbody tr:hover { background: var(--mp-card); }   /* 카드에선 hover 배경 제거 */

	.mp-table td {
		display: flex; align-items: center; justify-content: space-between; gap: 12px;
		padding: 11px 0; border-bottom: 1px solid var(--mp-line);
		text-align: right; white-space: normal;
	}
	.mp-table tr td:last-child { border-bottom: 0; }
	.mp-table td::before {
		content: attr(data-label);
		flex: 0 0 auto; text-align: left;
		color: var(--mp-muted); font-weight: 600; font-size: 13px;
	}
	/* 데스크탑 th 기준 정렬값 무효화 → 카드에선 값 우측, 상품은 우측 정렬 */
	.mp-table .mp-col-amt, .mp-table .mp-col-c { text-align: right; }
	.mp-pay-prod { justify-content: flex-end; flex-wrap: wrap; }
}

/* ============================================================================
   16. 구독 관리 (subscription)
   ============================================================================ */
.mp-sub-card {
	background: var(--mp-card); border: 1px solid var(--mp-line);
	border-radius: 16px; padding: 28px;
}
.mp-sub-top {
	display: flex; align-items: flex-start; justify-content: space-between;
	gap: 16px; flex-wrap: wrap;
}
.mp-sub-name { font-size: 19px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.mp-sub-price { font-size: 18px; font-weight: 700; color: var(--mp-navy); white-space: nowrap; }
.mp-sub-price small { font-size: 14px; font-weight: 500; color: var(--mp-muted); margin-right: 2px; }

.mp-sub-grid {
	display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
	margin: 22px 0; padding: 20px 0;
	border-top: 1px solid var(--mp-line); border-bottom: 1px solid var(--mp-line);
}
.mp-sub-cell .k { font-size: 14px; color: var(--mp-muted); margin-bottom: 6px; }
.mp-sub-cell .v { font-size: 15px; font-weight: 700; }

.mp-sub-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* 구독 없음 */
.mp-sub-card.is-none { text-align: center; padding: 56px 24px; }
.mp-sub-card.is-none p { margin: 0 0 16px; color: var(--mp-muted); font-size: 15px; }

/* 회원 탈퇴 영역 */
.mp-danger {
	margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--mp-line);
	display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.mp-danger-text strong { display: block; font-size: 14px; }
.mp-danger-text span { font-size: 14px; color: var(--mp-muted); }
.mp-danger a { font-size: 14px; color: var(--mp-muted); text-decoration: underline; white-space: nowrap; }
.mp-danger a:hover { color: #c0392b; }

@media (max-width: 768px) {
	.mp-sub-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
	.mp-sub-grid { grid-template-columns: 1fr; }
	.mp-danger { flex-direction: column; align-items: flex-start; }
}

/* ============================================================================
   17. 내 정보 설정 (account) — 인라인 편집(수정 누르면 그 행이 입력폼으로)
   ============================================================================ */
.mp-settings-card {
	background: var(--mp-card); border: 1px solid var(--mp-line);
	border-radius: 16px; padding: 6px 24px; margin-bottom: 20px;
}
.mp-settings-card > h3 { font-size: 16px; font-weight: 700; padding: 18px 0 4px; margin: 0; }

.mp-field { padding: 16px 0; border-top: 1px solid var(--mp-line); }
.mp-settings-card > h3 + .mp-field { border-top: 0; }   /* 제목 바로 아래 첫 행은 윗줄 제거 */

.mp-field-view { display: flex; align-items: center; gap: 14px; }
.mp-field-label { flex: 0 0 84px; color: var(--mp-muted); font-size: 16px; }
.mp-field-val { flex: 1 1 auto; font-weight: 600; min-width: 0; }
.mp-field-view .mp-btn { flex: 0 0 auto; }
.mp-field-ro .mp-field-val { font-weight: 600; }       /* 읽기전용(아이디/이름) */

.mp-field-form { display: none; padding: 4px 0 2px; }
.mp-field.is-editing .mp-field-view { display: none; }
.mp-field.is-editing .mp-field-form { display: block; }

/* .mp-wrap 접두사로 명시도 (0,2,0) 확보 — login.css 의 전역 콤마 누수
   `input[type="email"]`/`input[type="password"]` (0,1,1) 보다 우선.
   margin:0 으로 누수된 margin-left:20px 도 무력화. */
.mp-wrap .mp-input, .mp-wrap .mp-select {
	width: 100%; max-width: 380px; margin: 0; padding: 11px 13px; font-size: 14px;
	border: 1px solid var(--mp-line); border-radius: 9px;
	background: #fff; color: var(--mp-ink); box-sizing: border-box;
}
.mp-wrap .mp-input:focus, .mp-wrap .mp-select:focus { outline: none; border-color: var(--mp-navy); }
.mp-wrap .mp-input + .mp-input { margin-top: 8px; }
.mp-form-grid { display: flex; gap: 8px; flex-wrap: wrap; }
.mp-form-grid .mp-select { max-width: 110px; }
.mp-form-grid .mp-input { max-width: 200px; }
.mp-form-actions { display: flex; gap: 8px; margin-top: 12px; }
.mp-field-hint { font-size: 14px; color: var(--mp-muted); margin-top: 8px; }

/* ============================================================================
   18. 운세부적 (amulet) — 갤러리 그리드 + 라이트박스
   ============================================================================ */
.mp-amulet-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.mp-amulet {
	display: flex; flex-direction: column; align-items: center; gap: 8px;
	background: var(--mp-card); border: 1px solid var(--mp-line); border-radius: 12px;
	padding: 12px 8px; cursor: pointer; text-align: center; color: inherit;
}
.mp-amulet:hover { border-color: #cfcde0; box-shadow: 0 4px 12px rgba(0,0,0,.06); }
.mp-amulet-thumb {
	width: 100%; aspect-ratio: 1; object-fit: contain;
	background: #faf7ef; border-radius: 8px;   /* 부적 종이 느낌 크림 배경 */
}
.mp-amulet-name { font-size: 12.5px; color: #5c5a6e; word-break: keep-all; line-height: 1.3; }

@media (max-width: 1024px) { .mp-amulet-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 420px)  { .mp-amulet-grid { grid-template-columns: repeat(3, 1fr); } }

/* 라이트박스 */
.mp-lb {
	display: none; position: fixed; inset: 0; z-index: 10000;
	background: rgba(0,0,0,.82); align-items: center; justify-content: center; padding: 24px;
}
.mp-lb.is-open { display: flex; }
.mp-lb-fig {
	margin: 0; display: flex; flex-direction: column; align-items: center; gap: 14px;
	max-width: 90vw; max-height: 90vh;
}
.mp-lb-img {
	max-width: min(440px, 84vw); max-height: 68vh; object-fit: contain;
	background: #faf7ef; border-radius: 10px;
}
.mp-lb-cap { color: #fff; font-size: 15px; font-weight: 600; }
.mp-lb-save { min-width: 160px; }
.mp-lb-x {
	position: absolute; top: 14px; right: 18px; width: 44px; height: 44px;
	border: 0; background: transparent; color: #fff; font-size: 32px; line-height: 1; cursor: pointer;
}
.mp-lb-nav {
	position: absolute; top: 50%; transform: translateY(-50%);
	width: 48px; height: 48px; border-radius: 50%; border: 0;
	background: rgba(255,255,255,.15); color: #fff; font-size: 28px; line-height: 1; cursor: pointer;
}
.mp-lb-nav:hover { background: rgba(255,255,255,.28); }
.mp-lb-prev { left: 16px; }
.mp-lb-next { right: 16px; }
@media (max-width: 640px) {
	.mp-lb-nav { width: 40px; height: 40px; font-size: 24px; }
	.mp-lb-prev { left: 8px; } .mp-lb-next { right: 8px; }
}

/* ----------------------------------------------------------------------------
   19. 페이지네이션 (results / payments / books 공용 — 페이지 번호 방식)
   ---------------------------------------------------------------------------- */
.mp-pager {
	display: flex; justify-content: center; align-items: center;
	gap: 6px; flex-wrap: wrap; margin-top: 24px;
}
.mp-page-btn {
	min-width: 36px; height: 36px; padding: 0 10px;
	border: 1px solid var(--mp-line); background: #fff; color: var(--mp-ink);
	border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer;
	display: inline-flex; align-items: center; justify-content: center;
}
.mp-page-btn:hover:not(:disabled):not(.is-active) { border-color: #cfcde0; }
.mp-page-btn.is-active { background: var(--mp-navy); color: #fff; border-color: var(--mp-navy); }
.mp-page-btn:disabled { color: #c9c7d4; cursor: default; }
.mp-page-ellipsis { padding: 0 4px; color: var(--mp-muted); }

/* ============================================================================
   20. 모바일 미세조정 (≤480px) — 폰트 한 단계↓ · 패딩 4px 단위 한 단계↓
       (레이아웃 collapse 는 위 12·14~18절의 ≤1024/768/640 미디어쿼리가 담당.
        여기선 작은 화면에서 글자/여백만 줄여 잘 보이게.)
   ============================================================================ */
@media (max-width: 480px) {
	/* 콘텐츠 여백 */
	.mp-content { padding: 16px; gap: 20px; }

	/* 모바일 선택기 좌우 여백을 콘텐츠 패딩(16px)에 맞춤 */
	.mp-msel { margin: 0 16px 14px; font-size: 15px; padding: 12px 14px; }
	.mp-sheet-item { font-size: 15px; padding: 14px 8px; }

	/* 페이지 헤더 / 탭 / 안내 */
	.mp-page-head { gap: 10px; }
	.mp-page-title { font-size: 26px; }
	.mp-page-count { font-size: 15px; }
	.mp-notice { font-size: 14px; }
	.mp-tab { font-size: 14px; padding: 7px 13px 6px; }

	/* 히어로(대시보드) */
	.mp-hero { padding: 24px 18px; }
	.mp-hero-title { font-size: 22px; }
	.mp-hero-sub { font-size: 14px; }

	/* 요약 / 스탯 카드 */
	.mp-summary-item { padding: 20px; }
	.mp-summary-label, .mp-summary-foot, .mp-summary-desc { font-size: 13px; }
	.mp-summary-num { font-size: 22px; }
	.mp-stat { padding: 16px 10px; }
	.mp-stat-label { font-size: 13px; }
	.mp-stat-num { font-size: 18px; }
	.mp-section-title { font-size: 17px; }

	/* 최근 본 운세 / 운세결과 카드 */
	.mp-recent { gap: 12px; }
	.mp-recent-item { padding: 14px 10px; }
	.mp-recent-thumb { width: 72px; height: 72px; }
	.mp-recent-name, .mp-recent-date { font-size: 13px; }

	/* 사주책 행 카드 */
	.mp-bookrow { padding: 16px; gap: 14px; }
	.mp-bookrow .mp-book-cover { width: 84px; }
	.mp-bookrow-name { font-size: 20px; }
	.mp-book-target { font-size: 15px; }
	.mp-book-meta { font-size: 14px; }
	.mp-book-chips span { font-size: 13px; }

	/* 결제 내역 테이블 */
	.mp-table { font-size: 13px; }
	.mp-table th { padding: 12px 14px; font-size: 13px; }
	.mp-table td { padding: 12px 14px; }

	/* 구독 관리 카드 */
	.mp-sub-card { padding: 20px; }
	.mp-sub-name { font-size: 17px; }
	.mp-sub-price { font-size: 16px; }
	.mp-sub-cell .v { font-size: 14px; }

	/* 내 정보 설정 */
	.mp-settings-card { padding: 4px 18px; }
	.mp-settings-card > h3 { font-size: 15px; }
	.mp-field { padding: 14px 0; }
	.mp-field-label { flex-basis: 72px; font-size: 14px; }
	.mp-field-val { font-size: 15px; }

	/* 사이드바(오프캔버스) */
	.mp-side-title { font-size: 20px; }
	.mp-nav-item { font-size: 14px; padding: 12px; }

	/* 페이지네이션 */
	.mp-pager { gap: 4px; margin-top: 20px; }
	.mp-page-btn { min-width: 32px; height: 32px; font-size: 13px; padding: 0 8px; }
}
