/*
 * rates-board.css — 실시간 금리 비교 보드 (프로덕션)
 *
 * 의존성 0. 외부 폰트·CDN 로드 없음.
 * 모든 클래스에 rb- 접두사로 기존 스타일과 격리.
 * 브랜드 톤: 블로그 1·2·3편과 동일한 teal (#0891b2).
 */

/* ───── 초기화·기본 */
* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Pretendard', "Segoe UI", "Noto Sans KR", "Apple SD Gothic Neo", sans-serif;
  color: #1f2937;
  background: #f8fafc;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}
body { overflow-x: clip; }
a { color: #0891b2; text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; }
code {
  background: #f1f5f9;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.88em;
}

/* ───── 샌드박스 배너 */
.rb-sandbox-banner {
  background: linear-gradient(90deg, #fef3c7, #fde68a);
  border-bottom: 1px solid #f59e0b;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.88em;
  color: #78350f;
  flex-wrap: wrap;
  justify-content: center;
}
.rb-badge {
  background: #f59e0b;
  color: #fff;
  padding: 3px 10px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.82em;
  letter-spacing: 0.5px;
}
.rb-banner-text { max-width: 600px; }

/* ───── 브레드크럼 */
.rb-breadcrumb {
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  padding: 12px 0;
}
.rb-crumb-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
  font-size: 0.88em;
  color: #6b7280;
}
.rb-crumb-inner a { color: #6b7280; }
.rb-crumb-inner a:hover { color: #0891b2; }
.rb-sep { margin: 0 8px; color: #cbd5e1; }

/* ───── 메인 컨테이너 */
.rb-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 30px 20px 60px;
}

/* ───── 헤더 */
.rb-header {
  margin-bottom: 30px;
  padding-bottom: 24px;
  border-bottom: 1px solid #e5e7eb;
}
.rb-header h1 {
  margin: 0 0 12px;
  font-size: 1.85em;
  line-height: 1.3;
  color: #111827;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.rb-lede {
  margin: 0 0 16px;
  font-size: 1.02em;
  color: #4b5563;
  max-width: 780px;
}
.rb-lede strong { color: #0e7490; }
.rb-lede em { color: #b45309; font-style: normal; font-weight: 600; }
.rb-howto {
  margin: 0 0 16px;
  font-size: 0.9em;
  color: #6b7280;
}
.rb-howto strong { color: #0891b2; }
.rb-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 20px;
  align-items: center;
  font-size: 0.92em;
  color: #6b7280;
}
.rb-updated strong { color: #0e7490; font-weight: 700; }
.rb-source-link {
  font-weight: 600;
  background: #ecfeff;
  border: 1px solid #a5f3fc;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.88em;
}
/* Hero 피어 링크 — 클러스터 양방향 신호 */
.rb-hero-peers {
  margin: 12px 0 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 0.85em;
  color: #64748b;
}
.rb-hero-peers i { color: #0891b2; font-size: 1.05em; }
.rb-hero-peers a {
  color: #0e7490;
  text-decoration: underline;
  text-decoration-color: #a5f3fc;
  text-underline-offset: 2px;
  font-weight: 600;
}
.rb-hero-peers a:hover { color: #155e75; text-decoration-color: #0891b2; }
.rb-peer-sep { color: #cbd5e1; }

/* ───── 보드 컨테이너 */
.rb-board {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 22px;
  margin-bottom: 40px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

/* ───── 필터 바 */
.rb-filter {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-bottom: 18px;
  margin-bottom: 18px;
  border-bottom: 1px dashed #e5e7eb;
}
.rb-filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.rb-filter-group label {
  font-size: 0.78em;
  font-weight: 700;
  color: #6b7280;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.rb-filter-group select {
  padding: 9px 10px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
  font-size: 0.92em;
  color: #111827;
  cursor: pointer;
  appearance: none;
  height: 40px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'><path d='M1 1.5L6 6.5L11 1.5' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 30px;
}
.rb-filter-group select:focus {
  outline: none;
  border-color: #0891b2;
  box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.12);
}

/* ───── Chip 버튼 */
/* ───── 토글 (정기예금/적금 라디오 스타일) */
.rb-toggle-row {
  display: flex;
  gap: 0;
  border: 2px solid #0891b2;
  border-radius: 8px;
  overflow: hidden;
}
.rb-toggle {
  flex: 1;
  min-width: 100px;
  padding: 10px 20px;
  border: none;
  background: #fff;
  color: #0891b2;
  font-size: 0.9em;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
}
.rb-toggle + .rb-toggle {
  border-left: 2px solid #0891b2;
}
.rb-toggle:hover {
  background: #ecfeff;
}
.rb-toggle-on {
  background: #0891b2;
  color: #fff;
}
.rb-toggle-on:hover {
  background: #0e7490;
  color: #fff;
}

/* ───── 특판 탭 (2줄 · SNS 언급중인 / 특판) */
.rb-toggle-promo {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 7px 14px 8px;
  line-height: 1;
}
.rb-toggle-sub {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: -0.03em;
  opacity: 0.72;
  white-space: nowrap;
}
.rb-toggle-on .rb-toggle-sub {
  opacity: 0.88;
}
.rb-toggle-main {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
@media (max-width: 480px) {
  .rb-toggle-promo { padding: 6px 10px; }
  .rb-toggle-sub { font-size: 10px; }
  .rb-toggle-main { font-size: 13px; }
}
.rb-promo-count {
  display: inline-block;
  min-width: 18px;
  padding: 1px 5px;
  background: #dc2626;
  color: #fff;
  border-radius: 9px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
}
.rb-toggle-on .rb-promo-count {
  background: #fff;
  color: #0891b2;
}
.rb-promo-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #f97316;
  box-shadow: 0 0 0 0 rgba(249, 115, 22, 0.6);
  animation: rb-pulse-orange 1.8s infinite;
  display: inline-block;
}
.rb-promo-dot[hidden] { display: none !important; }
@keyframes rb-pulse-orange {
  0%   { box-shadow: 0 0 0 0 rgba(249, 115, 22, 0.7); }
  70%  { box-shadow: 0 0 0 6px rgba(249, 115, 22, 0); }
  100% { box-shadow: 0 0 0 0 rgba(249, 115, 22, 0); }
}

/* ───── 특판 카드 뱃지 */
.rb-tag-promo {
  background: #ec4899;
  color: #fff;
}
/* ───── 뱃지 공통 규격 (rb-badge / rb-type-tag / rb-d-badge 전부 동일 높이) */
.rb-badge,
.rb-type-tag,
.rb-d-badge {
  display: inline-flex !important;
  align-items: center !important;
  height: 22px;
  padding: 0 8px !important;
  border-radius: 4px !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  letter-spacing: -0.01em;
  white-space: nowrap;
  margin: 0 4px 3px 0 !important;
  border: 1px solid transparent;
  box-sizing: border-box;
}
/* 특판 뱃지 3색 체계 — 좋음(초록) / 경고(빨강) / 조건(회색) */
.rb-badge-good {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #6ee7b7;
  font-weight: 700;
}
.rb-badge-bad {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fca5a5;
  font-weight: 600;
}
.rb-badge-neutral {
  background: #f3f4f6;
  color: #4b5563;
  border: 1px solid #e5e7eb;
  font-weight: 500;
}
/* 레거시 호환 (다른 탭에서 여전히 사용) */
.rb-badge-offline { background: #f3f4f6; color: #4b5563; border: 1px solid #e5e7eb; }
.rb-badge-online  { background: #f3f4f6; color: #4b5563; border: 1px solid #e5e7eb; }
.rb-badge-region  { background: #f3f4f6; color: #4b5563; border: 1px solid #e5e7eb; }
.rb-badge-deadline { background: #fef2f2; color: #b91c1c; border: 1px solid #fca5a5; font-variant-numeric: tabular-nums; }
.rb-badge-soft { background: #f3f4f6; color: #4b5563; border: 1px solid #e5e7eb; }
/* 특판 모달 — 제목 옆 전화 + 아래 주소 */
.rb-m-phone {
  font-size: 0.78em;
  font-weight: 600;
  color: #0891b2;
  text-decoration: none;
  margin-left: 6px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.rb-m-phone:hover {
  text-decoration: underline;
}
.rb-m-address {
  font-size: 0.72em;
  font-weight: 400;
  color: #64748b;
  margin-top: 4px;
  line-height: 1.45;
  letter-spacing: -0.01em;
}
/* 특판 출처 박스 (모달) */
.rb-sources-box {
  background: #fffbeb;
  border-left: 3px solid #f59e0b;
}
.rb-src-meta {
  font-size: 0.85em;
  color: #78350f;
  margin: 4px 0 8px;
}
.rb-src-list {
  list-style: none;
  padding: 0;
  margin: 6px 0;
}
.rb-src-list li {
  padding: 5px 0;
  border-top: 1px dashed #fde68a;
  font-size: 0.88em;
  line-height: 1.5;
  /* 한 줄 고정 — 모바일에서도 줄바꿈 X */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rb-src-list a {
  display: inline;
}
.rb-src-list li:first-child { border-top: none; }
.rb-src-list a {
  color: #1d4ed8;
  text-decoration: none;
}
.rb-src-list a:hover { text-decoration: underline; }
.rb-src-blogger {
  color: #64748b;
  font-size: 0.9em;
}
.rb-src-note {
  font-size: 0.8em;
  color: #92400e;
  margin: 8px 0 0;
  line-height: 1.5;
}
/* 특판 탭 면책 배너 */
.rb-promo-notice {
  background: #fefce8;
  border: 1px solid #fde047;
  border-radius: 8px;
  padding: 10px 14px;
  margin: 12px 0;
  font-size: 0.85em;
  color: #713f12;
  line-height: 1.5;
}
.rb-promo-notice strong {
  color: #422006;
}

/* ───── 섹션 제목 */
.rb-section-title {
  font-size: 0.92em;
  font-weight: 700;
  color: #0e7490;
  letter-spacing: 0.3px;
}

/* ───── 필드 행 (은행구분 | 금액 | 예치기간 — 컬럼 정렬) */
.rb-fields-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.rb-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.rb-field-lbl {
  font-size: 0.82em;
  font-weight: 600;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  position: relative;
}
.rb-field-scope { flex: 1; }
.rb-field-amt { flex: 1.4; }
.rb-field-period { flex: 1; }
.rb-field-amt .rb-amount-wrap {
  height: 40px;
  cursor: text;
}
.rb-field-period select {
  width: 100%;
  height: 40px;
  padding: 9px 30px 9px 10px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
  font-size: 0.92em;
  color: #111827;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'><path d='M1 1.5L6 6.5L11 1.5' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
}
.rb-field-period select:focus {
  outline: none;
  border-color: #0891b2;
  box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.12);
}

/* ───── 저장 안내 */
.rb-saved-notice {
  padding: 10px 14px;
  border-radius: 8px;
  background: #ecfeff;
  border: 1px solid #a5f3fc;
  font-size: 0.84em;
  color: #0e7490;
  font-weight: 600;
  text-align: center;
}
.rb-saved-notice[hidden] { display: none; }

/* ───── 액션 버튼 행 */
.rb-action-row {
  display: flex;
  gap: 10px;
}
.rb-action-search {
  flex: 1;
  height: 42px;
  border: 1.5px solid #a5f3fc;
  border-radius: 8px;
  background: #ffffff;
  color: #0e7490;
  font: inherit;
  font-size: 0.88em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.rb-action-search:hover {
  background: #f0fdff;
  border-color: #67e8f9;
}
.rb-action-row-bottom {
  margin-top: 16px;
}

/* ───── 접이식 토글: 내 조건 넣어 계산해보기 */
.rb-calc-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  height: 42px;
  padding: 0 16px;
  border: 2px solid #0891b2;
  border-radius: 8px;
  background: #0891b2;
  cursor: pointer;
  font: inherit;
  font-size: 0.88em;
  font-weight: 700;
  color: #ffffff;
  transition: all 0.15s;
  white-space: nowrap; /* 줄바꿈 방지 */
  box-shadow: 0 1px 3px rgba(8, 145, 178, 0.25);
}
/* 기본: full 라벨 표시, short 숨김 */
.rb-calc-label-short { display: none; }
/* 좁은 화면(420px 이하): short로 축약 */
@media (max-width: 420px) {
  .rb-calc-label-full { display: none; }
  .rb-calc-label-short { display: inline; }
  .rb-calc-toggle { padding: 0 10px; font-size: 0.85em; }
}
.rb-calc-toggle:hover {
  background: #0e7490;
  border-color: #0e7490;
}
.rb-calc-arrow {
  font-size: 1em;
  transition: transform 0.2s;
}
.rb-calc-arrow.rb-open {
  transform: rotate(180deg);
}
.rb-action-row .rb-calc-toggle {
  flex: 1;
}
.rb-calc-toggle-bottom {
  margin-top: 0;
}

/* ───── 계산 패널 */
.rb-calc-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px 0 0;
}
.rb-calc-panel[hidden] {
  display: none;
}
.rb-calc-actions {
  display: flex;
  gap: 10px;
  align-items: stretch;
}
.rb-calc-actions .rb-saved-btn,
.rb-calc-actions .rb-search-btn {
  flex: 1;
  height: 42px;
  white-space: nowrap;
}

/* ───── 패널 상단 2열 */
.rb-panel-top {
  display: flex;
  gap: 14px;
}
.rb-panel-left {
  flex: 1;
}
.rb-panel-right {
  flex: 1;
}

/* ───── 조건 입력 (출생년도 + 자녀) */
.rb-condition-col {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px 16px;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 38px;
}
.rb-condition-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.rb-condition-row label {
  font-size: 0.82em;
  font-weight: 600;
  color: #64748b;
  white-space: nowrap;
  min-width: 56px;
}
.rb-condition-row select {
  flex: 1;
  padding: 8px 30px 8px 10px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #fff;
  font-size: 0.88em;
  color: #111827;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6' fill='none'><path d='M1 1l4 4 4-4' stroke='%236b7280' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 8px center;
}
.rb-condition-row select:focus {
  outline: none;
  border-color: #0891b2;
  box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.12);
}
.rb-condition-btns {
  display: flex;
  gap: 8px;
  margin-top: auto;
}
.rb-condition-btn {
  flex: 1;
  padding: 9px;
  border: 2px solid #0891b2;
  border-radius: 6px;
  background: #0891b2;
  color: #fff;
  font: inherit;
  font-size: 0.85em;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}
.rb-condition-btn:hover {
  background: #0e7490;
  border-color: #0e7490;
}
.rb-condition-reset {
  flex: 1;
  padding: 9px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #fff;
  color: #64748b;
  font: inherit;
  font-size: 0.85em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.rb-condition-reset:hover {
  border-color: #ef4444;
  color: #ef4444;
}

/* ───── 포트폴리오 액션 (카드 아래) */
.rb-portfolio-actions {
  display: flex;
  gap: 10px;
}
.rb-portfolio-actions[hidden] { display: none; }
.rb-portfolio-calc {
  flex: 1;
  padding: 9px;
  border: 2px solid #0891b2;
  border-radius: 6px;
  background: #0891b2;
  color: #fff;
  font: inherit;
  font-size: 0.85em;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}
.rb-portfolio-calc:hover { background: #0e7490; border-color: #0e7490; }
.rb-portfolio-share {
  flex: 1;
  padding: 10px 20px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
  color: #475569;
  font: inherit;
  font-size: 0.88em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.rb-portfolio-share:hover { border-color: #0891b2; color: #0891b2; }

/* ───── 포트폴리오 계산 결과 (task 2~7) */
.rb-portfolio-result {
  margin-top: 16px;
  padding: 18px 16px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.rb-portfolio-result[hidden] { display: none; }
/* 금액 미입력 카드 — 빨간 테두리 + 흔들림으로 즉각 시각 피드백 */
.rb-saved-card-amt-error {
  position: relative;
  animation: rb-card-amt-shake 0.35s ease;
}
.rb-saved-card-amt-error input {
  border-color: #dc2626 !important;
  background: #fef2f2 !important;
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.12);
}
@keyframes rb-card-amt-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-3px); }
  75% { transform: translateX(3px); }
}

.rb-pr-head,
.rb-pr-section-head,
.rb-pr-details-head {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.92em;
  font-weight: 700;
  color: #0f172a;
}
.rb-pr-head i,
.rb-pr-section-head i,
.rb-pr-details-head i {
  color: #0891b2;
  font-size: 1.15em;
}
.rb-pr-head {
  padding-bottom: 8px;
  border-bottom: 1px solid #e2e8f0;
}

/* 요약 (task 2) */
.rb-pr-summary {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.rb-pr-summary-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
/* 평균 기간 — 아랫줄 풀폭 (투자금 길어도 안 깨지게) */
.rb-pr-summary-row > .rb-pr-stat:nth-child(3) {
  grid-column: 1 / -1;
}
.rb-pr-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  text-align: center;
}
.rb-pr-stat span {
  font-size: 0.72em;
  color: #94a3b8;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.rb-pr-stat strong {
  font-size: 1em;
  color: #0f172a;
  font-weight: 800;
}
.rb-pr-stat strong em {
  font-style: normal;
  font-size: 0.72em;
  color: #64748b;
  font-weight: 500;
  margin-left: 2px;
}
/* 첫 만기 카드 — 아랫줄에 상품·금액·세후 이자 */
.rb-pr-stat-detail {
  display: block;
  margin-top: 4px;
  padding: 6px 8px 0;
  border-top: 1px dashed #e2e8f0;
  font-size: 0.76em;
  color: #475569;
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: -0.01em;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.rb-pr-stat-detail b { color: #0f172a; font-weight: 700; }
/* 데스크탑: 상품명 · 금액·세후이자 한 줄 (점 구분자) */
.rb-pr-stat-detail-name::after {
  content: ' · ';
  color: #cbd5e1;
  margin: 0 2px;
}
/* 모바일: 상품명 작게 위, 금액+세후이자 아래 한 줄로 */
@media (max-width: 640px) {
  .rb-pr-stat-detail {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-top: 8px;
  }
  .rb-pr-stat-detail-name {
    font-size: 0.85em;
    color: #64748b;
    font-weight: 500;
    display: block;
  }
  .rb-pr-stat-detail-name::after { content: ''; }
  .rb-pr-stat-detail-money {
    font-size: 1.08em;
    color: #0f172a;
    font-weight: 600;
    display: block;
  }
  .rb-pr-stat-detail-money b { font-weight: 800; }
}

/* 만기 진행바 (task 3) */
.rb-pr-bars {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.rb-pr-bar-row {
  display: grid;
  grid-template-columns: minmax(90px, auto) 1fr auto;
  align-items: center;
  gap: 10px;
  font-size: 0.85em;
}
.rb-pr-bar-label {
  color: #334155;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 110px;
}
.rb-pr-bar-track {
  height: 10px;
  background: #f1f5f9;
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}
.rb-pr-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.6s ease-out;
  animation: rb-pr-bar-grow 0.6s ease-out;
}
@keyframes rb-pr-bar-grow {
  from { width: 0 !important; }
}
.rb-pr-bar-meta {
  color: #64748b;
  font-weight: 600;
  white-space: nowrap;
  font-size: 0.82em;
}
.rb-pr-bar-meta em {
  font-style: normal;
  color: #0891b2;
  font-weight: 700;
  margin-left: 4px;
}

/* 만기 조언 (task 4) */
.rb-pr-advice {
  padding: 14px 0;
  background: transparent;
  border: none;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  border-radius: 0;
}
.rb-pr-advice-body { min-width: 0; }
.rb-pr-advice-title {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #0f172a;
  font-size: 0.92em;
  margin-bottom: 8px;
}
.rb-pr-advice-title i { color: #0891b2; font-size: 1.1em; }
.rb-pr-insights {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
/* 장점 / 주의할 점 그룹 헤더 */
.rb-pr-insight-group + .rb-pr-insight-group { margin-top: 12px; }
.rb-pr-insight-group-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82em;
  font-weight: 700;
  margin-bottom: 6px;
  letter-spacing: 0.01em;
}
.rb-pr-insight-group-label i { font-size: 1.05em; }
.rb-pr-insight-group-count {
  margin-left: 4px;
  font-size: 0.78em;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 10px;
  background: #e2e8f0;
  color: #475569;
  letter-spacing: 0;
}
.rb-pr-insight-group-pros .rb-pr-insight-group-label { color: #15803d; }
.rb-pr-insight-group-pros .rb-pr-insight-group-label i { color: #16a34a; }
.rb-pr-insight-group-pros .rb-pr-insight-group-count { background: #dcfce7; color: #15803d; }
.rb-pr-insight-group-cons .rb-pr-insight-group-label { color: #b45309; }
.rb-pr-insight-group-cons .rb-pr-insight-group-label i { color: #d97706; }
.rb-pr-insight-group-cons .rb-pr-insight-group-count { background: #fef3c7; color: #b45309; }
.rb-pr-insight {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 0.83em;
  line-height: 1.5;
  color: #334155;
  background: #fff;
  border: 1px solid #e2e8f0;
}
.rb-pr-insight i { font-size: 1.1em; flex-shrink: 0; padding-top: 1px; }
.rb-pr-insight-msg { flex: 1; min-width: 0; }
.rb-pr-insight-msg strong { color: #0f172a; font-weight: 700; }
.rb-pr-insight-good   { background: #f0fdf4; border-color: #bbf7d0; }
.rb-pr-insight-good i { color: #16a34a; }
.rb-pr-insight-warn   { background: #fef3c7; border-color: #fde68a; }
.rb-pr-insight-warn i { color: #b45309; }
.rb-pr-insight-info   { background: #f0f9ff; border-color: #bae6fd; }
.rb-pr-insight-info i { color: #0284c7; }
/* 인사이트 안 인라인 링크 — SEO/AEO 자연스러운 anchor */
.rb-pr-inline-link {
  color: #0e7490;
  text-decoration: underline;
  text-decoration-color: #a5f3fc;
  text-underline-offset: 2px;
  font-weight: 600;
  transition: color 0.15s;
}
.rb-pr-inline-link:hover {
  color: #155e75;
  text-decoration-color: #0891b2;
}

/* 다음 단계 — 토픽 클러스터 카드 (SEO) */
.rb-pr-cluster {
  margin-top: 6px;
  padding-top: 14px;
  border-top: 1px solid #e2e8f0;
}
.rb-pr-cluster-head {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.92em;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 10px;
}
.rb-pr-cluster-head i { color: #0891b2; font-size: 1.1em; }
.rb-pr-cluster-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.rb-pr-cluster-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  text-decoration: none;
  color: #0f172a;
  transition: all 0.15s;
}
.rb-pr-cluster-card:hover {
  border-color: #0891b2;
  background: #f0fdfa;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(8, 145, 178, 0.08);
}
.rb-pr-cluster-card i {
  font-size: 1.3em;
  color: #0891b2;
}
.rb-pr-cluster-card strong {
  font-size: 0.9em;
  font-weight: 700;
}
.rb-pr-cluster-card small {
  font-size: 0.75em;
  color: #64748b;
  font-weight: 500;
  line-height: 1.4;
}
@media (max-width: 640px) {
  .rb-pr-cluster-grid { grid-template-columns: 1fr; }
  .rb-pr-cluster-card { flex-direction: row; align-items: center; gap: 10px; }
  .rb-pr-cluster-card strong { font-size: 0.88em; }
  .rb-pr-cluster-card small { display: block; font-size: 0.72em; }
}

/* 세부 내역 (task 5) */
.rb-pr-details {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.rb-pr-detail-item {
  padding: 8px 12px;
  background: #f8fafc;
  border-radius: 6px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  row-gap: 2px;
}
.rb-pr-detail-title {
  grid-column: 1 / -1;
  font-size: 0.82em;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rb-pr-detail-body {
  grid-column: 1 / -1;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.78em;
  color: #475569;
}
.rb-pr-detail-calc {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.rb-pr-detail-net {
  color: #0e7490;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}

/* AI + 은행 버튼 (task 6·7) — 2버튼 한 줄 (모바일 포함) */
.rb-pr-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}
.rb-pr-actions-row {
  display: flex;
  gap: 8px;
}
.rb-pr-ai-btn,
.rb-pr-bank-btn,
.rb-pr-share-btn {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s;
  border: none;
}
.rb-pr-ai-btn-icon {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.rb-pr-ai-btn-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.2;
  min-width: 0;
}
.rb-pr-ai-btn-text strong {
  font-size: 0.92em;
  font-weight: 700;
  white-space: nowrap;
}
.rb-pr-ai-btn-text small {
  font-size: 0.72em;
  opacity: 0.85;
  font-weight: 500;
  margin-top: 1px;
  white-space: nowrap;
}
/* 좁은 모바일 — 자간 줄여서 360px에서도 자연스럽게 */
@media (max-width: 380px) {
  .rb-pr-ai-btn, .rb-pr-bank-btn {
    padding: 9px 5px;
    gap: 4px;
  }
  .rb-pr-ai-btn-text strong { font-size: 0.78em; letter-spacing: -0.04em; }
  .rb-pr-ai-btn-text small  { font-size: 0.64em; letter-spacing: -0.04em; }
  .rb-pr-openai-logo { width: 15px; height: 15px; }
}
/* 큰 모바일 (380~640px) */
@media (min-width: 381px) and (max-width: 640px) {
  .rb-pr-ai-btn, .rb-pr-bank-btn {
    padding: 11px 12px;
    gap: 9px;
  }
  .rb-pr-ai-btn-text strong { font-size: 0.95em; }
  .rb-pr-ai-btn-text small  { font-size: 0.75em; }
}
.rb-pr-ai-btn {
  background: #10A37F; /* OpenAI 공식 그린 */
  color: #fff;
  box-shadow: 0 4px 12px rgba(16, 163, 127, 0.25);
}
.rb-pr-ai-btn:hover {
  background: #0E8E6D;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(16, 163, 127, 0.35);
}
.rb-pr-ai-btn i { font-size: 1.15em; }
.rb-pr-openai-logo {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.rb-pr-bank-btn {
  background: #fff;
  color: #475569;
  border: 1px solid #cbd5e1;
}
.rb-pr-bank-btn:hover {
  border-color: #0891b2;
  color: #0e7490;
  background: #ecfeff;
}
.rb-pr-bank-btn i { font-size: 1.15em; }
/* 카톡 공유 버튼 — 카카오 공식 옐로우 #FEE500 + 공식 스피치버블 로고 */
.rb-pr-share-btn {
  flex: 1 1 0;
  background: #FEE500;
  color: #181600;
  box-shadow: 0 4px 12px rgba(254, 229, 0, 0.35);
}
.rb-pr-share-btn:hover {
  background: #F4D900;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(254, 229, 0, 0.45);
}
.rb-pr-share-icon {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  color: #181600;
}
.rb-pr-kakao-logo {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}
.rb-pr-share-label {
  font-size: 0.95em;
  font-weight: 700;
  white-space: nowrap;
  letter-spacing: 0.06em;
}
@media (max-width: 380px) {
  .rb-pr-share-btn { padding: 9px 5px; gap: 4px; }
  .rb-pr-share-label { font-size: 0.85em; letter-spacing: -0.04em; }
  .rb-pr-kakao-logo { width: 20px; height: 20px; }
}
@media (min-width: 381px) and (max-width: 640px) {
  .rb-pr-share-btn { padding: 11px 12px; gap: 9px; }
  .rb-pr-share-label { font-size: 0.98em; }
}
.rb-pr-ai-msg {
  text-align: center;
  font-size: 0.82em;
  color: #059669;
  font-weight: 600;
  padding: 6px;
  background: #ecfdf5;
  border-radius: 6px;
}

/* 모바일 (task 9) */
@media (max-width: 640px) {
  .rb-pr-summary-row { grid-template-columns: 1fr 1fr; gap: 5px; }
  .rb-pr-stat { padding: 8px 5px; }
  .rb-pr-stat span { font-size: 0.66em; }
  .rb-pr-stat strong { font-size: 0.85em; letter-spacing: -0.02em; }
  .rb-pr-stat strong em { font-size: 0.68em; margin-left: 2px; }
  .rb-pr-bar-row { grid-template-columns: minmax(80px, auto) 1fr auto; gap: 6px; }
  .rb-pr-bar-label { max-width: 90px; font-size: 0.78em; }
  .rb-pr-bar-meta { font-size: 0.75em; }
  .rb-pr-advice { padding: 12px 0; }
  .rb-pr-insight { font-size: 0.78em; padding: 7px 8px; }
}

/* ───── 출생년도 + 자녀 */
.rb-personal-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.rb-birth-group {
  display: flex;
  align-items: center;
  gap: 8px;
}
.rb-birth-group label {
  font-size: 0.82em;
  font-weight: 600;
  color: #64748b;
  white-space: nowrap;
}
.rb-birth-group select {
  padding: 7px 28px 7px 10px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #fff;
  font-size: 0.88em;
  color: #111827;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6' fill='none'><path d='M1 1l4 4 4-4' stroke='%236b7280' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 8px center;
}
.rb-birth-group select:focus {
  outline: none;
  border-color: #0891b2;
  box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.12);
}

/* ───── 금리 동향 카드 */
.rb-trend {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px 16px;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.rb-trend-title {
  font-size: 0.82em;
  font-weight: 700;
  color: #334155;
}
.rb-trend-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.82em;
  color: #475569;
  flex: 1;
}
.rb-trend-divider {
  border: none;
  border-top: 1px solid #e2e8f0;
  margin: 2px 0;
}
.rb-trend-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.rb-trend-rate {
  font-weight: 700;
  color: #0891b2;
}
.rb-trend-count {
  font-size: 0.9em;
  color: #94a3b8;
}
.rb-child-group {
  display: flex;
  align-items: center;
  gap: 8px;
}
.rb-child-group label {
  font-size: 0.82em;
  font-weight: 600;
  color: #64748b;
}
.rb-child-group select {
  padding: 7px 28px 7px 10px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #fff;
  font-size: 0.88em;
  color: #111827;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6' fill='none'><path d='M1 1l4 4 4-4' stroke='%236b7280' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 8px center;
}
.rb-child-group select:focus {
  outline: none;
  border-color: #0891b2;
  box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.12);
}

/* ───── 저장 상품 카드 그리드 */
.rb-saved-hint {
  margin: 18px 0 10px;
  padding: 14px 0 0;
  background: transparent;
  border-top: 1px solid #e2e8f0; /* 상단 구분선 — 실시간/조건 찾기 영역과 분리 */
  font-size: 0.92em;
  color: #64748b;
  display: block;
  line-height: 1.5;
  white-space: normal;
}
.rb-saved-hint-count {
  display: inline;
  font-weight: 800;
  font-size: 1.15em;
  color: #db2777; /* 핑크 — 메인 CTA 색과 대비, 눈에 확 들어옴 */
  margin-right: 6px;
}
.rb-saved-hint-text {
  display: inline;
  font-weight: 700;
  color: #0f172a; /* 진한 검정 — 숫자와 대비 */
}
.rb-saved-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.rb-saved-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  position: relative;
  transition: border-color 0.15s;
  min-height: 200px; /* 한도 표시 유무에 따른 높이 차이 흡수 */
}
.rb-saved-card-limit {
  font-size: 0.72em;
  color: #94a3b8;
  text-align: center;
  margin-top: 2px;
  padding: 2px 0;
  font-weight: 500;
}
.rb-saved-card-limit[data-has-limit] {
  color: #b45309;
  background: #fffbeb;
  border-radius: 4px;
  font-weight: 600;
}
/* 한도 초과 경고 — 별도 박스 X, 기존 한도 텍스트를 빨간색으로 */
.rb-saved-card-over {
  border-color: #ef4444;
  background: #fef2f2;
}
.rb-saved-card-over .rb-saved-card-amt input {
  border-color: #ef4444;
  color: #b91c1c;
  background: #fff;
}
.rb-saved-card-limit[data-over] {
  background: #fee2e2;
  color: #b91c1c;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 4px 8px;
  text-align: center;
}
.rb-saved-card-limit[data-over] i { font-size: 1em; }
.rb-saved-card:hover {
  border-color: #0891b2;
}
.rb-saved-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}
.rb-saved-card-bank {
  font-size: 0.78em;
  font-weight: 700;
  color: #334155;
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.rb-saved-card-bank .rb-tag {
  font-size: 0.85em;
  flex-shrink: 0;
}
.rb-saved-card-del {
  width: 22px;
  height: 22px;
  border: none;
  background: #f1f5f9;
  border-radius: 50%;
  color: #94a3b8;
  font-size: 0.85em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s;
}
.rb-saved-card-del:hover {
  background: #fee2e2;
  color: #ef4444;
}
.rb-saved-card-name {
  font-size: 0.82em;
  color: #334155;
  font-weight: 600;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.7em; /* 2줄 높이 고정 — 카드 통일 */
}
.rb-saved-card-rate {
  font-size: 1.15em;
  font-weight: 800;
  color: #0891b2;
  line-height: 1;
}
.rb-saved-card-rate small {
  font-size: 0.6em;
  font-weight: 600;
  color: #64748b;
  margin-left: 2px;
}
.rb-saved-card-amt {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-top: 2px;
}
.rb-saved-card-period {
  width: 100%;
  padding: 5px 24px 5px 8px;
  border: 1px solid #e2e8f0;
  border-radius: 5px;
  font-size: 0.8em;
  color: #334155;
  background: #f8fafc;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6' fill='none'><path d='M1 1.5L5 4.5L9 1.5' stroke='%2394a3b8' stroke-width='1.5' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 8px center;
}
.rb-saved-card-period:focus {
  outline: none;
  border-color: #0891b2;
  background-color: #fff;
}
.rb-saved-card-amt input {
  width: 100%;
  padding: 5px 6px;
  border: 1px solid #e2e8f0;
  border-radius: 5px;
  font-size: 0.8em;
  color: #111827;
  text-align: right;
  background: #f8fafc;
}
.rb-saved-card-amt input:focus {
  outline: none;
  border-color: #0891b2;
  background: #fff;
}
.rb-saved-card-amt span {
  font-size: 0.75em;
  color: #94a3b8;
  flex-shrink: 0;
}
.rb-saved-cards-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 20px 10px;
  color: #94a3b8;
  font-size: 0.85em;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
}
.rb-saved-star {
  color: #f59e0b;
  font-size: 1.1em;
}

.rb-label-row {
  display: flex;
  align-items: center;
  gap: 6px;
  position: relative;
}
.rb-label-row label {
  font-size: 0.78em;
  font-weight: 700;
  color: #6b7280;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* ───── 종류별 (가로 필 라디오) */
.rb-scope-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.rb-scope-title {
  font-size: 0.82em;
  font-weight: 700;
  color: #64748b;
  margin-right: 4px;
}
.rb-scope-pill {
  padding: 7px 14px;
  border: 1px solid #d1d5db;
  border-radius: 20px;
  background: #fff;
  color: #4b5563;
  font-size: 0.82em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1;
}
.rb-scope-pill:hover {
  border-color: #0891b2;
  color: #0891b2;
}
.rb-scope-pill.rb-scope-on {
  background: #0891b2;
  border-color: #0891b2;
  color: #fff;
}
.rb-scope-pill.rb-scope-on:hover {
  background: #0e7490;
}

/* ───── ⓘ 툴팁 */
.rb-tip-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border: none;
  background: #e2e8f0;
  border-radius: 50%;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}
.rb-tip-btn:hover { background: #cbd5e1; }
.rb-tip-btn svg { width: 12px; height: 12px; }
.rb-tooltip {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  background: #1e293b;
  color: #f1f5f9;
  font-size: 0.78em;
  line-height: 1.5;
  padding: 8px 12px;
  border-radius: 8px;
  max-width: 280px;
  z-index: 10;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* ───── 나이 + 자녀 */
.rb-age-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 0;
}
.rb-age-left {
  display: flex;
  align-items: center;
  gap: 8px;
}
.rb-age-left label {
  font-size: 0.82em;
  font-weight: 600;
  color: #64748b;
}
#rb-age {
  width: 56px;
  height: 36px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #fff;
  font-size: 0.95em;
  font-weight: 600;
  color: #0f172a;
  text-align: center;
  padding: 0 4px;
  -moz-appearance: textfield;
}
#rb-age::-webkit-outer-spin-button,
#rb-age::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
#rb-age:focus {
  outline: none;
  border-color: #0891b2;
  box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.12);
}
#rb-age::placeholder { color: #d1d5db; }
.rb-age-suffix {
  font-size: 0.82em;
  color: #64748b;
}
.rb-child-label {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 0.82em;
  font-weight: 500;
  color: #374151;
}
.rb-child-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  accent-color: #0891b2;
  cursor: pointer;
}

/* ───── 구분선 */
.rb-divider {
  border: none;
  border-top: 1px solid #f1f5f9;
  margin: 4px 0;
}

/* ───── 초기화 */
.rb-reset-btn {
  padding: 10px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fafafa;
  color: #9ca3af;
  font-size: 0.82em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.rb-reset-btn:hover {
  border-color: #cbd5e1;
  color: #6b7280;
  background: #f1f5f9;
}

/* ───── 금액 입력 */
.rb-amount-wrap {
  display: flex;
  align-items: center;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
  padding: 0 14px;
  height: 40px;
  gap: 4px;
  position: relative; /* 에러 메시지 absolute 앵커 */
}
.rb-amount-wrap input {
  border: none;
  outline: none;
  font-size: 1em;
  font-weight: 600;
  color: #0f172a;
  background: transparent;
  width: 100%;
  min-width: 0;
  flex: 1 1 0;
  -moz-appearance: textfield;
  text-align: right;
  order: 1;
}
.rb-amount-wrap input::-webkit-outer-spin-button,
.rb-amount-wrap input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.rb-amount-wrap:focus-within {
  border-color: #0891b2;
  box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.12);
}
/* 금액 0원 검증 에러 — 흔들림 + 빨간 테두리 */
.rb-amount-wrap.rb-amount-error {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
  animation: rb-amount-shake 0.35s ease;
}
@keyframes rb-amount-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}
.rb-amount-wrap.rb-amount-error::after {
  content: '금액을 입력하세요';
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  font-size: 0.75em;
  color: #dc2626;
  font-weight: 600;
  pointer-events: none;
}
.rb-amount-suffix {
  font-size: 0.85em;
  font-weight: 600;
  color: #94a3b8;
  white-space: nowrap;
  pointer-events: none;
  transition: color 0.15s;
  order: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex-shrink: 10; /* 금액 input이 우선 공간 차지 — suffix는 밀려남 */
}
.rb-amount-suffix.rb-suffix-active {
  color: #0891b2;
}
.rb-amount-btns {
  display: flex;
  gap: 6px;
  flex-wrap: nowrap; /* 모바일에서도 한 줄 유지 */
}
.rb-amt-btn {
  padding: 6px 10px;
  border: none;
  border-radius: 6px;
  background: #f1f5f9;
  color: #64748b;
  font-size: 0.8em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  flex: 1 1 0;
  min-width: 0;
  white-space: nowrap;
  text-align: center;
}
/* +1만, +10만은 좁게 (+100만, +1,000만에 공간 양보) */
.rb-amt-btn[data-delta="10000"],
.rb-amt-btn[data-delta="100000"] {
  flex: 0.7 1 0;
}
.rb-amt-btn:hover {
  background: #e2e8f0;
}
.rb-amt-btn.rb-amt-accent {
  background: #ecfeff;
  color: #0891b2;
}
.rb-amt-btn.rb-amt-accent:hover {
  background: #cffafe;
}
.rb-amt-btn.rb-amt-reset {
  background: #fff7ed;
  color: #ea580c;
}
.rb-amt-btn.rb-amt-reset:hover {
  background: #ffedd5;
}

/* ───── 종류별 (세로 라디오) */
.rb-scope-radio {
  display: flex;
  flex-direction: column;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}
.rb-scope-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: none;
  background: #fff;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s;
  font: inherit;
}
.rb-scope-item + .rb-scope-item {
  border-top: 1px solid #e2e8f0;
}
.rb-scope-item:hover {
  background: #f8fafc;
}
.rb-scope-item.rb-scope-on {
  background: #0891b2;
}
.rb-scope-item.rb-scope-on .rb-scope-label {
  color: #fff;
}
.rb-scope-item.rb-scope-on .rb-scope-desc {
  color: rgba(255,255,255,0.7);
}
.rb-radio-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #d1d5db;
  flex-shrink: 0;
  position: relative;
}
.rb-scope-on .rb-radio-dot {
  border-color: #fff;
  background: #fff;
}
.rb-scope-on .rb-radio-dot::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #0891b2;
}
.rb-scope-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.rb-scope-label {
  font-size: 0.9em;
  font-weight: 600;
  color: #0f172a;
}
.rb-scope-desc {
  font-size: 0.75em;
  color: #94a3b8;
  line-height: 1.4;
}

/* ───── 기간+정렬 나란히 */
.rb-filter-row {
  display: flex;
  gap: 16px;
}
.rb-filter-half {
  flex: 1;
  min-width: 0;
}

/* ───── 저장 버튼 */
.rb-saved-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 10px;
  border: 1px dashed #e2e8f0;
  border-radius: 8px;
  background: #fafafa;
  color: #9ca3af;
  font-size: 0.85em;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}
.rb-saved-btn:hover {
  border-color: #0891b2;
  color: #0891b2;
  background: #ecfeff;
}
.rb-saved-btn.rb-saved-active {
  border-style: solid;
  border-color: #0891b2;
  color: #0891b2;
  background: #ecfeff;
}
.rb-saved-icon {
  font-size: 1.1em;
}

/* ───── 하단 행 (저장 + 검색 반반) */
.rb-bottom-row {
  display: flex;
  gap: 10px;
}
.rb-bottom-row .rb-saved-btn {
  flex: 1;
  min-width: 0;
}
.rb-search-wrap {
  flex: 1;
  min-width: 0;
}
/* ───── 검색 버튼 */
.rb-search-btn {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  border: none;
  border-radius: 8px;
  background: #0891b2;
  color: #fff;
  font-size: 0.9em;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
  font: inherit;
}
.rb-search-btn:hover {
  background: #0e7490;
}

.rb-chip-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.rb-chip {
  border: 1px solid #d1d5db;
  background: #fff;
  color: #4b5563;
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 0.85em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.rb-chip:hover {
  border-color: #0891b2;
  color: #0891b2;
}
.rb-chip-on {
  background: #0891b2;
  border-color: #0891b2;
  color: #fff;
}
.rb-chip-on:hover { color: #fff; }

/* ───── 유형 필터 (3축: 자격·조건·테마, 접이식) */
.rb-type-filter {
  margin-bottom: 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
}
.rb-type-head {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 14px 16px;
  background: transparent;
  border: none;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: background 0.15s;
}
.rb-type-head:hover {
  background: #f1f5f9;
}
.rb-type-head strong {
  font-size: 0.95em;
  color: #0e7490;
  font-weight: 800;
  flex-shrink: 0;
}
.rb-type-sub {
  font-size: 0.82em;
  color: #0e7490;
  font-weight: 700;
  line-height: 1.4;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 4px 10px;
  background: #ecfeff;
  border: 1px dashed #67e8f9;
  border-radius: 999px;
  animation: rb-type-sub-pulse 2s ease-in-out infinite;
}
/* 접힌 상태에서만 안내 강조 — 펼치면 일반 톤으로 */
.rb-type-filter:not(.rb-type-collapsed) .rb-type-sub {
  background: transparent;
  border: none;
  padding: 0;
  color: #94a3b8;
  font-weight: 500;
  font-size: 0.78em;
  animation: none;
}
@keyframes rb-type-sub-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(8, 145, 178, 0); }
  50%      { box-shadow: 0 0 0 4px rgba(8, 145, 178, 0.10); }
}
.rb-type-chev {
  font-size: 0.9em;
  color: #94a3b8;
  flex-shrink: 0;
  transition: transform 0.2s;
}
.rb-type-filter:not(.rb-type-collapsed) .rb-type-chev {
  transform: rotate(180deg);
}
.rb-type-body {
  display: flex;
  flex-direction: column;
  gap: 22px; /* 축 간 여백 — 자격·조건·테마 각 덩어리 분리 */
  padding: 0;
}
.rb-type-filter.rb-type-collapsed .rb-type-body {
  display: none;
}
.rb-type-reset {
  align-self: flex-end;
  font-size: 0.75em;
  color: #94a3b8;
  background: transparent;
  border: 1px solid transparent;
  padding: 4px 10px;
  cursor: pointer;
  font-weight: 600;
  border-radius: 6px;
}
.rb-type-reset:hover {
  color: #0e7490;
  background: #ecfeff;
  border-color: #a5f3fc;
}

/* 축 컨테이너 — 각 축(자격·조건·테마)을 하나의 시각적 덩어리로 */
.rb-axis {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}
.rb-axis-head {
  display: flex;
  align-items: center;
  gap: 6px;
}
.rb-axis-label {
  font-size: 0.72em;
  font-weight: 800;
  color: #475569;
  letter-spacing: 0.06em;
  padding: 2px 8px;
  background: #e2e8f0;
  border-radius: 4px;
}
.rb-axis-sub {
  font-size: 0.78em;
  color: #64748b;
  font-weight: 500;
  margin-left: 6px;
  display: inline;
}
@media (max-width: 640px) {
  .rb-axis-head { flex-wrap: wrap; }
  .rb-axis-sub { display: block; margin-left: 0; margin-top: 2px; font-size: 0.72em; }
}

/* 모바일 — 칩 가로 스크롤 방지, 줄바꿈 허용, 칩 크기 통일 */
#rb-axis-eligibility, #rb-axis-condition, #rb-axis-theme {
  flex-wrap: wrap;
  gap: 6px;
}
.rb-type-body .rb-chip {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 12px;
  line-height: 1.2;
  white-space: nowrap;
  flex-shrink: 0;
}
/* "해당없음" 기본 칩 — 비활성 시 중성 회색 (활성은 위 통일 핑크) */
.rb-type-body .rb-chip[data-type="none"]:not(.rb-chip-on) {
  background: #fff;
  color: #94a3b8;
  border-color: #e2e8f0;
}
/* 칩 안 부속 라벨 (나이대/신규 등) */
.rb-type-body .rb-chip small {
  font-size: 0.78em;
  font-weight: 500;
  opacity: 0.75;
  margin-left: 3px;
}
.rb-type-body .rb-chip.rb-chip-on small {
  opacity: 0.85;
}
@media (max-width: 640px) {
  .rb-type-sub { flex-basis: 100%; }
  /* 모바일: 축 간 여백 살짝 줄이고, 칩 크기 완전 통일 */
  .rb-type-body { gap: 16px; }
  .rb-axis { padding: 10px 12px; }
  /* 모바일 칩: 3열 균등 그리드로 정렬 — 줄 끝 빈 공간 제거 */
  .rb-type-body .rb-chip-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }
  .rb-type-body .rb-chip {
    font-size: 0.78em;
    padding: 7px 6px;
    min-height: 32px;
    text-align: center;
    border-radius: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .rb-type-body .rb-chip small {
    font-size: 0.72em;
    margin-left: 2px;
  }
}

/* ───── 유형 태그 (테이블·히어로·모달 공용) */
.rb-type-tag {
  display: inline-block;
  font-size: 0.7em;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 700;
  letter-spacing: 0.2px;
  margin-left: 6px;
  vertical-align: middle;
  white-space: nowrap;
}
/* ─── 자격 축 — 전부 핑크 (축 내 단일 선택이라 구분 불필요) */
.rb-tt-youth,
.rb-tt-senior,
.rb-tt-family,
.rb-tt-first    { background: #fce7f3; color: #be185d; }

/* ─── 조건 축 — 성격별 그룹 색 */
.rb-tt-flat     { background: #dcfce7; color: #166534; } /* 안정: 초록 */
/* 거래 실적 그룹: 보라 */
.rb-tt-card,
.rb-tt-salary,
.rb-tt-utility,
.rb-tt-housing,
.rb-tt-autotransfer { background: #ede9fe; color: #6d28d9; }
/* 가입 채널 그룹: 파랑 */
.rb-tt-nonface,
.rb-tt-offline,
.rb-tt-appuse   { background: #dbeafe; color: #1e40af; }
/* 계좌 연계 그룹: 청록 */
.rb-tt-checking,
.rb-tt-xsell,
.rb-tt-redeposit { background: #cffafe; color: #0e7490; }
/* 마케팅동의: 슬레이트 */
.rb-tt-marketing { background: #f1f5f9; color: #64748b; }

/* ─── 테마 축 */
.rb-tt-challenge  { background: #fef3c7; color: #b45309; } /* 주황 */
.rb-tt-restricted { background: #f1f5f9; color: #475569; } /* 회색 */
.rb-tt-esg        { background: #d1fae5; color: #065f46; } /* 초록 — 친환경 */
.rb-tt-loyalty    { background: #e0e7ff; color: #3730a3; } /* 인디고 — 주거래 */
.rb-tt-promo      { background: #fee2e2; color: #991b1b; } /* 빨강 — 특판 */
.rb-tt-goalreach  { background: #fef9c3; color: #854d0e; } /* 노랑 — 목표달성 */

/* ─── 플래그 */
.rb-tt-trap      { background: #ffedd5; color: #9a3412; border: 1px solid #fb923c; font-weight: 800; }

/* 레거시 (제거된 유형) — 하위호환 폴백 */
.rb-tt-easy      { background: #dbeafe; color: #1e40af; }
.rb-tt-short     { background: #e0f2fe; color: #0369a1; }
.rb-tt-newcomer  { background: #fce7f3; color: #be185d; }

/* ───── 제약 뱃지 (한도·자격·마감·중도해지·함정주의) */
.rb-c-icon {
  width: 12px;
  height: 12px;
  display: inline-block;
  vertical-align: -2px;
  margin-right: 3px;
}
.rb-c-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.68em;
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.2px;
  margin-right: 4px;
  white-space: nowrap;
  border: 1px solid transparent;
}
.rb-c-limit           { background: #fff7ed; color: #9a3412; border-color: #fed7aa; }
.rb-c-eligibility     { background: #f5f3ff; color: #5b21b6; border-color: #ddd6fe; }
.rb-c-newcomer        { background: #ecfeff; color: #155e75; border-color: #a5f3fc; }
.rb-c-deadline        { background: #fef2f2; color: #991b1b; border-color: #fecaca; }
.rb-c-earlyWithdrawal { background: #fef3c7; color: #854d0e; border-color: #fde68a; }
.rb-c-trap            { background: #fff1f2; color: #9f1239; border-color: #fecdd3; }

/* ───── 구체적 뱃지 (한도·연령·자녀) */
.rb-d-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.68em;
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.1px;
  white-space: nowrap;
  border: 1px solid transparent;
}
.rb-d-limit   { background: #fff7ed; color: #9a3412; border-color: #fed7aa; }
.rb-d-age     { background: #ede9fe; color: #6d28d9; border-color: #ddd6fe; }
.rb-d-child   { background: #fce7f3; color: #be185d; border-color: #fbcfe8; }
.rb-d-unknown { background: #f1f5f9; color: #64748b; border-color: #cbd5e1; font-weight: 600; }
.rb-d-period  { background: #ecfeff; color: #0e7490; border-color: #a5f3fc; cursor: help; }
.rb-d-best    { background: #fffbeb; color: #b45309; border-color: #fde68a; font-weight: 600; }
/* 기간별 금리 다름 + 최적 기간 연결 뱃지 */
.rb-period-pair {
  display: inline-flex;
  align-items: stretch;
  gap: 0;
  vertical-align: middle;
}
.rb-d-period-left {
  border-right: none;
  border-radius: 4px 0 0 4px;
  margin-right: 0;
}
.rb-d-period-right {
  border-left: none;
  border-radius: 0 4px 4px 0;
  margin-left: 0;
}


.rb-row-cbadges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 5px;
}
.rb-row-warn { background: rgba(251, 146, 60, 0.04); }
.rb-row-warn:hover { background: rgba(251, 146, 60, 0.08) !important; }

.rb-after-empty {
  color: #cbd5e1;
  font-size: 0.9em;
}
.rb-after-warn {
  display: block;
  font-size: 0.72em;
  color: #9a3412;
  font-weight: 600;
  margin-top: 3px;
}

/* 히어로 카드 내부 제약 뱃지 */
.rb-hw-cbadges {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.rb-hw-cbadges .rb-c-badge {
  background: rgba(255,255,255,0.18);
  color: #fff;
  border-color: rgba(255,255,255,0.3);
}
.rb-hw-warn {
  margin-top: 10px;
  padding: 8px 12px;
  background: rgba(254, 215, 170, 0.18);
  border: 1px solid rgba(251, 146, 60, 0.5);
  border-radius: 6px;
  font-size: 0.82em;
  font-weight: 600;
  color: #fff7ed;
}

/* 모달 제약 주의 섹션 */
.rb-m-constraints {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-left: 4px solid #f97316;
  border-radius: 8px;
  padding: 12px 14px;
  margin: 6px 0 14px;
}
.rb-m-constraints-head {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 800;
  color: #9a3412;
  font-size: 0.92em;
  margin-bottom: 8px;
}
.rb-m-constraints-head .rb-c-icon {
  width: 16px;
  height: 16px;
}
.rb-c-rows {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px dashed #fed7aa;
  padding-top: 8px;
}
.rb-c-rows li {
  display: flex;
  gap: 10px;
  padding: 5px 0;
  font-size: 0.88em;
  color: #78350f;
  align-items: flex-start;
}
.rb-c-row-label {
  flex-shrink: 0;
  min-width: 72px;
  font-weight: 700;
  color: #9a3412;
  display: inline-flex;
  align-items: center;
}
.rb-c-warnings {
  margin: 8px 0 0;
  padding: 8px 0 0 18px;
  border-top: 1px dashed #fed7aa;
  color: #9a3412;
  font-size: 0.84em;
  line-height: 1.6;
}
.rb-c-warnings li { padding: 2px 0; }

.rb-mrow-warn {
  background: #fff7ed;
  border-left: 3px solid #f97316;
  padding: 8px 10px;
  margin: 4px -10px;
  border-radius: 4px;
}
.rb-mrow-warn span { color: #9a3412; font-weight: 600; }
.rb-mrow-warn strong { color: #7c2d12; }

/* 유형 chip 선택 시 — 모든 축(해당없음 포함) 통일 핑크 */
.rb-type-body .rb-chip.rb-chip-on {
  background: #db2777;
  border-color: #db2777;
  color: #fff;
}
.rb-type-body .rb-chip.rb-chip-on:hover {
  background: #be185d;
  border-color: #be185d;
  color: #fff;
}
/* 함정주의 · 특수자격은 경고성이라 기존 색 유지 */
.rb-chip.rb-chip-trap {
  border-color: #fb923c;
  color: #9a3412;
  background: #fff7ed;
  font-weight: 800;
}
.rb-chip.rb-chip-trap:hover {
  border-color: #f97316;
  color: #7c2d12;
}

/* 히어로 카드 내부 유형 */
.rb-hw-types {
  margin-top: 8px;
  font-size: 0.78em;
  opacity: 0.95;
}
.rb-hw-types .rb-type-tag {
  margin-left: 0;
  margin-right: 4px;
  background: rgba(255,255,255,0.22);
  color: #fff;
}
.rb-hw-period {
  font-size: 0.82em;
  opacity: 0.85;
  font-weight: 600;
}

/* 모달 유형 */
.rb-mtypes {
  display: flex;
  gap: 12px;
  padding: 10px 0 4px;
  margin-bottom: 6px;
  border-bottom: 1px dashed #e5e7eb;
  align-items: flex-start;
}
.rb-mtypes > span {
  color: #6b7280;
  font-size: 0.88em;
  min-width: 48px;
  padding-top: 2px;
}
.rb-mtypes-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex: 1;
}
.rb-mtypes-list .rb-type-tag { margin-left: 0; }

/* ───── 로딩 */
.rb-loading {
  padding: 60px 20px;
  text-align: center;
  color: #6b7280;
}
.rb-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid #e5e7eb;
  border-top-color: #0891b2;
  border-radius: 50%;
  margin: 0 auto 14px;
  animation: rb-spin 0.8s linear infinite;
}
@keyframes rb-spin {
  to { transform: rotate(360deg); }
}

/* ───── 에러 */
.rb-error {
  padding: 40px 20px;
  text-align: center;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 10px;
}
.rb-error p { margin: 6px 0; color: #b91c1c; }
.rb-error-sub { color: #7f1d1d !important; font-size: 0.9em; }
.rb-error button {
  margin-top: 12px;
  padding: 10px 22px;
  background: #dc2626;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
}
.rb-error button:hover { background: #b91c1c; }

/* ───── 샘플 알림 */
.rb-sample-alert {
  background: #fef3c7;
  border: 1px solid #fcd34d;
  color: #78350f;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 0.9em;
  margin-bottom: 14px;
}

/* ───── NO.1 추천 히어로 카드 */
.rb-hero-winner {
  background: linear-gradient(135deg, #0e7490, #0891b2);
  color: #fff;
  border-radius: 14px;
  padding: 20px 24px;
  margin: 14px 0 18px;
  box-shadow: 0 8px 24px rgba(8, 145, 178, 0.18);
}
.rb-hw-tag {
  font-size: 0.78em;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  opacity: 0.9;
  margin-bottom: 8px;
  font-weight: 700;
}
.rb-hw-main {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  flex-wrap: wrap;
}
.rb-hw-left { min-width: 0; flex: 1; }
.rb-hw-bank {
  font-size: 1.15em;
  font-weight: 800;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.rb-hw-bank .rb-tag {
  background: rgba(255,255,255,0.2);
  color: #fff;
}
.rb-hw-prod {
  font-size: 0.95em;
  opacity: 0.92;
  line-height: 1.4;
}
.rb-hw-right { text-align: right; }
.rb-hw-rate {
  font-size: 2.6em;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.rb-hw-rate span { font-size: 0.5em; margin-left: 2px; opacity: 0.85; }
.rb-hw-sub {
  font-size: 0.78em;
  opacity: 0.8;
  margin-top: 4px;
}
.rb-hw-foot {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.2);
  font-size: 0.88em;
  opacity: 0.95;
}
.rb-hw-foot strong {
  color: #fef3c7;
  font-weight: 800;
}

/* ───── 테이블 */
.rb-table-wrap {
  overflow-x: auto;
  margin-top: 14px;
}
.rb-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92em;
  min-width: 780px;
}
.rb-table thead th {
  background: #f1f5f9;
  color: #374151;
  font-weight: 700;
  text-align: left;
  padding: 12px 14px;
  font-size: 0.82em;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  border-bottom: 2px solid #cbd5e1;
}
.rb-table tbody tr {
  border-bottom: 1px solid #f1f5f9;
  transition: background 0.15s;
}
.rb-table tbody tr:hover {
  background: #f0fdfa;
}
.rb-table tbody td {
  padding: 14px;
  vertical-align: middle;
}
.rb-col-fav {
  text-align: center;
  width: 64px;
  padding-left: 8px !important;
  padding-right: 8px !important;
}
.rb-fav {
  background: #fff;
  border: 1px solid #d1d5db;
  cursor: pointer;
  font-size: 0.76em;
  color: #6b7280;
  padding: 5px 10px;
  border-radius: 6px;
  font-weight: 600;
  transition: all 0.15s;
  letter-spacing: 0.2px;
  white-space: nowrap;
}
.rb-fav:hover {
  border-color: #0891b2;
  color: #0891b2;
}
.rb-fav.rb-fav-on {
  background: #0891b2;
  border-color: #0891b2;
  color: #fff;
}
.rb-fav.rb-fav-on:hover {
  background: #0e7490;
  border-color: #0e7490;
}
.rb-table thead th.rb-col-fav {
  font-size: 0.72em;
  color: #9ca3af;
  text-align: center;
}
.rb-sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}
.rb-col-rank {
  width: 44px;
  color: #9ca3af;
  font-weight: 700;
}
.rb-col-bank strong {
  display: block;
  color: #111827;
  font-size: 0.98em;
}
.rb-col-product .rb-link {
  background: none;
  border: none;
  color: #0891b2;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  text-align: left;
  font-size: 1em;
}
.rb-col-product .rb-link:hover { text-decoration: underline; }
.rb-col-product .rb-sub {
  display: inline;
  font-size: 0.8em;
  color: #9ca3af;
  margin-right: 6px;
  vertical-align: middle;
}
.rb-col-product .rb-badges-row {
  display: inline;
  margin-top: 0;
}
.rb-col-product .rb-link {
  display: block;
  margin-bottom: 4px;
}
.rb-col-base {
  color: #6b7280;
  font-variant-numeric: tabular-nums;
}
.rb-col-max strong {
  color: #0e7490;
  font-variant-numeric: tabular-nums;
}
.rb-col-after {
  color: #059669;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.rb-empty {
  text-align: center;
  padding: 40px 20px;
  color: #9ca3af;
}
.rb-table-note {
  margin: 16px 0 0;
  font-size: 0.82em;
  color: #6b7280;
  line-height: 1.7;
  padding: 12px 14px;
  background: #f8fafc;
  border-radius: 8px;
}

/* ───── Tag */
.rb-tag {
  display: inline-block;
  font-size: 0.68em;
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 700;
  letter-spacing: 0.3px;
  margin-right: 6px;
  vertical-align: middle;
}
.rb-tag-bk { background: #dbeafe; color: #1d4ed8; }
.rb-tag-sb { background: #fef3c7; color: #b45309; }

/* ───── 테이블 헤더 정렬 */
.rb-th-sort {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  transition: color 0.15s;
}
.rb-th-sort:hover {
  color: #0891b2;
}
.rb-sort-arrow {
  font-size: 0.8em;
  margin-left: 3px;
  color: #d1d5db;
  vertical-align: middle;
}
.rb-th-active {
  color: #0891b2 !important;
}
.rb-th-active .rb-sort-arrow {
  color: #0891b2;
}

/* ───── 모바일 반응형 */
@media (max-width: 767px) {
  .rb-panel-top {
    flex-direction: column;
  }
  .rb-personal-row {
    gap: 12px;
  }
  .rb-amt-hide-mobile {
    display: none;
  }
  .rb-amount-wrap input { order: 0; text-align: right; min-width: 0; flex: 1 1 auto; width: 100%; }
  .rb-amount-suffix { display: none; } /* 모바일에선 한글 단위 숨김 — 입력값만 깔끔하게 */
  .rb-saved-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .rb-fields-row {
    flex-wrap: wrap;
  }
  .rb-field-scope { flex: 1 1 100%; }
  /* 금액 + 예치기간 = 한 줄, 전체 패널 폭에 꽉 맞게 (정기예금/적금 토글과 동일) */
  .rb-field-amt { flex: 1 1 0; min-width: 0; }
  .rb-field-period { flex: 0 0 110px; }
  .rb-field-period select { width: 100%; }
  /* 모바일 금액 버튼 — 한 줄 강제 + 작은 폰트 */
  .rb-amount-btns { gap: 4px; }
  .rb-amt-btn { font-size: 0.75em; padding: 6px 6px; }

  /* ─────────────────────────────────────────────
   * 테이블 → 카드 레이아웃 (모바일, pencil v7 기반)
   *   상단: 순위 + [저축은행] + 은행명 + ★(우상단)
   *   2: 상품명 · 기간
   *   3: 유형 뱃지
   *   4: 우대 | 세후 (divider 위)
   * ───────────────────────────────────────────── */
  .rb-table-wrap { overflow-x: visible; }
  .rb-table { display: block; border: none; background: transparent; min-width: 0; }
  .rb-table > colgroup,
  .rb-table > thead { display: none; }
  .rb-table > tbody { display: block; width: 100%; }
  .rb-table > tbody > tr {
    position: relative;
    display: grid;
    grid-template-areas:
      "head"
      "prod"
      "bottom";
    gap: 6px;
    padding: 12px 40px 12px 14px; /* 우측 여백 = 별 공간 */
    margin-bottom: 10px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    align-items: start;
  }
  .rb-table > tbody > tr:hover { background: #fff !important; }
  .rb-table > tbody > tr.rb-row-warn { background: #fffbeb; border-color: #fde68a; }
  .rb-table > tbody > tr > td {
    display: block;
    padding: 0;
    border: none;
    line-height: 1.4;
  }
  /* 컬럼 모두 표시 (기본·우대·세후 모두 하단에) */

  /* ▼ 1줄: 순위 + 저축은행 태그 + 은행명 (한 flex 안에 모음) */
  .rb-table td.rb-col-rank {
    grid-area: head;
    justify-self: start;
    align-self: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px !important;
    height: 28px;
    padding: 0 !important;
    font-size: 0.82em;
    font-weight: 800;
    color: #fff;
    background: #0891b2;
    border-radius: 50%;
    box-shadow: 0 1px 2px rgba(0,0,0,0.08);
    z-index: 1; /* 다음 bank와 겹치지 않게 */
  }
  /* 금/은/동 메달 */
  .rb-table > tbody > tr:nth-child(1) td.rb-col-rank {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #78350f;
    border: 2px solid #fde68a;
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.35);
  }
  .rb-table > tbody > tr:nth-child(2) td.rb-col-rank {
    background: linear-gradient(135deg, #e5e7eb 0%, #9ca3af 100%);
    color: #1f2937;
    border: 2px solid #f3f4f6;
    box-shadow: 0 2px 6px rgba(156, 163, 175, 0.3);
  }
  .rb-table > tbody > tr:nth-child(3) td.rb-col-rank {
    background: linear-gradient(135deg, #f97316 0%, #c2410c 100%);
    color: #fff;
    border: 2px solid #fed7aa;
    box-shadow: 0 2px 6px rgba(194, 65, 12, 0.3);
  }
  /* rank와 bank를 같은 head 영역에 겹쳐 놓고, bank 내부 padding-left로 밀어냄 */
  .rb-table td.rb-col-bank {
    grid-area: head;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    padding-left: 36px !important; /* 순위 배지(28) + 간격(8) */
    min-height: 28px;
  }
  .rb-table td.rb-col-bank strong { font-size: 0.92em; color: #0f172a; }

  /* ▼ 2줄: 상품명 · 기간 (inline) / 3줄: 뱃지 모음 */
  .rb-table td.rb-col-product {
    grid-area: prod;
    display: block;
    line-height: 1.45;
  }
  .rb-table td.rb-col-product .rb-link {
    font-size: 0.95em;
    font-weight: 600;
    display: inline;
    color: #0891b2;
  }
  .rb-table td.rb-col-product .rb-sub {
    display: inline;
    margin-left: 6px;
    font-size: 0.8em;
    color: #64748b;
    font-weight: 500;
  }
  /* 뱃지 row — 새 블록 줄 */
  .rb-table td.rb-col-product .rb-badges-row {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 6px;
  }
  .rb-table td.rb-col-product .rb-type-tag,
  .rb-table td.rb-col-product .rb-row-cbadges {
    display: inline-block;
    margin-left: 0; /* 글로벌 margin-left 6px 상쇄 — 순위/상품명과 x=0 정렬 */
  }

  /* ▼ 4줄: 기본 | 우대 | 세후 (3분할, divider 위) */
  .rb-table > tbody > tr {
    grid-template-areas:
      "head"
      "prod"
      "bottom";
  }
  /* 하단 3개 셀을 한 가상 행에 균등 분배 — grid의 subgrid 대체로 flex 방식 사용 */
  .rb-table td.rb-col-base,
  .rb-table td.rb-col-max,
  .rb-table td.rb-col-after {
    grid-area: bottom;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding-top: 8px;
    border-top: 1px solid #f1f5f9;
    font-size: 0.95em;
    font-weight: 700;
    color: #0f172a;
  }
  .rb-table td.rb-col-base { justify-self: start; }
  .rb-table td.rb-col-max  { justify-self: center; align-items: center; }
  .rb-table td.rb-col-after{ justify-self: end;    align-items: flex-end; }

  .rb-table td.rb-col-base::before { content: '기본'; }
  .rb-table td.rb-col-max::before  { content: '우대'; }
  .rb-table td.rb-col-after::before{ content: '세후'; }
  .rb-table td.rb-col-base::before,
  .rb-table td.rb-col-max::before,
  .rb-table td.rb-col-after::before {
    font-size: 0.72em;
    font-weight: 500;
    color: #94a3b8;
  }
  .rb-table td.rb-col-max strong,
  .rb-table td.rb-col-after strong { font-size: 1em; }

  /* ▼ 저장(★) — 우상단 코너 absolute */
  .rb-table td.rb-col-fav {
    position: absolute;
    top: 6px;
    right: 8px;
    grid-area: unset;
    width: auto !important;
    padding: 0 !important;
    z-index: 2;
  }
  .rb-table td.rb-col-fav .rb-fav {
    width: 28px;
    height: 28px;
    padding: 0;
    font-size: 0;
    border: none;
    background: transparent;
    line-height: 1;
    cursor: pointer;
  }
  .rb-table td.rb-col-fav .rb-fav::before {
    content: '☆';
    font-size: 20px;
    line-height: 1;
    color: #cbd5e1;
  }
  .rb-table td.rb-col-fav .rb-fav.rb-fav-on::before {
    content: '★';
    color: #f59e0b;
  }

  /* 빈 상태 */
  .rb-table td.rb-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 24px 12px;
    color: #94a3b8;
  }
  .rb-table > tbody > tr:has(.rb-empty) {
    display: block;
    grid-template-areas: none;
  }
}

/* ───── 모달 */
.rb-modal {
  border: none;
  border-radius: 14px;
  padding: 0;
  max-width: 520px;
  width: 92%;
  max-height: 88vh;
  overflow: auto;
  box-shadow: 0 25px 80px rgba(0,0,0,0.3);
}
.rb-modal::backdrop {
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(3px);
}
.rb-modal-inner {
  padding: 22px 26px 24px;
  position: relative;
}
.rb-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: #f1f5f9;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
  color: #6b7280;
}
.rb-modal-close:hover { background: #e5e7eb; color: #111827; }
.rb-modal h3 {
  margin: 0 30px 16px 0;
  font-size: 1.25em;
  color: #111827;
  line-height: 1.35;
}
.rb-mrow {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 0.95em;
}
.rb-mrow span { color: #6b7280; }
.rb-mrow strong { color: #111827; }
.rb-mrow-hi {
  background: #ecfeff;
  padding: 10px 12px;
  border-radius: 6px;
  margin: 4px -12px;
}
.rb-modal hr {
  border: none;
  border-top: 1px dashed #e5e7eb;
  margin: 14px 0;
}
.rb-mbox {
  background: #fffbeb;
  border: 1px solid #fde68a;
  padding: 12px 14px;
  border-radius: 8px;
}
.rb-mbox strong { color: #b45309; font-size: 0.88em; }
.rb-mbox p { margin: 6px 0 0; font-size: 0.88em; color: #78350f; line-height: 1.6; }
.rb-mnote {
  font-size: 0.78em;
  color: #9ca3af;
  margin: 14px 0 0;
  line-height: 1.6;
}
.rb-cta-calc {
  display: block;
  background: linear-gradient(135deg, #0891b2, #0e7490);
  color: #fff !important;
  padding: 14px 18px;
  border-radius: 10px;
  text-align: center;
  font-weight: 800;
  font-size: 0.96em;
  margin: 14px 0 0;
  text-decoration: none !important;
  box-shadow: 0 6px 18px rgba(8, 145, 178, 0.22);
  transition: transform 0.12s, box-shadow 0.12s;
}
.rb-cta-calc:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(8, 145, 178, 0.28);
  background: linear-gradient(135deg, #0e7490, #155e75);
}
/* ─── 기간별 금리 테이블 (모달) */
.rb-mbox-periods {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}
.rb-mbox-periods strong { color: #0e7490; }
.rb-mpt-hint {
  font-size: 0.78em;
  color: #94a3b8;
  margin: 4px 0 10px;
  font-weight: 500;
}
.rb-mpt {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9em;
}
.rb-mpt th {
  padding: 8px 6px;
  text-align: left;
  font-weight: 700;
  font-size: 0.82em;
  color: #64748b;
  border-bottom: 1px solid #e2e8f0;
  background: #fff;
}
.rb-mpt th:nth-child(n+2), .rb-mpt td:nth-child(n+2) { text-align: right; }
.rb-mpt td {
  padding: 8px 6px;
  border-bottom: 1px solid #f1f5f9;
  color: #0f172a;
}
.rb-mpt tbody tr:last-child td { border-bottom: none; }
.rb-mpt tr.rb-mpt-current td {
  background: #ecfeff;
  font-weight: 700;
  color: #0e7490;
}
.rb-mpt tr.rb-mpt-current td:first-child {
  border-left: 3px solid #0891b2;
  padding-left: 9px;
}
.rb-mpt tr.rb-mpt-current td strong { color: #0e7490; }

/* ───── 섹션 공통 */
.rb-section-head {
  margin-bottom: 20px;
}
.rb-section-head h2 {
  margin: 0 0 6px;
  font-size: 1.4em;
  color: #111827;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.rb-section-head p {
  margin: 0;
  color: #6b7280;
  font-size: 0.95em;
}

/* ───── 블로그 3부작 카드 */
.rb-cluster {
  margin-bottom: 40px;
}
.rb-cluster-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.rb-cluster-card {
  display: block;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 22px 24px;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}
.rb-cluster-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 4px;
  background: linear-gradient(90deg, #0891b2, #10b981);
}
.rb-cluster-card:hover {
  border-color: #0891b2;
  box-shadow: 0 10px 30px rgba(8,145,178,0.12);
  transform: translateY(-3px);
  text-decoration: none;
}
.rb-card-num {
  display: inline-block;
  font-size: 0.75em;
  font-weight: 800;
  color: #0891b2;
  background: #ecfeff;
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 10px;
  letter-spacing: 0.5px;
}
.rb-cluster-card h3 {
  margin: 0 0 10px;
  font-size: 1.1em;
  color: #111827;
  font-weight: 800;
  line-height: 1.4;
}
.rb-cluster-card p {
  margin: 0 0 14px;
  font-size: 0.88em;
  color: #6b7280;
  line-height: 1.6;
}
.rb-card-cta {
  font-size: 0.88em;
  font-weight: 700;
  color: #0891b2;
}

/* ───── 계산기 카드 */
.rb-calc-cta {
  margin-bottom: 40px;
}
.rb-calc-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.rb-calc-card {
  display: block;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px 22px;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s;
  border-left: 3px solid #0891b2;
}
.rb-calc-card:hover {
  border-color: #e5e7eb;
  border-left-color: #0e7490;
  box-shadow: 0 6px 20px rgba(8,145,178,0.08);
  transform: translateY(-2px);
  text-decoration: none;
}
.rb-calc-kicker {
  display: inline-block;
  font-size: 0.72em;
  font-weight: 800;
  letter-spacing: 0.6px;
  color: #0891b2;
  background: #ecfeff;
  padding: 3px 10px;
  border-radius: 4px;
  margin-bottom: 10px;
  text-transform: uppercase;
}
.rb-calc-card h3 {
  margin: 0 0 6px;
  font-size: 0.98em;
  color: #111827;
  font-weight: 700;
}
.rb-calc-card p {
  margin: 0;
  font-size: 0.82em;
  color: #6b7280;
  line-height: 1.5;
}

/* ───── FAQ (AEO) */
.rb-faq {
  margin-top: 40px;
  margin-bottom: 32px;
  padding: 24px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
}
.rb-faq h2 {
  margin: 0 0 16px;
  font-size: 1.2em;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 8px;
}
.rb-faq h2::before {
  content: '';
  width: 4px;
  height: 18px;
  background: #0891b2;
  border-radius: 2px;
}
.rb-faq-item {
  border-bottom: 1px solid #f1f5f9;
  padding: 14px 0;
}
.rb-faq-item:last-child { border-bottom: none; padding-bottom: 0; }
.rb-faq-item:first-child { padding-top: 0; }
.rb-faq-q {
  font-size: 0.95em;
  font-weight: 700;
  color: #0f172a;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 0;
  transition: color 0.15s;
}
.rb-faq-q::-webkit-details-marker { display: none; }
.rb-faq-q::after {
  content: '+';
  font-size: 1.4em;
  color: #94a3b8;
  font-weight: 400;
  transition: transform 0.2s;
  flex-shrink: 0;
}
.rb-faq-item[open] .rb-faq-q::after { content: '−'; }
.rb-faq-q:hover { color: #0891b2; }
.rb-faq-a {
  margin-top: 10px;
  color: #475569;
  font-size: 0.88em;
  line-height: 1.65;
}
.rb-faq-a p { margin: 0 0 8px; }
.rb-faq-a p:last-child { margin-bottom: 0; }
.rb-faq-a a {
  color: #0e7490;
  text-decoration: underline;
  text-decoration-color: #a5f3fc;
  text-underline-offset: 2px;
  font-weight: 600;
}
.rb-faq-a a:hover { color: #155e75; text-decoration-color: #0891b2; }

/* ───── 허브 귀환 버튼 — /compoundcalc/ 로 강하게 신호 */
.rb-back-to-hub {
  margin: 24px 0 12px;
  display: flex;
  justify-content: center;
}
.rb-back-to-hub-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  background: #ecfeff;
  border: 1px solid #a5f3fc;
  border-radius: 10px;
  color: #0e7490;
  font-weight: 700;
  font-size: 0.95em;
  text-decoration: none;
  transition: all 0.15s;
}
.rb-back-to-hub-link:hover {
  background: #cffafe;
  border-color: #0891b2;
  color: #155e75;
  transform: translateX(-2px);
}
.rb-back-to-hub-link i { font-size: 1.15em; }

/* ───── 관련 페이지 — 텍스트 한 줄 (허브 인상 X, SEO 신호 O) */
.rb-related-line {
  margin: 0 0 32px;
  padding: 14px 18px;
  background: #f8fafc;
  border-radius: 8px;
  font-size: 0.85em;
  color: #64748b;
  line-height: 1.9;
  word-break: keep-all;
}
.rb-related-line-label {
  font-weight: 700;
  color: #475569;
  margin-right: 6px;
}
.rb-related-line a {
  color: #0e7490;
  text-decoration: underline;
  text-decoration-color: #a5f3fc;
  text-underline-offset: 2px;
  font-weight: 600;
  margin: 0 4px;
}
.rb-related-line a:hover {
  color: #155e75;
  text-decoration-color: #0891b2;
}
@media (max-width: 480px) {
  .rb-faq { padding: 18px; }
  .rb-related-line { font-size: 0.8em; padding: 12px 14px; }
}

/* ───── 주의문 */
.rb-disclaimer {
  background: #f8fafc;
  border-left: 4px solid #0891b2;
  padding: 20px 24px;
  border-radius: 0 10px 10px 0;
  margin-bottom: 40px;
}
.rb-disclaimer h2 {
  margin: 0 0 10px;
  font-size: 1em;
  color: #0e7490;
}
.rb-disclaimer ul {
  margin: 0;
  padding-left: 18px;
  color: #4b5563;
  font-size: 0.88em;
  line-height: 1.8;
}
.rb-disclaimer li { padding: 3px 0; }

/* ───── 푸터 */
.rb-footer {
  text-align: center;
  padding: 30px 20px;
  border-top: 1px solid #e5e7eb;
  color: #9ca3af;
  font-size: 0.82em;
  line-height: 1.7;
}
.rb-footer p { margin: 4px 0; }
.rb-copy { color: #cbd5e1; }

/* ───── 반응형 */
@media (max-width: 900px) {
  .rb-filter { grid-template-columns: repeat(2, 1fr); }
  .rb-cluster-grid { grid-template-columns: 1fr; }
  .rb-calc-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .rb-main { padding: 20px 14px 40px; }
  .rb-header h1 { font-size: 1.4em; }
  .rb-lede { font-size: 0.95em; }
  .rb-filter { grid-template-columns: 1fr; gap: 14px; }
  .rb-board { padding: 16px; }
  /* 테이블은 위쪽 @media에서 카드 레이아웃으로 변환됨 — min-width 제거 */
  .rb-table { font-size: 0.86em; min-width: 0; }
  .rb-modal-inner { padding: 18px 20px; }
  .rb-calc-grid { grid-template-columns: 1fr; }
  .rb-hero-winner { padding: 16px 18px; }
  .rb-hw-rate { font-size: 2em; }
  .rb-hw-bank { font-size: 1em; }
  .rb-hw-main { flex-direction: column; gap: 10px; }
  .rb-hw-right { text-align: left; }
}
