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

/* 헤더 */
.cv-head { text-align: center; margin: 4px 0 22px; }
.cv-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);
}
.cv-head h1 { font-size: 1.7rem; font-weight: 800; margin: 0 0 8px; letter-spacing: -0.03em; }
.cv-sub { color: #6b7280; font-size: 0.95rem; margin: 0; line-height: 1.6; }

/* 공통 카드 */
.cv-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);
}
.cv-card-calc {
  background: linear-gradient(180deg,#ffffff 0%,#f8fbff 100%);
  border-color: #dbeafe;
}
.cv-sec h2 {
  font-size: 1.18rem; font-weight: 800; margin: 0 0 14px; letter-spacing: -0.02em;
  display: flex; align-items: center; gap: 9px;
}
.cv-sec h2 small { font-size: 0.78rem; font-weight: 600; color: #9ca3af; }
.cv-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;
}
.cv-sec p { font-size: 0.95rem; line-height: 1.75; color: #374151; margin: 0 0 10px; }
.cv-sec p:last-child { margin-bottom: 0; }

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

.cv-seg { display: flex; gap: 8px; flex-wrap: wrap; }
.cv-seg label { flex: 1 1 0; min-width: 96px; cursor: pointer; }
.cv-seg input { position: absolute; opacity: 0; pointer-events: none; }
.cv-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;
}
.cv-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);
}
.cv-seg label:hover span { border-color: #cbd5e1; }

/* 동적 안내 */
.cv-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;
}
.cv-guide-ico { font-size: 1.5rem; line-height: 1.2; flex: none; }
.cv-guide-title { display: block; font-size: 0.92rem; color: #92400e; margin-bottom: 3px; }
.cv-guide-text { display: block; font-size: 0.88rem; color: #78610a; line-height: 1.6; }

/* 금액 입력 */
.cv-input-row { display: flex; align-items: center; gap: 10px; }
.cv-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;
}
.cv-input-row input:focus { border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
.cv-unit { font-size: 1.05rem; color: #6b7280; font-weight: 700; }

.cv-quick { display: flex; gap: 7px; margin-top: 11px; flex-wrap: wrap; }
.cv-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;
}
.cv-quick button:hover { background: #eef2f7; }
.cv-clear-btn { margin-left: auto; color: #ef4444 !important; }

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

.cv-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);
}
.cv-fee-label { display: block; font-size: 0.82rem; color: #dbeafe; font-weight: 600; margin-bottom: 6px; }
.cv-fee-label em { font-style: normal; opacity: .8; }
.cv-fee-amount { display: block; font-size: 2.4rem; font-weight: 800; color: #fff; line-height: 1.05; letter-spacing: -0.03em; }
.cv-fee-amount small { font-size: 1.15rem; font-weight: 700; margin-left: 3px; }
.cv-fee-kor { display: block; font-size: 0.95rem; color: #c7dbff; margin-top: 6px; font-weight: 600; }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

/* ===== 전월세 전환율 전용 (cyan) ===== */
.cv-total { text-align:center; margin-bottom:16px; padding:18px; background:linear-gradient(135deg,#0891b2,#0e7490); border-radius:14px; box-shadow:0 8px 20px rgba(8,145,178,.22); }
.cv-total-label { display:block; font-size:0.82rem; color:#cffafe; font-weight:600; margin-bottom:6px; }
.cv-total-label em { font-style:normal; opacity:.85; }
.cv-total-amount { display:block; font-size:2.3rem; font-weight:800; color:#fff; line-height:1.05; letter-spacing:-0.03em; }
.cv-total-amount small { font-size:1.1rem; font-weight:700; margin-left:3px; }
.cv-total-kor { display:block; font-size:0.95rem; color:#a5f3fc; margin-top:6px; font-weight:600; }
.cv-sub { font-size:0.78rem; color:#9ca3af; font-weight:500; }
.cv-row-hi span:last-child { color:#0e7490; font-weight:800; font-size:1.05rem; }
.cv-note-warn { background:#fffbeb !important; color:#b45309 !important; }
.cv-seg-cyan input:checked + span { border-color:#0891b2 !important; background:linear-gradient(135deg,#ecfeff,#cffafe) !important; color:#0e7490 !important; box-shadow:0 2px 8px rgba(8,145,178,.18) !important; }
.cv-tips { margin:0; padding-left:0; list-style:none; }
.cv-tips li { font-size:0.92rem; color:#374151; line-height:1.65; padding:9px 0; border-bottom:1px solid #f1f5f9; }
.cv-tips li:last-child { border-bottom:none; }
.cv-tips b { color:#0e7490; }
.cv-table .cv-hl td { background:#ecfeff; font-weight:600; }
@media (prefers-color-scheme: dark) {
  .cv-rows, .cv-result-note { background:#232a36; }
  .cv-tips li { color:#cbd5e1; border-color:#2b3340; }
  .cv-note-warn { background:#3f3219 !important; color:#fbbf24 !important; }
  .cv-table .cv-hl td { background:#164e54; }
}
