/* 전체 탭 콘텐츠 스타일 */
.ohaeng-all-content {
    display: none !important; /* 기본 숨김, active 클래스로 표시 */
    flex-direction: column;
    gap: 0;
}

.ohaeng-all-content.active {
    display: flex !important; /* active일 때만 flex로 표시 */
}

.ohaeng-all-section {
    border: none;
    border-radius: 0;
    padding: 0;
    background-color: transparent;
    page-break-inside: avoid;
    margin-bottom: 16px;
}

.ohaeng-all-section:last-child {
    margin-bottom: 0;
}

.ohaeng-all-section-title {
    margin: 0;
    padding: 12px 0 8px;
    border-bottom: 1px solid var(--link-color);
    font-size: 18px;
    font-weight: bold;
    color: var(--text-primary);
}

.ohaeng-all-section-content {
    margin: 0;
    padding: 10px 0 0;
    color: var(--text-primary);
}

/* 일간 강약 — 세로 바 없이 본문만 (오행 탭 규칙: 표/텍스트) */
.dayGanStrength-card {
    padding: 8px 0;
    border: none;
    margin-bottom: 12px;
    background-color: transparent;
}

.dayGanStrength-card.strength-strong .dayGanStrength-level {
    color: #e74c3c;
}

.dayGanStrength-card.strength-weak .dayGanStrength-level {
    color: var(--link-color);
}

.dayGanStrength-card.strength-neutral .dayGanStrength-level {
    color: var(--text-secondary, var(--bg-gray));
}

