/* ==========================================================================
   pro_style.css - 오주기반 정통 만세력 PRO 전용 스타일시트
   기존 style.css를 확장하여 컴팩트 입력창, 접이식 아코디언, Pro 4대 탭 제공
   ========================================================================== */

/* 1. Pro Header & Badges */
.app-header {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 12px !important;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.title-area {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-actions {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  width: 100% !important;
  gap: 12px !important;
  flex-wrap: wrap !important;
}

.header-actions-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.header-actions-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* 헤더 액션 버튼 폰트 및 규격 완벽 일치화 (a 태그와 button 태그 100% 일원화) */
.header-actions .btn-sm,
.header-actions a.btn-sm,
.header-actions button.btn-sm {
  font-family: -apple-system, BlinkMacSystemFont, "Pretendard", "Noto Sans KR", "Apple SD Gothic Neo", sans-serif !important;
  font-size: 0.82rem !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  letter-spacing: -0.2px !important;
  text-decoration: none !important;
  color: var(--text-main) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  height: 32px !important;
  padding: 0 10px !important;
  border-radius: var(--radius-sm) !important;
  border: 1px solid var(--border-color) !important;
  background: var(--bg-glass) !important;
  box-sizing: border-box !important;
  cursor: pointer !important;
  user-select: none !important;
  vertical-align: middle !important;
  -webkit-appearance: none !important;
  appearance: none !important;
  -webkit-font-smoothing: antialiased !important;
}

.header-actions .btn-sm span,
.header-actions a.btn-sm span,
.header-actions button.btn-sm span {
  font-family: inherit !important;
  font-size: 0.82rem !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  letter-spacing: -0.2px !important;
  color: inherit !important;
  text-decoration: none !important;
}

.header-actions .btn-sm:hover,
.header-actions a.btn-sm:hover,
.header-actions button.btn-sm:hover {
  background: rgba(212, 175, 55, 0.2) !important;
  border-color: var(--gold-primary) !important;
  color: var(--gold-light) !important;
  text-decoration: none !important;
}

.badge-pro {
  background: linear-gradient(135deg, #ffd700, #ff8c00);
  color: #0b0f19;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
  margin-left: 6px;
  box-shadow: 0 0 8px rgba(255, 215, 0, 0.4);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

#btn-open-gammyung,
.header-actions button#btn-open-gammyung,
.header-actions button.btn-highlight-gammyung,
.header-actions .btn-highlight-gammyung,
.btn-highlight-gammyung {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.25) 0%, rgba(212, 175, 55, 0.1) 100%) !important;
  border: 1.5px solid #ffd700 !important;
  color: #ffd700 !important;
  font-weight: 700 !important;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.4) !important;
}

#btn-open-gammyung:hover,
.header-actions button#btn-open-gammyung:hover,
.header-actions button.btn-highlight-gammyung:hover,
.header-actions .btn-highlight-gammyung:hover,
.btn-highlight-gammyung:hover {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.4) 0%, rgba(212, 175, 55, 0.25) 100%) !important;
  border-color: #fff2a8 !important;
  color: #ffffff !important;
  box-shadow: 0 0 14px rgba(255, 215, 0, 0.6) !important;
}

.btn-toggle-input {
  background: rgba(212, 175, 55, 0.15) !important;
  border: 1px solid var(--gold-primary) !important;
  color: var(--gold-light) !important;
  font-weight: 600;
}

.btn-toggle-input:hover {
  background: rgba(212, 175, 55, 0.3) !important;
  color: #ffffff !important;
}

/* 2. Compact Collapsible Input Panel (컴팩트 접이식 입력창) */
.pro-input-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  margin-bottom: 16px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

/* 접혔을 때의 한 줄 요약 바 */
.input-summary-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 14px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: var(--radius-md);
  color: #e2e8f0;
  font-size: 0.86rem;
}

.summary-text-wrap {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.summary-badge-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.78rem;
  color: var(--gold-light);
}

.summary-badge-item.loc {
  color: #90caf9;
}

