:root {
  --color-primary: #1e1e1e;
  --color-primary-hover: #111;
  --color-border: #e0e0e0;
  --color-border-light: #eee;
  --color-bg-light: #fff;
  --color-bg-lighter: #fafafa;
  --color-error-bg: #fff3f3;
  --color-error-border: #f5c2c2;
  --color-error-text: #d63638;
  --font-main: 'Noto Sans KR', sans-serif;
}

/* 컨테이너 */
.choi-common-container {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.04);
  padding: 24px 20px;
  margin: 32px 16px;
  font-family: var(--font-main);
}

/* 타이틀 */
.choi-common-title {
  margin-top: 16px;
  margin-bottom: 24px;
  font-size: 1.5rem;
  font-weight: 600;
  color: #333;
  text-align: center;
}

/* 탭 */
.choi-common-tabs {
  display: flex;
  padding: 0;
  margin: 0;
  list-style: none;
}
.choi-common-tab {
  flex: 1;
  text-align: center;
  padding: 12px 0;
  font-size: 0.95rem;
  color: #666;
  cursor: pointer;
  transition: background 0.2s;
}
.choi-common-tab.active {
  color: var(--color-primary);
  font-weight: 600;
  border-bottom: 2px solid var(--color-primary);
}

/* 패널 */
.choi-common-panel {
  padding: 16px 20px;
}
.hidden {
  display: none;
}

/* 입력 테이블 */
.choi-common-form {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 16px;
}
.choi-common-form th,
.choi-common-form td {
  padding: 10px 8px;
  font-size: 0.95rem;
}
.choi-common-form th {
  width: 40%;
  font-weight: 600;
  color: #333;
}
.choi-common-form td input,
.choi-common-select {
  width: 100%;
  padding: 6px 8px;
  font-size: 0.9rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  box-sizing: border-box;
}

/* 옵션 체크박스 */
.choi-common-options {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  padding: 0 16px;
}
.choi-common-options label {
  display: flex;
  align-items: flex-start;
  flex: 1 1 45%;
  font-size: 0.85rem;
  color: #444;
  line-height: 1.5;
}
.choi-common-options input[type="checkbox"] {
  margin-top: 2px;
  margin-right: 8px;
  flex-shrink: 0;
}

/* 계산 버튼 */
.choi-common-btn {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 16px 0;
  font-size: 1.05rem;
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  transition: background 0.2s;
}
.choi-common-btn:hover {
  background: var(--color-primary-hover);
}

/* 에러 */
.choi-common-error {
  display: none;
  background: var(--color-error-bg);
  border: 1px solid var(--color-error-border);
  color: var(--color-error-text);
  padding: 10px 12px;
  font-size: 0.9rem;
  margin-top: 12px;
  border-radius: 4px;
}
.choi-common-error.show {
  display: block;
}

/* 결과 영역 */
.choi-common-result {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: all 0.3s ease;
  margin-top: 0;
  padding: 0;
}
.choi-common-result.show {
  max-height: 1000px;
  opacity: 1;
  margin-top: 20px;
}
.choi-common-result table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.choi-common-result th,
.choi-common-result td {
  padding: 8px 6px;
  border: 1px solid var(--color-border-light);
  text-align: right;
  color: #555;
}
.choi-common-result th {
  background: var(--color-bg-lighter);
  text-align: left;
  font-weight: 600;
}
.choi-common-result td strong {
  color: var(--color-primary);
  font-weight: 600;
}

/* 결과 요약 */
.choi-common-summary {
  padding: 20px 16px 12px;
  border-radius: 8px;
  background: #fff;
}
.choi-common-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 6px 0;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.4;
}
.choi-common-summary-row .label {
  color: #444;
  font-size: 0.95rem;
}
.choi-common-summary-row .value {
  font-weight: 700;
  color: var(--color-primary);
  font-size: 1.05rem;
}

/* 상세 보기 토글 */
.choi-common-toggle-btn {
  margin-top: 10px;
  width: 100%;
  padding: 10px 0;
  font-size: 0.9rem;
  background: none;
  color: #0073aa;
  border: none;
  border-bottom: 1px dashed #0073aa;
  cursor: pointer;
  text-align: center;
  transition: opacity 0.2s ease;
}
.choi-common-toggle-btn:hover {
  opacity: 0.8;
}

/* 상세 항목 */
.choi-common-details {
  margin-top: 14px;
  padding-top: 12px;
}
.choi-common-detail-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 0.92rem;
  color: #555;
}
.choi-common-detail-row span {
  display: block;
  line-height: 1.4;
  margin-bottom: 2px;
}
.choi-common-detail-row strong {
  font-weight: 600;
  color: #222;
  white-space: nowrap;
}
.choi-common-detail-row.total {
  margin-top: 12px;
  padding-top: 8px;
  font-weight: bold;
  color: var(--color-primary);
  border-top: 1px solid #eee;
}

/* 설명 영역 */
.choi-common-info h4 {
  font-size: 1rem;
  margin: 12px 0 6px;
  color: var(--color-primary);
}
.choi-common-info ul {
  list-style: disc inside;
  padding-left: 0;
  margin-left: 0;
}
.choi-common-info ul li {
  position: static;
  margin-bottom: 6px;
}
.choi-common-info ul li::before {
  content: none;
}

