/* ===== 부동산 중개수수료 계산기 (두꺼운 버전) ===== */
.bf-wrap { max-width: 740px; margin: 0 auto; padding: 4px 0 56px; }

/* 헤더 */
.bf-head { text-align: center; margin: 4px 0 22px; }
.bf-head-badge {
  display: inline-block; background: linear-gradient(135deg,#2563eb,#1d4ed8);
  color: #fff; font-size: 0.8rem; font-weight: 700; padding: 6px 16px;
  border-radius: 999px; margin-bottom: 14px; box-shadow: 0 4px 12px rgba(37,99,235,.25);
}
.bf-head h1 { font-size: 1.7rem; font-weight: 800; margin: 0 0 8px; letter-spacing: -0.03em; }
.bf-sub { color: #6b7280; font-size: 0.95rem; margin: 0; line-height: 1.6; }

/* 공통 카드 */
.bf-card {
  background: #fff; border: 1px solid #e9ecef; border-radius: 18px;
  padding: 24px; margin-bottom: 18px; box-shadow: 0 2px 10px rgba(17,24,39,.04);
}
.bf-card-calc {
  background: linear-gradient(180deg,#ffffff 0%,#f8fbff 100%);
  border-color: #dbeafe;
}
.bf-sec h2 {
  font-size: 1.18rem; font-weight: 800; margin: 0 0 14px; letter-spacing: -0.02em;
  display: flex; align-items: center; gap: 9px;
}
.bf-sec h2 small { font-size: 0.78rem; font-weight: 600; color: #9ca3af; }
.bf-ico {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 10px; background: #eff6ff; font-size: 1.05rem;
  flex: none;
}
.bf-sec p { font-size: 0.95rem; line-height: 1.75; color: #374151; margin: 0 0 10px; }
.bf-sec p:last-child { margin-bottom: 0; }

/* 입력 필드 */
.bf-field { margin-bottom: 18px; }
.bf-field:last-child { margin-bottom: 0; }
.bf-flabel { display: block; font-weight: 700; font-size: 0.92rem; margin-bottom: 9px; color: #374151; }

.bf-seg { display: flex; gap: 8px; flex-wrap: wrap; }
.bf-seg label { flex: 1 1 0; min-width: 96px; cursor: pointer; }
.bf-seg input { position: absolute; opacity: 0; pointer-events: none; }
.bf-seg span {
  display: block; text-align: center; padding: 12px 8px; border-radius: 12px;
  border: 1.5px solid #e5e7eb; background: #f9fafb; font-size: 0.9rem; font-weight: 600;
  color: #4b5563; transition: all .14s; white-space: nowrap;
}
.bf-seg input:checked + span {
  border-color: #2563eb; background: linear-gradient(135deg,#eff6ff,#dbeafe);
  color: #1d4ed8; box-shadow: 0 2px 8px rgba(37,99,235,.18); transform: translateY(-1px);
}
.bf-seg label:hover span { border-color: #cbd5e1; }

/* 동적 안내 */
.bf-guide {
  display: flex; gap: 12px; align-items: flex-start;
  background: linear-gradient(135deg,#fffbeb,#fef9c3); border: 1px solid #fde68a;
  border-radius: 12px; padding: 14px 16px; margin-bottom: 18px;
}
.bf-guide-ico { font-size: 1.5rem; line-height: 1.2; flex: none; }
.bf-guide-title { display: block; font-size: 0.92rem; color: #92400e; margin-bottom: 3px; }
.bf-guide-text { display: block; font-size: 0.88rem; color: #78610a; line-height: 1.6; }

/* 금액 입력 */
.bf-input-row { display: flex; align-items: center; gap: 10px; }
.bf-input-row input {
  flex: 1; font-size: 1.45rem; font-weight: 800; text-align: right;
  padding: 13px 16px; border: 1.5px solid #e5e7eb; border-radius: 12px;
  background: #fff; color: #111827; outline: none; transition: border-color .14s;
}
.bf-input-row input:focus { border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
.bf-unit { font-size: 1.05rem; color: #6b7280; font-weight: 700; }

.bf-quick { display: flex; gap: 7px; margin-top: 11px; flex-wrap: wrap; }
.bf-quick button {
  border: 1px solid #e5e7eb; background: #f9fafb; color: #4b5563;
  border-radius: 9px; padding: 8px 13px; font-size: 0.82rem; font-weight: 700; cursor: pointer;
  transition: background .12s;
}
.bf-quick button:hover { background: #eef2f7; }
.bf-clear-btn { margin-left: auto; color: #ef4444 !important; }

/* 결과 */
.bf-result { margin-top: 22px; padding-top: 22px; border-top: 1px dashed #d1d5db; }
.bf-result.bf-empty { text-align: center; }
.bf-hint { color: #9ca3af; font-size: 0.92rem; margin: 10px 0; }

.bf-fee {
  text-align: center; margin-bottom: 16px; padding: 18px;
  background: linear-gradient(135deg,#2563eb,#1d4ed8); border-radius: 14px;
  box-shadow: 0 8px 20px rgba(37,99,235,.22);
}
.bf-fee-label { display: block; font-size: 0.82rem; color: #dbeafe; font-weight: 600; margin-bottom: 6px; }
.bf-fee-label em { font-style: normal; opacity: .8; }
.bf-fee-amount { display: block; font-size: 2.4rem; font-weight: 800; color: #fff; line-height: 1.05; letter-spacing: -0.03em; }
.bf-fee-amount small { font-size: 1.15rem; font-weight: 700; margin-left: 3px; }
.bf-fee-kor { display: block; font-size: 0.95rem; color: #c7dbff; margin-top: 6px; font-weight: 600; }

.bf-rows { background: #f8fafc; border: 1px solid #eef2f7; border-radius: 12px; padding: 6px 16px; }
.bf-row { display: flex; justify-content: space-between; align-items: center; padding: 11px 0; font-size: 0.93rem; border-bottom: 1px solid #eef0f2; }
.bf-row:last-child { border-bottom: none; }
.bf-row span:first-child { color: #6b7280; }
.bf-row span:last-child { font-weight: 600; color: #111827; }
.bf-strong { font-size: 1.05rem; color: #1d4ed8; }
.bf-rate-badge { background: #eff6ff; color: #1d4ed8; padding: 3px 10px; border-radius: 7px; font-weight: 800; font-size: 0.88rem; }
.bf-tag { font-size: 0.72rem; background: #fef3c7; color: #92400e; padding: 2px 8px; border-radius: 6px; margin-left: 6px; font-weight: 700; }

.bf-result-note {
  font-size: 0.85rem; color: #475569; line-height: 1.7; margin-top: 14px;
  background: #f8fafc; border-radius: 10px; padding: 13px 15px;
}

/* 키포인트 그리드 */
.bf-keypoints { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 6px; }
.bf-kp { display: flex; gap: 11px; align-items: flex-start; background: #f8fafc; border-radius: 12px; padding: 13px 14px; }
.bf-kp span { font-size: 1.4rem; line-height: 1.1; flex: none; }
.bf-kp div { font-size: 0.85rem; color: #475569; line-height: 1.5; }
.bf-kp b { color: #1f2937; }

/* 요율표 */
.bf-table { width: 100%; border-collapse: collapse; margin: 4px 0 10px; font-size: 0.9rem; border-radius: 10px; overflow: hidden; }
.bf-table th, .bf-table td { padding: 11px 12px; border-bottom: 1px solid #eef2f7; text-align: center; }
.bf-table th { background: #1e293b; color: #fff; font-weight: 700; font-size: 0.85rem; }
.bf-table td:first-child { text-align: left; color: #374151; }
.bf-table tbody tr:nth-child(even) { background: #f8fafc; }
.bf-table tbody tr.bf-hl { background: #eff6ff; }
.bf-table tbody tr.bf-hl td { color: #1d4ed8; font-weight: 700; }
.bf-cap { font-size: 0.85rem !important; color: #64748b !important; margin: 2px 0 0 !important; }

/* 2단 미니카드 */
.bf-twocol { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.bf-mini { background: #f8fafc; border: 1px solid #eef2f7; border-radius: 14px; padding: 16px; }
.bf-mini-ico { font-size: 1.7rem; margin-bottom: 6px; }
.bf-mini b { font-size: 0.96rem; color: #1f2937; }
.bf-mini p { font-size: 0.82rem !important; color: #64748b !important; margin: 5px 0 8px !important; line-height: 1.5 !important; }
.bf-mini ul { margin: 0; padding-left: 18px; }
.bf-mini li { font-size: 0.86rem; color: #374151; line-height: 1.7; }
.bf-mini b { color: #1d4ed8; }

/* 공식 박스 */
.bf-formula { background: #f0f7ff; border: 1px solid #dbeafe; border-radius: 12px; padding: 16px; margin: 10px 0; }
.bf-formula-line { font-size: 0.98rem; color: #1e40af; padding: 3px 0; }
.bf-formula-sub { font-size: 0.85rem; color: #6b7280; }

/* 예시 박스 */
.bf-example-box { background: #f8fafc; border-left: 4px solid #2563eb; border-radius: 0 10px 10px 0; padding: 14px 16px; margin-top: 10px; }
.bf-example-t { font-weight: 700; font-size: 0.88rem; color: #1d4ed8; margin-bottom: 6px; }
.bf-example-box p { font-size: 0.88rem !important; color: #475569 !important; margin: 0 0 8px !important; line-height: 1.6 !important; }
.bf-example-box p:last-child { margin-bottom: 0 !important; }

/* 실전 케이스 그리드 */
.bf-cases { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.bf-case { background: linear-gradient(180deg,#ffffff,#f8fbff); border: 1px solid #e0ecff; border-radius: 14px; padding: 15px; text-align: center; }
.bf-case-h { font-size: 0.86rem; font-weight: 700; color: #334155; margin-bottom: 8px; }
.bf-case-calc { font-size: 0.78rem; color: #94a3b8; margin-bottom: 8px; }
.bf-case-fee { font-size: 1.5rem; font-weight: 800; color: #2563eb; letter-spacing: -0.02em; }

/* 팁 */
.bf-tips { margin: 0; padding-left: 0; list-style: none; }
.bf-tips li { font-size: 0.92rem; color: #374151; line-height: 1.65; padding: 9px 0; border-bottom: 1px solid #f1f5f9; }
.bf-tips li:last-child { border-bottom: none; }
.bf-tips b { color: #1d4ed8; }

/* 경고 섹션 */
.bf-sec-warn { background: linear-gradient(180deg,#fffbeb,#fff); border-color: #fde68a; }
.bf-sec-warn .bf-ico { background: #fef3c7; }
.bf-sec-warn b { color: #b45309; }

/* FAQ */
.bf-faq details { border: 1px solid #e9ecef; border-radius: 12px; margin-bottom: 9px; overflow: hidden; }
.bf-faq summary { padding: 15px 16px; font-weight: 700; font-size: 0.93rem; cursor: pointer; color: #1f2937; list-style: none; }
.bf-faq summary::-webkit-details-marker { display: none; }
.bf-faq summary::after { content: "＋"; float: right; color: #94a3b8; font-weight: 700; }
.bf-faq details[open] summary::after { content: "－"; }
.bf-faq details[open] summary { background: #f8fafc; border-bottom: 1px solid #eef2f7; }
.bf-faq p { padding: 13px 16px 15px; margin: 0; font-size: 0.9rem; color: #4b5563; line-height: 1.65; }
.bf-faq b { color: #1f2937; }

.bf-disclaimer { font-size: 0.82rem; color: #9ca3af; line-height: 1.65; margin: 6px 4px 0; text-align: center; }

/* 모바일 */
@media (max-width: 520px) {
  .bf-head h1 { font-size: 1.4rem; }
  .bf-card { padding: 18px; border-radius: 16px; }
  .bf-fee-amount { font-size: 1.95rem; }
  .bf-seg label { min-width: 0; }
  .bf-seg span { padding: 11px 4px; font-size: 0.82rem; }
  .bf-keypoints, .bf-twocol, .bf-cases { grid-template-columns: 1fr; }
  .bf-sec h2 { font-size: 1.06rem; }
}

/* 다크모드 */
@media (prefers-color-scheme: dark) {
  .bf-card { background: #1b212c; border-color: #2b3340; }
  .bf-card-calc { background: linear-gradient(180deg,#1b212c,#172033); border-color: #1e3a5f; }
  .bf-sub, .bf-sec p { color: #94a3b8; }
  .bf-ico { background: #1e3a5f; }
  .bf-seg span { background: #232a36; border-color: #2b3340; color: #cbd5e1; }
  .bf-seg input:checked + span { background: linear-gradient(135deg,#1e3a5f,#1e40af); border-color: #3b82f6; color: #bfdbfe; }
  .bf-guide { background: linear-gradient(135deg,#2a2510,#332d12); border-color: #4d4318; }
  .bf-guide-title { color: #fcd34d; } .bf-guide-text { color: #d4c896; }
  .bf-input-row input { background: #232a36; border-color: #2b3340; color: #f1f5f9; }
  .bf-quick button { background: #232a36; border-color: #2b3340; color: #cbd5e1; }
  .bf-rows, .bf-result-note { background: #232a36; border-color: #2b3340; }
  .bf-row span:last-child { color: #f1f5f9; }
  .bf-rate-badge { background: #1e3a5f; color: #bfdbfe; }
  .bf-kp, .bf-mini, .bf-example-box { background: #232a36; }
  .bf-mini { border-color: #2b3340; } .bf-mini b { color: #e2e8f0; } .bf-mini b:not(:first-child) { color: #93c5fd; }
  .bf-kp b { color: #e2e8f0; } .bf-kp div { color: #94a3b8; }
  .bf-table td { color: #cbd5e1; } .bf-table td:first-child { color: #e2e8f0; }
  .bf-table th, .bf-table td { border-color: #2b3340; }
  .bf-table tbody tr:nth-child(even) { background: #1f2630; }
  .bf-table tbody tr.bf-hl { background: #1e3a5f; }
  .bf-table tbody tr.bf-hl td { color: #bfdbfe; }
  .bf-formula { background: #172033; border-color: #1e3a5f; } .bf-formula-line { color: #bfdbfe; }
  .bf-case { background: linear-gradient(180deg,#1b212c,#172033); border-color: #1e3a5f; }
  .bf-case-h { color: #cbd5e1; }
  .bf-tips li { color: #cbd5e1; border-color: #2b3340; }
  .bf-sec-warn { background: linear-gradient(180deg,#2a2510,#1b212c); border-color: #4d4318; }
  .bf-faq details { border-color: #2b3340; } .bf-faq summary { color: #e2e8f0; }
  .bf-faq details[open] summary { background: #232a36; } .bf-faq p { color: #94a3b8; }
}