/* 컴팩트 2열 레이아웃 */
.compact-input-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.compact-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.compact-item label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gold-light);
  white-space: nowrap;
}

/* 출생일시 5개 숫자 입력 바 */
.compact-date-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 8px 12px;
}

.btn-calc-pro {
  background: linear-gradient(135deg, #ffd700, #c89611) !important;
  color: #0b0f19 !important;
  font-weight: 800 !important;
  font-size: 0.85rem !important;
  height: 34px;
  padding: 0 16px !important;
  border: none !important;
  border-radius: var(--radius-sm);
  cursor: pointer;
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.4);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.btn-calc-pro:hover {
  background: linear-gradient(135deg, #fff2a8, #ffd700) !important;
  transform: translateY(-1px);
  box-shadow: 0 0 16px rgba(255, 215, 0, 0.6);
}

/* 아코디언 토글 버튼 */
.accordion-toggle-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(212, 175, 55, 0.3);
  border-radius: var(--radius-md);
  padding: 8px 14px;
  color: var(--gold-light);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 8px;
}

.accordion-toggle-btn:hover {
  background: rgba(212, 175, 55, 0.08);
  border-color: var(--gold-primary);
}

.accordion-panel {
  display: none;
  padding-top: 12px;
  margin-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.accordion-panel.is-open {
  display: block;
}

/* 3. Pro Navigation Tabs (메인 5대 탭 한줄 꽉 찬 균등 분할) */
.pro-tabs-container {
  display: flex;
  align-items: stretch;
  width: 100%;
  gap: 6px;
  margin-bottom: 20px;
  border-bottom: 2px solid rgba(212, 175, 55, 0.25);
  padding-bottom: 2px;
  box-sizing: border-box;
}

.pro-tab-item {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 6px;
  font-size: 1.08rem;
  font-weight: 700;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 3.5px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  user-select: none;
  border-radius: 8px 8px 0 0;
  box-sizing: border-box;
}

.pro-tab-item .pro-tab-icon {
  font-size: 1.32rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.4));
  transition: transform 0.2s ease;
}

.pro-tab-item .pro-tab-text {
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: -0.3px;
}

.pro-tab-item:hover {
  color: #ffd700;
  background: rgba(212, 175, 55, 0.06);
  border-color: rgba(212, 175, 55, 0.2);
  border-bottom-color: rgba(212, 175, 55, 0.4);
}

.pro-tab-item:hover .pro-tab-icon {
  transform: translateY(-1px) scale(1.08);
}

.pro-tab-item.active {
  color: #ffd700;
  background: linear-gradient(180deg, rgba(212, 175, 55, 0.15) 0%, rgba(212, 175, 55, 0.03) 100%);
  border-color: rgba(212, 175, 55, 0.35);
  border-bottom-color: #ffd700;
  box-shadow: 0 -2px 10px rgba(212, 175, 55, 0.12);
  font-weight: 800;
}

.pro-tab-item.active .pro-tab-icon {
  transform: scale(1.1);
}

.pro-tab-badge {
  font-size: 0.65rem;
  padding: 1px 5px;
  border-radius: 4px;
  font-weight: 700;
  background: rgba(255, 215, 0, 0.2);
  color: #ffd700;
}

/* 4. Tab Content Panes */
.pro-tab-pane {
  display: none;
}

.pro-tab-pane.active {
  display: block;
  animation: fadeIn 0.25s ease-in-out;
}

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

/* Pro Card Elements */
.pro-feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

.pro-feature-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.pro-feature-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--gold-light);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 오주괘(五柱卦) 디스플레이 카드 */
.ojugwae-diagram-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.gwae-box {
  background: rgba(0, 0, 0, 0.35);
  border: 1.5px solid rgba(212, 175, 55, 0.3);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
}

.gwae-box-title {
  font-size: 0.85rem;
  color: var(--gold-light);
  font-weight: 700;
  margin-bottom: 10px;
}

.gwae-lines-visual {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 120px;
  margin: 0 auto 12px auto;
}

