/* =======================================================================
   styles.css — 주역 단시점 UI 스타일 (간소화 버전)
   ======================================================================= */

/* ===== CSS 변수 ===== */
:root {
  --primary-color: #2c5aa0;
  --primary-dark: #1a365d;
  --primary-light: #4a90e2;
  --accent-color: #b7777a;
  --border-color: #e5e7eb;
  --background: #f5f7fa;
  --card-bg: #ffffff;
  --text-primary: #111827;
  --text-secondary: #4a5568;
  --text-muted: #9ca3af;
  --neutral-bg: #f3f4f6;
  --info-bg: #bbdcd6;
}

/* ===== 기본 설정 ===== */
* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'nanum-square', 'NanumGothic', 'Noto Sans KR', sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--background);
}

/* 수정 */
.entry-content main,
.entry-content > main,
main {
  max-width: 100%;
  width: 100%;
  margin: 0;
  padding: 0;
}

/* ===== 유틸리티 ===== */
.is-hidden { display: none !important; }
.muted { color: var(--text-muted); font-size: 0.92rem; }

/* ===== 공통 패널 ===== */
.panel {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.panel h2 {
  margin: 0 0 20px 0;
  color: var(--primary-color);
  font-size: 1.5rem;
  font-weight: 600;
  border-bottom: 2px solid var(--primary-light);
  padding-bottom: 8px;
}

/* ===== 입력 폼 ===== */
.field { 
  margin-bottom: 16px; 
}

.field label { 
  font-size: 0.95rem; 
  display: block; 
  margin-bottom: 8px; 
  font-weight: 500; 
  color: var(--primary-color); 
}

.tsline {
  font-size: 1rem;
  margin-bottom: 12px;
  color: var(--text-secondary);
}

.row { 
  display: flex; 
  gap: 12px; 
  align-items: center; 
  margin-bottom: 8px; 
  flex-wrap: wrap; 
}

input[type="date"], 
input[type="time"], 
select {
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 1rem;
  background: white;
  transition: all 0.3s ease;
}

input[type="date"]:focus, 
input[type="time"]:focus, 
select:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.chk { 
  display: flex !important; 
  align-items: center; 
  gap: 6px; 
  margin: 0; 
  font-weight: normal; 
  cursor: pointer; 
}

.chk input[type="checkbox"] { margin: 0; }

button { 
  padding: 10px 20px; 
  background: var(--primary-light); 
  color: white; 
  border: none; 
  border-radius: 6px; 
  font-size: 1rem; 
  cursor: pointer; 
  transition: all 0.3s ease; 
  font-weight: 500;
}

button:hover { 
  background: var(--primary-color); 
  transform: translateY(-1px); 
  box-shadow: 0 4px 8px rgba(74, 144, 226, 0.2); 
}

button:active { 
  transform: translateY(0); 
}

.actions { 
  display: flex; 
  gap: 12px; 
  margin-top: 16px; 
}

.hint-inline { 
  color: var(--text-muted); 
  font-size: 0.9rem; 
  font-style: italic; 
}

/* ===== 간지 프리뷰 ===== */
.preview {
  font-size: 1.05rem;
  padding: 16px;
  text-align: center;
  font-weight: 500;
  background: linear-gradient(135deg, #f0f8ff 0%, #e8f4fd 100%);
  border: 1px solid #b3d9ff;
  border-radius: 8px;
  margin-bottom: 20px;
}

/* ===== 괘 정보 (텍스트 위주) ===== */
.hexagram-info {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 20px;
}

.hex-row {
  display: flex;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
  gap: 8px;
}

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

.hex-label {
  font-weight: 600;
  color: var(--primary-color);
  min-width: 60px;
  font-size: 1rem;
}

.hex-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  font-family: 'Noto Serif KR', serif;
}

.hex-trigrams {
  font-size: 1.5rem;
  color: var(--accent-color);
  display: inline-flex;
  gap: 4px;
}

.hex-detail {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.hex-spacer {
  flex: 1;
}

.hex-grade {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
  background: var(--info-bg);
  color: #000;
  border: 1px solid var(--border-color);
  margin-left: auto;
}

.hex-score {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary-dark);
  min-width: 40px;
  text-align: right;
}

.hex-value {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary-dark);
}

.hex-hint {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
}

.hex-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
  text-align: center;
  padding-top: 12px;
  margin-top: 8px;
  border-top: 1px solid var(--border-color);
}

/* ===== 해설 섹션 ===== */
.interpretation-content {
  line-height: 1.8;
  color: var(--text-primary);
}

.judgment-1 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--primary-dark);
  margin-bottom: 15px;
  padding: 15px;
  font-style: italic;
  border-left: 4px solid var(--primary-light);
  background: rgba(74, 144, 226, 0.08);
  border-radius: 0 8px 8px 0;
}

.judgment-2 {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.8;
  padding: 0 15px;
}

/* ===== 로그 ===== */
pre {
  background: #f8f9fa;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 16px;
  white-space: pre-wrap;
  word-wrap: break-word;
  max-height: 300px;
  overflow-y: auto;
  font-size: 0.9rem;
  line-height: 1.5;
  font-family: 'Consolas', 'Monaco', monospace;
}

/* ===== 반응형 ===== */
@media (max-width: 768px) {
  main { padding: 12px; }
  
  .panel { padding: 16px; }
  
  .row { 
    flex-direction: column; 
    align-items: stretch; 
    gap: 8px; 
  }
  
  .actions { 
    flex-direction: column; 
  }
  
  button {
    width: 100%;
  }
  
  .hex-row {
    flex-wrap: wrap;
  }
  
  .hex-spacer {
    display: none;
  }
  
  .hex-grade,
  .hex-score {
    margin-left: auto;
  }
}

@media (max-width: 480px) {
  .panel h2 { 
    font-size: 1.3rem; 
  }
}


/* 불필요한 p 태그 여백 제거 */
.entry-content > p:empty,
.entry-content > p:first-child:has(link),
.entry-content > p:last-child:has(script) {
  display: none;
  margin: 0;
  padding: 0;
}
.dansijum-wrap {
  margin-top: 0;
  margin-bottom: 0;
}