.dayGanStrength-level {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.dayGanStrength-details {
    margin-bottom: 10px;
    font-size: 14px;
    color: var(--text-secondary);
}

.dayGanStrength-details div {
    margin-bottom: 5px;
}

.dayGanStrength-explanation {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* 용신 카드 */
.yongshen-card {
    padding: 10px 0;
    border: none;
    margin-bottom: 12px;
    background-color: transparent;
}

.yongshen-main {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.yongshen-label {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.yongshen-value {
    font-size: 28px;
    /* font-weight: bold; */
    color: var(--text-primary);
    margin-bottom: 5px;
}

.yongshen-type {
    font-size: 14px;
    color: var(--text-secondary);
    padding: 3px 8px;
    background-color: var(--bg-secondary);
    display: inline-block;
    border-radius: 3px;
}

.yongshen-xishen,
.yongshen-jishen,
.yongshen-gushen {
    margin-bottom: 10px;
}

.yongshen-explanation {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* 오행 분포 표 */
.fiveElements-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid var(--border-color);
    background-color: transparent;
    margin: 0 auto;
}

.fiveElements-table th,
.fiveElements-table td {
    border: 1px solid var(--border-color);
    padding: 10px;
    text-align: center;
    background-color: transparent;
    color: var(--text-primary);
}

.fiveElements-table thead th {
    background-color: transparent;
    font-weight: bold;
    font-size: 13px;
    color: var(--text-primary);
}

.fiveElements-bar-container {
    width: 100%;
    background-color: transparent;
    /* border: 1px solid #777; */
    height: 20px;
    position: relative;
}

.fiveElements-bar {
    height: 100%;
    min-width: 2px;
    transition: width 0.3s ease;
}

/* 십성 표 */
.tenGods-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid var(--border-color);
    background-color: transparent;
    margin: 0 auto;
}

.tenGods-table th,
.tenGods-table td {
    border: 1px solid var(--border-color);
    padding: 8px;
    text-align: center;
    background-color: transparent;
    color: var(--text-primary);
}

.tenGods-table thead th {
    background-color: transparent;
    font-weight: bold;
    font-size: 13px;
    color: var(--text-primary);
}

/* 십이운성 표 */
.twelveFortune-container {
    padding: 8px 0;
}

.twelveFortune-dayGan {
    margin-bottom: 15px;
    font-size: 14px;
    font-weight: bold;
    color: var(--text-primary);
}

.twelveFortune-saju,
.twelveFortune-all {
    margin-bottom: 20px;
}

.twelveFortune-saju h5,
.twelveFortune-all h5 {
    margin: 0 0 10px 0;
    font-size: 14px;
    font-weight: bold;
    color: var(--text-primary);
}

.twelveFortune-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid var(--border-color);
    background-color: transparent;
    margin: 0 auto;
}

.twelveFortune-table th,
.twelveFortune-table td {
    border: 1px solid var(--border-color);
    padding: 8px;
    text-align: center;
    background-color: transparent;
    color: var(--text-primary);
}

.twelveFortune-table thead th {
    background-color: transparent;
    font-weight: bold;
    font-size: 13px;
    color: var(--text-primary);
}

/* 재물 구조 분석 */
.wealthStructure-container {
    padding: 8px 0;
}

.wealthStructure-section {
    margin-bottom: 20px;
}

.wealthStructure-section h5 {
    margin: 0 0 10px 0;
    font-size: 14px;
    font-weight: bold;
    color: var(--text-primary);
}

.wealthStructure-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid var(--border-color);
    background-color: transparent;
    margin: 0 auto;
}

.wealthStructure-table th,
.wealthStructure-table td {
    border: 1px solid var(--border-color);
    padding: 8px;
    text-align: center;
    background-color: transparent;
    color: var(--text-primary);
}

.wealthStructure-table thead th {
    background-color: transparent;
    font-weight: bold;
    font-size: 13px;
    color: var(--text-primary);
}

.wealthStructure-info {
    padding: 10px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.wealthStructure-info div {
    margin-bottom: 5px;
    font-size: 14px;
    color: var(--text-secondary);
}

.wealthStructure-info div:last-child {
    margin-bottom: 0;
}

/* 식신·상관 구조 분석 */
.shishenShangguanStructure-container {
    padding: 8px 0;
}

.shishenShangguanStructure-section {
    margin-bottom: 20px;
}

.shishenShangguanStructure-section h5 {
    margin: 0 0 10px 0;
    font-size: 14px;
    font-weight: bold;
    color: var(--text-primary);
}

.shishenShangguanStructure-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid var(--border-color);
    background-color: transparent;
    margin: 0 auto;
}

.shishenShangguanStructure-table th,
.shishenShangguanStructure-table td {
    border: 1px solid var(--border-color);
    padding: 8px;
    text-align: center;
    background-color: transparent;
    color: var(--text-primary);
}

.shishenShangguanStructure-table thead th {
    background-color: transparent;
    font-weight: bold;
    font-size: 13px;
    color: var(--text-primary);
}

.shishenShangguanStructure-info {
    padding: 10px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.shishenShangguanStructure-info div {
    margin-bottom: 5px;
    font-size: 14px;
    color: var(--text-secondary);
}

.shishenShangguanStructure-info div:last-child {
    margin-bottom: 0;
}

/* 직업 구조 분석 */
.careerStructure-container {
    padding: 8px 0;
}

.careerStructure-section {
    margin-bottom: 20px;
}

.careerStructure-section h5 {
    margin: 0 0 10px 0;
    font-size: 14px;
    font-weight: bold;
    color: var(--text-primary);
}

.careerStructure-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid var(--border-color);
    background-color: transparent;
    margin: 0 auto;
}

.careerStructure-table th,
.careerStructure-table td {
    border: 1px solid var(--border-color);
    padding: 8px;
    text-align: center;
    background-color: transparent;
    color: var(--text-primary);
}

.careerStructure-table thead th {
    background-color: transparent;
    font-weight: bold;
    font-size: 13px;
    color: var(--text-primary);
}

.careerStructure-info {
    padding: 10px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    margin-top: 10px;
}

.careerStructure-info div {
    margin-bottom: 5px;
    font-size: 14px;
    color: var(--text-secondary);
}

.careerStructure-info div:last-child {
    margin-bottom: 0;
}

/* 가족 관계 분석 */
.familyRelationships-container {
    padding: 8px 0;
}

.familyRelationships-section {
    margin-bottom: 20px;
}

.familyRelationships-section h5 {
    margin: 0 0 10px 0;
    font-size: 14px;
    font-weight: bold;
    color: var(--text-primary);
}

.familyRelationships-info {
    padding: 10px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    margin-bottom: 10px;
}

.familyRelationships-info div {
    margin-bottom: 5px;
    font-size: 14px;
    color: var(--text-secondary);
}

.familyRelationships-info div:last-child {
    margin-bottom: 0;
}

.familyRelationships-info strong {
    color: var(--text-primary);
    font-weight: bold;
}

/* 관계 분석 */
.relationships-container {
    padding: 8px 0;
}

.relationships-section {
    margin-bottom: 16px;
    padding: 8px 0;
    border: none;
    border-bottom: 1px solid var(--border-color);
    background-color: transparent;
}

.relationships-section h4 {
    margin: 0 0 10px 0;
    font-size: 16px;
    color: var(--text-primary);
}

.relationships-section div {
    margin-bottom: 5px;
    font-size: 14px;
    color: var(--text-secondary);
}

.relationships-extended .relationships-title {
    margin: 0 0 12px;
    font-size: 1.05em;
}
.relationships-matrix {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 14px;
    table-layout: fixed;
}
.relationships-matrix th,
.relationships-matrix td {
    border: 1px solid var(--border-color, #ddd);
    padding: 8px 6px;
    text-align: center;
    vertical-align: top;
    background: var(--bg-secondary, #f8f8f8);
}
.relationships-matrix th {
    font-size: 0.85em;
    color: var(--text-secondary, #666);
}
.rel-pillar {
    font-weight: 600;
    font-size: 1.05em;
    margin-bottom: 4px;
}
.rel-marks {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    justify-content: center;
}
.rel-marks.muted { color: var(--text-secondary, #999); font-size: 0.85em; }
.rel-mark {
    display: inline-block;
    padding: 0;
    border: none;
    border-radius: 0;
    font-size: 0.85em;
    background: none;
    color: var(--text-primary, #333);
}
.relationships-detail-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92em;
}
.relationships-detail-table td {
    padding: 4px 0;
    border-bottom: 1px solid var(--border-color, #eee);
}
.shensha-extended .shensha-matrix {
    width: 100%;
    border-collapse: collapse;
    margin: 8px 0 12px;
    table-layout: fixed;
}
.shensha-extended .shensha-matrix th,
.shensha-extended .shensha-matrix td {
    border: 1px solid var(--border-color, #ddd);
    padding: 8px 6px;
    vertical-align: top;
    background: var(--bg-secondary, #f8f8f8);
}
.shensha-col-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.shensha-col-list li {
    margin: 0 0 4px;
    font-size: 0.9em;
}
.shensha-col-list li.muted { color: #999; }

@media print {
    body.pro-print-module .pro-category-menu-bar,
    body.pro-print-module .layer-toggle-btn,
    body.pro-print-module .layer-overlay,
    body.pro-print-module .output-buttons,
    body.pro-print-module #left-layer,
    body.pro-print-module .left-panel,
    body.pro-print-module .client-form-panel,
    body.pro-print-module .pro-lock-card-actions {
        display: none !important;
    }
    body.pro-print-module .right-panel-group {
        display: none !important;
    }
    body.pro-print-module[data-print-mode="jami"] #right-panel-jami,
    body.pro-print-module[data-print-mode="jum"] #right-panel-jum,
    body.pro-print-module[data-print-mode="gimun"] #right-panel-gimun,
    body.pro-print-module[data-print-mode="jikseok"] #right-panel-jikseok,
    body.pro-print-module[data-print-mode="taegil"] #right-panel-taegil,
    body.pro-print-module[data-print-mode="haemong"] #right-panel-haemong,
    body.pro-print-module[data-print-mode="owun"] #right-panel-owun,
    body.pro-print-module[data-print-mode="sanmyung"] #right-panel-sanmyung,
    body.pro-print-module[data-print-mode="dangsaju"] #right-panel-dangsaju,
    body.pro-print-module[data-print-mode="fortune-code"] #right-panel-fortune-code,
    body.pro-print-module[data-print-mode="gunghap"] #right-panel-gunghap,
    body.pro-print-module[data-print-mode="bujeok"] #right-panel-bujeok,
    body.pro-print-module[data-print-mode="naming"] #right-panel-naming,
    body.pro-print-module[data-print-mode="tojeong"] #right-panel-tojeong {
        display: block !important;
        width: 100% !important;
    }
}

/* 공망 */
.kongwang-container {
    padding: 8px 0;
    border: none;
    border-bottom: 1px solid var(--border-color);
    background-color: transparent;
    margin-bottom: 12px;
}

.kongwang-container h4 {
    margin: 0 0 10px 0;
    font-size: 16px;
    color: var(--text-primary);
}

.kongwang-zhi {
    font-size: 18px;
    font-weight: bold;
    color: #e74c3c;
    margin-bottom: 8px;
}

.kongwang-explanation {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* 신살 */
.shensha-container {
    padding: 8px 0;
    border: none;
    background-color: transparent;
}

.shensha-container h4 {
    margin: 0 0 10px 0;
    font-size: 16px;
    color: var(--text-primary);
}

.shensha-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.shensha-list li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
    color: var(--text-secondary);
}

.shensha-list li:last-child {
    border-bottom: none;
}

.shensha-list li strong {
    color: var(--text-primary);
    margin-right: 8px;
}
.shensha-hint {
    margin: 0 0 8px;
    font-size: 0.85em;
    color: var(--text-secondary, #6b7280);
}
.defines-sinsal-link {
    appearance: none;
    border: none;
    background: none;
    padding: 0;
    margin: 0;
    font: inherit;
    font-weight: 700;
    color: var(--link-color, #3F8BC9);
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.defines-sinsal-link:hover,
.defines-sinsal-link.is-active {
    color: #1d4f7a;
}
html[data-theme="dark"] .defines-sinsal-link:hover,
html[data-theme="dark"] .defines-sinsal-link.is-active {
    color: #7eb8e8;
}
.defines-sinsal-meaning {
    color: var(--text-secondary, #6b7280);
    font-weight: 400;
}
.defines-sinsal-detail {
    margin-top: 12px;
    padding: 12px;
    background: var(--bg-primary, #fff);
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 8px;
}
.defines-sinsal-detail[hidden] {
    display: none !important;
}
.defines-sinsal-explain .defines-section-title {
    margin: 0 0 10px;
    font-size: 1em;
}
.defines-sinsal-explain .defines-topic-label {
    font-size: 0.9em;
}
.unse-shensha .defines-sinsal-detail {
    margin-top: 10px;
}

.window-panel {
    background-color: var(--bg-primary);
    border: none;
    border-radius: 0;
    margin-bottom: 16px;
    overflow: visible; /* hidden에서 visible로 변경: 내용이 잘리지 않도록 */
}

.window-panel-header {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-weight: bold;
    font-size: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    box-sizing: border-box;
}

.window-panel-header-buttons {
    display: flex;
    gap: 4px;
    align-items: center;
}

/* 패널 헤더 아이콘 버튼 공통 (설정·새로고침·접기) */
.panel-toggle-btn,
.panel-refresh-btn,
.ohaeng-settings-btn,
.fortune-report-settings-btn,
.unse-settings-btn,
.naming-panel .naming-settings-btn {
    appearance: none;
    -webkit-appearance: none;
    background: none;
    border: none;
    margin: 0;
    padding: 0;
    width: 28px;
    height: 28px;
    min-width: 28px;
    min-height: 28px;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
    cursor: pointer;
    color: #666;
    font-size: 14px;
    line-height: 1;
    transition: background-color 0.2s, color 0.2s;
    vertical-align: middle;
}

.panel-toggle-btn {
    color: var(--theme-green-deep, olive);
}

.panel-toggle-btn:hover,
.panel-refresh-btn:hover,
.ohaeng-settings-btn:hover,
.fortune-report-settings-btn:hover,
.unse-settings-btn:hover,
.naming-panel .naming-settings-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: var(--color-blue, #5a6b4a);
}

.panel-refresh-btn:active,
.ohaeng-settings-btn:active,
.fortune-report-settings-btn:active,
.unse-settings-btn:active {
    background-color: rgba(0, 0, 0, 0.1);
}

.panel-toggle-btn .fa,
.panel-refresh-btn .fa,
.ohaeng-settings-btn .fa,
.fortune-report-settings-btn .fa,
.unse-settings-btn .fa,
.naming-panel .naming-settings-btn .fa,
.ohaeng-settings-icon,
.fortune-report-settings-icon,
.unse-settings-icon,
.panel-toggle-icon {
    display: inline-block;
    font-size: 14px;
    width: 1em;
    line-height: 1;
    text-align: center;
}

.panel-toggle-icon {
    transition: transform 0.3s ease;
}

.window-panel.collapsed .panel-toggle-icon {
    transform: rotate(-90deg);
}

html[data-theme="dark"] .panel-refresh-btn,
html[data-theme="dark"] .ohaeng-settings-btn,
html[data-theme="dark"] .fortune-report-settings-btn,
html[data-theme="dark"] .unse-settings-btn,
html[data-theme="dark"] .naming-panel .naming-settings-btn {
    color: var(--text-secondary, #aaa);
}

html[data-theme="dark"] .panel-toggle-btn:hover,
html[data-theme="dark"] .panel-refresh-btn:hover,
html[data-theme="dark"] .ohaeng-settings-btn:hover,
html[data-theme="dark"] .fortune-report-settings-btn:hover,
html[data-theme="dark"] .unse-settings-btn:hover,
html[data-theme="dark"] .naming-panel .naming-settings-btn:hover {
    background-color: rgba(255, 255, 255, 0.08);
    color: var(--theme-green, #8a9a7a);
}

.window-panel-body {
    padding: 10px 0 12px;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    max-height: 10000px; /* 충분히 큰 값 */
    /* 높이 제한 없음: 전체 내용이 보이도록 */
}

.window-panel.collapsed .window-panel-body {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
}

/* 레이아웃 그리드 (기존 2단) */
.layout-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

@media (max-width: 1200px) {
    .layout-grid {
        grid-template-columns: 1fr;
    }
}

/* 3단 레이아웃 그리드 (권장 방안) */
.layout-grid-3col {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr) minmax(0, 1fr); /* 좌 300px, 중앙·우측 50:50 고정 */
    gap: 20px;
    margin-bottom: 20px;
    max-width: 1600px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
}

/* 좌측 1단 (레이어) */
.vertical-section-left {
    display: flex;
    flex-direction: column;
    gap: 15px;
    overflow-y: auto;
    /* max-height 제거: 생년월일시 영역 전체가 보이도록 */
    padding-right: 10px;
    background-color: var(--bg-primary);
    border-right: 1px solid var(--bg-tertiary);
}

/* 명단 레이어 — 상담 받는 자 정보 제목 (배경 없음 + 우측 X) */
.client-form-panel-header {
    background: transparent;
    background-color: transparent;
    border: none;
    border-radius: 0;
    padding: 4px 2px 8px;
    margin: 0;
    cursor: default;
    font-weight: 700;
    font-size: 15px;
}

.client-form-panel-title {
    flex: 1;
    min-width: 0;
}

.client-layer-close {
    display: none;
    appearance: none;
    -webkit-appearance: none;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 4px;
    background: transparent;
    color: var(--text-secondary, #666);
    font-size: 1.6em;
    font-weight: 400;
    line-height: 1;
    cursor: pointer;
}

.client-layer-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-primary, #333);
}

html[data-theme="dark"] .client-layer-close:hover {
    background: rgba(255, 255, 255, 0.08);
}

/* 고객관리 레이어 — 사용정보 (제목 아래, 일반·관리자 동일 노란 안내 박스) */
.client-layer-user-menu {
    background: transparent;
    border: none;
    padding: 0;
    margin: 0 0 12px;
}

.client-layer-user-menu .service-usage-info,
.client-layer-user-menu .service-usage-info.usage-limit-exceeded {
    margin: 0;
    padding: 10px 15px;
    background-color: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
    font-size: 13px;
    color: #856404;
}

/* 다크: plus/calendar 일정 칩(.wr-cal-chip-event)과 동일 — 갈색 배경·밝은 글씨 */
html[data-theme="dark"] .client-layer-user-menu .service-usage-info,
html[data-theme="dark"] .client-layer-user-menu .service-usage-info.usage-limit-exceeded {
    background-color: rgba(139, 69, 19, 0.28);
    border-color: #c48a5a;
    color: var(--text-primary, #e8e4df);
}

/* 중앙 2단 (가로폭 우측과 동일 유지) */
.vertical-section-center {
    display: flex;
    flex-direction: column;
    gap: 15px;
    min-width: 0; /* 그리드 셀 축소 허용으로 50:50 유지 */
}

/* 우측 3단 (가로폭 중앙과 동일 유지) */
.vertical-section-right {
    display: flex;
    flex-direction: column;
    gap: 15px;
    min-width: 0;
    min-height: 0; /* 그리드/플렉스 내에서 높이 제한 시 자식이 스크롤 가능하도록 */
}

.right-panel-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
    min-height: 0;
}

/* 운세 메뉴 선택 시: 별난보고서 숨기고 운세 분석만 표시할 때 상단 여백 제거 */
.right-panel-group.unse-only {
    gap: 0;
    padding-top: 0;
    margin-top: 0;
}
.right-panel-group.unse-only .unse-panel {
    margin-top: 0;
}

/* 레이어 토글 버튼 — 기본은 메뉴바 아이콘용(고정 플로팅 아님) */
.layer-toggle-btn {
    display: none; /* 데스크톱(≥1100)에서는 숨김 — 미디어쿼리에서 표시 */
}

.layer-toggle-text {
    display: none;
}

/* 레이어 오버레이 */
.layer-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 998;
}

.layer-overlay.active {
    display: block;
}

/* 태블릿 반응형 (방안 B: 레이어 방식) */
/* 공통 셸 §3.2: 769~1099 좌측 드로어, ≥1100 좌 고정 */
@media (min-width: 769px) and (max-width: 1099px) {
    .layout-grid-3col {
        grid-template-columns: 1fr 1fr; /* 2단 구성 */
    }
    
    .pro-category-menu-left .layer-toggle-btn {
        display: inline-flex; /* 메뉴바 좌측 아이콘으로 표시 */
    }
    
    .vertical-section-left {
        position: fixed;
        top: 55px; /* top-bar 높이 */
        left: -320px; /* 기본 숨김 */
        width: 300px;
        height: calc(100vh - 55px);
        z-index: 999;
        transition: left 0.3s ease;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
        border-top-right-radius: 10px; /* 점9개 메뉴(#user_menu)와 동일 */
        /* max-height 제거: 생년월일시 영역 전체가 보이도록 */
    }

    .vertical-section-left .client-layer-close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    
    /* 태블릿에서 좌측 레이어 내부 패널 높이 제한 제거 */
    .vertical-section-left .window-panel {
        overflow: visible;
    }
    
    .vertical-section-left.active {
        left: 0; /* 열림 */
    }
    
    .vertical-section-right {
        grid-column: 2; /* 중앙과 합침 */
    }
    
    /* 태블릿에서 메모 입력 창이 레이어 스크롤바보다 위에 표시되도록 */
    .consultation-form-modal {
        z-index: 10001 !important;
    }
    
    .consultation-form-content {
        z-index: 10002 !important;
    }
}

/* 모바일 반응형 (방안 B: 레이어 방식) */
@media (max-width: 768px) {
    .layout-grid-3col {
        grid-template-columns: 1fr; /* 1열 배치 */
    }
    
    .pro-category-menu-left .layer-toggle-btn {
        display: inline-flex; /* 메뉴바 좌측 아이콘 */
    }

    /* 메뉴 전환 시 섹션 스크롤이 상단 메뉴바에 가리지 않도록 */
    .vertical-section-right .window-panel,
    #unse-panel,
    #saju-panel {
        scroll-margin-top: 130px;
    }
}

@media (max-width: 768px) {
    .vertical-section-left {
        position: fixed;
        top: 55px;
        left: -100%; /* 기본 완전 숨김 */
        width: 280px;
        max-width: 85vw; /* 화면 너비의 85% */
        height: calc(100vh - 55px);
        z-index: 999;
        transition: left 0.3s ease;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
        border-top-right-radius: 10px; /* 점9개 메뉴(#user_menu)와 동일 */
        /* max-height 제거: 생년월일시 영역 전체가 보이도록 */
    }

    .vertical-section-left .client-layer-close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    
    .vertical-section-left.active {
        left: 0; /* 열림 */
    }
    
    /* 모바일에서 좌측 레이어 내부 패널 높이 제한 제거 */
    .vertical-section-left .window-panel {
        overflow: visible;
    }
    
    /* 레이어 열림 시 리포트 영역 스크롤 방지 */
    body.layer-open {
        overflow: hidden;
    }
}

/* 세로 배치 영역 */
.vertical-section {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* 출력 버튼 영역 */
.output-buttons {
    display: flex;
    gap: 15px;
    padding: 15px;
    background-color: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    justify-content: center;
}

.output-btn {
    padding: 8px 16px;
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--bg-tertiary);
    cursor: pointer;
    font-size: 14px;
}

.output-btn:hover {
    background-color: var(--bg-secondary);
}

.output-btn.secondary {
    background-color: var(--bg-tertiary);
    border-color: var(--bg-tertiary);
}

.output-btn.secondary:hover {
    background-color: var(--bg-secondary);
}

/* 데스크탑 프로그램 추가 스타일 */
.program-title {
    font-size: 18px;
    font-weight: bold;
    color: var(--accent-color);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--link-color);
}

/* 세로 배치 영역 */
.vertical-section-1 {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.vertical-section-2 {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* 윈도우 패널 내부 스타일 */
.panel-content {
    min-height: 200px;
    /* 높이 제한 없음: 전체 내용이 보이도록 */
}

.panel-placeholder {
    color: var(--text-secondary);
    font-style: italic;
    text-align: center;
    padding: 40px 20px;
}

/* 사주팔자 표시 스타일 (세로형) */
.saju-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: nowrap;
}

.saju-column-vertical {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
}

.saju-ganzhi-vertical {
    width: 100%;
    max-width: 80px;
    padding: 20px 10px;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 150px;
}

.saju-gan {
    font-size: 3.5em;
    font-weight: bold;
    color: var(--text-primary);
    text-shadow: none;
    line-height: 1.2;
    margin-bottom: 10px;
}

.saju-zhi {
    font-size: 3.5em;
    font-weight: bold;
    color: var(--text-primary);
    text-shadow: none;
    line-height: 1.2;
}

/* 사주팔자 표시 영역 */
#saju-display {
    display: none;
}

/* 입력 정보 표시 */
.saju-input-info {
    font-size: 0.8em;
    color: var(--text-secondary);
    text-align: center;
    padding: 8px 10px;
    margin-bottom: 10px;
    line-height: 1.5;
}

/* 사주팔자 테이블 */
.saju-display-wrapper {
    text-align: center;
    padding: 8px 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.saju-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 auto;
    background-color: transparent;
}

.saju-table th,
.saju-table td {
    border: 1px solid var(--border-color);
    padding: 15px 10px;
    text-align: center;
    background-color: transparent;
    color: var(--text-primary);
}

.saju-table th {
    font-size: 0.9em;
    color: var(--text-primary);
    font-weight: normal;
    background-color: transparent;
}

.saju-gan-cell {
    font-size: 3em;
    font-weight: bold;
    color: var(--text-primary);
    min-height: 60px;
    vertical-align: middle;
}

.saju-zhi-cell {
    font-size: 3em;
    font-weight: bold;
    color: var(--text-primary);
    min-height: 60px;
    vertical-align: middle;
}

/* 사주 8칸: 글자색은 테마 고정(라이트=검정/다크=흰색), 오행은 배경색으로만 표시 */
:root,
html[data-theme="light"] {
    --saju-cell-text: #111;
    /* 5색 (라이트가 다크보다 조금 더 밝은 톤) */
    --saju-c-wood: #64b5f6;
    --saju-c-fire: #ef9a9a;
    --saju-c-earth: #ffd54f;
    --saju-c-metal: #dde5e9;
    --saju-c-water: #78909c;
    /* 10색 (양: 강하고 밝게 / 음: 약간 흐리게) */
    --saju-c-wood-yang: #42a5f5;
    --saju-c-wood-yin: #81c784;
    --saju-c-fire-yang: #ef5350;
    --saju-c-fire-yin: #c48b94;
    --saju-c-earth-yang: #ffca28;
    --saju-c-earth-yin: #d4b06a;
    --saju-c-metal-yang: #e1e8ec;
    --saju-c-metal-yin: #eef3f6;
    --saju-c-water-yang: #50636d;
    --saju-c-water-yin: #73858f;
}

html[data-theme="dark"] {
    --saju-cell-text: #f5f5f5;
    /* 다크: 같은 계열에서 살짝 더 어두운 톤 (순흑/순백 제외) */
    --saju-c-wood: #356c9a;
    --saju-c-fire: #9b4e4e;
    --saju-c-earth: #9f7b22;
    --saju-c-metal: #90a0a8;
    --saju-c-water: #3f4e56;
    --saju-c-wood-yang: #2f7fbd;
    --saju-c-wood-yin: #3f7a66;
    --saju-c-fire-yang: #b24d4a;
    --saju-c-fire-yin: #815a63;
    --saju-c-earth-yang: #b68c2a;
    --saju-c-earth-yin: #866f42;
    --saju-c-metal-yang: #bcc7ce;
    --saju-c-metal-yin: #95a3ab;
    --saju-c-water-yang: #42545e;
    --saju-c-water-yin: #2f3e46;
}

.saju-gan-cell,
.saju-zhi-cell {
    color: var(--saju-cell-text) !important;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.saju-ohaeng-wood { background-color: var(--saju-c-wood) !important; }
.saju-ohaeng-fire { background-color: var(--saju-c-fire) !important; }
.saju-ohaeng-earth { background-color: var(--saju-c-earth) !important; }
.saju-ohaeng-metal { background-color: var(--saju-c-metal) !important; }
.saju-ohaeng-water { background-color: var(--saju-c-water) !important; }

.saju-ohaeng-wood-yang { background-color: var(--saju-c-wood-yang) !important; }
.saju-ohaeng-wood-yin { background-color: var(--saju-c-wood-yin) !important; }
.saju-ohaeng-fire-yang { background-color: var(--saju-c-fire-yang) !important; }
.saju-ohaeng-fire-yin { background-color: var(--saju-c-fire-yin) !important; }
.saju-ohaeng-earth-yang { background-color: var(--saju-c-earth-yang) !important; }
.saju-ohaeng-earth-yin { background-color: var(--saju-c-earth-yin) !important; }
.saju-ohaeng-metal-yang { background-color: var(--saju-c-metal-yang) !important; }
.saju-ohaeng-metal-yin { background-color: var(--saju-c-metal-yin) !important; }
.saju-ohaeng-water-yang { background-color: var(--saju-c-water-yang) !important; }
.saju-ohaeng-water-yin { background-color: var(--saju-c-water-yin) !important; }

/* 만세력(간단 폼): 한/漢 · 5색/10색 · 만세력 조회 — 가로 3등분 */
.simple-form-action-row {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 8px;
    margin-bottom: 10px;
}

.simple-form-action-row .simple-form-action-btn {
    flex: 1 1 0;
    min-width: 0;
    width: auto !important;
    box-sizing: border-box;
}

/* 만세력 조회: 주요 액션 — 회색 토글과 구분 */
.simple-form-action-row .simple-manseoryeop-btn {
    background: var(--color-blue, #5a6b4a) !important;
    border: 1px solid var(--color-blue, #5a6b4a) !important;
    color: #fff !important;
}

.simple-form-action-row .simple-manseoryeop-btn:hover {
    background: var(--theme-green-deep, #5a6b4a) !important;
    border-color: var(--theme-green-deep, #5a6b4a) !important;
    color: #fff !important;
}

/* 회원 폼 상단: 1줄(한/漢 · 5/10색) */
.client-form-top-buttons--dual {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 8px;
    margin-bottom: 8px;
}

/* 회원 폼 상단: 2줄(명단 불러오기) */
.client-form-load-row {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e0e0e0;
}

.client-form-load-btn {
    width: 100%;
}

.client-form-top-btn-third {
    flex: 1 1 0;
    min-width: 0;
    width: auto !important;
    box-sizing: border-box;
}

@media (max-width: 420px) {
    .simple-form-action-row .simple-form-action-btn,
    .client-form-top-buttons--dual .client-form-top-btn-third {
        font-size: 12px;
        padding-left: 6px;
        padding-right: 6px;
    }
}

.saju-hidden-gan-cell {
    font-size: 1.0em;
    color: var(--text-secondary);
    padding: 7px;
    vertical-align: middle;
}

.saju-column-label {
    font-size: 0.85em;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

/* 생년월일시 입력 폼 */
#saju-input-form {
    padding: 15px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    /* border-radius: 5px; */
    border: 1px solid var(--bg-tertiary);
    margin-bottom: 15px;
}

.saju-input-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    margin-bottom: 10px;
}

.saju-input-label {
    display: block;
    font-size: 0.85em;
    color: var(--text-secondary);
    margin-bottom: 3px;
}

.saju-input-select {
    width: 100%;
    padding: 5px;
    border: 1px solid var(--bg-tertiary);
    border-radius: 0;
    background: var(--bg-primary);
    color: var(--text-primary);
}

.saju-radio-group {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.saju-radio-label {
    display: flex;
    align-items: center;
    gap: 5px;
}

.saju-radio-text {
    font-size: 0.9em;
    color: var(--text-secondary);
}

.saju-leapmonth-select {
    padding: 5px;
}

.saju-calculate-btn {
    flex: 1;
    padding: 10px;
    background: var(--color-blue, #5a6b4a);
    color: white;
    border: none;
    /* border-radius: 5px; */
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
}

.saju-calculate-btn:hover {
    background: var(--theme-green-deep, #5a6b4a);
}

/* 이름 입력 필드 */
.saju-input-text {
    width: 100%;
    padding: 5px;
    border: 1px solid var(--bg-tertiary);
    border-radius: 0;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 14px;
    box-sizing: border-box;
}

.saju-input-text:focus {
    outline: none;
    border-color: var(--color-blue, #5a6b4a);
}

/* 고객 선택 영역 */
.client-select-area {
    margin-bottom: 15px;
    padding: 0;
    /* background: var(--bg-primary); */
    /* color: var(--text-secondary); */
    /* border: 1px solid var(--bg-tertiary); */
}

.client-select-group {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

.client-select-label {
    font-size: 0.9em;
    color: var(--text-secondary);
    font-weight: 500;
    white-space: nowrap;
}

.client-select {
    flex: 1;
    min-width: 150px;
    padding: 5px;
    border: 1px solid var(--bg-tertiary);
    border-radius: 0;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 14px;
}

.client-load-btn {
    padding: 10px 15px;
    background-color: var(--link-color, var(--color-blue, #5a6b4a));
    color: #fff;
    border: 1px solid var(--link-color, var(--color-blue, #5a6b4a));
    border-radius: 0;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    transition: background-color 0.2s;
    height: auto;
    box-sizing: border-box;
}

.client-load-btn:hover {
    background-color: var(--link-hover-color, #2c5e7f);
    border-color: var(--link-hover-color, #2c5e7f);
}

/* 다크 테마에서 명단 불러오기 버튼 대비 강화 */
html[data-theme="dark"] .client-load-btn {
    background-color: #3f6380;
    border-color: #3f6380;
    color: #fff;
}

html[data-theme="dark"] .client-load-btn:hover {
    background-color: #34536b;
    border-color: #34536b;
}

/* 고객 목록 컨테이너 */
.client-list-container {
    margin-top: 15px;
    padding: 10px;
    background: var(--bg-primary);
    color: var(--text-primary);
    border: 1px solid var(--bg-tertiary);
    max-height: 300px;
    overflow-y: auto;
}

.client-list {
    width: 100%;
}

.client-list-title {
    font-weight: bold;
    font-size: 0.95em;
    color: var(--text-primary);
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid var(--bg-tertiary);
}

.client-list-items {
    list-style: none;
    padding: 0;
    margin: 0;
}

.client-list-item {
    padding: 10px;
    border-bottom: 1px solid var(--bg-tertiary);
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: var(--text-primary);
}

.client-list-item:last-child {
    border-bottom: none;
}

.client-list-item:hover {
    background-color: var(--bg-secondary);
}

.client-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.client-item-name {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.95em;
    flex: 1;
}

.client-item-info {
    font-size: 0.85em;
    color: var(--text-secondary);
    text-align: left;
}

.client-owner-badge {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 8px;
    background-color: #555;
    color: #fff;
    border-radius: 3px;
    font-size: 0.8em;
    font-weight: bold;
    white-space: nowrap;
}

.client-item-actions {
    display: flex;
    gap: 5px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.client-item-btn {
    padding: 5px 12px;
    background: var(--color-blue, #5a6b4a);
    color: white;
    border: none;
    border-radius: 0;
    cursor: pointer;
    font-size: 0.85em;
    white-space: nowrap;
    transition: background-color 0.2s;
}

.client-item-btn:hover {
    background: var(--theme-green-deep, #5a6b4a);
}

.client-item-btn.btn-edit {
    background: #27ae60;
}

.client-item-btn.btn-edit:hover {
    background: #229954;
}

.client-item-btn.btn-delete {
    background: #e74c3c;
}

.client-item-btn.btn-delete:hover {
    background: #c0392b;
}

.client-source-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 0.75em;
    font-weight: 500;
    white-space: nowrap;
}

.badge-primary {
    background-color: var(--color-blue, #5a6b4a);
    color: white;
}

.badge-secondary {
    background-color: #95a5a6;
    color: white;
}

.client-loading,
.client-empty {
    padding: 20px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9em;
}

/* 고객 정보 입력 폼 버튼 그룹 */
.client-form-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.client-save-btn {
    flex: 1;
    padding: 10px;
    background: #757577;
    color: white;
    border: none;
    border-radius: 0;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
    transition: background-color 0.2s;
}

.client-save-btn:hover {
    background: #838583;
}

.client-save-as-new-btn {
    flex: 1 1 100%;
    padding: 10px;
    background: var(--bg-tertiary, #e6e4dc);
    color: var(--text-primary, #2a2a24);
    border: 1px solid var(--border-color, #e0ded4);
    border-radius: 0;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
    transition: background-color 0.2s, border-color 0.2s;
}

.client-save-as-new-btn:hover {
    background: var(--bg-secondary, #f4f3ef);
    border-color: var(--theme-green, #8fad6a);
}

/* 기타 정보 입력 영역 */
.saju-extra-info {
    padding: 15px;
}

.saju-extra-placeholder {
    padding: 20px;
}

/* 24절기 정보 */
#solar-term-info {
    margin-top: 15px;
    padding: 10px;
    background-color: #f8f9fa;
    /* border-radius: 5px; */
    display: none;
}

.solar-term-title {
    font-weight: bold;
    margin-bottom: 5px;
    color: #2c3e50;
}

.solar-term-content {
    font-size: 0.9em;
    color: #555;
}

.solar-term-exact {
    color: #e74c3c;
    font-weight: bold;
}

.solar-term-nearby {
    color: var(--color-blue, #5a6b4a);
}

.solar-term-date {
    margin-top: 5px;
    color: #7f8c8d;
}

.solar-term-list-container {
    max-height: 300px;
    overflow-y: auto;
}

.solar-term-list-title {
    font-weight: bold;
    margin-bottom: 8px;
    color: #2c3e50;
}

.solar-term-list-item {
    padding: 5px 0;
    border-bottom: 1px solid #e0e0e0;
}

.solar-term-list-name {
    color: #e74c3c;
    font-weight: bold;
}

.solar-term-list-name-han {
    color: #7f8c8d;
}

.solar-term-list-date {
    color: #555;
}

/* 대운 표시 스타일 (표 형식, 우→좌 배치) */
.daeun-table-container {
    width: 100%;
    overflow-x: auto;
    margin-top: 10px;
}

.daeun-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid var(--border-color);
    background-color: transparent;
    margin: 0 auto;
}

.daeun-table th,
.daeun-table td {
    border: 1px solid var(--border-color);
    padding: 8px 4px;
    text-align: center;
    background-color: transparent;
    font-size: 14px;
    color: var(--text-primary);
}

.daeun-table thead th {
    font-weight: bold;
    font-size: 12px;
    color: var(--text-primary);
    background-color: transparent;
}

.daeun-gan-row td,
.daeun-zhi-row td {
    font-size: 18px;
    font-weight: bold;
    color: var(--text-primary);
    writing-mode: horizontal-tb;
    text-orientation: mixed;
}

/* 현재 대운 구간 강조 — 배경은 열 전체, 테두리 강조는 나이(세) 헤더만 */
.daeun-table th.daeun-current,
.daeun-table td.daeun-current {
    background-color: rgba(90, 107, 74, 0.16);
    position: relative;
    z-index: 1;
}

.daeun-table thead th.daeun-current {
    font-weight: 800;
    box-shadow: inset 0 0 0 2px var(--theme-green, #5a6b4a);
}

.daeun-info-current {
    color: var(--theme-green-deep, #5a6b4a);
    font-weight: 600;
}

html[data-theme="dark"] .daeun-table th.daeun-current,
html[data-theme="dark"] .daeun-table td.daeun-current {
    background-color: rgba(138, 154, 122, 0.22);
}

html[data-theme="dark"] .daeun-table thead th.daeun-current {
    box-shadow: inset 0 0 0 2px var(--theme-green, #8a9a7a);
}

html[data-theme="dark"] .daeun-info-current {
    color: var(--theme-green, #8a9a7a);
}

.daeun-info {
    margin-top: 15px;
    padding: 10px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    font-size: 13px;
    color: var(--text-secondary);
}

.daeun-info-item {
    margin-bottom: 5px;
}

.daeun-info-item:last-child {
    margin-bottom: 0;
}

/* 대운 표시 영역 */
#daeun-display {
    display: none;
}

@media print {
    /* 헤더/푸터 제외 */
    .topbar-pc {
        display: none !important;
    }
    
    /* top-bar 영역 전체 제외 */
    .topbar,
    .topbar-left-buttons,
    .topbar-left-btn,
    .topbar-right,
    .topbar-visitor-count {
        display: none !important;
    }
    
    .output-buttons {
        display: none !important;
    }
    
    /* 좌측 고객관리 레이어 버튼 제외 */
    .layer-toggle-btn {
        display: none !important;
    }
    
    /* 레이어 오버레이 제외 */
    .layer-overlay {
        display: none !important;
    }
    
    /* 우하단 공유 버튼 및 상단 이동 버튼 제외 */
    .share,
    .dropup,
    #top_btn,
    .top-btn,
    .fixed-bottom-buttons {
        display: none !important;
    }
    
    /* 하단 서비스 이동 버튼 제외 */
    .pro-bottom-buttons,
    .pro-bottom-btn-left,
    .pro-bottom-btn-right {
        display: none !important;
    }
    
    /* tail.pro.php 하단 정보 제외 */
    .pro-footer {
        display: none !important;
    }
    
    /* tail.sub.php 내용 제외 (일반적인 푸터 요소들) */
    #ft,
    .ft,
    footer {
        display: none !important;
    }
    
    .saju-ganzhi-vertical {
        background: transparent !important;
        box-shadow: none !important;
        max-width: 80px;
        padding: 20px 10px;
        min-height: 150px;
    }
    .saju-gan, .saju-zhi {
        color: #000 !important;
        text-shadow: none !important;
        font-size: 3.5em;
    }
    .saju-gan-cell,
    .saju-zhi-cell {
        color: #000 !important;
        background-color: transparent !important;
    }
    .daeun-table {
        border: 1px solid #000 !important;
        background-color: transparent !important;
    }
    .daeun-table th,
    .daeun-table td {
        border: 1px solid #000 !important;
        background-color: transparent !important;
        color: #000 !important;
    }
}

/* 상담 메모 스타일 */
.consultation-toolbar {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
}

/* 상담 메모 요약 카드 */
.consultation-summary-card {
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 15px;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

.consultation-summary-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.consultation-summary-title-section {
    flex: 1;
}

.consultation-summary-title {
    font-size: 1.1em;
    font-weight: bold;
    color: #333;
    margin: 0 0 5px 0;
}

.consultation-summary-date {
    font-size: 0.85em;
    color: #666;
}

.consultation-summary-actions {
    display: flex;
    gap: 8px;
}

.consultation-summary-btn {
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    background-color: #777;
    color: #eee;
    cursor: pointer;
    font-size: 13px;
    transition: background-color 0.2s;
}

.consultation-summary-btn:hover {
    background-color: #555;
    color: #eee;
}

.consultation-summary-content {
    margin-bottom: 12px;
    padding: 10px;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    border-radius: 3px;
    min-height: 40px;
}

.consultation-summary-preview {
    margin: 0;
    color: #555;
    line-height: 1.5;
    font-size: 0.9em;
}

.consultation-empty-text {
    margin: 0;
    color: #999;
    font-style: italic;
}

.consultation-summary-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85em;
    color: #666;
    padding-top: 10px;
    border-top: 1px solid var(--border-color);
}

.consultation-summary-writer {
    flex: 1;
}

.consultation-summary-count {
    margin-right: 10px;
    color: var(--color-blue, #5a6b4a);
}

.consultation-more-btn {
    padding: 4px 10px;
    border: 1px solid var(--color-blue, #5a6b4a);
    background-color: #fff;
    color: var(--color-blue, #5a6b4a);
    cursor: pointer;
    font-size: 12px;
    border-radius: 3px;
    transition: all 0.2s;
}

.consultation-more-btn:hover {
    background-color: var(--color-blue, #5a6b4a);
    color: #fff;
}

/* 현재 고객 내 검색 영역 */
.consultation-search-area {
    margin-bottom: 15px;
    padding: 10px;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border-radius: 4px;
}

.consultation-search-group,
.consultation-filter-group,
.consultation-action-group {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.consultation-search-input,
.consultation-date-filter {
    flex: 1;
    min-width: 150px;
    padding: 6px 10px;
    border: 1px solid var(--border-color);
    font-size: 14px;
}

.consultation-search-btn,
.consultation-filter-btn,
.consultation-clear-btn,
.consultation-new-btn {
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    background-color: var(--color-gray);
    color: var(--color-white);
    cursor: pointer;
    font-size: 13px;
    transition: background-color 0.2s;
}

.consultation-search-btn:hover,
.consultation-filter-btn:hover,
.consultation-clear-btn:hover {
    background-color: var(--color-gray);
    color: var(--color-white);
}

.consultation-new-btn {
    background-color: var(--color-blue, #5a6b4a);
    color: white;
    border-color: var(--color-blue, #5a6b4a);
}

.consultation-new-btn:hover {
    background-color: var(--theme-green-deep, #5a6b4a);
}

.consultation-list-container {
    max-height: 500px;
    overflow-y: auto;
}

.consultation-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.consultation-item {
    border: 1px solid #e0e0e0;
    padding: 12px;
    background-color: #fff;
    transition: box-shadow 0.2s;
}

.consultation-item:hover {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.consultation-item.consultation-important {
    border-left: 4px solid #e74c3c;
}

.consultation-item-header {
    margin-bottom: 8px;
}

.consultation-item-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
}

.consultation-important-badge {
    padding: 2px 6px;
    background-color: #e74c3c;
    color: white;
    font-size: 11px;
    border-radius: 3px;
    font-weight: bold;
}

.consultation-item-meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: #666;
    flex-wrap: wrap;
}

.consultation-item-content {
    margin-bottom: 8px;
    font-size: 14px;
    color: #333;
    line-height: 1.6;
}

.consultation-item-content p {
    margin: 0 0 8px 0;
}

.consultation-item-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.consultation-tag {
    padding: 2px 8px;
    background-color: #ecf0f1;
    color: #2c3e50;
    font-size: 11px;
    border-radius: 3px;
}

.consultation-item-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    padding-top: 8px;
    border-top: 1px solid #f0f0f0;
}

.consultation-edit-btn,
.consultation-delete-btn-small {
    padding: 4px 12px;
    border: 1px solid #ccc;
    background-color: #fff;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.2s;
}

.consultation-edit-btn:hover {
    background-color: var(--color-blue, #5a6b4a);
    color: white;
    border-color: var(--color-blue, #5a6b4a);
}

.consultation-delete-btn-small:hover {
    background-color: #e74c3c;
    color: white;
    border-color: #e74c3c;
}

.consultation-loading,
.consultation-empty {
    padding: 40px 20px;
    text-align: center;
    color: #999;
    font-size: 14px;
}

/* 상담 메모 입력/수정 폼 모달 */
.consultation-form-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10001; /* 레이어(z-index: 999) 및 스크롤바보다 훨씬 높게 설정 */
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none; /* 모달 외부 클릭 방지 */
}

.consultation-form-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* background-color: rgba(0, 0, 0, 0.1);  */
    background-color: none; /* 더 투명하게 */
    pointer-events: none; /* 오버레이 클릭 비활성화 */
}

.consultation-form-content {
    position: fixed;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    min-width: 500px;
    min-height: 400px;
    max-width: 90vw;
    max-height: 90vh;
    width: 90%;
    max-width: 700px;
    height: auto;
    max-height: 90vh;
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    z-index: 10002; /* 모달 및 모든 레이어 요소(스크롤바 포함)보다 높게 설정 */
    /* 초기 위치는 중앙 (JavaScript에서 조정) */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    pointer-events: auto; /* 모달 내용은 클릭 가능 */
}

/* 모바일 화면에서 상담 메모 입력 창 너비 100% */
@media (max-width: 768px) {
    .consultation-form-content {
        /* width: 100% !important; */
        max-width: 100% !important;
        min-width: 0 !important;
        left: 0 !important;
        right: 0 !important;
        transform: translateY(-50%) !important;
        top: 50%;
        /* height: 100vh; */
        /* max-height: 100vh; */
        border-left: none;
        border-right: none;
        border-radius: 0;
    }
}

/* 크기 조절 핸들 영역 */
.consultation-form-resize-handle {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 20px;
    height: 20px;
    background: linear-gradient(-45deg, transparent 30%, #ccc 30%, #ccc 50%, transparent 50%, transparent 70%, #ccc 70%);
    cursor: nwse-resize;
    z-index: 1002;
    pointer-events: auto;
}

.consultation-form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--border-color);
    color: var(--text-primary);
    cursor: move;
    user-select: none;
}

.consultation-form-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: bold;
}

.consultation-form-close {
    padding: 5px 10px;
    border: none;
    background: none;
    font-size: 22px;
    color: var(--text-secondary);
    cursor: pointer;
}

.consultation-form-close:hover {
    color: var(--text-primary);
}

.consultation-form {
    padding: 20px;
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.consultation-form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.consultation-form-group {
    flex: 1;
    min-width: 200px;
}

.consultation-form-group-full {
    flex: 100%;
}

.consultation-form-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 13px;
    font-weight: bold;
    color: var(--text-secondary);
}

.consultation-input,
.consultation-select,
.consultation-textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--bg-tertiary);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    box-sizing: border-box;
}

.consultation-textarea {
    resize: vertical;
    min-height: 150px;
}

.consultation-checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.consultation-checkbox-label input[type="checkbox"] {
    margin: 0;
}

.consultation-form-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.consultation-save-btn,
.consultation-cancel-btn,
.consultation-delete-btn {
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

.consultation-save-btn {
    background-color: var(--color-blue, #5a6b4a);
    color: white;
    border-color: var(--color-blue, #5a6b4a);
}

.consultation-save-btn:hover {
    background-color: var(--theme-green-deep, #5a6b4a);
}

.consultation-cancel-btn {
    background-color: #555;
    color: #eee;
}

.consultation-cancel-btn:hover {
    background-color: #777;
    color: #eee;
}

.consultation-delete-btn {
    background-color: #e74c3c;
    color: white;
    border-color: #e74c3c;
}

.consultation-delete-btn:hover {
    background-color: #c0392b;
}

/* 별난보고서 패널: 내용 높이만큼 자연 확장 (내부 max-height/중첩 스크롤 제거) */
.fortune-report-panel {
    display: flex;
    flex-direction: column;
    min-height: 0;
    /* flex:1 제거 — 그리드 열 높이에 맞춰 잘리며 내부 스크롤 생기는 문제 방지 */
    flex: 0 0 auto;
    overflow: visible;
}

/* 운세 메뉴 진입 시 접힌 상태: 높이를 헤더만 차지해 운세 패널이 위로 올라가도록 */
.fortune-report-panel.collapsed {
    flex: 0 0 auto;
}

/* 오행 분석 패널: 내용 높이만큼 자연 확장 */
.ohaeng-panel {
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 0 0 auto;
    overflow: visible;
}

.ohaeng-panel .window-panel-body {
    flex: 0 0 auto;
    min-height: 0;
    max-height: none;
    overflow: visible;
}

.ohaeng-panel.collapsed .window-panel-body {
    display: none;
    flex: 0 0 auto;
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    overflow: hidden;
}

.myeongri-interpret-panel .window-panel-body,
.myeongri-deep-panel .window-panel-body {
    flex: 0 0 auto;
    min-height: 0;
    max-height: none;
    overflow: visible;
}

.myeongri-interpret-panel.collapsed .window-panel-body,
.myeongri-deep-panel.collapsed .window-panel-body {
    display: none;
    flex: 0 0 auto;
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    overflow: hidden;
}

.fortune-report-panel .window-panel-body {
    flex: 0 0 auto;
    min-height: 0;
    max-height: none;
    overflow: visible;
}

.fortune-report-panel.collapsed .window-panel-body {
    display: none;
    flex: 0 0 auto;
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    overflow: hidden;
}

/* 혹시 남는 스크롤 영역이 있어도 스크롤바는 숨김 (터치/휠 스크롤은 가능) */
.fortune-report-panel .window-panel-body,
.ohaeng-panel .window-panel-body {
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.fortune-report-panel .window-panel-body::-webkit-scrollbar,
.ohaeng-panel .window-panel-body::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

/* AI 운세 리포트 탭 스타일 */
.fortune-report-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
    flex-wrap: wrap;
}

.fortune-report-tab {
    padding: 8px 15px;
    border: none;
    background: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-size: 13px;
    color: #666;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

.fortune-report-tab:hover {
    color: var(--color-blue, #5a6b4a);
}

.fortune-report-tab.active {
    color: var(--color-blue, #5a6b4a);
    border-bottom-color: var(--color-blue, #5a6b4a);
    font-weight: bold;
}

.fortune-report-tab-content {
    display: none !important;
}

.fortune-report-tab-content.active {
    display: block !important;
}

/* 별난보고서 서브탭 스타일 */
.weirdreport-subtabs {
    display: flex;
    gap: 5px;
    margin-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
    flex-wrap: wrap;
}

.weirdreport-subtab {
    padding: 8px 15px;
    border: none;
    background: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-size: 13px;
    color: #666;
    transition: all 0.2s;
}

.weirdreport-subtab:hover {
    color: var(--color-blue, #5a6b4a);
}

.weirdreport-subtab.active {
    color: var(--color-blue, #5a6b4a);
    border-bottom-color: var(--color-blue, #5a6b4a);
    font-weight: bold;
}

.weirdreport-subtab-content {
    display: none !important;
}

.weirdreport-subtab-content.active {
    display: block !important;
}

/* AI 종합 리포트 스타일 — 라이트/다크 테마 토큰 */
.ai-comprehensive-input {
    margin-bottom: 20px;
}

.ai-comprehensive-hint {
    margin: 0 0 8px;
    font-size: 13px;
    color: var(--text-secondary, #666);
}

.ai-comprehensive-memo {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid var(--input-border, var(--border-color, #ddd));
    border-radius: 4px;
    background: var(--input-bg, var(--bg-primary, #fff));
    color: var(--text-primary, #333);
    font: inherit;
    resize: vertical;
}

.ai-comprehensive-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ai-comprehensive-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font: inherit;
    color: var(--button-text, #fff);
    background: var(--color-blue, #5a6b4a);
}

.ai-comprehensive-btn--secondary {
    background: var(--color-gray-dark, #6a6a62);
}

.ai-comprehensive-result {
    margin-top: 20px;
    padding: 15px;
    border: 1px solid var(--border-color, #ddd);
    border-radius: 4px;
    background-color: var(--bg-secondary, #f9f9f9);
    color: var(--text-primary, #333);
    min-height: 100px;
}

.ai-comprehensive-cache-note {
    margin: 0 0 10px;
    font-size: 12px;
    color: var(--text-secondary, #888);
}

.ai-comprehensive-body .ai-comprehensive-h {
    margin: 1.1em 0 0.4em;
    font-size: 1.05em;
    font-weight: 700;
    color: var(--text-primary, #2c3e50);
}

.ai-comprehensive-body .ai-comprehensive-p {
    margin: 0 0 0.65em;
    line-height: 1.65;
    color: var(--text-secondary, var(--text-primary, #333));
    white-space: pre-wrap;
}

/* 오행 분석 스타일 */
.ohaeng-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
    flex-wrap: wrap;
}

.ohaeng-tab {
    padding: 8px 15px;
    border: none;
    background: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-size: 13px;
    color: #666;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

.ohaeng-tab span {
    flex: 1;
}

.ohaeng-checkbox-label {
    display: inline-flex;
    align-items: center;
    margin-left: 5px;
    cursor: pointer;
}

.ohaeng-checkbox-label input[type="checkbox"] {
    margin: 0;
    cursor: pointer;
    width: 16px;
    height: 16px;
}

.ohaeng-tab:hover {
    color: var(--color-blue, #5a6b4a);
}

.ohaeng-tab.active {
    color: var(--color-blue, #5a6b4a);
    border-bottom-color: var(--color-blue, #5a6b4a);
    font-weight: bold;
}

.ohaeng-tab-content {
    display: none !important;
}

.ohaeng-tab-content.active {
    display: block !important;
}


/* 오행 분석 설정 모달 */
.ohaeng-settings-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.ohaeng-settings-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    cursor: pointer;
}

.ohaeng-settings-modal-content {
    position: relative;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease;
    z-index: 10001;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.ohaeng-settings-modal-header {
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ohaeng-settings-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: bold;
    color: #2c3e50;
}

.ohaeng-settings-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: color 0.2s;
}

.ohaeng-settings-modal-close:hover {
    color: #e74c3c;
}

.ohaeng-settings-modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.ohaeng-settings-description {
    margin: 0 0 15px 0;
    font-size: 14px;
    color: #666;
}

.ohaeng-settings-checkbox-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.ohaeng-settings-checkbox-item {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.ohaeng-settings-checkbox-item:hover {
    background-color: #f8f9fa;
}

.ohaeng-settings-checkbox-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    margin: 0;
}

.ohaeng-settings-checkbox-item span {
    font-size: 14px;
    color: #333;
    user-select: none;
}

.ohaeng-settings-actions {
    display: flex;
    gap: 10px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.ohaeng-settings-btn-select-all,
.ohaeng-settings-btn-deselect-all {
    flex: 1;
    padding: 8px 16px;
    border: 1px solid #ddd;
    background-color: #fff;
    color: #666;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}

.ohaeng-settings-btn-select-all:hover {
    background-color: var(--color-blue, #5a6b4a);
    color: #fff;
    border-color: var(--color-blue, #5a6b4a);
}

.ohaeng-settings-btn-deselect-all:hover {
    background-color: #95a5a6;
    color: #fff;
    border-color: #95a5a6;
}

.ohaeng-settings-modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.ohaeng-settings-btn-cancel,
.ohaeng-settings-btn-apply {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.ohaeng-settings-btn-cancel {
    background-color: #ecf0f1;
    color: #666;
}

.ohaeng-settings-btn-cancel:hover {
    background-color: #bdc3c7;
}

.ohaeng-settings-btn-apply {
    background-color: var(--color-blue, #5a6b4a);
    color: #fff;
}

.ohaeng-settings-btn-apply:hover {
    background-color: var(--theme-green-deep, #5a6b4a);
}

/* AI 운세 리포트 설정 모달 */
.fortune-report-settings-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

.fortune-report-settings-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    cursor: pointer;
}

.fortune-report-settings-modal-content {
    position: relative;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease;
    z-index: 10001;
}

.fortune-report-settings-modal-header {
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.fortune-report-settings-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: bold;
    color: #2c3e50;
}

.fortune-report-settings-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: color 0.2s;
}

.fortune-report-settings-modal-close:hover {
    color: #e74c3c;
}

.fortune-report-settings-modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.fortune-report-settings-description {
    margin: 0 0 15px 0;
    font-size: 14px;
    color: #666;
}

.fortune-report-settings-checkbox-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.fortune-report-settings-checkbox-item {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.fortune-report-settings-checkbox-item:hover {
    background-color: #f8f9fa;
}

.fortune-report-settings-checkbox-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    margin: 0;
}

.fortune-report-settings-checkbox-item span {
    font-size: 14px;
    color: #333;
    user-select: none;
}

.fortune-report-settings-actions {
    display: flex;
    gap: 10px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.fortune-report-settings-btn-select-all,
.fortune-report-settings-btn-deselect-all {
    flex: 1;
    padding: 8px 16px;
    border: 1px solid #ddd;
    background-color: #fff;
    color: #666;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}

.fortune-report-settings-btn-select-all:hover {
    background-color: var(--color-blue, #5a6b4a);
    color: #fff;
    border-color: var(--color-blue, #5a6b4a);
}

.fortune-report-settings-btn-deselect-all:hover {
    background-color: #95a5a6;
    color: #fff;
    border-color: #95a5a6;
}

.fortune-report-settings-modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.fortune-report-settings-btn-cancel,
.fortune-report-settings-btn-apply {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.fortune-report-settings-btn-cancel {
    background-color: #ecf0f1;
    color: #666;
}

.fortune-report-settings-btn-cancel:hover {
    background-color: #bdc3c7;
}

.fortune-report-settings-btn-apply {
    background-color: var(--color-blue, #5a6b4a);
    color: #fff;
}

.fortune-report-settings-btn-apply:hover {
    background-color: var(--theme-green-deep, #5a6b4a);
}

/* 모바일 반응형 */
@media (max-width: 768px) {
    .ohaeng-settings-modal-content {
        width: 100%;
        max-width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
    }
    
    .ohaeng-settings-modal-header {
        padding: 15px;
    }
    
    .ohaeng-settings-modal-body {
        padding: 15px;
    }
    
    .ohaeng-settings-modal-footer {
        padding: 15px;
    }
}

@media print {
    .ohaeng-tabs {
        display: none;
    }
    
    /* 체크박스 숨김 */
    .ohaeng-checkbox-label {
        display: none !important;
    }
    
    /* 전체 탭 콘텐츠는 항상 표시 */
    .ohaeng-all-content {
        display: block !important;
    }
    
    /* 개별 탭 콘텐츠는 프린트에서 숨김 */
    .ohaeng-tab-content:not(.ohaeng-all-content) {
        display: none !important;
    }
    
    /* 체크 해제된 섹션은 프린트에서도 숨김 */
    .ohaeng-all-section[data-section="strength"]:not(:has(+ *)) {
        display: none !important;
    }
    
    /* 체크박스 상태에 따라 섹션 표시/숨김 (JavaScript로 처리) */
    .ohaeng-all-section {
        page-break-inside: avoid;
        page-break-after: auto;
    }
    
    .fiveElements-table,
    .tenGods-table,
    .twelveFortune-table,
    .wealthStructure-table,
    .shishenShangguanStructure-table,
    .careerStructure-table {
        border: 1px solid #000 !important;
    }
    .fiveElements-table th,
    .fiveElements-table td,
    .tenGods-table th,
    .tenGods-table td,
    .twelveFortune-table th,
    .twelveFortune-table td,
    .wealthStructure-table th,
    .wealthStructure-table td,
    .shishenShangguanStructure-table th,
    .shishenShangguanStructure-table td,
    .careerStructure-table th,
    .careerStructure-table td {
        border: 1px solid #000 !important;
        background-color: transparent !important;
        color: #000 !important;
    }
}

/* 문의하기 페이지 스타일 */
.contact-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    background: var(--bg-primary);
    color: var(--text-primary);
}

.contact-messages {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 500px;
    padding: 20px;
    margin: 0 auto;
}

.contact-form {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    padding: 20px;
    margin-top: 20px;
    border: 1px solid var(--bg-tertiary);
}

.contact-greeting {
    margin-bottom: 20px;
    padding: 10px 0;
    font-size: 20px;
    font-weight: bold;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--bg-tertiary);
}

.contact-plan-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 16px;
    max-width: 500px;
    width: 100%;
    box-sizing: border-box;
}

.contact-plan-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 140px;
    min-height: 42px;
    padding: 10px 14px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    box-sizing: border-box;
    border: 1px solid transparent;
}

.contact-plan-btn--primary {
    background: var(--color-blue, #5a6b4a);
    color: var(--button-text, #eee);
    border-color: var(--color-blue, #5a6b4a);
}

.contact-plan-btn--primary:hover {
    filter: brightness(1.05);
    color: var(--button-text, #eee);
}

.contact-plan-btn--secondary {
    background: var(--bg-primary, #fff);
    color: var(--text-primary, #333);
    border-color: var(--border-color, #ddd);
}

.contact-plan-btn--secondary:hover {
    border-color: var(--theme-green, var(--color-blue));
    color: var(--theme-green-deep, var(--color-blue));
}

.contact-form-group {
    margin-bottom: 20px;
}

.contact-form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-weight: 500;
}

.contact-form-group input,
.contact-form-group textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid var(--bg-tertiary);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 14px;
    box-sizing: border-box;
}

.contact-form-group input:focus,
.contact-form-group textarea:focus {
    border-color: var(--color-blue, #5a6b4a);
    outline: 1px solid var(--color-blue, #5a6b4a);
    outline-offset: -1px;
}

.contact-form-group textarea {
    min-height: 150px;
    resize: vertical;
}

.contact-submit-btn {
    width: 100%;
    padding: 8px 16px;
    background-color: #eee;
    color: #000;
    border: 1px solid #bbb;
    font-size: 14px;
    font-weight: normal;
    cursor: pointer;
}

.contact-submit-btn:hover {
    background-color: #e0e0e0;
    color: #000;
}

/* 허니팟 필드 숨김 */
.honeypot-field {
    display: none;
}

/* 메시지 스타일 */
.messageAi {
    background: #ecf0f1;
    padding: 15px;
    border: 1px solid #ddd;
    margin-bottom: 10px;
    position: relative;
}

.messageAi::after {
    display: none;
}

.messageAi p {
    margin-top: 10px;
    margin-bottom: 10px;
    color: #2c3e50;
}

.messageHuman {
    background: #d5e8f7;
    padding: 15px;
    border: 1px solid #ddd;
    margin-bottom: 10px;
}

.messageHuman p {
    margin-top: 10px;
    margin-bottom: 10px;
    color: #2c3e50;
}

.error-message {
    background: #fadbd8 !important;
}

.error-message p {
    color: #e74c3c !important;
}

/* 반응형 스타일 */
@media screen and (max-width: 768px) {
    .contact-container {
        padding: 15px;
    }
    
    .contact-form {
        padding: 20px;
    }
}

/* 전문가용 회원 페이지 스타일 - 딱딱한 디자인 */
#mb_login,
.register {
    max-width: 500px;
    margin: 0 auto;
    padding: 0;
}

.register form > p {
    color: var(--text-primary);
    margin: 0 0 20px 0;
    padding: 0;
    font-size: 14px;
}

.register form > p .fa-check-circle {
    color: var(--text-primary);
    margin-right: 8px;
}

.mbskin_box {
    max-width: 100%;
}

.mb_log_cate {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.mb_log_cate h2 {
    margin: 0;
    font-size: 18px;
    color: var(--text-primary);
}

.mb_log_cate .join {
    font-size: 14px;
    color: var(--text-secondary);
    text-decoration: none;
}

.mb_log_cate .join:hover {
    text-decoration: underline;
    color: var(--link-color);
}

#login_fs {
    max-width: 100%;
}

.login_input_row {
    margin-bottom: 10px;
}

.login_input_row input[type="text"],
.login_input_row input[type="password"] {
    width: 100%;
    padding: 8px;
    border: 1px solid var(--bg-tertiary);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 14px;
    box-sizing: border-box;
    margin-bottom: 10px;
}

.login_input_row input[type="text"]:last-of-type,
.login_input_row input[type="password"]:last-of-type {
    margin-bottom: 0;
}

.login_input_row .login_btn {
    width: 100%;
    margin-top: 10px;
    min-width: auto;
}

.login_info_row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.login_info_row .login_if_auto {
    margin: 0;
}

.login_info_row .login_if_lpl {
    margin: 0;
}

.login_info_row .login_if_lpl a {
    font-size: 13px;
    color: var(--text-secondary);
    text-decoration: none;
}

.login_info_row .login_if_lpl a:hover {
    text-decoration: underline;
    color: var(--link-color);
}

/* 버튼 스타일 통일 - 최소한의 디자인 */
.btn_submit,
.btn_close,
.reg_btn_submit {
    padding: 8px 16px;
    border: 1px solid #333;
    background-color: #fff;
    color: #333;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    min-width: 80px;
}

.btn_submit:hover,
.reg_btn_submit:hover {
    background-color: #fafafa;
    color: #000;
}

/* 로그인 버튼 특별 스타일 */
.login_btn {
    background-color: #fafafa;
    color: #000;
}

.login_btn:hover {
    background-color: #f5f5f5;
    color: #000;
}

.btn_close {
    background-color: #f5f5f5;
    border-color: #999;
    color: #333;
    margin: 20px auto;
    display: block;
}

.btn_close:hover {
    background-color: #e0e0e0;
}

.btn_confirm {
    margin-top: 20px;
    text-align: center;
    display: flex;
    gap: 10px;
    justify-content: center;
}

.btn_confirm a,
.btn_confirm button {
    margin: 0;
    padding: 8px 16px !important;
    width: 150px !important;
    min-width: 150px !important;
    height: 36px !important;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    font-size: 14px;
    text-decoration: none;
    border: 1px solid #333;
    background-color: #fff;
    color: #333;
    cursor: pointer;
}

.btn_confirm a.btn_close {
    background-color: #f5f5f5;
    border-color: #999;
    color: #333;
}

.btn_confirm a.btn_close:hover {
    background-color: #e0e0e0;
}

.btn_confirm button.btn_submit:hover {
    background-color: #f5f5f5;
}

/* 회원가입 폼 스타일 */
#register_form {
    padding: 0;
    margin: 0;
}

.register_form_inner {
    margin-bottom: 20px;
    padding: 0;
}

/* tbl_frm01, tbl_wrap 클래스의 패딩 제거 */
.tbl_frm01.register_form_inner,
.tbl_wrap.register_form_inner,
.tbl_frm01.tbl_wrap.register_form_inner {
    padding: 0 !important;
    margin: 0 0 20px 0;
}

.register_form_inner ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.register_form_inner li {
    margin-bottom: 15px;
    padding: 0;
}

.register_form_inner input[type="text"],
.register_form_inner input[type="password"],
.register_form_inner input[type="email"],
.register_form_inner input[type="tel"],
.register_form_inner textarea,
.register_form_inner select,
.register_form_inner .frm_input {
    width: 100%;
    max-width: 100%;
    padding: 8px;
    border: 1px solid var(--bg-tertiary);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 14px;
    box-sizing: border-box;
    margin: 0;
}

.register_form_inner .full_input {
    width: 100%;
    max-width: 100%;
}

/* half_input 스타일 (비밀번호, 비밀번호 확인 등) */
.register_form_inner .half_input {
    width: 48%;
    float: left;
}

.register_form_inner .half_input.left_input {
    margin-right: 4%;
}

.register_form_inner .half_input.margin_input {
    margin-bottom: 15px;
}

/* half_input이 있는 ul의 clearfix */
.register_form_inner ul:after {
    content: "";
    display: table;
    clear: both;
}

/* required 표시 수정 */
.register_form_inner .required::after {
    content: " *";
    color: #c00;
    margin-left: 2px;
}

/* tooltip_icon 위치 조정 */
.register_form_inner label .tooltip_icon {
    margin-left: 5px;
    vertical-align: middle;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-size: 14px;
    color: #666;
    display: inline-block;
}

.register_form_inner textarea {
    min-height: 80px;
    resize: vertical;
}

/* 체크박스 스타일 - 최소한 */
.chk_box {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    position: relative;
}

.chk_box input[type="checkbox"] {
    margin: 0;
    flex-shrink: 0;
}

.chk_box label {
    margin: 0;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.chk_box label span {
    display: none;
}

.chk_box .chk_li {
    margin: 0;
    display: inline-block;
    flex: 1;
}

/* ============================================
   Fortune 폴더 스타일 (pro/fortune)
   ============================================ */

/* 미디어 컨테이너 */
.mediaContainer {
    width: 100vw;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    margin-top: 30px;
    margin-bottom: 30px;
}

/* 텍스트 컨테이너 */
.divText {
    margin: auto;
    padding: 10px;
    border: 1px solid black;
    max-width: 90%;
}

/* 제목 스타일 */
.divTitle0 {
    display: block;
    max-width: 95vw;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    color: #ffffff;
    background: linear-gradient(to right, 
        #d0d0d0 5%, rgb(165, 165, 165) 10%, black 15%, 
        #cfcbcb 25%, black 40%, #d0d0d0 95%);
}

.divTitle1 {
    display: block;
    max-width: 95vw;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    color: #ffffff;
    background: linear-gradient(to right, 
        rgb(255, 255, 255) 5%, #717fad 17%, black 27%, 
        rgb(168, 168, 168) 40%, black 60%, white 95%);
}

.divTitle2 {
    display: block;
    max-width: 95vw;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    color: #ffffff;
    background: linear-gradient(to right, 
        rgb(255, 255, 255) 5%, black 15%, #74a86e 33%, 
        #74a86e 40%, black 70%, white 95%);
}

.divTitle3 {
    display: block;
    max-width: 95vw;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    color: #ffffff;
    background: linear-gradient(to right, 
        rgb(255, 255, 255) 5%, black 38%, #a1915d 65%, 
        #d4cfc4 78%, black 85%, white 95%);
}

.divTitle4 {
    display: block;
    max-width: 95vw;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    color: #ffffff;
    background: linear-gradient(to right, 
        rgb(255, 255, 255) 5%, black 40%, rgb(143, 143, 143) 60%, 
        black 73%, #b38191 83%, white 95%);
}

/* 원형 색상 표시 */
.circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: rgb(127, 127, 127);
    box-shadow: 3px 3px 5px rgb(133, 133, 133);
}

/* 오늘운 관련 스타일 */
.now_number,
.now_business,
.now_direct,
.now_nature,
.now_animal {
    white-space: nowrap;
    overflow: auto;
}

/* 애정운 관련 스타일 */
.love_mate {
    margin-left: auto;
    margin-right: auto;
    max-width: 80vw;
}

/* 나에 대한 리포트 관련 스타일 */
.me_nature {
    margin: 0 auto;
}

.me_animal {
    white-space: nowrap;
    overflow: auto;
}

.me_color {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    box-shadow: inset 1px 1px 20px #00000095;
    background-color: rgb(127, 127, 127);
}

/* 종합운 관련 스타일 */
.life_nature,
.life_animal {
    white-space: nowrap;
    overflow: auto;
}

/* 바이오리듬 스타일 */
.bio {
    font-family: 'Noto Sans', -apple-system, BlinkMacSystemFont, Arial, sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    overflow: hidden;
}

/* 서비스 사용 정보 표시 영역 */
.service-usage-info {
    background-color: var(--bg-secondary, #f8f9fa);
    border: 1px solid var(--border-color, #e0e0e0);
    border-radius: 4px;
    padding: 10px 15px;
    margin-bottom: 15px;
    font-size: 13px;
    color: var(--text-primary, #333);
}

.service-usage-info.usage-limit-exceeded {
    background-color: #fff3cd;
    border-color: #ffc107;
    color: #856404;
}

.service-usage-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.service-usage-content span {
    font-weight: 500;
}

.bio canvas {
    margin-top: 20px;
}

/* 메인 이미지 스타일 */
.main_image {
    position: relative;
    min-height: 300px;
}

.main_image img {
    opacity: 0.7;
}

.main_image_text {
    position: absolute;
    width: 100%;
    max-width: 700px;
    height: auto;
    color: white;
    background: var(--button-bg);
    padding: 15px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* 별자리/기타 섹션 스타일 */
.zodiac-etc-section {
    margin-bottom: 30px;
}

/* 바이오리듬 컨테이너 스타일 */
.biorhythm-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

/* Fortune 리포트 콘텐츠 스타일 — 좌우 패딩 제거(패널 바디와 맞춤) */
.fortune-report-content {
    padding: 8px 0 12px;
    color: var(--text-primary);
}

.fortune-report-content h1,
.fortune-report-content h2,
.fortune-report-content h3,
.fortune-report-content h4 {
    color: var(--text-primary);
}

.fortune-report-content p {
    color: var(--text-secondary, var(--text-primary));
}

.wr-fr-main-title {
    margin: 0 0 24px;
    color: var(--text-primary) !important;
}
.wr-fr-section {
    margin-bottom: 28px;
    padding-bottom: 0;
    border-bottom: none;
}
.wr-fr-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}
/* 제목: 오행 탭과 동일 — 밑줄 */
.wr-fr-section-title {
    margin: 0 0 12px;
    padding: 12px 0 8px;
    font-size: 1.2em;
    font-weight: 700;
    color: var(--text-primary) !important;
    border: none;
    border-bottom: 1px solid var(--link-color, var(--border-color));
}
.wr-fr-section-title--me,
.wr-fr-section-title--mbti,
.wr-fr-section-title--strength,
.wr-fr-section-title--life,
.wr-fr-section-title--zodiac,
.wr-fr-section-title--bio {
    border-left: none;
    padding-left: 0;
}

/* 별난보고서 본문 블록 — 세로 바 대신 1px 테두리 박스(선택) 또는 평문 */
.wr-mbti-box {
    margin: 12px 0;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    color: var(--text-primary);
    box-shadow: none;
}
.wr-mbti-box--result {
    text-align: center;
}
.wr-mbti-box--accent,
.wr-mbti-box--warn,
.wr-mbti-box--ok,
.wr-mbti-box--info {
    padding: 10px 12px;
    border: 1px solid var(--border-color, var(--bg-tertiary));
    border-radius: 0;
    background: transparent;
}
.wr-mbti-box h3,
.wr-mbti-box h4,
.wr-mbti-type,
.wr-mbti-name {
    color: var(--text-primary) !important;
    margin: 0 0 8px;
}
.wr-mbti-type {
    font-size: 2.2em;
    font-weight: 700;
    text-align: center;
}
.wr-mbti-name {
    font-size: 1.25em;
    color: var(--link-color, #3F8BC9) !important;
    text-align: center;
}
.wr-mbti-box p,
.wr-mbti-desc {
    color: var(--text-secondary, var(--text-primary)) !important;
    line-height: 1.7;
    margin: 0 0 10px;
}
.wr-mbti-card {
    margin: 12px 0;
    padding: 10px 0;
    background: transparent;
    border: none;
    border-radius: 0;
    color: var(--text-primary);
}
.wr-mbti-card h4 {
    color: var(--text-primary) !important;
    margin: 0 0 8px;
    font-size: 1.05em;
    font-weight: 700;
}
.wr-mbti-toolbar {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}
.wr-mbti-select {
    padding: 8px 10px;
    font-size: 1em;
    border: 1px solid var(--input-border, var(--border-color, #ccc));
    border-radius: 4px;
    background: var(--input-bg, var(--bg-primary));
    color: var(--text-primary);
    cursor: pointer;
}
.wr-mbti-btn {
    padding: 8px 14px;
    border: 1px solid var(--border-color, var(--bg-tertiary));
    border-radius: 4px;
    background: var(--button-bg, var(--color-blue, #5a6b4a));
    color: var(--button-text, #fff);
    cursor: pointer;
    font-size: 0.95em;
}
.wr-mbti-btn--danger {
    background: transparent;
    color: var(--text-primary);
    border-color: var(--border-color, #888);
}
.wr-mbti-bar {
    background: var(--mbti-bar-bg, var(--bg-tertiary, #ddd));
    height: 12px;
    border-radius: 6px;
    overflow: hidden;
}
.wr-mbti-bar > span {
    display: block;
    height: 100%;
    background: var(--mbti-bar-fg, #888);
    border-radius: 6px 0 0 6px;
}
.wr-mbti-axis {
    margin-bottom: 14px;
}
.wr-mbti-axis:last-child {
    margin-bottom: 8px;
}
.wr-mbti-axis-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 6px;
    margin: 0 0 8px;
    color: var(--text-primary) !important;
    font-size: 0.95em;
    line-height: 1.4;
}
.wr-mbti-axis-title strong {
    font-weight: 600;
}
.wr-mbti-dot {
    display: inline-block;
    width: 0.7em;
    height: 0.7em;
    border-radius: 50%;
    flex-shrink: 0;
    vertical-align: -0.05em;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
}
.wr-mbti-axis-pair {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-right: 2px;
}
.wr-mbti-axis-sep {
    color: var(--text-secondary, #888);
    margin: 0 2px;
}
.wr-mbti-axis-result {
    margin-left: 4px;
    color: var(--text-secondary, var(--text-primary));
    font-weight: 500;
}
/* E/I · S/N · T/F 보색 쌍 (전경=좌측 성향, 배경=우측 성향) */
.wr-mbti-axis--ei {
    --mbti-left: #3B82F6;
    --mbti-right: #F59E0B;
    --mbti-bar-fg: var(--mbti-left);
    --mbti-bar-bg: var(--mbti-right);
}
.wr-mbti-axis--sn {
    --mbti-left: #0D9488;
    --mbti-right: #E11D48;
    --mbti-bar-fg: var(--mbti-left);
    --mbti-bar-bg: var(--mbti-right);
}
.wr-mbti-axis--tf {
    --mbti-left: #65A30D;
    --mbti-right: #7C3AED;
    --mbti-bar-fg: var(--mbti-left);
    --mbti-bar-bg: var(--mbti-right);
}
.wr-mbti-axis--ei .wr-mbti-dot--left,
.wr-mbti-axis--sn .wr-mbti-dot--left,
.wr-mbti-axis--tf .wr-mbti-dot--left {
    background: var(--mbti-left);
}
.wr-mbti-axis--ei .wr-mbti-dot--right,
.wr-mbti-axis--sn .wr-mbti-dot--right,
.wr-mbti-axis--tf .wr-mbti-dot--right {
    background: var(--mbti-right);
}
.wr-mbti-note {
    margin: 12px 0;
    padding: 10px 12px;
    background: transparent;
    border: 1px solid var(--border-color, var(--bg-tertiary));
    border-radius: 0;
    color: var(--text-secondary, var(--text-primary));
    box-sizing: border-box;
}
.wr-mbti-note p {
    margin: 0;
    color: inherit !important;
}
.wr-mbti-note--ok,
.wr-mbti-note--info,
.wr-mbti-note--warn {
    border-left: 1px solid var(--border-color, var(--bg-tertiary));
}

html[data-theme="dark"] .wr-mbti-box,
html[data-theme="dark"] .wr-mbti-card,
html[data-theme="dark"] .wr-mbti-note {
    background: transparent;
}
html[data-theme="dark"] .wr-mbti-box--accent,
html[data-theme="dark"] .wr-mbti-box--warn,
html[data-theme="dark"] .wr-mbti-box--ok,
html[data-theme="dark"] .wr-mbti-box--info,
html[data-theme="dark"] .wr-mbti-note {
    border: 1px solid var(--border-color, #404040);
}
html[data-theme="dark"] .wr-mbti-card {
    background: transparent;
}
html[data-theme="dark"] .wr-mbti-dot {
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}
html[data-theme="dark"] .wr-mbti-select {
    background: var(--input-bg, #2d2d2d);
    border-color: var(--input-border, #404040);
    color: var(--text-primary);
}

/* 다크모드: 하드코딩된 밝은 박스/어두운 제목 보정 */
html[data-theme="dark"] .fortune-report-panel .fortune-report-content h1,
html[data-theme="dark"] .fortune-report-panel .fortune-report-content h2,
html[data-theme="dark"] .fortune-report-panel .fortune-report-content h3,
html[data-theme="dark"] .fortune-report-panel .fortune-report-content h4 {
    color: var(--text-primary) !important;
}
html[data-theme="dark"] .fortune-report-panel .fortune-report-content p {
    color: var(--text-secondary, #bbb) !important;
}

/* 애니메이션 */
@keyframes birthCircle {
    0% {
        transform: translateX(0%);
    }
    25% {
        transform: translateX(16%);
    }
    50% {
        transform: translateX(0%);
    }
    75% {
        transform: translateX(8%);
    }
    100% {
        transform: translateX(0%);
    }
}

@keyframes nowCircle {
    0% {
        transform: translateX(0%);
    }
    25% {
        transform: translateX(16%);
    }
    50% {
        transform: translateX(0%);
    }
    75% {
        transform: translateX(8%);
    }
    100% {
        transform: translateX(0%);
    }
}

@keyframes meCircle {
    0% {
        transform: translateY(0%);
    }
    25% {
        transform: translateY(7%);
    }
    45% {
        transform: translateY(0%);
    }
    62% {
        transform: translateY(3%);
    }
    80% {
        transform: translateY(0%);
    }
    91% {
        transform: translateY(1%);
    }
    100% {
        transform: translateY(0%);
    }
}

/* 원형 애니메이션 적용 */
:is(#c1, #c2, #c3, #c4, #c5, #c6) {
    animation: birthCircle 1s ease;
    animation-iteration-count: 1;
    animation-fill-mode: forwards;
}

#c1 { animation-delay: 0.5s; }
#c2 { animation-delay: 0.6s; }
#c3 { animation-delay: 0.7s; }
#c4 { animation-delay: 0.8s; }
#c5 { animation-delay: 0.9s; }
#c6 { animation-delay: 1.0s; }

:is(#nC1, #nC2, #nC3, #nC4, #nC5, #nC6) {
    animation: nowCircle 1s ease;
    animation-iteration-count: 1;
    animation-fill-mode: forwards;
}

#nC1 { animation-delay: 0.5s; }
#nC2 { animation-delay: 0.6s; }
#nC3 { animation-delay: 0.7s; }
#nC4 { animation-delay: 0.8s; }
#nC5 { animation-delay: 0.9s; }
#nC6 { animation-delay: 1.0s; }

:is(#meC1) {
    animation: meCircle 1s ease;
    animation-iteration-count: 1;
    animation-fill-mode: forwards;
    animation-delay: 0.5s;
}

/* 로그인 유도 모달 */
.login-prompt-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.login-prompt-modal.active {
    opacity: 1;
    visibility: visible;
}

.login-prompt-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    cursor: pointer;
}

.login-prompt-content {
    position: relative;
    background-color: var(--bg-secondary, #fff);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.login-prompt-modal.active .login-prompt-content {
    transform: scale(1);
}

.login-prompt-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-color, #e0e0e0);
}

.login-prompt-header h3 {
    margin: 0;
    font-size: 20px;
    color: var(--text-primary, #333);
}

.login-prompt-close {
    background: none;
    border: none;
    font-size: 28px;
    color: var(--text-secondary, #666);
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.login-prompt-close:hover {
    color: var(--text-primary, #333);
}

.login-prompt-body {
    padding: 20px;
    color: var(--text-primary, #333);
}

.login-prompt-body p {
    margin: 0 0 10px 0;
    line-height: 1.6;
}

.login-prompt-body ul {
    margin: 15px 0;
    padding-left: 25px;
    color: var(--text-secondary, #666);
    font-size: 14px;
}

.login-prompt-body li {
    margin-bottom: 8px;
    line-height: 1.6;
}

.login-prompt-footer {
    display: flex;
    gap: 10px;
    padding: 20px;
    border-top: 1px solid var(--border-color, #e0e0e0);
    justify-content: flex-end;
}

.login-prompt-btn-secondary,
.login-prompt-btn-primary {
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.login-prompt-btn-secondary {
    background-color: var(--bg-tertiary, #f5f5f5);
    color: var(--text-primary, #333);
    border: 1px solid var(--border-color, #e0e0e0);
}

.login-prompt-btn-secondary:hover {
    background-color: var(--bg-secondary, #e0e0e0);
}

/* 고객관리 레이어 내 한/漢 전환 버튼 스타일 */
.ganzhi-toggle-area {
    margin-bottom: 15px;
}

.ganzhi-toggle-btn-client {
    width: 100%;
    padding: 10px 15px;
    font-size: 14px;
    background: #757577;
    color: #fff;
    border: 1px solid #757577;
    cursor: pointer;
    transition: background-color 0.2s, opacity 0.2s;
    font-weight: 500;
    font-family: 'Noto Sans', -apple-system, BlinkMacSystemFont, 'Malgun Gothic', '맑은 고딕', Arial, sans-serif;
    height: auto;
    box-sizing: border-box;
}

.ganzhi-toggle-btn-client:hover {
    background: #4a4a63;
    border: 1px solid #4a4a63;
}

.ganzhi-toggle-btn-client:active {
    opacity: 0.8;
}

.login-prompt-btn-primary {
    background-color: var(--button-bg, var(--color-blue, #5a6b4a));
    color: var(--button-text, #fff);
    border: none;
}

.login-prompt-btn-primary:hover {
    background-color: var(--link-color, var(--theme-green-deep, #5a6b4a));
    color: var(--button-text, #fff);
}

/* Pro 전용 카테고리 메뉴 바 */
.pro-category-menu-bar {
    position: sticky;
    top: 55px; /* topbar 높이만큼 아래로 */
    /* topbar(77)보다 낮게 — 검색 드롭다운이 메뉴바에 가리지 않도록 */
    z-index: 50;
    background-color: var(--bg-primary, #fff);
    border-bottom: 1px solid var(--border-color, #e0e0e0);
    padding: 0;
    margin-bottom: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    width: 100%;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    gap: 0;
}

/* 좌측 고정 아이콘: 명단 · 이용안내
   세로 패딩은 .pro-category-menu-scroll 과 동일하게 맞춰 높이 정렬 */
.pro-category-menu-left {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    gap: 4px;
    padding: 8px 4px 8px 8px;
    box-sizing: border-box;
}

.pro-category-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    /* 메뉴 pill(.pro-category-menu-item)과 동일 높이 — 세로 위치 어긋남 방지 */
    width: 36px;
    height: 36px;
    min-height: 36px;
    padding: 0;
    margin: 0;
    border: 1px solid var(--border-color, #e0e0e0);
    border-radius: 4px;
    background: var(--bg-secondary, #f8f9fa);
    color: var(--text-primary, #333);
    text-decoration: none;
    cursor: pointer;
    flex-shrink: 0;
    box-sizing: border-box;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.pro-category-icon-btn i,
.pro-category-icon-btn .fa,
.pro-category-icon-btn .fa-solid {
    font-size: 16px;
    line-height: 1;
    color: inherit;
}

.pro-category-icon-btn:hover {
    background: var(--bg-tertiary, #e6e4dc);
    border-color: var(--theme-green, #8fad6a);
    color: var(--text-primary, #333);
}

.pro-category-icon-btn.active,
.pro-category-icon-btn.is-active {
    background: var(--bg-primary, #fff);
    border-color: var(--theme-green, #8fad6a);
    color: var(--theme-green-deep, #5a6b4a);
    box-shadow: inset 0 -2px 0 var(--theme-green, #8fad6a);
}

/* 메뉴바 안 명단 버튼: 플로팅 스타일 무력화 */
.pro-category-menu-left .layer-toggle-btn {
    position: static !important;
    top: auto !important;
    left: auto !important;
    width: 36px !important;
    height: 36px !important;
    padding: 0 !important;
    writing-mode: horizontal-tb;
    flex-direction: row;
    border-radius: 4px !important;
    box-shadow: none !important;
    z-index: auto;
}

/* ≤1099: 드로어용 명단 아이콘 표시 (아이콘 기본 display 이후에 위치) */
@media (max-width: 1099px) {
    .pro-category-menu-left .layer-toggle-btn {
        display: inline-flex !important;
    }
}

@media (min-width: 1100px) {
    .pro-category-menu-left .layer-toggle-btn {
        display: none !important;
    }
}

.pro-category-menu-scroll {
    display: flex;
    align-items: center;
    /* center 사용 시 overflow 시 좌측 항목이 scrollLeft=0 밖에 남아 스크롤 불가 */
    justify-content: flex-start;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    /* 가로 스크롤바(thin 4px)가 레이아웃 높이를 잡아 좌측 아이콘과 메뉴 pill 세로 위치가 어긋남
       → 스크롤바 숨김 (터치 스와이프·마우스 드래그 스크롤은 유지) */
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 8px 8px 8px 4px;
    gap: 8px;
    box-sizing: border-box;
    flex: 1;
    min-width: 0;
}

.pro-category-menu-scroll::-webkit-scrollbar {
    display: none;
    height: 0;
    width: 0;
}

.pro-category-menu-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    /* 좌측 아이콘 버튼과 동일 높이 */
    height: 36px;
    min-height: 36px;
    min-width: fit-content;
    white-space: nowrap;
    background-color: var(--bg-secondary, #f8f9fa);
    color: var(--text-primary, #333);
    text-decoration: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color, #e0e0e0);
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    flex-shrink: 0;
    box-sizing: border-box;
}

.pro-category-menu-item:hover {
    background-color: var(--link-color, var(--color-blue, #5a6b4a));
    color: var(--bg-secondary, #fff);
    border-color: var(--link-color, var(--color-blue, #5a6b4a));
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.2);
}

.pro-category-menu-item.active {
    background-color: var(--link-color, var(--color-blue, #5a6b4a));
    color: var(--bg-primary, #fff);
    border-color: var(--link-color, var(--color-blue, #5a6b4a));
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(0, 123, 255, 0.3);
}

/* 터치/드래그 스크롤 개선 */
.pro-category-menu-scroll {
    cursor: grab;
}

.pro-category-menu-scroll:active {
    cursor: grabbing;
}

.pro-category-menu-scroll.dragging {
    cursor: grabbing;
    user-select: none;
    -webkit-user-select: none;
}

/* 모바일 최적화 */
@media (max-width: 768px) {
    .pro-category-menu-bar {
        top: 55px; /* 모바일 topbar 높이 */
    }
    
    .pro-category-menu-left {
        padding: 8px 4px 8px 8px;
    }

    .pro-category-menu-scroll {
        padding: 8px 8px 8px 4px;
        gap: 6px;
    }

    .pro-category-icon-btn,
    .pro-category-menu-left .layer-toggle-btn {
        width: 34px !important;
        height: 34px !important;
        min-height: 34px;
    }
    
    .pro-category-menu-item {
        padding: 0 12px;
        height: 34px;
        min-height: 34px;
        font-size: 13px;
    }
}

/* 세로형 모바일: 상단 카테고리 메뉴 전폭(좌우 마진 0) */
@media (max-width: 768px) and (orientation: portrait) {
    #pro-container.wr-shell-pro .pro-category-menu-bar {
        width: calc(100% + 20px);
        max-width: none;
        margin-left: -10px;
        margin-right: -10px;
        box-sizing: border-box;
    }

    #pro-container.wr-shell-pro .pro-category-menu-scroll {
        padding-left: 4px;
        padding-right: 8px;
    }

    #pro-container.wr-shell-pro .pro-category-menu-left {
        padding-left: 8px;
    }
}

/* 운세 패널 스타일 */
.unse-panel {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 1;
}

.unse-panel .window-panel-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.unse-panel.collapsed .window-panel-body {
    flex: 0 0 auto;
}

.unse-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
    flex-wrap: wrap;
}

.unse-tab {
    padding: 10px 20px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    margin-bottom: -2px;
}

.unse-tab:hover {
    color: var(--link-color);
}

.unse-tab.active {
    color: var(--link-color);
    border-bottom-color: var(--link-color);
    font-weight: bold;
}

.unse-tab-content {
    display: none;
}

.unse-tab-content.active {
    display: block;
}

.unse-search-row {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.unse-related-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0 0 14px;
    padding: 10px 12px;
    background: var(--bg-secondary, #f5f7fa);
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 8px;
}
.unse-related-nav--panel {
    margin: 14px 0 0;
}
.unse-fortune-report-cta {
    margin-top: 10px;
}
.unse-fortune-report-cta-btn {
    display: inline-block;
    text-decoration: none;
    font-weight: 600;
}
.unse-related-nav-label {
    font-size: 0.85em;
    font-weight: 600;
    color: var(--text-secondary, #6b7280);
    margin-right: 4px;
}
.unse-related-nav-btn {
    appearance: none;
    border: 1px solid var(--link-color, #3F8BC9);
    background: var(--bg-primary, #fff);
    color: var(--link-color, #3F8BC9);
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 0.9em;
    font-weight: 600;
    cursor: pointer;
    line-height: 1.3;
}
.unse-related-nav-btn:hover {
    background: var(--link-color, #3F8BC9);
    color: #fff;
}

.unse-four-panels {
    margin-top: 16px;
}

.unse-panel-block {
    margin-bottom: 20px;
    padding: 14px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-secondary, #f9f9f9);
}

.unse-panel-block .unse-panel-title {
    margin: 0 0 8px 0;
    font-size: 15px;
    color: var(--text-primary);
}

.unse-panel-block .unse-panel-summary,
.unse-panel-block .unse-panel-ganzhi {
    margin: 6px 0;
    font-size: 13px;
}

.unse-panel-other-date-wrap {
    margin-top: 12px;
    margin-bottom: 0;
}

.unse-other-date-btn {
    padding: 6px 14px;
    font-size: 13px;
    cursor: pointer;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-primary);
    color: var(--link-color, #06c);
}

.unse-other-date-btn:hover {
    background: var(--bg-tertiary);
}

.unse-panel-block .unse-more-btn {
    margin-top: 8px;
    padding: 6px 12px;
    font-size: 12px;
    cursor: pointer;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-primary);
    color: var(--text-secondary);
    transition: background 0.3s ease;
}
.unse-panel-block .unse-more-btn:hover {
    background: var(--link-color);
    color: var(--bg-primary);
    border-color: var(--link-color);
}

.unse-panel-block .unse-sub-select {
    padding: 6px 10px;
    margin-top: 4px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.unse-settings-dropdown label {
    cursor: pointer;
}

.unse-panel-year-list .unse-year-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.unse-panel-year-list .unse-year-item {
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color, #eee);
    font-size: 13px;
}

.unse-panel-year-list .unse-year-item:last-child {
    border-bottom: none;
}

.unse-panel-year-list .unse-year-year {
    font-weight: bold;
    margin-right: 8px;
    min-width: 48px;
    display: inline-block;
}

.unse-panel-year-list .unse-year-ganji {
    color: var(--link-color, #06c);
    margin-right: 8px;
    min-width: 56px;
    display: inline-block;
}

.unse-panel-year-list .unse-year-summary {
    color: var(--text-secondary, #666);
}

.unse-donut-row {
    margin: 14px 0 18px;
}
.unse-donut-table {
    table-layout: fixed;
    text-align: center;
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
}
.unse-donut-label {
    margin: 0 0 6px;
    font-size: 0.9em;
    font-weight: 600;
    color: var(--text-primary);
}
.unse-pct-badges {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-left: 4px;
    vertical-align: middle;
}
.unse-pct-badge {
    display: inline-block;
    padding: 1px 6px;
    font-size: 0.75em;
    border: 1px solid;
    border-radius: 3px;
    background: var(--bg-primary, #fff);
    color: var(--text-primary);
    white-space: nowrap;
}
.unse-trend-wrap {
    margin: 12px 0 16px;
    padding: 10px 8px 8px;
    background: var(--bg-secondary, #fafafa);
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 6px;
}
.unse-trend-title {
    margin: 0 0 8px;
    font-size: 0.95em;
    font-weight: 600;
    color: var(--text-primary);
}
.unse-trend-canvas,
.unse-bio-canvas {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
}
.unse-trend-legend {
    margin-top: 6px;
    font-size: 0.85em;
    color: var(--text-secondary, #6b7280);
    text-align: center;
}
.unse-year-item,
.unse-month-item,
.unse-day-item {
    cursor: pointer;
}
.unse-year-item:hover,
.unse-month-item:hover,
.unse-day-item:hover {
    background: rgba(63, 139, 201, 0.08);
}
.unse-sub-item-main {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 8px;
}
.unse-sub-item-summary {
    margin-top: 4px;
    font-size: 0.9em;
    color: var(--text-secondary, #6b7280);
    line-height: 1.45;
}
.unse-sub-item-defines {
    margin-top: 4px;
    min-height: 0;
}
.unse-defines-line {
    display: block;
    margin-top: 2px;
    font-size: 0.86em;
    line-height: 1.5;
    color: #374151;
    background: rgba(147, 197, 253, 0.12);
    border-left: 3px solid #3F8BC9;
    padding: 6px 8px;
    border-radius: 0 4px 4px 0;
}
.unse-defines-line.is-loading {
    color: #9ca3af;
    background: rgba(229, 231, 235, 0.5);
    border-left-color: #d1d5db;
    font-style: italic;
}
.unse-defines-line.is-fallback {
    background: rgba(156, 163, 175, 0.1);
    border-left-color: #9ca3af;
    color: #4b5563;
}
.unse-defines-tag {
    display: inline-block;
    font-size: 0.75em;
    font-weight: 700;
    color: #1d4f7a;
    background: rgba(63, 139, 201, 0.15);
    border-radius: 3px;
    padding: 1px 5px;
    margin-right: 4px;
    vertical-align: middle;
}
.unse-defines-tag.is-fallback {
    color: #4b5563;
    background: rgba(156, 163, 175, 0.25);
}
.unse-panel-day-list .unse-day-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.unse-panel-day-list .unse-day-item.is-today {
    background: rgba(63, 139, 201, 0.12);
    border-left: 3px solid var(--link-color, #3F8BC9);
    padding-left: 5px;
}
.unse-panel-day-list .unse-day-date {
    font-weight: 600;
    margin-right: 6px;
}
.unse-panel-day-list .unse-day-ganji {
    color: var(--link-color, #3F8BC9);
}
.unse-day-ohaeng {
    margin: 12px 0;
    padding: 10px 12px;
    background: var(--bg-secondary, #fafafa);
    border-radius: 4px;
}
.unse-day-ohaeng-list {
    margin: 6px 0;
    padding-left: 1.2em;
}
.unse-day-bio-wrap {
    margin: 14px 0;
}

/* plus/fortune 오늘운세 장문 공유 (§10.4-B) */
.fortune-day-share {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color, #e5e7eb);
}
.fortune-day-share-title {
    margin: 0 0 4px;
    font-size: 1.05em;
}
.fortune-day-share-date {
    margin: 0 0 12px;
    color: var(--text-secondary, #6b7280);
    font-size: 0.9em;
}
.fortune-day-share-block {
    margin: 0 0 16px;
    padding: 12px 12px 10px;
    background: var(--bg-secondary, #fafafa);
    border-radius: 6px;
}
.fortune-day-share-block h5 {
    margin: 0 0 8px;
    font-size: 0.95em;
    font-weight: 600;
}
.fortune-day-color-row {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin: 8px 0;
}
.fortune-day-color-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid rgba(0,0,0,0.08);
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}
.fortune-day-share-big {
    font-size: 1.8rem;
    font-weight: 700;
    text-align: center;
    margin: 4px 0;
}
.fortune-day-share-emph {
    font-size: 1.15rem;
    font-weight: 600;
    text-align: center;
    margin: 4px 0;
}
.fortune-day-share-hint,
.fortune-day-share-note {
    font-size: 0.85em;
    color: var(--text-secondary, #6b7280);
    line-height: 1.45;
}
.fortune-day-share-media {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    align-items: center;
}
.fortune-day-share-media img {
    max-width: 120px;
    height: auto;
}
.fortune-day-ai-status {
    color: var(--text-secondary, #6b7280);
    font-size: 0.9em;
}
.fortune-day-ai-body {
    line-height: 1.6;
    color: var(--text-primary);
}

/* 대운 패널 — pro 사주·명리학 요약 (별 / 직업 추천) */
.unse-daeun-pro-slot {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color, #e5e7eb);
}
.unse-daeun-pro-enrich {
    margin: 0;
}
.unse-daeun-pro-block {
    margin-bottom: 18px;
}
.unse-daeun-pro-title {
    margin: 0 0 10px;
    font-size: 1.1em;
    color: var(--text-primary, #1f2937);
}
.unse-daeun-me-body {
    font-size: 0.95em;
    line-height: 1.55;
}
.unse-daeun-careers > div {
    margin-top: 0 !important;
}

.unse-panel-month-list .unse-month-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.unse-panel-month-list .unse-month-item {
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color, #eee);
    font-size: 13px;
}

.unse-panel-month-list .unse-month-item:last-child {
    border-bottom: none;
}

.unse-panel-month-list .unse-month-month {
    font-weight: bold;
    margin-right: 8px;
    min-width: 40px;
    display: inline-block;
}

.unse-panel-month-list .unse-month-ganji {
    color: var(--link-color, #06c);
    margin-right: 8px;
    min-width: 56px;
    display: inline-block;
}

.unse-panel-month-list .unse-month-summary {
    color: var(--text-secondary, #666);
}

.unse-date-selector {
    display: inline-flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 0;
    flex-wrap: wrap;
}

.unse-date-selector label {
    font-weight: bold;
    color: var(--text-primary);
}

.unse-date-selector input,
.unse-date-selector select {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 14px;
}

.unse-calculate-btn {
    padding: 8px 20px;
    background: var(--link-color);
    color: var(--bg-primary);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s ease;
}

.unse-calculate-btn:hover {
    background: var(--link-hover-color, var(--theme-green-deep, #5a6b4a));
}

.unse-donut-graph {
    margin: 20px 0;
}

.unse-result {
    margin-top: 20px;
    padding: 20px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-secondary);
    display: none;
}

.unse-result-content h3 {
    margin-top: 0;
    color: var(--text-primary);
    border-bottom: 2px solid var(--link-color);
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.unse-result-content p {
    margin: 10px 0;
    color: var(--text-primary);
    line-height: 1.6;
}

.unse-result-content ul {
    margin: 10px 0;
    padding-left: 25px;
    color: var(--text-primary);
}

.unse-result-content li {
    margin: 5px 0;
    line-height: 1.6;
}

/* defines 명리·운세 고사 */
.defines-myung-display,
.defines-unse-slot,
.defines-unse-detail,
.myeongri-deep-display {
    margin-top: 12px;
    padding: 8px 0 0;
    background: transparent;
    border: none;
    border-radius: 0;
    color: var(--text-primary);
}
.defines-section-title {
    margin: 12px 0 8px;
    padding: 0 0 6px;
    font-size: 1.05em;
    font-weight: 700;
    color: var(--text-primary);
    border-bottom: 1px solid var(--link-color, var(--border-color));
}
.defines-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 6px;
    font-size: 0.75em;
    font-weight: 500;
    color: var(--text-secondary, #555);
    background: var(--bg-tertiary, #e5e7eb);
    border: 1px solid var(--border-color, transparent);
    border-radius: 3px;
}
.defines-topic-item {
    margin-bottom: 12px;
}
.defines-topic-label {
    margin: 0 0 4px;
    font-size: 0.95em;
    font-weight: 700;
    color: var(--text-primary, #1f2937);
}
.defines-topic-text {
    margin: 0;
    font-size: 0.92em;
    line-height: 1.65;
    color: var(--text-secondary, #374151);
    white-space: normal;
}
.defines-gunghap-box {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px dashed var(--border-color, #d1d5db);
}
.defines-gunghap-form {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    align-items: center;
    margin-bottom: 10px;
    font-size: 0.9em;
    color: var(--text-primary);
}
.defines-gunghap-form label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.defines-gunghap-form select {
    min-width: 72px;
    padding: 4px 6px;
    background: var(--input-bg, var(--bg-primary));
    color: var(--text-primary);
    border: 1px solid var(--input-border, var(--border-color));
}
.defines-gunghap-result {
    margin-top: 8px;
    color: var(--text-primary);
}
.defines-note {
    margin: 8px 0 0;
    font-size: 0.82em;
    color: var(--text-secondary, #6b7280);
}
.gunghap-lead {
    margin: 0 0 12px;
    font-size: 0.92em;
    color: var(--text-secondary, #6b7280);
}
.gunghap-form-title {
    margin: 0 0 8px;
    font-size: 1em;
}
.gunghap-partner-form {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px dashed var(--border-color, #d1d5db);
}
.gunghap-form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    align-items: center;
    margin-bottom: 8px;
    font-size: 0.9em;
}
/* 고객 불러오기 — 좌측 '명단 불러오기'와 유사한 시인성 */
.gunghap-client-load-row {
    padding: 10px 12px;
    margin-bottom: 12px;
    background-color: rgba(52, 152, 219, 0.12);
    border: 1px solid var(--link-color, var(--color-blue, #5a6b4a));
    color: var(--text-primary);
}
.gunghap-client-load-row label {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 8px;
    font-weight: 600;
}
.gunghap-client-load-row select {
    min-width: 10em;
    padding: 6px 8px;
    background: var(--input-bg, var(--bg-primary, #fff));
    color: var(--text-primary);
    border: 1px solid var(--link-color, var(--color-blue, #5a6b4a));
    border-radius: 0;
    font-weight: 500;
}
.gunghap-client-refresh-btn,
#gunghap-client-refresh.gunghap-client-refresh-btn {
    background-color: var(--bg-tertiary, #e0e0e0);
    border: 1px solid var(--border-color, #c0c0c0);
    color: var(--text-primary, #333);
    min-width: 2.4em;
    padding: 6px 10px;
}
.gunghap-client-refresh-btn:hover,
#gunghap-client-refresh.gunghap-client-refresh-btn:hover {
    background-color: var(--bg-secondary, #d0d0d0);
    border-color: var(--border-color, #aaa);
    color: var(--text-primary, #333);
}
#gunghap-calc-btn.output-btn {
    background-color: var(--link-color, var(--color-blue, #5a6b4a));
    border: 1px solid var(--link-color, var(--color-blue, #5a6b4a));
    color: #fff;
}
#gunghap-calc-btn.output-btn:hover {
    background-color: var(--link-hover-color, #2c5e7f);
    border-color: var(--link-hover-color, #2c5e7f);
    color: #fff;
}
html[data-theme="dark"] .gunghap-client-load-row {
    background-color: rgba(63, 99, 128, 0.35);
    border-color: #3f6380;
}
html[data-theme="dark"] .gunghap-client-load-row select {
    border-color: #3f6380;
    background: var(--input-bg, #2d2d2d);
}
html[data-theme="dark"] .gunghap-client-refresh-btn,
html[data-theme="dark"] #gunghap-client-refresh.gunghap-client-refresh-btn {
    background-color: #555;
    border-color: #666;
    color: #eee;
}
html[data-theme="dark"] .gunghap-client-refresh-btn:hover,
html[data-theme="dark"] #gunghap-client-refresh.gunghap-client-refresh-btn:hover {
    background-color: #666;
    border-color: #777;
    color: #fff;
}
html[data-theme="dark"] #gunghap-calc-btn.output-btn {
    background-color: #3f6380;
    border-color: #3f6380;
    color: #fff;
}
html[data-theme="dark"] #gunghap-calc-btn.output-btn:hover {
    background-color: #34536b;
    border-color: #34536b;
}
.gunghap-birth-row input[type="number"] {
    width: 3.0em;
    min-width: 2.5em;
    padding: 3px 3px;
    box-sizing: border-box;
}
/* 연도 4자리(YYYY) — 스피너·패딩 때문에 4.2em이면 끝자리 잘림 */
.gunghap-birth-row #gh-year {
    width: 4.5em;
    min-width: 4.0em;
}
.gunghap-birth-row input[type="number"]:disabled {
    opacity: 0.45;
    background: var(--bg-secondary, #f0f0f0);
    cursor: not-allowed;
}
.gunghap-hour-unknown-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 30px;
    margin: 0;
    padding: 0 10px;
    border: 1px solid var(--border-color, #c0c0c0);
    border-radius: 16px;
    background: var(--bg-primary, #fff);
    color: var(--text-secondary, #555);
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    white-space: nowrap;
    box-sizing: border-box;
}
.gunghap-hour-unknown-btn:hover {
    border-color: var(--color-blue, var(--theme-green-deep, #5a6b4a));
    color: var(--color-blue, var(--theme-green-deep, #5a6b4a));
}
.gunghap-hour-unknown-btn.is-active,
.gunghap-hour-unknown-btn[aria-pressed="true"] {
    background: var(--color-blue, var(--theme-green-deep, #5a6b4a));
    border-color: var(--color-blue, var(--theme-green-deep, #5a6b4a));
    color: var(--button-text, #fff);
}
/* 세로형 모바일: 연·월·일 / 시·분(+생시 모름) 분리 */
@media (max-width: 768px) and (orientation: portrait) {
    .gunghap-birth-date,
    .gunghap-birth-time {
        flex-wrap: nowrap;
        gap: 6px 8px;
    }
    .gunghap-birth-time {
        margin-top: 0;
    }
}
.gunghap-form-actions {
    margin-top: 10px;
}
.gunghap-report-head {
    margin: 0 0 10px;
    font-size: 0.95em;
}
.gunghap-love-cta {
    margin: 20px 0 8px;
    padding: 14px 16px;
    text-align: center;
    background: var(--bg-secondary, rgba(0, 0, 0, 0.03));
    border: 1px solid var(--border-color, #d1d5db);
    border-radius: 4px;
}
.gunghap-love-cta-lead {
    margin: 0 0 10px;
    font-size: 0.9em;
    color: var(--text-secondary, #6b7280);
}
.gunghap-love-cta-btn {
    display: inline-block;
    text-decoration: none;
    white-space: normal;
    line-height: 1.4;
    max-width: 100%;
}
html[data-theme="dark"] .gunghap-love-cta {
    background: var(--bg-secondary, #222);
    border-color: var(--border-color, #404040);
}
.gunghap-summary-card {
    margin: 0 0 16px;
    padding: 14px 16px;
    background: var(--bg-secondary, rgba(63, 139, 201, 0.08));
    border: 1px solid var(--link-color, #3F8BC9);
    border-left-width: 3px;
    border-radius: 4px;
    color: var(--text-primary);
}
.gunghap-summary-title {
    margin: 0 0 10px;
    font-size: 1em;
    font-weight: 700;
    color: var(--text-primary) !important;
}
.gunghap-summary-score {
    margin: 0 0 8px;
    font-size: 1.35em;
    line-height: 1.35;
    color: var(--text-primary) !important;
}
.gunghap-summary-score strong {
    font-size: 1.15em;
    color: var(--link-color, #3F8BC9);
}
.gunghap-summary-line {
    margin: 0 0 6px;
    font-size: 0.92em;
    line-height: 1.55;
    color: var(--text-secondary, var(--text-primary)) !important;
}
.gunghap-summary-line strong {
    color: var(--text-primary);
}
.gunghap-summary-note {
    margin: 10px 0 0;
    padding-top: 8px;
    border-top: 1px dashed var(--border-color, #d1d5db);
    font-size: 0.82em;
    line-height: 1.5;
    color: var(--text-secondary, #6b7280) !important;
}
html[data-theme="dark"] .gunghap-summary-card {
    background: rgba(63, 99, 128, 0.28);
    border-color: #3f6380;
}
html[data-theme="dark"] .gunghap-summary-score strong {
    color: #7eb8e8;
}
body.gunghap-mode .ohaeng-panel.collapsed .window-panel-body,
body.gunghap-mode .myeongri-interpret-panel.collapsed .window-panel-body,
body.gunghap-mode .myeongri-deep-panel.collapsed .window-panel-body {
    display: none;
}
.partner-saju-panel .window-panel-header,
.partner-daeun-panel .window-panel-header {
    background: rgba(63, 139, 201, 0.12);
}

/* 명리학 심화 / 궁합 — 등급 잠금 안내 */
.pro-lock-card {
    margin: 8px 0 4px;
    padding: 20px 18px;
    border: 1px solid var(--border-color, #d1d5db);
    background: linear-gradient(165deg, #f8fafc 0%, #eef2f7 100%);
    color: var(--text-primary, #1f2937);
}
.pro-lock-card-icon {
    font-size: 1.6rem;
    line-height: 1;
    margin-bottom: 8px;
}
.pro-lock-card-title {
    margin: 0 0 10px;
    font-size: 1.05rem;
    font-weight: 700;
}
.pro-lock-card-text {
    margin: 0 0 12px;
    font-size: 0.92em;
    line-height: 1.65;
    color: var(--text-secondary, #4b5563);
}
.pro-lock-card-list {
    margin: 0 0 16px;
    padding-left: 1.2em;
    font-size: 0.88em;
    color: var(--text-secondary, #4b5563);
}
.pro-lock-card-list li {
    margin-bottom: 4px;
}
.pro-lock-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.pro-lock-card-actions .output-btn.secondary {
    background: transparent;
    color: var(--link-color, #3F8BC9);
    border: 1px solid var(--link-color, #3F8BC9);
}
.pro-lock-shop-hint {
    margin: 0 0 10px;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-secondary, #4b5563);
}
.pro-lock-card-actions .pro-lock-shop-btn {
    background: #2f6fed;
    color: #fff;
    border: 1px solid #2f6fed;
    font-weight: 600;
}

/* Pro × Shop 이용권 CTA (게스트·1·2등급) */
.pro-shop-cta {
    margin: 10px 0 0;
    padding: 12px 14px;
    border: 1px solid var(--border-color, #dde3ea);
    background: var(--bg-secondary, #f5f7fa);
    color: var(--text-primary, #1f2937);
}
.pro-shop-cta-title {
    margin: 0 0 6px;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.4;
}
.pro-shop-cta-text {
    margin: 0 0 10px;
    font-size: 0.86rem;
    line-height: 1.55;
    color: var(--text-secondary, #4b5563);
}
.pro-shop-cta-level {
    display: inline-block;
    margin-left: 4px;
    opacity: 0.85;
    font-size: 0.82em;
}
.pro-shop-cta-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.pro-shop-cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 4px;
    background: #2f6fed;
    color: #fff !important;
    border: 1px solid #2f6fed;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none !important;
    line-height: 1.2;
}
.pro-shop-cta-btn--ghost {
    background: transparent;
    color: #2f6fed !important;
    border-color: #2f6fed;
}
.pro-shop-cta--strip {
    display: grid;
    grid-template-rows: 0fr;
    margin: 0;
    padding: 0;
    border: 0;
    border-bottom: 1px solid transparent;
    background: #e3f4fc;
    color: var(--text-primary, #1f2937);
    overflow: hidden;
    transition: grid-template-rows 0.4s ease, border-color 0.3s ease;
}
.pro-shop-cta--strip.is-open {
    grid-template-rows: 1fr;
    border-bottom-color: #b8dcf0;
}
.pro-shop-cta--strip.is-collapsed {
    grid-template-rows: 0fr;
    border-bottom-color: transparent;
    pointer-events: none;
}
.pro-shop-cta-strip-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 0;
    overflow: hidden;
    padding: 0 12px;
    transition: padding 0.35s ease;
}
.pro-shop-cta--strip.is-open .pro-shop-cta-strip-inner {
    padding: 8px 12px;
}
.pro-shop-cta--strip .pro-shop-cta-text {
    margin: 0;
    flex: 1;
    min-width: 0;
    color: #1e4a66;
}
.pro-shop-cta--strip .pro-shop-cta-btn {
    flex-shrink: 0;
    padding: 6px 10px;
    font-size: 0.82rem;
}
.pro-shop-cta-close {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: #3a6a88;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
}
.pro-shop-cta-close:hover {
    background: rgba(47, 111, 237, 0.12);
    color: #1a4a6e;
}
html[data-theme="dark"] .pro-shop-cta {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.12);
}
html[data-theme="dark"] .pro-shop-cta--strip {
    background: rgba(100, 170, 220, 0.18);
}
html[data-theme="dark"] .pro-shop-cta--strip.is-open {
    border-bottom-color: rgba(100, 170, 220, 0.35);
}
html[data-theme="dark"] .pro-shop-cta--strip .pro-shop-cta-text,
html[data-theme="dark"] .pro-shop-cta-close {
    color: var(--text-primary, #e5e7eb);
}
@media (max-width: 640px) {
    .pro-shop-cta-strip-inner {
        flex-wrap: wrap;
    }
}
.myeongri-deep-panel .window-panel-header {
    background: rgba(55, 65, 81, 0.08);
}
.myeongri-deep-display {
    min-height: 40px;
}
.unse-search-loading {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 12px 0 8px;
    padding: 14px 16px;
    background: var(--bg-secondary, #f5f7fa);
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 8px;
    color: var(--text-secondary, #6b7280);
}
.unse-search-loading-text,
.unse-panel-loading p {
    margin: 0;
    font-size: 0.92em;
    font-weight: 600;
}
.unse-panel-loading {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 12px;
    color: var(--text-secondary, #6b7280);
}
.unse-search-spinner {
    width: 22px;
    height: 22px;
    border: 3px solid #d1d5db;
    border-top-color: var(--link-color, #3F8BC9);
    border-radius: 50%;
    animation: unse-spin 0.7s linear infinite;
    flex-shrink: 0;
}
@keyframes unse-spin {
    to { transform: rotate(360deg); }
}

.defines-note,
.defines-empty,
.defines-loading {
    font-size: 0.85em;
    color: var(--text-secondary, #6b7280);
    margin: 8px 0 0;
}
html[data-theme="dark"] .defines-myung-display,
html[data-theme="dark"] .defines-unse-slot,
html[data-theme="dark"] .defines-unse-detail,
html[data-theme="dark"] .myeongri-deep-display,
html[data-theme="dark"] .defines-sinsal-detail {
    background: transparent;
    border: none;
}
html[data-theme="dark"] .defines-badge {
    background: var(--bg-tertiary, #333);
    color: var(--text-secondary, #bbb);
    border-color: var(--border-color, #404040);
}
html[data-theme="dark"] .defines-topic-text,
html[data-theme="dark"] .defines-topic-label,
html[data-theme="dark"] .defines-section-title {
    color: var(--text-primary, #ccc);
}
html[data-theme="dark"] .defines-topic-text {
    color: var(--text-secondary, #bbb);
}
html[data-theme="dark"] .pro-lock-card {
    background: linear-gradient(165deg, #252525 0%, #1e1e1e 100%);
    border-color: var(--border-color, #404040);
    color: var(--text-primary, #ccc);
}
html[data-theme="dark"] .partner-saju-panel .window-panel-header,
html[data-theme="dark"] .partner-daeun-panel .window-panel-header {
    background: rgba(63, 139, 201, 0.18);
}
html[data-theme="dark"] .myeongri-deep-panel .window-panel-header {
    background: rgba(255, 255, 255, 0.06);
}

/* 부적 카탈로그 패널 */
.bujeok-panel .window-panel-header {
    background: rgba(120, 90, 50, 0.10);
}
.bujeok-browse {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 0;
}
.bujeok-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.bujeok-nav-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary, #6b7280);
    margin-bottom: 4px;
}
.bujeok-select {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid var(--border-color, #d1d5db);
    background: var(--bg-primary, #fff);
    color: var(--text-primary, #1f2937);
    font-size: 0.88rem;
}
.bujeok-title-list,
.bujeok-sub-list {
    list-style: none;
    margin: 8px 0 0;
    padding: 0;
    max-height: 160px;
    overflow-y: auto;
    border: 1px solid var(--border-color, #e5e7eb);
    background: var(--bg-secondary, #f8fafc);
}
.bujeok-title-list li,
.bujeok-sub-list li {
    padding: 7px 10px;
    cursor: pointer;
    font-size: 0.86rem;
    border-bottom: 1px solid var(--border-color, #eef2f7);
    color: var(--text-primary, #1f2937);
}
.bujeok-title-list li:last-child,
.bujeok-sub-list li:last-child {
    border-bottom: none;
}
.bujeok-title-list li:hover,
.bujeok-sub-list li:hover {
    background: rgba(63, 139, 201, 0.08);
}
.bujeok-title-list li.is-active,
.bujeok-sub-list li.is-active {
    background: rgba(63, 139, 201, 0.14);
    font-weight: 600;
}
.bujeok-idx {
    color: var(--text-secondary, #6b7280);
    margin-right: 4px;
}
.bujeok-count {
    float: right;
    color: var(--text-secondary, #9ca3af);
    font-size: 0.8em;
}
.bujeok-section-title {
    margin: 0 0 6px;
    font-size: 0.95rem;
}
.bujeok-hint {
    margin: 0 0 8px;
    font-size: 0.85em;
    color: var(--text-secondary, #6b7280);
}
.bujeok-content-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.bujeok-content-item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 8px 6px;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color, #eef2f7);
}
.bujeok-content-item:hover {
    background: rgba(63, 139, 201, 0.06);
}
.bujeok-thumb {
    width: 48px;
    height: 48px;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid var(--border-color, #e5e7eb);
    background: #f3f4f6;
}
.bujeok-thumb-empty {
    display: inline-block;
}
.bujeok-content-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.bujeok-content-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary, #1f2937);
}
.bujeok-content-preview {
    font-size: 0.8rem;
    color: var(--text-secondary, #6b7280);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.bujeok-detail-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}
.bujeok-detail-title {
    margin: 0 0 4px;
    font-size: 1.05rem;
}
.bujeok-detail-idx {
    margin: 0 0 12px;
    font-size: 0.78rem;
    color: var(--text-secondary, #6b7280);
}
.bujeok-detail-text {
    font-size: 0.92rem;
    line-height: 1.7;
    color: var(--text-primary, #1f2937);
    white-space: pre-wrap;
}
.bujeok-detail-images {
    margin-bottom: 14px;
}
.bujeok-detail-figure {
    margin: 0 0 12px;
}
.bujeok-detail-figure img {
    max-width: 100%;
    height: auto;
    display: block;
    border: 1px solid var(--border-color, #e5e7eb);
    background: #fafafa;
}
@media (max-width: 720px) {
    .bujeok-nav {
        grid-template-columns: 1fr;
    }
    .bujeok-title-list,
    .bujeok-sub-list {
        max-height: 120px;
    }
}
html[data-theme="dark"] .bujeok-panel .window-panel-header {
    background: rgba(180, 140, 80, 0.12);
}
html[data-theme="dark"] .bujeok-title-list,
html[data-theme="dark"] .bujeok-sub-list,
html[data-theme="dark"] .bujeok-thumb,
html[data-theme="dark"] .bujeok-detail-figure img {
    background: var(--bg-secondary, #222);
    border-color: var(--border-color, #404040);
}
html[data-theme="dark"] .bujeok-select {
    background: var(--bg-secondary, #222);
    border-color: var(--border-color, #404040);
    color: var(--text-primary, #ccc);
}

/* 당사주 12천성 */
.dangsaju-panel .window-panel-header {
    background: linear-gradient(90deg, #3d4a3a 0%, #5a6b52 100%);
    color: var(--text-primary, #222);
}
.dangsaju-lead {
    margin: 0 0 12px;
    font-size: 0.92em;
    line-height: 1.55;
    color: var(--text-secondary, #555);
}
.dangsaju-stars {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 12px;
}
.dangsaju-star-card {
    padding: 10px 12px;
    border: 1px solid var(--border-color, #ddd);
    border-radius: 6px;
    background: var(--bg-secondary, #f8f9f6);
}
.dangsaju-star-card.is-empty {
    opacity: 0.7;
}
.dangsaju-star-period {
    display: block;
    font-size: 0.75em;
    color: var(--text-secondary, #777);
    margin-bottom: 2px;
}
.dangsaju-star-card strong {
    display: block;
    font-size: 0.98em;
}
.dangsaju-star-zhi {
    display: block;
    font-size: 0.82em;
    color: var(--text-secondary, #666);
    margin-top: 2px;
}
.dangsaju-topic-list {
    margin-top: 8px;
}
@media (min-width: 720px) {
    .dangsaju-stars {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}
html[data-theme="dark"] .dangsaju-panel .window-panel-header {
    background: linear-gradient(90deg, #2a3228 0%, #3d4a3a 100%);
}
html[data-theme="dark"] .dangsaju-star-card {
    background: var(--bg-secondary, #222);
    border-color: var(--border-color, #404040);
}

/* Fortune 3코드 길흉점 */
.fortune-code-panel .window-panel-header {
    background: linear-gradient(90deg, #4a3d32 0%, #6b5a4a 100%);
    color: var(--text-primary, #222);
}
.fortune-code-lead {
    margin: 0 0 12px;
    font-size: 0.92em;
    line-height: 1.55;
    color: var(--text-secondary, #555);
}
.fortune-code-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 12px;
}
.fortune-code-card {
    padding: 12px;
    border: 1px solid var(--border-color, #ddd);
    border-radius: 6px;
    background: var(--bg-secondary, #faf7f2);
    text-align: center;
}
.fortune-code-label {
    display: block;
    font-size: 0.75em;
    color: var(--text-secondary, #777);
}
.fortune-code-value {
    display: block;
    font-size: 1.6em;
    letter-spacing: 0.08em;
    margin: 4px 0;
}
.fortune-code-meta {
    display: block;
    font-size: 0.78em;
    color: var(--text-secondary, #888);
}
html[data-theme="dark"] .fortune-code-panel .window-panel-header {
    background: linear-gradient(90deg, #2e2620 0%, #4a3d32 100%);
}
html[data-theme="dark"] .fortune-code-card {
    background: var(--bg-secondary, #222);
    border-color: var(--border-color, #404040);
}

/* 자미두수 */
.jami-panel .window-panel-header {
    background: linear-gradient(90deg, #2c3a52 0%, #4a5d7a 100%);
    color: var(--text-primary, #222);
}
.jami-lead {
    margin: 0 0 12px;
    font-size: 0.92em;
    line-height: 1.55;
    color: var(--text-secondary, #555);
}
.jami-meta {
    margin: 0 0 12px;
    padding: 10px 12px;
    border-left: 3px solid #4a5d7a;
    background: var(--bg-secondary, #f4f6fa);
    font-size: 0.9em;
    line-height: 1.55;
}
.jami-stars {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 12px;
}
.jami-star-card {
    padding: 10px 12px;
    border: 1px solid var(--border-color, #ddd);
    border-radius: 6px;
    background: var(--bg-secondary, #f4f6fa);
}
.jami-star-period {
    display: block;
    font-size: 0.75em;
    color: var(--text-secondary, #777);
}
.jami-star-card strong {
    display: block;
    font-size: 0.98em;
}
.jami-ecode {
    letter-spacing: 0.06em;
}
.jami-star-zhi {
    display: block;
    font-size: 0.82em;
    color: var(--text-secondary, #666);
    margin-top: 2px;
}
@media (min-width: 720px) {
    .jami-stars {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}
html[data-theme="dark"] .jami-panel .window-panel-header {
    background: linear-gradient(90deg, #1a2230 0%, #2c3a52 100%);
}
html[data-theme="dark"] .jami-star-card,
html[data-theme="dark"] .jami-meta {
    background: var(--bg-secondary, #222);
    border-color: var(--border-color, #404040);
}

/* 자미 원국/해설 탭 · 12궁 명반 */
.jami-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}
.jami-tab {
    appearance: none;
    border: 1px solid var(--border-color, #c5cdd8);
    background: var(--bg-secondary, #f4f6fa);
    color: var(--text-primary, #1e2430);
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.86em;
    cursor: pointer;
    line-height: 1.3;
}
.jami-tab:hover {
    border-color: #4a5d7a;
}
.jami-tab.is-active {
    background: #4a5d7a;
    border-color: #4a5d7a;
    color: #eef2f8;
}
.jami-palace-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
    margin: 8px 0 14px;
    max-width: 520px;
}
.jami-palace-cell {
    min-height: 92px;
    padding: 6px 8px;
    border: 1px solid var(--border-color, #c5cdd8);
    border-radius: 4px;
    background: var(--bg-secondary, #f7f8fb);
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.jami-palace-cell.jami-palace-empty {
    border: none;
    background: transparent;
    min-height: 0;
    padding: 0;
}
.jami-palace-cell.is-ming {
    border-color: #4a5d7a;
    box-shadow: inset 0 0 0 1px #4a5d7a;
    background: #eef2f8;
}
.jami-palace-cell.is-ziwei {
    border-color: #8a5a2b;
}
.jami-palace-cell.is-tianfu {
    border-color: #2f6b5a;
}
.jami-palace-cell.is-ziwei.is-ming,
.jami-palace-cell.is-tianfu.is-ming {
    box-shadow: inset 0 0 0 1px #4a5d7a;
}
.jami-palace-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 4px;
    font-size: 0.72em;
    color: var(--text-secondary, #667);
}
.jami-palace-name {
    font-weight: 700;
    color: var(--text-primary, #1e2430);
}
.jami-palace-zhi {
    letter-spacing: 0.02em;
}
.jami-palace-stars {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 2px 6px;
    font-size: 0.78em;
    line-height: 1.35;
    color: var(--text-primary, #243044);
}
.jami-palace-stars li {
    margin: 0;
}
.jami-topic-radios {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    margin: 0 0 14px;
}
.jami-topic-radio {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.88em;
    cursor: pointer;
    color: var(--text-primary, #222);
}
.jami-topic-radio input {
    margin: 0;
}
@media (max-width: 520px) {
    .jami-palace-grid {
        max-width: none;
        gap: 3px;
    }
    .jami-palace-cell {
        min-height: 78px;
        padding: 5px 6px;
    }
    .jami-palace-stars {
        font-size: 0.7em;
    }
}
html[data-theme="dark"] .jami-tab {
    background: var(--bg-secondary, #222);
    border-color: var(--border-color, #404040);
    color: var(--text-primary, #e8e8e8);
}
html[data-theme="dark"] .jami-tab:hover {
    border-color: #7a8eaa;
}
html[data-theme="dark"] .jami-tab.is-active {
    background: #4a5d7a;
    border-color: #6a7e9a;
    color: #eef2f8;
}
html[data-theme="dark"] .jami-palace-cell {
    background: var(--bg-secondary, #1c222c);
    border-color: var(--border-color, #404040);
}
html[data-theme="dark"] .jami-palace-cell.is-ming {
    background: #243044;
}
html[data-theme="dark"] .jami-palace-name,
html[data-theme="dark"] .jami-topic-radio,
html[data-theme="dark"] .jami-palace-stars {
    color: var(--text-primary, #e8e8e8);
}

/* 주역 점괘 */
.jum-panel .window-panel-header {
    background: linear-gradient(90deg, #3a2f24 0%, #5c4a38 100%);
    color: var(--text-primary, #222);
}
.jum-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 12px;
}
.jum-card {
    padding: 10px 12px;
    border: 1px solid var(--border-color, #ddd);
    border-radius: 6px;
    background: var(--bg-secondary, #f7f3ee);
}
.jum-label {
    display: block;
    font-size: 0.75em;
    color: var(--text-secondary, #777);
}
.jum-card strong {
    display: block;
    font-size: 0.98em;
    margin-top: 2px;
}
.jum-gwae {
    letter-spacing: 0.04em;
}
.jum-gwae-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 4px;
    margin: 4px 0 16px;
    padding: 16px 12px;
    border: 1px solid var(--border-color, #e0ded4);
    background: var(--bg-secondary, #f4f3ef);
}
.jum-gwae-hero__num {
    font-size: 0.85em;
    color: var(--text-secondary, #666);
    letter-spacing: 0.06em;
}
.jum-gwae-hero__ko {
    display: block;
    font-size: clamp(1.75rem, 5.5vw, 2.35rem);
    line-height: 1.2;
    font-weight: 800;
    color: var(--text-primary, #2a2a24);
    letter-spacing: 0.04em;
}
.jum-gwae-hero__han {
    display: block;
    font-size: clamp(1.15rem, 3.2vw, 1.45rem);
    line-height: 1.3;
    color: var(--text-secondary, #555);
    letter-spacing: 0.12em;
}
.jum-gwae-hero__idx {
    font-size: 0.78em;
    color: var(--text-secondary, #888);
    letter-spacing: 0.08em;
}
@media (min-width: 720px) {
    .jum-summary {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}
html[data-theme="dark"] .jum-panel .window-panel-header {
    background: linear-gradient(90deg, #241c16 0%, #3a2f24 100%);
}
html[data-theme="dark"] .jum-card {
    background: var(--bg-secondary, #222);
    border-color: var(--border-color, #404040);
}

/* 주역 시간축 탭 */
.jum-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}
.jum-tab {
    appearance: none;
    border: 1px solid var(--border-color, #d4c8b8);
    background: var(--bg-secondary, #f7f3ee);
    color: var(--text-primary, #2a2218);
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.86em;
    cursor: pointer;
    line-height: 1.3;
}
.jum-tab:hover {
    border-color: #5c4a38;
}
.jum-tab.is-active {
    background: #5c4a38;
    border-color: #5c4a38;
    color: #f5efe6;
}
.jum-lead {
    margin: 0 0 12px;
    font-size: 0.92em;
    line-height: 1.55;
    color: var(--text-secondary, #555);
}
.jum-formula {
    margin: -4px 0 14px !important;
    font-size: 0.82em !important;
    line-height: 1.5;
}
.jum-formula-date {
    opacity: 0.85;
}
.jum-formula-fp {
    display: block;
    margin-top: 0.35em;
    font-size: 0.78em;
    opacity: 0.55;
    word-break: break-all;
}
.jum-year-ctrl {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px;
    font-size: 0.88em;
}
.jum-year-input {
    width: 5.5em;
    padding: 4px 8px;
    border: 1px solid var(--border-color, #d4c8b8);
    border-radius: 4px;
    background: var(--bg-primary, #fff);
    color: var(--text-primary, #222);
}
.jum-year-hint {
    color: var(--text-secondary, #777);
}
html[data-theme="dark"] .jum-tab {
    background: var(--bg-secondary, #222);
    border-color: var(--border-color, #404040);
    color: var(--text-primary, #e8e8e8);
}
html[data-theme="dark"] .jum-tab:hover {
    border-color: #8a7460;
}
html[data-theme="dark"] .jum-tab.is-active {
    background: #5c4a38;
    border-color: #7a6550;
    color: #f5efe6;
}
html[data-theme="dark"] .jum-year-input {
    background: var(--bg-secondary, #222);
    border-color: var(--border-color, #404040);
    color: var(--text-primary, #e8e8e8);
}

/* 기문 간쌍 */
.gimun-panel .window-panel-header {
    background: linear-gradient(90deg, #1f3a36 0%, #2f5a52 100%);
    color: var(--text-primary, #222);
}
.gimun-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
    gap: 8px;
    margin-bottom: 12px;
}
.gimun-card {
    padding: 10px 12px;
    border: 1px solid var(--border-color, #ddd);
    border-radius: 6px;
    background: var(--bg-secondary, #f0f6f4);
}
.gimun-label {
    display: block;
    font-size: 0.75em;
    color: var(--text-secondary, #777);
}
.gimun-card strong {
    display: block;
    font-size: 0.98em;
    margin-top: 2px;
}
.gimun-pair {
    letter-spacing: 0.08em;
}
html[data-theme="dark"] .gimun-panel .window-panel-header {
    background: linear-gradient(90deg, #142622 0%, #1f3a36 100%);
}
html[data-theme="dark"] .gimun-card {
    background: var(--bg-secondary, #222);
    border-color: var(--border-color, #404040);
}

/* 기문 구궁 MVP — 탭·洛书 격자 */
.gimun-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}
.gimun-view-tabs {
    margin-bottom: 14px;
}
.gimun-tab {
    appearance: none;
    border: 1px solid var(--border-color, #c5d4cf);
    background: var(--bg-secondary, #f0f6f4);
    color: var(--text-primary, #1a2e2a);
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.86em;
    cursor: pointer;
    line-height: 1.3;
}
.gimun-tab:hover {
    border-color: #2f5a52;
}
.gimun-tab.is-active {
    background: #2f5a52;
    border-color: #2f5a52;
    color: #e8f4f1;
}
.gimun-palace-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    margin: 8px 0 14px;
    max-width: 420px;
}
.gimun-palace-cell {
    min-height: 88px;
    padding: 8px;
    border: 1px solid var(--border-color, #c5d4cf);
    border-radius: 4px;
    background: var(--bg-secondary, #f5faf8);
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.gimun-palace-cell.is-center {
    background: #e4efeb;
    align-items: center;
    justify-content: center;
    text-align: center;
}
.gimun-palace-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 4px;
    font-size: 0.72em;
    color: var(--text-secondary, #667);
}
.gimun-palace-num {
    font-weight: 600;
    color: var(--text-primary, #1a2e2a);
}
.gimun-palace-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: auto;
}
.gimun-palace-door {
    font-size: 0.95em;
    font-weight: 600;
    letter-spacing: 0.04em;
}
.gimun-palace-star {
    font-size: 0.78em;
    color: var(--text-secondary, #556);
}
.gimun-palace-stem {
    font-size: 1.15em;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: #1f3a36;
}
.gimun-topic-radios {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    margin: 0 0 14px;
}
.gimun-topic-radio {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.88em;
    cursor: pointer;
    color: var(--text-primary, #222);
}
.gimun-topic-radio input {
    margin: 0;
}
.gimun-classic-pair {
    margin-bottom: 10px;
}
.gimun-palace-explain .defines-topic-item {
    margin-bottom: 10px;
}
@media (max-width: 480px) {
    .gimun-palace-grid {
        max-width: none;
        gap: 4px;
    }
    .gimun-palace-cell {
        min-height: 76px;
        padding: 6px;
    }
    .gimun-palace-stem {
        font-size: 1.05em;
    }
}
html[data-theme="dark"] .gimun-tab {
    background: var(--bg-secondary, #222);
    border-color: var(--border-color, #404040);
    color: var(--text-primary, #e8e8e8);
}
html[data-theme="dark"] .gimun-tab:hover {
    border-color: #4a8a7c;
}
html[data-theme="dark"] .gimun-tab.is-active {
    background: #2f5a52;
    border-color: #3d7a6e;
    color: #e8f4f1;
}
html[data-theme="dark"] .gimun-palace-cell {
    background: var(--bg-secondary, #1c2422);
    border-color: var(--border-color, #404040);
}
html[data-theme="dark"] .gimun-palace-cell.is-center {
    background: #243430;
}
html[data-theme="dark"] .gimun-palace-num,
html[data-theme="dark"] .gimun-palace-door,
html[data-theme="dark"] .gimun-topic-radio {
    color: var(--text-primary, #e8e8e8);
}
html[data-theme="dark"] .gimun-palace-stem {
    color: #9fd4c4;
}
html[data-theme="dark"] .gimun-palace-star,
html[data-theme="dark"] .gimun-palace-dir,
html[data-theme="dark"] .gimun-palace-head {
    color: var(--text-secondary, #9aa);
}

/* 해몽 Enc_Dream */
.haemong-panel .window-panel-header {
    background: linear-gradient(90deg, #3a2a42 0%, #5a4468 100%);
    color: var(--text-primary, #222);
}
.haemong-search-row {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}
.haemong-search {
    flex: 1;
    min-width: 0;
    padding: 8px 10px;
    border: 1px solid var(--border-color, #ddd);
    border-radius: 6px;
    background: var(--bg-primary, #fff);
    color: var(--text-primary, #222);
}
.haemong-cats,
.haemong-mids {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}
.haemong-cat-btn,
.haemong-mid-btn {
    padding: 6px 10px;
    border: 1px solid var(--border-color, #ddd);
    border-radius: 6px;
    background: var(--bg-secondary, #f6f2f8);
    cursor: pointer;
    font-size: 0.88em;
}
.haemong-cat-btn.is-active,
.haemong-mid-btn.is-active {
    border-color: #6b4f7a;
    background: #ebe2f0;
    font-weight: 600;
}
.haemong-items {
    list-style: none;
    margin: 0 0 12px;
    padding: 0;
    max-height: 220px;
    overflow: auto;
    border: 1px solid var(--border-color, #ddd);
    border-radius: 6px;
}
.haemong-item {
    padding: 8px 10px;
    border-bottom: 1px solid var(--border-color, #eee);
    cursor: pointer;
    font-size: 0.9em;
}
.haemong-item:last-child { border-bottom: 0; }
.haemong-item.is-active,
.haemong-item:hover {
    background: var(--bg-secondary, #f6f2f8);
}
.haemong-item-idx {
    display: inline-block;
    min-width: 3.6em;
    color: var(--text-secondary, #777);
    font-size: 0.85em;
}
html[data-theme="dark"] .haemong-panel .window-panel-header {
    background: linear-gradient(90deg, #241a2a 0%, #3a2a42 100%);
}
html[data-theme="dark"] .haemong-cat-btn,
html[data-theme="dark"] .haemong-mid-btn,
html[data-theme="dark"] .haemong-item.is-active,
html[data-theme="dark"] .haemong-item:hover {
    background: var(--bg-secondary, #222);
    border-color: var(--border-color, #404040);
}

/* 즉석점 / 육효 */
.jikseok-panel .window-panel-header {
    background: linear-gradient(90deg, #2f3a24 0%, #4a5c38 100%);
    color: var(--text-primary, #222);
}
.jikseok-mode-row {
    display: flex;
    gap: 14px;
    margin-bottom: 12px;
}
.jikseok-mode-opt {
    font-size: 0.95em;
    cursor: pointer;
}
.jikseok-hint {
    font-size: 0.88em;
    color: var(--text-secondary, #666);
    margin: 0 0 12px;
    line-height: 1.45;
    text-align: center;
}
.jikseok-yut-stack {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    margin: 0 auto 16px;
    width: min(100%, 340px);
}
.jikseok-yut {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border: 1px solid rgba(90, 70, 40, 0.22);
    border-radius: 8px;
    background: linear-gradient(180deg, #f3ebe0 0%, #dcc9ad 100%);
    color: #8a7355;
    cursor: pointer;
    text-align: left;
    transition: background 0.2s ease, border-color 0.2s ease, opacity 0.15s ease, transform 0.15s ease;
}
.jikseok-yut.is-next {
    animation: jikseok-yut-wait-pulse 1.4s ease-in-out infinite;
    border-color: #6b8a45;
    background: linear-gradient(180deg, #f7f4ea 0%, #e5d7b8 50%, #d4c09a 100%);
    background-size: 100% 200%;
}
.jikseok-yut.is-next .jikseok-yut-num {
    animation: jikseok-yut-num-glow 1.4s ease-in-out infinite;
}
.jikseok-yut.is-locked {
    opacity: 0.42;
    cursor: not-allowed;
    filter: grayscale(0.3);
}
.jikseok-yut.is-flipping {
    animation: jikseok-yut-row-spin 0.16s ease-in-out infinite;
}
/* 앞면: 거의 흰 갈색 → 갈색 상하 그라데이션 */
.jikseok-yut.is-set.face-yang {
    background: linear-gradient(180deg, #fbf7f0 0%, #e8d4b5 42%, #b8956a 100%);
    border-color: #a67c52;
    color: #6b5338;
    animation: none;
}
/* 뒷면: 그레이+갈색 탁한 중간색 */
.jikseok-yut.is-set.face-yin {
    background: linear-gradient(180deg, #9a8f82 0%, #7d7268 50%, #6a5e52 100%);
    border-color: #5c534a;
    color: #3f3832;
    animation: none;
}
.jikseok-yut-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.9em;
    height: 1.7em;
    padding: 0 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.55);
    color: #3d3428;
    font-size: 0.72em;
    font-weight: 700;
    letter-spacing: -0.02em;
    white-space: nowrap;
}
.jikseok-yut.is-set.face-yin .jikseok-yut-num {
    background: rgba(0, 0, 0, 0.22);
    color: #f5f2ee;
}
.jikseok-yut-meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-width: 2.4em;
}
.jikseok-yut-meta em {
    font-style: normal;
    font-size: 0.72em;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.35);
    letter-spacing: -0.02em;
}
.jikseok-yut-meta em.is-empty {
    opacity: 0.35;
    color: #8a7355;
    text-shadow: none;
}
.jikseok-yut.is-set.face-yang .jikseok-yut-meta em {
    color: #5c3d1e;
    text-shadow: none;
}
.jikseok-yut-wait {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.35em;
    height: 1.35em;
    border-radius: 50%;
    font-size: 0.85em;
    font-weight: 800;
    color: #5c3d1e;
    background: rgba(255, 255, 255, 0.7);
    box-shadow: 0 0 0 1px rgba(107, 138, 69, 0.35);
    animation: jikseok-yut-wait-spin 0.9s linear infinite;
}
@keyframes jikseok-yut-wait-pulse {
    0% {
        border-color: #8fad5c;
        box-shadow: 0 0 0 0 rgba(107, 138, 69, 0.45);
        background-position: 0% 0%;
        filter: brightness(1);
    }
    50% {
        border-color: #c4a05a;
        box-shadow: 0 0 0 3px rgba(196, 160, 90, 0.35);
        background-position: 0% 100%;
        filter: brightness(1.06);
    }
    100% {
        border-color: #6b8a45;
        box-shadow: 0 0 0 0 rgba(107, 138, 69, 0.2);
        background-position: 0% 0%;
        filter: brightness(1);
    }
}
@keyframes jikseok-yut-num-glow {
    0%, 100% { background: rgba(255, 255, 255, 0.55); }
    50% { background: rgba(232, 245, 200, 0.95); }
}
@keyframes jikseok-yut-wait-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
@keyframes jikseok-yut-row-spin {
    0% { transform: rotateX(0deg); filter: brightness(1); }
    40% { transform: rotateX(78deg); filter: brightness(1.12); }
    100% { transform: rotateX(0deg); filter: brightness(0.95); }
}
.jikseok-donghyo {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 12px;
}
.jikseok-donghyo-label {
    font-size: 0.85em;
    color: var(--text-secondary, #777);
    margin-right: 2px;
}
.jikseok-dong-track {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
}
.jikseok-dong-btn {
    min-width: 48px;
    padding: 6px 8px;
    border: 1px solid var(--border-color, #ddd);
    border-radius: 8px;
    background: var(--bg-primary, #fff);
    cursor: pointer;
    line-height: 1.15;
}
.jikseok-dong-btn .jikseok-dong-cap {
    display: block;
    font-size: 0.65em;
    color: #888;
}
.jikseok-dong-btn strong {
    font-size: 1em;
}
.jikseok-dong-btn.is-active {
    border-color: #5a6b42;
    background: #e8eedc;
    font-weight: 700;
}
.jikseok-donghyo.is-spinning .jikseok-dong-btn.is-active {
    animation: jikseok-dong-pulse 0.12s ease-in-out infinite alternate;
}
@keyframes jikseok-dong-pulse {
    from { transform: scale(1); }
    to { transform: scale(1.08); background: #d5e3b8; }
}
.jikseok-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
    justify-content: center;
}

/* 1→6 자동·점괘 보기: 회색 (shell .output-btn 올리브 !important 덮어씀) */
.jikseok-panel .jikseok-btn-muted.output-btn,
.jikseok-panel #jikseok-rand-all.output-btn,
.jikseok-panel #jikseok-cast-btn.output-btn {
    background: linear-gradient(180deg, #e8e6e3 0%, #cfcbc6 100%) !important;
    border-color: #a8a29a !important;
    color: #4a453f !important;
    box-shadow: none !important;
}
.jikseok-panel .jikseok-btn-muted.output-btn:hover,
.jikseok-panel #jikseok-rand-all.output-btn:hover,
.jikseok-panel #jikseok-cast-btn.output-btn:hover {
    background: linear-gradient(180deg, #f0eeeb 0%, #d8d4cf 100%) !important;
    border-color: #8f8880 !important;
    color: #3a3530 !important;
}

/* 동효 뽑기: 육효 윷과 비슷한 주황~황토 */
.jikseok-panel .jikseok-btn-dong.output-btn {
    background: linear-gradient(180deg, #f3ebe0 0%, #dcc9ad 55%, #c4a06a 100%) !important;
    border-color: #a67c52 !important;
    color: #5c3d1e !important;
    font-weight: 700;
    box-shadow: none !important;
}
.jikseok-panel .jikseok-btn-dong.output-btn:hover:not(:disabled) {
    background: linear-gradient(180deg, #fbf7f0 0%, #e8d4b5 42%, #b8956a 100%) !important;
    border-color: #8a633c !important;
    color: #4a3018 !important;
}
.jikseok-panel .jikseok-btn-dong.output-btn:disabled {
    opacity: 0.45;
    filter: grayscale(0.25);
    cursor: not-allowed;
}
/* 육효 완료 후: 육효 is-next 와 유사한 유도 펄스 */
.jikseok-panel .jikseok-btn-dong.output-btn.is-next:not(:disabled) {
    animation: jikseok-yut-wait-pulse 1.4s ease-in-out infinite;
    border-color: #6b8a45 !important;
    background: linear-gradient(180deg, #f7f4ea 0%, #e5d7b8 50%, #d4c09a 100%) !important;
    background-size: 100% 200%;
}
.jikseok-coins {
    display: none;
}
.jikseok-coin {
    display: none;
}

html[data-theme="dark"] .jikseok-yut {
    background: linear-gradient(180deg, #4a4338 0%, #342e26 100%);
    border-color: #5a4e3a;
    color: #c4b49a;
}
html[data-theme="dark"] .jikseok-yut.is-set.face-yang {
    background: linear-gradient(180deg, #f0e8dc 0%, #c9ae88 45%, #8f6f4a 100%);
    color: #4a3828;
}
html[data-theme="dark"] .jikseok-yut.is-set.face-yin {
    background: linear-gradient(180deg, #7a7268 0%, #5e574e 55%, #4a433c 100%);
    color: #2e2a26;
}
html[data-theme="dark"] .jikseok-hint {
    color: #aaa;
}
html[data-theme="dark"] .jikseok-panel .window-panel-header {
    background: linear-gradient(90deg, #1c2416 0%, #2f3a24 100%);
}
html[data-theme="dark"] .jikseok-coin,
html[data-theme="dark"] .jikseok-dong-btn {
    background: var(--bg-secondary, #222);
    border-color: var(--border-color, #404040);
}
html[data-theme="dark"] .jikseok-dong-btn.is-active {
    background: #2a3320;
}

/* 택일 MVP */
.taegil-panel .window-panel-header {
    background: linear-gradient(90deg, #243642 0%, #3a5568 100%);
    color: var(--text-primary, #222);
}
.taegil-types {
    border: 0;
    margin: 0 0 10px;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
.taegil-types legend {
    font-size: 0.85em;
    color: var(--text-secondary, #777);
    margin-bottom: 6px;
    width: 100%;
}
.taegil-type-opt { cursor: pointer; font-size: 0.95em; }
.taegil-month-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}
.taegil-ym-label {
    font-weight: 600;
    font-size: 0.98em;
}
.taegil-user-zhi {
    font-size: 0.88em;
    margin: 0 0 8px;
    color: var(--text-secondary, #666);
}
.taegil-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 4px;
}
.taegil-dow {
    text-align: center;
    font-size: 0.72em;
    color: var(--text-secondary, #777);
    padding: 4px 0;
}
.taegil-cell {
    min-height: 52px;
    padding: 4px;
    border: 1px solid var(--border-color, #e0e0e0);
    border-radius: 5px;
    background: var(--bg-secondary, #f5f7f9);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    font-size: 0.78em;
}
.taegil-cell.is-empty {
    border: 0;
    background: transparent;
}
.taegil-cell.is-gil {
    background: #e8f5ea;
    border-color: #8fbf98;
}
.taegil-cell.is-hyung {
    background: #f8eaea;
    border-color: #c99;
}
.taegil-cell.is-pyung {
    background: var(--bg-secondary, #f5f7f9);
}
.taegil-day { font-weight: 700; }
.taegil-ganzhi { color: var(--text-secondary, #777); }
.taegil-verdict { font-size: 0.92em; }
.taegil-cell.is-gil .taegil-verdict { color: #2d6a3a; }
.taegil-cell.is-hyung .taegil-verdict { color: #8a3030; }
.taegil-legend {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}
.taegil-chip {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.8em;
}
.taegil-chip.gil { background: #e8f5ea; }
.taegil-chip.hyung { background: #f8eaea; }
.taegil-chip.pyung { background: #eef0f2; }
html[data-theme="dark"] .taegil-panel .window-panel-header {
    background: linear-gradient(90deg, #162028 0%, #243642 100%);
}
html[data-theme="dark"] .taegil-cell {
    background: var(--bg-secondary, #222);
    border-color: var(--border-color, #404040);
}
html[data-theme="dark"] .taegil-cell.is-gil { background: #1e3224; }
html[data-theme="dark"] .taegil-cell.is-hyung { background: #322020; }

/* 별난보고서 — 강점/채워줘/띠·별자리/바이오리듬 공통 */
.wr-fr-block {
    margin: 20px 0;
}
.wr-fr-h {
    margin: 0 0 12px;
    font-size: 1.15em;
    font-weight: 600;
    color: var(--text-primary) !important;
}
.wr-fr-muted {
    color: var(--text-secondary, #7f8c8d) !important;
    font-size: 0.92em;
    line-height: 1.6;
}
.wr-fr-value {
    text-align: center;
    font-weight: 700;
    color: var(--text-primary) !important;
    margin: 16px 0;
}
.wr-fr-value--lg { font-size: 1.5em; }
.wr-fr-value--xl { font-size: 2.5em; }
.wr-fr-value--xxl { font-size: 3em; }
.wr-fr-element-card {
    margin: 16px 0;
    padding: 12px;
    border: 1px solid var(--border-color, var(--bg-tertiary));
    border-radius: 0;
    background: transparent;
    color: var(--text-primary);
    box-shadow: none;
    box-sizing: border-box;
}
.wr-fr-callout {
    margin: 12px 0;
    padding: 10px 12px;
    background: transparent;
    border: 1px solid var(--border-color, var(--bg-tertiary));
    border-radius: 0;
    color: var(--text-secondary, var(--text-primary));
    line-height: 1.65;
    box-sizing: border-box;
}
.wr-fr-callout--ok,
.wr-fr-callout--info,
.wr-fr-callout--warn {
    border-left: 1px solid var(--border-color, var(--bg-tertiary));
}
.wr-fr-swatches {
    display: flex;
    gap: 16px;
    justify-content: center;
    align-items: center;
    margin: 16px 0;
}
.wr-fr-swatch {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.wr-fr-media {
    text-align: center;
    margin: 16px 0;
}
.zodiac-etc-section {
    margin-bottom: 24px;
    padding: 10px 0;
    background: transparent;
    border: none;
    border-radius: 0;
}
.zodiac-etc-section h3 {
    margin: 0 0 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border-color, var(--bg-tertiary));
    color: var(--text-primary) !important;
    font-size: 1.1em;
}
.zodiac-etc-name {
    font-size: 1.5em;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-primary) !important;
}
.zodiac-etc-desc {
    font-size: 0.92em;
    font-weight: 400;
    color: var(--text-secondary) !important;
    line-height: 1.55;
    margin-top: 6px;
}
.biorhythm-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    color: var(--text-primary);
}
.biorhythm-container h3 {
    color: var(--text-primary) !important;
}
.biorhythm-legend {
    margin-top: 16px;
    text-align: center;
    color: var(--text-secondary, var(--text-primary)) !important;
}

html[data-theme="dark"] .wr-fr-element-card,
html[data-theme="dark"] .zodiac-etc-section,
html[data-theme="dark"] .wr-fr-callout {
    background: transparent;
    border: 1px solid var(--border-color, #404040);
}

/* 다크모드: nature/animal·띠 이미지 */
html[data-theme="dark"] .fortune-report-panel img[src*="natu"],
html[data-theme="dark"] .fortune-report-panel img[src*="anim"],
html[data-theme="dark"] .fortune-report-panel .life_nature img,
html[data-theme="dark"] .fortune-report-panel .life_animal img,
html[data-theme="dark"] .fortune-report-panel .me_nature img,
html[data-theme="dark"] .fortune-report-panel .me_animal img,
html[data-theme="dark"] .fortune-report-panel .me_nature2 img,
html[data-theme="dark"] .fortune-report-panel .life_nature2 img,
html[data-theme="dark"] .fortune-report-panel .wr-fr-media img,
html[data-theme="dark"] .fortune-report-panel .zodiac-etc-section img {
    filter: invert(1) brightness(0.95);
}
.client-list-cache-hint {
    font-size: 0.8em;
    font-weight: 500;
    color: #6b7280;
}

/* 오운육기 */
.owun-panel .window-panel-header {
    background: linear-gradient(90deg, #2a3a32 0%, #3d5a48 100%);
    color: var(--text-primary, #222);
}
.owun-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}
.owun-card {
    padding: 10px 12px;
    border: 1px solid var(--border-color, #ddd);
    border-radius: 6px;
    background: var(--bg-secondary, #f3f7f4);
}
.owun-label {
    display: block;
    font-size: 0.8em;
    color: var(--text-secondary, #666);
    margin-bottom: 4px;
}
.owun-mvp {
    font-style: normal;
    font-size: 0.85em;
    color: #6a7a5a;
    margin-left: 4px;
}
.owun-card strong {
    display: block;
    font-size: 1.05em;
    margin-bottom: 4px;
}
.owun-estimate-date {
    display: block;
    font-size: 1.05em;
    font-weight: 300;
    margin-bottom: 4px;
    color: var(--text-primary, #222);
}
.owun-meta {
    display: block;
    font-size: 0.9em;
    color: var(--text-primary, #222);
}
.owun-badge {
    display: inline-block;
    margin-top: 6px;
    font-size: 0.75em;
    color: var(--text-secondary, #777);
}
.owun-lead {
    font-size: 0.88em;
    color: var(--text-secondary, #666);
    margin: 0 0 12px;
    line-height: 1.5;
}
.owun-topic-radios {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    margin: 0 0 14px;
}
.owun-topic-radio {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.88em;
    cursor: pointer;
    color: var(--text-primary, #222);
}
.owun-topic-radio input { margin: 0; }
@media (max-width: 520px) {
    .owun-summary { grid-template-columns: 1fr; }
}
html[data-theme="dark"] .owun-panel .window-panel-header {
    background: linear-gradient(90deg, #1a2420 0%, #2a3a32 100%);
}
html[data-theme="dark"] .owun-card {
    background: var(--bg-secondary, #222);
    border-color: var(--border-color, #404040);
}
html[data-theme="dark"] .owun-topic-radio {
    color: var(--text-primary, #e8e8e8);
}

/* 산명술(귀곡) */
.sanmyung-panel .window-panel-header {
    background: linear-gradient(90deg, #3a3228 0%, #5a4a38 100%);
    color: var(--text-primary, #222);
}
.sanmyung-summary {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 10px;
}
.sanmyung-card {
    padding: 10px 12px;
    border: 1px solid var(--border-color, #ddd);
    border-radius: 6px;
    background: var(--bg-secondary, #f7f3ee);
}
.sanmyung-label {
    display: block;
    font-size: 0.8em;
    color: var(--text-secondary, #666);
    margin-bottom: 4px;
}
.sanmyung-card strong {
    display: block;
    font-size: 1.05em;
    margin-bottom: 4px;
}
.sanmyung-meta {
    display: block;
    font-size: 0.9em;
}
.sanmyung-note {
    font-size: 0.86em;
    color: var(--text-secondary, #666);
    margin: 0 0 12px;
    line-height: 1.5;
}
.sanmyung-topic-radios {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    margin: 0 0 14px;
}
.sanmyung-topic-radio {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.88em;
    cursor: pointer;
    color: var(--text-primary, #222);
}
.sanmyung-topic-radio input { margin: 0; }
html[data-theme="dark"] .sanmyung-panel .window-panel-header {
    background: linear-gradient(90deg, #241e18 0%, #3a3228 100%);
}
html[data-theme="dark"] .sanmyung-card {
    background: var(--bg-secondary, #222);
    border-color: var(--border-color, #404040);
}
html[data-theme="dark"] .sanmyung-topic-radio {
    color: var(--text-primary, #e8e8e8);
}

/* 정밀화: 값부/값사 · 육효 · 사상 · 택일 建除 */
.gimun-palace-cell.is-zhifu {
    border-color: #b45309;
    box-shadow: inset 0 0 0 1px rgba(180, 83, 9, 0.35);
}
.gimun-palace-cell.is-zhishi {
    border-color: #1d4ed8;
}
.gimun-palace-cell.is-zhifu.is-zhishi {
    border-color: #7c3aed;
}
.gimun-zhifu-tag,
.gimun-zhishi-tag {
    display: inline-block;
    margin-top: 2px;
    padding: 0 4px;
    font-size: 0.68em;
    font-weight: 600;
    border-radius: 2px;
    letter-spacing: 0.02em;
}
.gimun-zhifu-tag {
    background: #fff7ed;
    color: #9a3412;
}
.gimun-zhishi-tag {
    background: #eff6ff;
    color: #1e40af;
}
html[data-theme="dark"] .gimun-zhifu-tag {
    background: #3b2a1a;
    color: #fdba74;
}
html[data-theme="dark"] .gimun-zhishi-tag {
    background: #1e293b;
    color: #93c5fd;
}

.jum-yao-table {
    width: 100%;
    max-width: 320px;
    border-collapse: collapse;
    margin: 0 0 14px;
    font-size: 0.9em;
}
.jum-yao-table th,
.jum-yao-table td {
    border: 1px solid var(--border-color, #c8d0cc);
    padding: 4px 8px;
    text-align: center;
}
.jum-yao-table th {
    background: var(--bg-secondary, #f0f4f2);
    font-weight: 600;
}
.jum-yao-sym {
    font-family: ui-monospace, "Noto Sans Mono", monospace;
    letter-spacing: 0.08em;
}
.jum-yao-table tr.is-changing {
    background: #fff8e8;
    font-weight: 600;
}
html[data-theme="dark"] .jum-yao-table th {
    background: #2a2a2a;
}
html[data-theme="dark"] .jum-yao-table tr.is-changing {
    background: #3a3220;
}

.owun-summary {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}
.owun-sasang-card strong {
    color: #0f4c3a;
}
.owun-sasang-ref {
    display: block;
    margin-top: 6px;
    font-size: 0.8em;
    font-weight: 400;
    color: var(--text-secondary, #777);
    line-height: 1.4;
}
html[data-theme="dark"] .owun-sasang-card strong {
    color: #6ee7b7;
}
html[data-theme="dark"] .owun-sasang-ref {
    color: #a8b89a;
}

.taegil-jc {
    display: block;
    font-size: 0.68em;
    color: var(--text-secondary, #667);
    line-height: 1.2;
}
.sanmyung-summary {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