.gwae-line {
  height: 10px;
  border-radius: 3px;
}

.gwae-line.yang {
  background: #ff5252; /* 양효: 연속된 선 */
}

.gwae-line.yin {
  display: flex;
  justify-content: space-between;
}

.gwae-line.yin::before,
.gwae-line.yin::after {
  content: '';
  width: 45%;
  height: 100%;
  background: #448aff; /* 음효: 끊어진 선 */
  border-radius: 3px;
}

.gwae-name-text {
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 4px;
}

.gwae-sub-desc {
  font-size: 0.78rem;
  color: #a0aec0;
  line-height: 1.4;
}

/* 신살 & 합충형파해 매트릭스 테이블 */
.matrix-table {
  width: 100%;
  border-collapse: collapse;
  text-align: center;
  font-size: 0.82rem;
  margin-top: 10px;
}

.matrix-table th,
.matrix-table td {
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.matrix-table th {
  background: rgba(212, 175, 55, 0.12);
  color: var(--gold-light);
  font-weight: 600;
}

.matrix-table td.highlight-hap {
  color: #81c784;
  font-weight: 700;
}

.matrix-table td.highlight-chung {
  color: #ef5350;
  font-weight: 700;
}

.matrix-table td.highlight-hyeong {
  color: #ffb74d;
  font-weight: 700;
}

/* 상담 메모 & 고객 관리 */
.memo-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

.memo-tag-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.memo-tag-chip {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #c9d1d9;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.76rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.memo-tag-chip.active {
  background: rgba(212, 175, 55, 0.25);
  border-color: var(--gold-primary);
  color: #ffd700;
  font-weight: 600;
}

.memo-textarea {
  width: 100%;
  min-height: 120px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  color: #ffffff;
  padding: 10px 12px;
  font-size: 0.85rem;
  resize: vertical;
  margin-bottom: 10px;
  font-family: inherit;
}

.memo-textarea:focus {
  outline: none;
  border-color: var(--gold-primary);
  box-shadow: 0 0 8px rgba(212, 175, 55, 0.3);
}

.saved-memos-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
}

.saved-memo-card {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.memo-header-title {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--gold-light);
  margin-bottom: 4px;
}