/* 설명 테이블 */
.choi-common-info-table {
  width: 100%;
  font-size: 0.85rem;
}
.choi-common-info-table tr {
  display: block;
  margin-bottom: 0px; /* 요구사항 반영 */
}
.choi-common-info-table th,
.choi-common-info-table td {
  display: block;
  width: 100%;
  border: none !important;
  padding: 4px 8px;
  text-align: left;
  word-break: break-word;
  white-space: normal;
}
.choi-common-info-table th {
  font-weight: 600;
  color: #333;
  background: var(--color-bg-lighter);
}
.choi-common-info-table td {
  color: #555;
  background: #fff;
  border-bottom: 1px solid var(--color-border-light);
}

.choi-common-result {
  max-height: none !important;  /* 기존 max-height 제거 */
  overflow: visible !important;
  opacity: 0;
  margin-top: 0;
  padding: 0;
  transition: all 0.3s ease;
}

.choi-common-result.show {
  opacity: 1;
  margin-top: 20px;
}

.choi-common-details {
  margin-top: 14px;
  padding-top: 12px;
  max-height: none;        /* 추가 */
  overflow: visible;       /* 추가 */
}

.choi-common-inline-input {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-bottom: 12px; /* ✅ 버튼 그룹 아래 공간 추가 */
}

.choi-common-inline-input input {
  flex: 2;
}

.choi-common-inline-input select {
  flex: 1;
  min-width: 100px;
}

.choi-common-btn.small {
  font-size: 0.8rem;
  padding: 6px 10px;
  background: #f9f9f9;
  color: #444;
  border: 1px solid #ccc;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
  margin-bottom: 12px;
}

.choi-common-btn.small:hover {
  background: #eee;
}

.choi-common-options {
  margin-top: 10px;
  margin-bottom: 24px;  /* ✅ 권장: 버튼과 적당한 여백 */
}

.choi-common-btn {
  margin-top: 0;        /* 불필요한 중복 여백 제거 */
}

.choi-common-form {
  border-spacing: 0;
  margin-bottom: 0;
}

.choi-common-hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 20px 0;
}

/* 보증금/월세 입력창 행 아래 여백 줄이기 */
#choi07-rent-row {
  padding-bottom: 0 !important;
  margin-bottom: 0 !important;
}

/* 안쪽 입력박스 정렬 및 여백 통일 */
#choi07-rent-row .choi-common-inline-input {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 !important;
  padding: 0 !important;
}

/* 입력창 간격과 높이 맞추기 */
#choi07-rent-row .choi-common-input {
  flex: 1 1 45%;
  padding: 6px 12px;
  margin: 0 !important;
  box-sizing: border-box;
}

.adsense-box.adsense-horizontal {
  text-align: center;
  margin: 16px auto;
}

.choi-common-btn:active {
  transform: translateY(2px);
}

.choi-common-form td input:focus,
.choi-common-select:focus {
  border-color: #0073aa;
  box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.15);
  outline: none;
}

.choi-common-panel {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.choi-common-panel:not(.hidden) {
  opacity: 1;
}

.choi-common-error {
  background: #ffe9e9;
  border-color: #f3b8b8;
  color: #c53030; /* 좀 더 강조된 빨간색 */
}

.choi-common-title {
  font-size: 1.6rem;
  font-weight: 700;
}

.choi-common-summary-row .label,
.choi-common-detail-row span {
  font-weight: 400;
}

.choi-common-summary-row .value,
.choi-common-detail-row strong {
  font-weight: 700;
}

/* 결과값 디자인 개선 (기본적인 디자인만 명확히 개선) */

/* 결과 박스 기본 스타일 개선 */
.choi-common-result {
  border: 1px solid var(--color-border-light);
  border-radius: 10px;
  padding: 16px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.03);
  box-shadow: none;
  border: none; /* 혹시 추가된 border가 있다면 */
}

/* 점수 및 등급을 강조 */
.choi-common-summary-row .value {
  font-size: 1.15rem;
  color: var(--color-primary);
  font-weight: 700;
}

/* 요약 해석의 가독성 강화 */
.choi-common-summary-row .label {
  color: #555;
  font-weight: 500;
}

/* 상세 요인 보기 버튼 개선 */
.choi-common-toggle-btn {
  color: var(--color-primary);
  border-bottom: none;
  text-decoration: underline;
  padding: 8px;
}

/* 상세 결과 항목 구분선 추가 */
.choi-common-detail-row {
  border-bottom: 1px dashed var(--color-border);
  padding: 10px 0;
}
.choi-common-detail-row:last-child {
  border-bottom: none;
}

/* 상세 결과 항목 타이틀 스타일 조정 */
.choi-common-detail-row span {
  color: #666;
  font-size: 0.9rem;
}

/* 상세 결과 값 강조 */
.choi-common-detail-row strong {
  color: #333;
  font-weight: 600;
}

/* 하이라이트 요소 (높은 점수 강조) */
.choi-common-item.choi-common-highlight {
  background: var(--color-bg-lighter);
  border-color: var(--color-border-light);
}

.choi-common-summary-row .value {
  font-size: 1rem;
  font-weight: 600;
}

.choi-common-summary-row .label {
  font-size: 0.85rem;
  color: #555;
}

.choi-common-detail-row span {
  font-size: 0.85rem;
  color: #666;
}

.choi-common-detail-row strong {
  font-size: 0.95rem;
  font-weight: 600;
  color: #222;
}
.choi-common-detail-row.total {
  border: none;
  margin-top: 6px;
  padding-top: 6px;
}

.choi-common-details,
.choi-common-detail-row span,
.choi-common-detail-row strong {
  word-break: break-word;
  white-space: normal;
}



