.review-input:disabled { background-color: rgba(255, 255, 255, 0.02); color: rgba(255, 255, 255, 0.3); cursor: not-allowed; }
body.light-mode .review-input:disabled { background-color: #f1f5f9; color: #94a3b8; }

.manse-wrap {
    font-family: 'Noto Sans KR', sans-serif;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3); border-radius: 12px; overflow: hidden;
    background: #f8f9fa; color: #111; margin: 0 auto;
}
.manse-header-bg { background: linear-gradient(135deg, #2d4373, #3b5998); color: white; padding: 16px; }
.manse-table { width: 100%; border-collapse: collapse; text-align: center; font-size: 0.85rem; line-height: 1.2; }
.manse-table th, .manse-table td { border: 1px solid #e5e7eb; padding: 6px 2px; vertical-align: middle; }

.manse-col-title { background-color: #f1f5f9; font-weight: bold; font-size: 0.9rem; }

.manse-box-container { padding: 8px 4px; }
.manse-char-box {
    width: 100%; max-width: 60px; aspect-ratio: 1/1; margin: 0 auto;
    display: flex; align-items: center; justify-content: center;
    font-size: 2rem; font-weight: bold; font-family: 'NMK-Classic', serif;
    box-shadow: 1px 2px 5px rgba(0,0,0,0.15); border-radius: 4px;
}

/* 오행 배경 컬러 */
.manse-wood { background-color: #16a34a; color: white; border: 2px solid #14532d; }
.manse-fire { background-color: #dc2626; color: white; border: 2px solid #7f1d1d; }
.manse-earth { background-color: #f59e0b; color: black; border: 2px solid #b45309; }
.manse-metal { background-color: #f8fafc; color: #1e293b; border: 2px solid #64748b; }
.manse-water { background-color: #1e293b; color: white; border: 2px solid #020617; }

.manse-ji-text { font-size: 0.75rem; color: #4b5563; }
.manse-bold-text { font-weight: bold; color: #1f2937; }
.manse-ilgan-text { color: #2563eb; font-weight: 900; background-color: #eff6ff; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-fade-in { animation: fadeIn 0.4s ease-out forwards; }

.scrollbar-hide::-webkit-scrollbar { display: none; }
.scrollbar-hide { -ms-overflow-style: none; scrollbar-width: none; }
/* ════════════════════════════════════════════════════════
   🌟 신살 칩 + 인라인 아코디언 (각 기둥 아래 신살 표시)
   ════════════════════════════════════════════════════════ */
/* 신살 칸 — 세로 나열 */
.shinsal-cell { vertical-align: top; padding: 6px 4px; }
.shinsal-stack { display: flex; flex-direction: column; gap: 3px; align-items: center; }
.shinsal-item { width: 100%; }

/* 신살 칩 (클릭 가능) */
.shinsal-chip {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid transparent;
    cursor: pointer;
    line-height: 1.4;
    transition: all 0.15s ease;
    white-space: nowrap;
    font-family: 'Noto Sans KR', sans-serif;
}
.shinsal-chip:hover { transform: translateY(-1px); }
.shinsal-chip-active { box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3); }

/* 12신살 — 회색 톤 */
.shinsal-chip-default {
    background: #f1f5f9;
    color: #475569;
    border-color: #e2e8f0;
}
.shinsal-chip-default:hover { background: #e2e8f0; }

/* 길신·귀인 — 보라 톤 */
.shinsal-chip-noble {
    background: #faf5ff;
    color: #7c3aed;
    border-color: #e9d5ff;
}
.shinsal-chip-noble:hover { background: #f3e8ff; }

/* 흉살·특수살 — 빨강 톤 */
.shinsal-chip-warning {
    background: #fef2f2;
    color: #dc2626;
    border-color: #fecaca;
}
.shinsal-chip-warning:hover { background: #fee2e2; }

/* 해석 박스 (인라인 아코디언) */
.shinsal-desc-box {
    margin-top: 4px;
    padding: 8px 10px;
    font-size: 11px;
    line-height: 1.55;
    color: #334155;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    text-align: left;
    word-break: keep-all;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
    animation: shinsalFade 0.18s ease-out;
}
.shinsal-desc-box.hidden { display: none; }

@keyframes shinsalFade {
    from { opacity: 0; transform: translateY(-3px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ════════════════════════════════════════════
   심층 리포트 풀스크린 모달
   ════════════════════════════════════════════ */
.ai-report-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.ai-report-modal.hidden { display: none; }
.ai-report-modal.open  { opacity: 1; }

.ai-report-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 12, 28, 0.78);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.ai-report-panel {
    position: relative;
    width: 100%;
    max-width: 920px;
    max-height: 92vh;
    background: #fff;
    border-radius: 16px;
    border: 1px solid rgba(212, 175, 55, 0.4);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(20px) scale(0.98);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.ai-report-modal.open .ai-report-panel {
    transform: translateY(0) scale(1);
}

.ai-report-header {
    flex-shrink: 0;
    background: linear-gradient(90deg, #1a2444 0%, #2d4373 50%, #1a2444 100%);
    color: #fff;
    padding: 14px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
}
.ai-report-close {
    width: 32px; height: 32px;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex; align-items: center; justify-content: center;
}
.ai-report-close:hover {
    background: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.4);
    transform: rotate(90deg);
}

.ai-report-body {
    flex: 1;
    overflow-y: auto;
    padding: 36px 44px;
    color: #1f2937;
    font-size: 15px;
    line-height: 1.95;
    letter-spacing: 0.01em;
}

/* 리포트 본문 타이포그래피 */
.saju-report-body {
    word-break: keep-all;
    overflow-wrap: break-word;
}
.saju-report-body p {
    margin-bottom: 14px;
}
.saju-report-body h2 {
    font-size: 22px;
    font-weight: 800;
    color: #92400e;
    margin: 28px 0 14px;
    padding-bottom: 6px;
    border-bottom: 2px solid #fcd34d;
}
.saju-report-body h3 {
    font-size: 18px;
    font-weight: 800;
    color: #1f2937;
    margin: 24px 0 10px;
    padding-bottom: 4px;
    border-bottom: 1px solid #fde68a;
}
.saju-report-body h4 {
    font-size: 16px;
    font-weight: 700;
    color: #b45309;
    margin: 18px 0 8px;
    padding-left: 12px;
    border-left: 4px solid #fbbf24;
}
.saju-report-body strong {
    color: #111827;
    font-weight: 800;
}

.ai-report-footer {
    flex-shrink: 0;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
    padding: 14px 22px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}
.ai-report-btn-print,
.ai-report-btn-close {
    padding: 10px 22px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}
.ai-report-btn-print {
    background: #fff;
    border: 1px solid #d1d5db;
    color: #4b5563;
}
.ai-report-btn-print:hover {
    border-color: #b45309;
    color: #b45309;
}
.ai-report-btn-close {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(180, 83, 9, 0.3);
}
.ai-report-btn-close:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(180, 83, 9, 0.45);
}

/* 모바일 — 거의 풀스크린 */
@media (max-width: 768px) {
    .ai-report-modal { padding: 0; }
    .ai-report-panel {
        max-width: 100%;
        max-height: 100vh;
        height: 100vh;
        border-radius: 0;
        border: none;
    }
    .ai-report-body {
        padding: 22px 18px;
        font-size: 14px;
        line-height: 1.85;
    }
    .saju-report-body h2 { font-size: 19px; }
    .saju-report-body h3 { font-size: 16px; }
    .saju-report-body h4 { font-size: 15px; }
}

/* 인쇄 시 — 모달 배경 제거하고 본문만 출력 */
@media print {
    body * { visibility: hidden; }
    #aiReportModal, #aiReportModal * { visibility: visible; }
    #aiReportModal {
        position: absolute;
        inset: 0;
        background: #fff;
        padding: 0;
    }
    .ai-report-backdrop,
    .ai-report-header,
    .ai-report-footer { display: none; }
    .ai-report-panel {
        box-shadow: none;
        border: none;
        max-width: 100%;
        max-height: none;
    }
    .ai-report-body { padding: 0; }
}