.memo-date-badge {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.memo-snippet {
  font-size: 0.8rem;
  color: #c9d1d9;
  line-height: 1.4;
  white-space: pre-wrap;
}

/* 모바일 반응형 최적화 */
@media (max-width: 768px) {
  .pro-input-panel {
    padding: 10px 12px;
  }
  .compact-input-row {
    gap: 8px;
  }
  .compact-date-bar {
    padding: 6px 8px;
    gap: 5px;
  }
  .pro-tabs-container {
    gap: 3px;
    margin-bottom: 14px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .pro-tabs-container::-webkit-scrollbar {
    display: none;
  }
  .pro-tab-item {
    flex: 1 1 0;
    min-width: 0;
    padding: 10px 2px;
    font-size: clamp(0.72rem, 2.2vw, 0.92rem);
    gap: 4px;
  }
  .pro-tab-item .pro-tab-icon {
    font-size: clamp(0.92rem, 2.6vw, 1.15rem);
  }
  .pro-tab-item .pro-tab-text {
    letter-spacing: -0.5px;
  }
  .memo-form-grid {
    grid-template-columns: 1fr;
  }
  .ojugwae-diagram-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   수화기제 감명지 (水火旣濟 鑑命紙) A4 인쇄 서식 스타일 (첨부 이미지 100% 일치)
   ========================================================================== */

/* 상단 인쇄 제어 바 (화면 전용) */
.gammyung-action-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
  padding: 12px 18px;
  background: linear-gradient(135deg, rgba(32, 25, 18, 0.85) 0%, rgba(20, 16, 12, 0.95) 100%);
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.gammyung-action-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.gammyung-badge {
  background: linear-gradient(135deg, #2e7d32 0%, #1b5e20 100%);
  color: #fff;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
}

.gammyung-desc {
  font-size: 0.82rem;
  color: var(--gold-light);
}

.gammyung-action-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-print-primary {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: linear-gradient(135deg, #d4af37 0%, #b8932b 100%);
  color: #12100e;
  border: none;
  border-radius: var(--radius-sm);
  padding: 8px 16px;
  font-size: 0.86rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 10px rgba(212, 175, 55, 0.35);
}

.btn-print-primary:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
}

.btn-sub-action {
  background: rgba(255, 255, 255, 0.08);
  color: #e0e0e0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-sub-action:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

/* 감명지 페이퍼 컨테이너 (화면 뷰) */
.gammyung-paper-container {
  display: flex;
  justify-content: center;
  padding: 10px 0 40px;
  background: rgba(10, 8, 6, 0.4);
  border-radius: var(--radius-lg);
  overflow-x: auto;
}

/* 감명지 본체 A4 페이퍼 (사진과 100% 동일한 외형) */
.gammyung-paper {
  width: 210mm;
  min-height: 297mm;
  background: #ffffff;
  color: #111827;
  padding: 14mm 15mm 12mm 15mm;
  border: 1px solid #c2d2e2;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Malgun Gothic", "맑은 고딕", "Noto Sans KR", sans-serif;
  line-height: 1.35;
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
}

/* [1] 최상단 헤더 타이틀 & 상담일 */
.gm-top-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 12px;
  padding-bottom: 4px;
}

.gm-main-title {
  display: flex;
  align-items: baseline;
  gap: 24px;
}

.gm-title-part1,
.gm-title-part2 {
  font-family: "Pretendard", "Malgun Gothic", "맑은 고딕", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  font-size: 1.95rem;
  font-weight: 900;
  color: #000000;
  letter-spacing: 2px;
  line-height: 1;
}

.gm-counsel-date-wrap {
  font-size: 0.82rem;
  color: #374151;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.gm-counsel-date-val {
  outline: none;
  min-width: 140px;
  border-bottom: 1px solid #374151;
  padding: 0 4px;
  font-weight: 600;
  color: #111827;
}

/* [2] 기본 정보 박스 (2행 2열 테두리 상자) */
.gm-info-box {
  border: 1px solid #c2d2e2;
  margin-bottom: 14px;
}

.gm-info-row {
  display: flex;
  border-bottom: 1px solid #c2d2e2;
}

.gm-info-row:last-child {
  border-bottom: none;
}

.gm-info-col {
  padding: 7px 10px;
  display: flex;
  align-items: center;
  font-size: 0.82rem;
  color: #374151;
}

.gm-info-col-left {
  width: 58%;
  border-right: 1px solid #c2d2e2;
}

.gm-info-col-right {
  width: 42%;
}

.gm-info-lbl {
  font-weight: 600;
  color: #111827;
  white-space: nowrap;
  margin-right: 6px;
}

.gm-info-underline {
  outline: none;
  border-bottom: 1px solid #6b7280;
  padding: 0 4px;
  color: #111827;
  font-weight: 600;
}

.gm-name-val {
  min-width: 80px;
  font-size: 0.88rem;
  font-weight: 800;
}

.gm-phone-val {
  flex: 1;
  min-width: 100px;
}

.gm-birth-val {
  min-width: 130px;
  font-size: 0.84rem;
}

.gm-place-val {
  min-width: 45px;
}

.gm-addr-val {
  flex: 1;
  min-width: 80px;
}

.gm-info-checks {
  display: inline-flex;
  gap: 8px;
  margin-left: auto;
  font-size: 0.8rem;
  color: #374151;
  white-space: nowrap;
}

.gm-chk-item {
  font-size: 0.78rem;
  color: #4b5563;
}

.gm-chk-item.is-checked {
  font-weight: 800;
  color: #111827;
}

/* 공통 블록 스타일 */
.gm-block {
  margin-bottom: 13px;
}

.gm-block-memo {
  margin-bottom: 0 !important;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.gm-block-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 4px;
}

.gm-block-title {
  font-size: 0.88rem;
  font-weight: 800;
  color: #111827;
}

.gm-block-desc {
  font-size: 0.72rem;
  color: #6b7280;
  font-weight: normal;
}

/* [3] 오주괘 · 사주명식 테이블 (2분할) */
.gm-saju-grid-table {
  display: flex;
  border: 1px solid #c2d2e2;
  min-height: 130px;
}

.gm-sg-col {
  display: flex;
  flex-direction: column;
}

.gm-sg-left {
  width: 38%;
  border-right: 1px solid #c2d2e2;
}

.gm-sg-right {
  width: 62%;
}

.gm-sg-hd {
  background: #edf4f9;
  border-bottom: 1px solid #c2d2e2;
  padding: 5px 8px;
  font-size: 0.82rem;
  font-weight: 700;
  text-align: center;
  color: #111827;
}

.gm-sg-body {
  padding: 6px 8px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* 오주점괘 내부 박스 스타일 */
.gm-oj-min-bar {
  font-size: 0.8rem;
  color: #1f2937;
  padding-bottom: 4px;
  margin-bottom: 4px;
  border-bottom: 1px dashed #c2d2e2;
}

.gm-oj-gwae-box {
  margin-top: 2px;
}

.gm-oj-gwae-name {
  font-size: 1.05rem;
  font-weight: 900;
  color: #b91c1c;
  font-family: "Pretendard", "Malgun Gothic", "맑은 고딕", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  margin-bottom: 2px;
}

.gm-oj-gwae-symbol {
  font-size: 1.15rem;
  letter-spacing: 2px;
  line-height: 1;
  margin-bottom: 4px;
}

.gm-oj-gwae-desc {
  font-size: 0.74rem;
  line-height: 1.4;
  color: #374151;
  background: #fafbfc;
  border: 1px solid #e2e8f0;
  padding: 5px 6px;
  border-radius: 2px;
}

/* 사주명식 4기둥 미니 표 - 공망 제외 후 높이 꽉 차도록 확장 */
.gm-saju-mini-table {
  width: 100%;
  height: 100%;
  border-collapse: collapse;
  font-size: 0.74rem;
  text-align: center;
}

.gm-saju-mini-table th,
.gm-saju-mini-table td {
  border: 1px solid #d1d5db;
  padding: 3px 2px;
  vertical-align: middle;
}

.gm-saju-mini-table th {
  background: #f8fafc;
  font-weight: 700;
  color: #374151;
  font-size: 0.72rem;
  padding: 4px 2px;
}

.gm-smt-god {
  font-size: 0.74rem;
  color: #1f2937;
  height: 20px;
  font-weight: 700;
}

.gm-smt-god.is-myself {
  font-weight: 900 !important;
  color: #000000 !important;
  font-size: 0.78rem !important;
}

.gm-smt-char {
  font-family: "Pretendard", "Malgun Gothic", "맑은 고딕", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  font-size: 1.18rem;
  font-weight: 800;
  color: #000000;
  padding: 4px 0;
  letter-spacing: 0.5px;
}

.gm-smt-char.is-day-master {
  font-weight: 900 !important;
  font-size: 1.25rem !important;
  color: #000000 !important;
  background: #ffffff !important;
}

.gm-smt-char.is-day-master strong,
.gm-daymaster-char {
  font-weight: 900 !important;
  font-size: 1.26rem !important;
  -webkit-text-stroke: 0.7px #000000;
  color: #000000 !important;
  display: inline-block;
}

.gm-smt-hidden {
  font-size: 0.72rem;
  font-weight: 700;
  color: #374151;
  letter-spacing: 0.5px;
}

.gm-smt-meta {
  font-size: 0.64rem;
  line-height: 1.25;
}

.gm-saju-gm-bar {
  display: none !important;
}

/* [4] 본인의 주체오행 · 오행 분포 */
.gm-elem-box {
  border: 1px solid #c2d2e2;
}

.gm-elem-top-bar {
  display: flex;
  align-items: center;
  padding: 6px 10px;
  background: #ffffff;
  border-bottom: 1px solid #c2d2e2;
  font-size: 0.82rem;
  color: #111827;
}

.gm-elem-top-lbl {
  font-weight: 600;
  margin-right: 8px;
}

.gm-master-underline {
  border-bottom: 1px solid #6b7280;
  padding: 0 6px;
  min-width: 120px;
  display: inline-block;
  font-weight: 800;
  color: #111827;
}

.gm-elem-checks {
  display: inline-flex;
  gap: 12px;
  margin-left: auto;
  font-size: 0.8rem;
  color: #374151;
}

/* 데이터 테이블 공통 */
.gm-data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
  text-align: center;
}

.gm-data-table th,
.gm-data-table td {
  border: 1px solid #c2d2e2;
  padding: 5px 4px;
  vertical-align: middle;
}

.gm-data-table thead th {
  background: #edf4f9;
  font-weight: 700;
  color: #111827;
  font-size: 0.8rem;
}

/* [4] 오행분포 구분란 목화토금수 고유 글자색 (정통 오행: 목=청, 화=빨강, 토=노랑, 금=회색, 수=검정) */
.gm-elem-grid-table thead th.gm-th-wood { color: #1d4ed8 !important; font-weight: 800; } /* 木: 청색 */
.gm-elem-grid-table thead th.gm-th-fire { color: #dc2626 !important; font-weight: 800; } /* 火: 빨강 */
.gm-elem-grid-table thead th.gm-th-earth { color: #d4af00 !important; font-weight: 800; } /* 土: 노랑 */
.gm-elem-grid-table thead th.gm-th-metal { color: #64748b !important; font-weight: 800; } /* 金: 회색 */
.gm-elem-grid-table thead th.gm-th-water { color: #000000 !important; font-weight: 800; } /* 水: 검은색 */

.gm-chk-item.gm-chk-wood.is-checked { color: #1d4ed8 !important; font-weight: 800; }
.gm-chk-item.gm-chk-fire.is-checked { color: #dc2626 !important; font-weight: 800; }
.gm-chk-item.gm-chk-earth.is-checked { color: #d4af00 !important; font-weight: 800; }
.gm-chk-item.gm-chk-metal.is-checked { color: #64748b !important; font-weight: 800; }
.gm-chk-item.gm-chk-water.is-checked { color: #000000 !important; font-weight: 800; }

.gm-td-hd,
.gm-cnt-hd {
  background: #ffffff;
  font-weight: 800 !important;
  color: #000000 !important;
  font-size: 0.82rem;
  width: 16.6%;
}

.gm-cnt-val,
#gm-cnt-wood,
#gm-cnt-fire,
#gm-cnt-earth,
#gm-cnt-metal,
#gm-cnt-water {
  color: #000000 !important;
  font-weight: 800 !important;
  font-size: 0.92rem !important;
}

.gm-editable-cell {
  outline: none;
  min-height: 20px;
  color: #111827;
}

.gm-editable-cell:focus {
  background: #fffbeb;
}

/* [5] 대운 · 세운 그리드 */
.gm-flow-container {
  border: 1px solid #c2d2e2;
  padding: 8px 8px;
  background: #ffffff;
}

.gm-flow-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.72rem;
  text-align: center;
}

.gm-flow-table th,
.gm-flow-table td {
  border: 1px solid #c2d2e2;
  padding: 3px 2px;
  vertical-align: middle;
}

.gm-flow-hd-title {
  background: #edf4f9 !important;
  font-weight: 800;
  color: #111827;
  font-size: 0.82rem;
  width: 10%;
}

.gm-flow-age-cell {
  font-size: 0.72rem;
  font-weight: 800;
  color: #000000 !important;
  background: #fbfcfd;
}

.gm-flow-ganji-cell {
  font-family: "Pretendard", "Malgun Gothic", "맑은 고딕", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  font-size: 0.95rem;
  font-weight: 800;
  padding: 4px 1px !important;
  vertical-align: middle;
}

/* 대운·세운 세로 간지 및 오행 한자 표기 */
.gm-flow-pillar {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
}

.gm-flow-pillar-char {
  display: flex;
  align-items: baseline;
  justify-content: center;
  line-height: 1.15;
}

.gm-flow-elem {
  font-size: 0.74rem;
  font-weight: 800;
  margin-right: 3px;
  font-family: "Pretendard", "Malgun Gothic", "맑은 고딕", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  line-height: 1;
}

.gm-flow-hanja {
  font-family: "Pretendard", "Malgun Gothic", "맑은 고딕", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  color: #000000 !important; /* 60갑자 글자는 선명한 검은색 */
}

.gm-flow-sewoon .gm-flow-hanja {
  font-size: 0.98rem;
  font-weight: 800;
}

/* 오행별 색상 (옆에 쓰는 목화토금수에만 적용: 목=청, 화=빨강, 토=노랑, 금=회색, 수=검정) */
.gm-flow-elem.gm-flow-elem-wood { color: #1d4ed8 !important; } /* 木: 청색 */
.gm-flow-elem.gm-flow-elem-fire { color: #dc2626 !important; } /* 火: 빨강 */
.gm-flow-elem.gm-flow-elem-earth { color: #d4af00 !important; } /* 土: 노랑 */
.gm-flow-elem.gm-flow-elem-metal { color: #64748b !important; } /* 金: 회색 */
.gm-flow-elem.gm-flow-elem-water { color: #000000 !important; } /* 水: 검은색 */

.gm-flow-god-cell {
  font-size: 0.65rem;
  color: #4b5563;
  line-height: 1.15;
}

/* 현재 만나이 대운 볼드 강조 */
.gm-flow-table td.is-current-daeun {
  background: #edf4f9 !important;
  color: #111827 !important;
}

.gm-flow-table td.gm-flow-age-cell.is-current-daeun {
  font-weight: 900 !important;
  color: #000000 !important;
  background: #edf4f9 !important;
}

.gm-flow-table td.gm-flow-ganji-cell.is-current-daeun {
  font-weight: 900 !important;
  font-size: 0.92rem !important;
  color: #000000 !important;
  background: #edf4f9 !important;
}

.gm-flow-table td.gm-flow-god-cell.is-current-daeun {
  font-weight: 800 !important;
  color: #111827 !important;
  background: #edf4f9 !important;
}

/* [6] 상담내용 (통합 메모 박스) - A4 최하단 여백까지 꽉 차도록 확장 */
.gm-counsel-memo-box {
  border: 1px solid #c2d2e2;
  background: #ffffff;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 250px;
  padding: 10px 12px;
  box-sizing: border-box;
}

.gm-counsel-content {
  width: 100%;
  flex: 1;
  min-height: 230px;
  outline: none;
  font-family: "Pretendard", "Malgun Gothic", "맑은 고딕", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  font-size: 0.94rem;
  font-weight: 500;
  line-height: 1.65;
  color: #000000;
  white-space: pre-wrap;
  word-break: break-all;
}

.gm-counsel-content:empty:before {
  content: attr(placeholder);
  color: #9ca3af;
}

.gm-counsel-content:focus {
  background: #fffdf5;
}

/* [7] 최하단 안내문구 (미사용) */
.gm-bottom-notice {
  display: none !important;
}

/* ==========================================================================
   @media print : A4 인쇄 스타일 (첨부 이미지와 100% 일치)
   ========================================================================== */
@media print {
  @page {
    size: A4 portrait;
    margin: 8mm 10mm;
  }

  html, body {
    background: #ffffff !important;
    color: #000000 !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    height: auto !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    font-family: "Pretendard", "Malgun Gothic", "맑은 고딕", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif !important;
    -webkit-font-smoothing: antialiased !important;
    text-rendering: geometricPrecision !important;
  }

  .gammyung-paper,
  .gammyung-paper * {
    font-family: "Pretendard", "Malgun Gothic", "맑은 고딕", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif !important;
  }

  .app-header,
  .panel,
  .pro-tabs-container,
  .gammyung-action-bar,
  .app-footer,
  .modal-overlay,
  .modal-backdrop,
  .toast,
  .no-print,
  #tab-pane-saju,
  #tab-pane-ojugwae,
  #tab-pane-sinsal,
  #tab-pane-memo {
    display: none !important;
  }

  #tab-pane-gammyung {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .gammyung-paper-container {
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    display: block !important;
  }

  .gammyung-paper {
    width: 100% !important;
    max-width: 190mm !important;
    min-height: 0 !important;
    height: auto !important;
    margin: 0 auto !important;
    padding: 0 !important;
    border: 1.5px solid #475569 !important;
    box-shadow: none !important;
    background: #ffffff !important;
    color: #000000 !important;
    page-break-inside: avoid !important;
  }

  .gm-sg-hd,
  .gm-data-table thead th,
  .gm-flow-hd-title,
  .gm-flow-table td.is-current-daeun {
    background: #edf4f9 !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* 인쇄 시 테두리 선명도 강화 (#94a3b8 -> #64748b) */
  .gm-info-box,
  .gm-info-row,
  .gm-info-col-left,
  .gm-saju-grid-table,
  .gm-sg-left,
  .gm-elem-box,
  .gm-elem-top-bar,
  .gm-data-table th,
  .gm-data-table td,
  .gm-flow-container,
  .gm-flow-table th,
  .gm-flow-table td,
  .gm-counsel-memo-box {
    border-color: #64748b !important;
  }

  /* 인쇄 시 텍스트 흑색 대비 및 볼드 강조 */
  .gm-title-part1,
  .gm-title-part2 {
    color: #000000 !important;
    font-weight: 900 !important;
    font-size: 2rem !important;
  }

  .gm-smt-char {
    color: #000000 !important;
    font-weight: 800 !important;
    font-size: 1.2rem !important;
  }

  .gm-smt-char.is-day-master strong,
  .gm-daymaster-char {
    color: #000000 !important;
    font-weight: 900 !important;
    font-size: 1.28rem !important;
    -webkit-text-stroke: 0.8px #000000 !important;
  }

  .gm-flow-hanja {
    color: #000000 !important;
    font-weight: 800 !important;
    font-size: 1.05rem !important;
  }

  .gm-flow-elem {
    font-weight: 800 !important;
    font-size: 0.74rem !important;
  }

  .gm-flow-age-cell,
  .gm-flow-table td.gm-flow-age-cell.is-current-daeun {
    color: #000000 !important;
    font-weight: 800 !important;
  }

  .gm-info-lbl,
  .gm-sg-hd,
  .gm-flow-hd-title,
  .gm-data-table thead th,
  .gm-td-hd,
  .gm-cnt-hd,
  .gm-cnt-val,
  #gm-cnt-wood,
  #gm-cnt-fire,
  #gm-cnt-earth,
  #gm-cnt-metal,
  #gm-cnt-water {
    color: #000000 !important;
    font-weight: 800 !important;
  }

  .gm-counsel-content:empty:before {
    display: none !important;
  }

  .gm-block-memo {
    margin-bottom: 0 !important;
  }

  .gm-counsel-memo-box {
    min-height: 240px !important;
  }

  .gm-counsel-content {
    min-height: 220px !important;
    font-size: 0.94rem !important;
    color: #000000 !important;
  }

  .gm-flow-elem.gm-flow-elem-wood,
  .gm-flow-elem.gm-flow-elem-fire,
  .gm-flow-elem.gm-flow-elem-earth,
  .gm-flow-elem.gm-flow-elem-metal,
  .gm-flow-elem.gm-flow-elem-water,
  .gm-elem-grid-table thead th.gm-th-wood,
  .gm-elem-grid-table thead th.gm-th-fire,
  .gm-elem-grid-table thead th.gm-th-earth,
  .gm-elem-grid-table thead th.gm-th-metal,
  .gm-elem-grid-table thead th.gm-th-water {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
}
