/* BBG론 대부 — "조건을 먼저 보여주는 원장(ledger)" 디자인
   외부 웹폰트·이미지 없음. 브레이크포인트: 1024px(레일 → 상단 바), 640px(1단). */

:root {
  --paper: #f6f3ea;
  --surface: #fffdf8;
  --ink: #1c211e;
  --ink-soft: #4a524d;
  --green: #1e5b45;
  --green-deep: #133d2e;
  --brass: #9a6a12;
  --brass-light: #e0b866; /* 어두운 레일 위 번호 장식용 (green-deep 대비 6.6:1) */
  --rail-text: #cfd8cf;   /* 레일 보조 텍스트 (green-deep 대비 8.4:1) */
  --warn: #a3261b;
  --line: #d9d3c3;
  --tbd-bg: #fff3c4;

  --font-serif: "Noto Serif KR", "Nanum Myeongjo", "AppleMyungjo", "Batang", "바탕", serif;
  --font-sans: -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", "맑은 고딕", "Noto Sans KR", sans-serif;

  --rail-width: 248px;
  --bar-height: 56px;
  --gutter: 40px;
  --content-max: 1040px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.35;
  margin: 0;
  color: var(--ink);
}

p,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
}

a {
  color: var(--green);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--green-deep);
}

/* 전화번호가 줄 중간에서 끊기지 않게 */
a[href^="tel:"],
.memo-count {
  white-space: nowrap;
}

:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.num,
.tabular {
  font-variant-numeric: tabular-nums;
}

/* ---------- 자리표시(미확정 업체 정보) ---------- */
.tbd {
  background: var(--tbd-bg);
  color: var(--ink);
  border-bottom: 1px dashed var(--ink-soft);
  padding: 0 0.2em;
  font-weight: 600;
}

/* ---------- 스킵 링크 ---------- */
.skip-link {
  position: absolute;
  left: 12px;
  top: -100px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
  color: var(--paper);
}

/* ---------- 워드마크 ---------- */
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: inherit;
  font-family: var(--font-serif);
  font-weight: 700;
}

.wordmark-box {
  display: inline-block;
  padding: 2px 7px 1px;
  border: 2px solid currentColor;
  font-size: 19px;
  letter-spacing: 0.08em;
  line-height: 1.2;
}

.wordmark-text {
  font-size: 18px;
  line-height: 1.2;
}

/* ---------- 공통 셸 ---------- */
.shell {
  min-height: 100vh;
}

.content {
  min-width: 0;
}

.wrap {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* 상단 바 (1024px 미만에서만 보임) */
.topbar {
  display: none;
}

/* 왼쪽 레일 */
.rail {
  background: var(--green-deep);
  color: var(--paper);
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 32px 24px 28px;
}

.rail a {
  color: var(--paper);
}

.rail :focus-visible {
  outline-color: var(--paper);
}

.rail-menu {
  list-style: none;
  padding: 0;
  border-top: 1px solid rgba(246, 243, 234, 0.25);
}

.rail-menu li {
  border-bottom: 1px solid rgba(246, 243, 234, 0.25);
}

.rail-menu a {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 12px 4px;
  text-decoration: none;
  font-size: 16px;
}

.rail-menu .num {
  font-family: var(--font-serif);
  color: var(--brass-light);
  font-size: 14px;
  min-width: 1.6em;
}

.rail-menu a:hover {
  background: rgba(246, 243, 234, 0.08);
}

.rail-menu a[aria-current="page"] {
  font-weight: 700;
  box-shadow: inset 3px 0 0 var(--brass-light);
  padding-left: 12px;
}

.rail-contact {
  display: grid;
  gap: 4px;
  font-size: 15px;
}

.rail-contact dt {
  color: var(--rail-text);
  font-size: 14px;
}

.rail-contact dd + dt {
  margin-top: 10px;
}

.rail-phone {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 700;
  text-decoration: none;
}

.rail-foot {
  margin-top: auto;
  font-size: 14px;
}

/* 모바일 하단 고정 바 (1024px 미만에서만 보임) */
.callbar {
  display: none;
}

/* ---------- 버튼 (사각, 반전 호버) ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 10px 20px;
  border: 1.5px solid var(--ink);
  border-radius: 2px;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.btn:hover {
  background: var(--ink);
  color: var(--paper);
}

.btn-primary {
  background: var(--green);
  border-color: var(--green);
  color: var(--paper);
}

.btn-primary:hover {
  background: var(--paper);
  color: var(--green);
}

.btn[disabled] {
  cursor: not-allowed;
  background: var(--line);
  border-color: var(--line);
  color: var(--ink-soft);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.text-link {
  font-weight: 700;
}

/* ---------- 섹션 공통 ---------- */
.section {
  padding: 56px 0;
  border-top: 1px solid var(--line);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 24px;
  margin-bottom: 24px;
}

.section-head h2 {
  font-size: 28px;
}

.section-sub {
  color: var(--ink-soft);
  margin-top: 6px;
}

.section-foot {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  align-items: baseline;
  justify-content: space-between;
}

.section-foot-end {
  justify-content: flex-end;
}

.caption {
  color: var(--ink-soft);
  font-size: 15px;
}

/* 원장 카드: 그림자 없음, 1px 테두리 + 상단 3px 황동 괘선, 모서리 0 */
.ledger {
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 3px solid var(--brass);
  border-radius: 0;
}

/* ---------- 하위 페이지 머리말 ---------- */
.page-head {
  padding: 48px 0 32px;
}

.page-no {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 28px;
  color: var(--brass);
  line-height: 1;
  margin-bottom: 10px;
}

.page-head h1 {
  font-size: 36px;
}

.page-head .lead {
  margin-top: 10px;
  color: var(--ink-soft);
  font-size: 17px;
}

.page-body {
  padding-bottom: 56px;
}

.page-body > * + * {
  margin-top: 32px;
}

/* ---------- 메인 히어로 ---------- */
.hero {
  padding: 48px 0 56px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  grid-template-areas:
    "copy info"
    "actions info";
  grid-template-rows: auto 1fr;
  gap: 24px 48px;
  align-items: start;
}

.hero-copy {
  grid-area: copy;
  padding-top: 8px;
}

.hero-copy h1 {
  font-size: 40px; /* 계획서: 데스크톱 헤드라인 40px 이하 */
  line-height: 1.3;
}

.hero-sub {
  margin-top: 16px;
  font-size: 17px;
  color: var(--ink-soft);
}

.hero-actions {
  grid-area: actions;
}

/* 필수 광고정보 원장 */
.ad-info {
  grid-area: info;
  padding: 20px 24px 24px;
}

.ad-info h2 {
  font-size: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--ink);
}

.ledger-rows {
  display: grid;
}

.ledger-rows > div {
  display: grid;
  grid-template-columns: minmax(7.5em, auto) minmax(0, 1fr);
  gap: 4px 16px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}

.ledger-rows dt {
  font-size: 15px;
  color: var(--ink-soft);
}

.ledger-rows dd {
  font-size: 16px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.ledger-rows dd a {
  color: var(--green);
}

/* 경고 3문장 박스: 경고색 왼쪽 세로줄 */
.warning-box {
  margin-top: 16px;
  padding: 12px 14px;
  border-left: 4px solid var(--warn);
  background: var(--paper);
  font-size: 15px;
  line-height: 1.6;
}

.warning-box strong {
  color: var(--warn);
}

/* ---------- 조건 요약 ---------- */
.summary-table {
  padding: 4px 24px;
}

.summary-table .ledger-rows > div:last-child {
  border-bottom: 0;
}

/* ---------- 4단계 띠 ---------- */
.steps {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 3px solid var(--brass);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.steps li {
  padding: 20px 20px 24px;
  border-left: 1px solid var(--line);
}

.steps li:first-child {
  border-left: 0;
}

.step-num {
  display: block;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 28px; /* 큰 글자(3:1 기준) — 황동색 번호 장식 */
  line-height: 1;
  color: var(--brass);
  margin-bottom: 12px;
}

.steps h3 {
  font-size: 18px;
  margin-bottom: 6px;
}

.steps p {
  font-size: 15px;
  color: var(--ink-soft);
}

/* ---------- 연락 선택지 2개 (같은 크기) ---------- */
.choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.choice {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px;
}

.choice h3 {
  font-size: 21px;
}

.choice-phone {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.choice .btn {
  margin-top: auto;
  align-self: flex-start;
}

/* ---------- FAQ (details, JS 없음) ---------- */
.faq-list {
  border-top: 1px solid var(--ink);
}

.faq-item {
  border-bottom: 1px solid var(--line);
}

.faq-item summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 4px;
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  font-size: 17px;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  font-family: var(--font-serif);
  font-size: 22px;
  line-height: 1;
  color: var(--green);
  flex-shrink: 0;
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-q {
  font-family: var(--font-serif);
  color: var(--green);
  margin-right: 8px;
}

.faq-a {
  padding: 0 4px 18px;
  color: var(--ink);
}

/* ---------- 대출 시 주의사항 ---------- */
.caution {
  padding: 24px;
}

.caution-lead {
  margin-bottom: 12px;
  color: var(--ink-soft);
}

.caution-list {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 32px;
}

.caution-list li {
  position: relative;
  padding: 10px 0 10px 20px;
  border-bottom: 1px solid var(--line);
}

.caution-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 1.15em;
  width: 7px;
  height: 7px;
  background: var(--warn);
}

/* ---------- 표 (업체소개·상품안내) ---------- */
.ledger-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border-top: 3px solid var(--brass);
  font-variant-numeric: tabular-nums;
}

.ledger-table caption {
  text-align: left;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 20px;
  padding-bottom: 12px;
}

.ledger-table th,
.ledger-table td {
  text-align: left;
  vertical-align: top;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.ledger-table th {
  width: 32%;
  font-weight: 600;
  color: var(--ink-soft);
  font-size: 15px;
  background: var(--paper);
}

.ledger-table td {
  font-weight: 700;
}

.notice-line {
  padding: 14px 16px;
  border-left: 4px solid var(--ink);
  background: var(--surface);
  font-weight: 700;
}

.plain-note {
  color: var(--ink-soft);
  font-size: 15px;
}

.cta-row {
  padding-top: 8px;
}

.product-kind {
  display: grid;
  grid-template-columns: minmax(7.5em, auto) minmax(0, 1fr);
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.product-kind dt {
  color: var(--ink-soft);
  font-size: 15px;
}

.product-kind dd {
  font-weight: 700;
}

/* 금리·총비용 예시의 괄호 단서: 글자 크기는 그대로(모바일 14px 이상 유지), 굵기·색만 낮춤 */
.cond-note {
  font-size: inherit;
  font-weight: 400;
  color: var(--ink-soft);
}

/* 취급 상품 카테고리: 원장 카드 안 칩 그리드 (링크·버튼 아님) */
.categories {
  padding: 24px;
}

.category-grid {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9em, 1fr));
  gap: 8px;
}

.category-grid li {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--green);
  background: var(--paper);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
}

.category-note {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-weight: 700;
}

/* ---------- 이용절차 세로 타임라인 ---------- */
.timeline {
  list-style: none;
  padding: 0;
  position: relative;
}

.timeline li {
  position: relative;
  padding: 0 0 32px 72px;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: 23px;
  top: 48px;
  bottom: 0;
  width: 1px;
  background: var(--line);
}

.timeline li:last-child::before {
  display: none;
}

.timeline .step-num {
  position: absolute;
  left: 0;
  top: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-top: 3px solid var(--brass);
  background: var(--surface);
  font-size: 20px;
  margin: 0;
  color: var(--ink);
}

.timeline h2 {
  font-size: 22px;
  padding-top: 8px;
  margin-bottom: 8px;
}

.timeline p + p {
  margin-top: 8px;
}

.closing {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 19px;
}

/* ---------- 이용안내·유의사항 ---------- */
.notice-card,
.review-empty {
  padding: 24px;
}

.notice-card h2,
.block-title {
  font-size: 22px;
  margin-bottom: 14px;
}

.notice-card > p + p,
.notice-card > p + .warning-box,
.notice-card > .warning-box + p {
  margin-top: 14px;
}

.notice-card strong {
  font-weight: 700;
}

.conditions {
  padding: 14px 16px;
  border: 1px dashed var(--ink-soft);
  line-height: 1.9;
}

/* ---------- 개인정보 처리방침 ---------- */
.policy-intro {
  padding: 20px 24px;
}

.policy {
  list-style: none;
  padding: 0;
  counter-reset: article;
}

.policy > li {
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.policy h2 {
  font-size: 20px;
  margin-bottom: 10px;
}

.policy h2 .num {
  color: var(--brass);
  margin-right: 6px;
}

.policy ul {
  padding-left: 1.2em;
}

.policy li li + li {
  margin-top: 4px;
}

/* ---------- 상담신청 ---------- */
.endpoint-notice {
  padding: 16px 20px;
  border: 2px solid var(--warn);
  background: var(--surface);
}

.endpoint-notice h2 {
  font-size: 19px;
  color: var(--warn);
  margin-bottom: 6px;
}

.apply-grid {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 32px;
  align-items: start;
}

.apply-panel {
  grid-column: 2;
  grid-row: 1;
  padding: 20px 24px;
}

.apply-panel h2 {
  font-size: 20px;
  margin-bottom: 8px;
}

.apply-panel .ledger-rows > div {
  grid-template-columns: minmax(0, 1fr);
  gap: 2px;
}

.apply-panel .ledger-rows dd {
  font-size: 15px;
}

.apply-form-col {
  grid-column: 1;
  grid-row: 1;
}

.consult-form {
  padding: 24px;
}

.field + .field {
  margin-top: 20px;
}

.field label,
.field .label {
  display: block;
  font-weight: 700;
  margin-bottom: 6px;
}

.req {
  color: var(--warn);
  font-weight: 700;
  font-size: 14px;
  margin-left: 4px;
}

.opt {
  color: var(--ink-soft);
  font-weight: 400;
  font-size: 14px;
  margin-left: 4px;
}

.field input[type="text"],
.field input[type="tel"],
.field select,
.field textarea {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1.5px solid var(--ink-soft);
  border-radius: 2px;
  background: #fff;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px; /* iOS 입력 확대 방지 */
  line-height: 1.5;
}

.field textarea {
  min-height: 120px;
  resize: vertical;
}

/* input[type=…] 기본 규칙(0,2,1)보다 구체적이어야 이름·휴대전화 칸에도 적용된다 */
.field input[aria-invalid="true"],
.field select[aria-invalid="true"],
.field textarea[aria-invalid="true"] {
  border-color: var(--warn);
  border-width: 2px;
}

.help {
  margin-top: 6px;
  font-size: 14px;
  color: var(--ink-soft);
}

.memo-meta {
  display: flex;
  justify-content: flex-end; /* 안내 문구 삭제 후 글자 수만 오른쪽 정렬 */
  gap: 12px;
  margin-top: 6px;
  font-size: 14px;
  color: var(--ink-soft);
}

.memo-meta .help {
  margin-top: 0;
  font-weight: 700;
  color: var(--ink);
}

.field-error {
  margin-top: 6px;
  font-size: 14px;
  font-weight: 700;
  color: var(--warn);
}

.consents {
  margin-top: 24px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.consent + .consent {
  margin-top: 14px;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: 700;
  cursor: pointer;
}

.check input {
  width: 22px;
  height: 22px;
  margin: 2px 0 0;
  flex-shrink: 0;
  accent-color: var(--green);
}

.consent details {
  margin: 6px 0 0 32px;
  font-size: 15px;
}

.consent summary {
  cursor: pointer;
  color: var(--green);
  font-weight: 700;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
}

.consent-body {
  margin-top: 6px;
  padding: 12px 14px;
  background: var(--paper);
  border: 1px solid var(--line);
}

.consent-body p + p {
  margin-top: 4px;
}

.consent .field-error {
  margin-left: 32px;
}

.form-summary {
  margin-bottom: 20px;
  padding: 12px 14px;
  border-left: 4px solid var(--warn);
  background: var(--paper);
  font-weight: 700;
  color: var(--warn);
}

.form-actions {
  margin-top: 24px;
}

.form-actions .btn {
  width: 100%;
}

.form-status:not(:empty) {
  margin-top: 16px;
  padding: 12px 14px;
  border-left: 4px solid var(--ink);
  background: var(--paper);
  font-weight: 700;
}

.form-success {
  margin-bottom: 20px;
  padding: 20px 24px;
  border: 2px solid var(--green);
  background: var(--surface);
}

.form-success h2 {
  font-size: 21px;
  color: var(--green);
  margin-bottom: 8px;
}

.receipt {
  margin-top: 8px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.noscript-note {
  margin-bottom: 16px;
  padding: 12px 14px;
  border-left: 4px solid var(--warn);
  background: var(--surface);
  font-weight: 700;
}

/* 허니팟: 화면 밖 배치 (인라인 스타일 금지 → 클래스) */
.hp {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------- 법정 표기 푸터 ---------- */
.legal-footer {
  border-top: 3px solid var(--ink);
  background: var(--surface);
  padding: 36px 0 40px;
  font-size: 15px;
}

.legal-footer p + p {
  margin-top: 4px;
}

.legal-name {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 18px;
  margin-bottom: 8px;
}

.legal-footer .sep {
  color: var(--ink-soft);
  margin: 0 2px;
}

/* 유의사항 문단 1(상품설명서·약관) → 경고 3문장 순서 */
.legal-footer .legal-notice {
  margin-top: 18px;
}

.legal-footer .warning-box {
  margin-top: 12px;
}

.legal-links {
  margin-top: 18px;
  font-weight: 700;
}

.legal-footer p.legal-copy {
  margin-top: 12px;
  color: var(--ink-soft);
  font-size: 14px;
}

/* =========================================================
   데스크톱: 1024px 이상 — 왼쪽 고정 레일(248px) + 본문
   ========================================================= */
@media (min-width: 1024px) {
  .shell {
    display: grid;
    grid-template-columns: var(--rail-width) minmax(0, 1fr);
  }

  .rail {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
  }
}

/* =========================================================
   태블릿·모바일: 1024px 미만 — 레일 → 상단 바 + 오버레이
   ========================================================= */
@media (max-width: 1023.98px) {
  :root {
    --gutter: 24px;
  }

  /* 포커스 가림 방지(WCAG 2.4.11): Tab/Shift+Tab 으로 스크롤될 때
     하단 고정 바(.callbar)·상단 sticky 바(.topbar) 아래로 숨지 않게 여백 확보 */
  html {
    scroll-padding-top: calc(var(--bar-height) + 8px);
    scroll-padding-bottom: calc(var(--bar-height) + env(safe-area-inset-bottom, 0px) + 8px);
  }

  body {
    padding-bottom: calc(var(--bar-height) + env(safe-area-inset-bottom, 0px));
  }

  body.menu-open {
    overflow: hidden;
  }

  .topbar {
    position: sticky;
    top: 0;
    z-index: 70;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--bar-height);
    padding: 0 var(--gutter);
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    color: var(--ink);
  }

  .menu-toggle {
    min-height: 44px;
    min-width: 64px;
    padding: 8px 14px;
    border: 1.5px solid var(--ink);
    border-radius: 2px;
    background: transparent;
    color: var(--ink);
    font-family: var(--font-sans);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
  }

  .menu-toggle[aria-expanded="true"] {
    background: var(--ink);
    color: var(--paper);
  }

  /* 레일이 그대로 전체 화면 오버레이 메뉴가 된다 */
  .rail {
    display: none;
    position: fixed;
    top: var(--bar-height);
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 60;
    overflow-y: auto;
    padding: 24px var(--gutter) 32px;
  }

  .menu-open .rail {
    display: flex;
  }

  .rail > .wordmark {
    display: none;
  }

  .rail-menu a {
    font-size: 18px;
    padding: 14px 4px;
  }

  .callbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    display: grid;
    grid-template-columns: 1fr 1fr; /* 1:1 사각 버튼 */
    height: calc(var(--bar-height) + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    border-top: 2px solid var(--green);
    background: var(--surface);
  }

  .callbar a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 0 8px;
    text-decoration: none;
    font-weight: 700;
    line-height: 1.25;
    text-align: center;
  }

  .callbar-call {
    background: var(--green);
    color: var(--paper);
  }

  .callbar-call:hover {
    color: var(--paper);
  }

  .callbar-label {
    font-size: 14px;
  }

  .callbar-num {
    font-size: 16px;
    font-variant-numeric: tabular-nums;
  }

  .callbar-apply {
    background: var(--surface);
    color: var(--ink);
    font-size: 16px;
  }

  .callbar-apply:hover {
    color: var(--green);
  }

  .callbar :focus-visible {
    outline-offset: -4px;
  }

  .callbar-call:focus-visible {
    outline-color: var(--paper);
  }
}

/* =========================================================
   모바일: 640px 미만 — 1단
   ========================================================= */
@media (max-width: 639.98px) {
  :root {
    --gutter: 16px;
  }

  body {
    font-size: 15px;
  }

  .hero {
    padding: 20px 0 40px;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "copy"
      "info"
      "actions";
    grid-template-rows: auto;
    gap: 16px;
  }

  .hero-copy {
    padding-top: 0;
  }

  .hero-copy h1 {
    font-size: 26px; /* 계획서: 모바일 헤드라인 26px 이하 */
  }

  .hero-sub {
    margin-top: 8px;
    font-size: 15px;
  }

  .hero-actions .btn {
    flex: 1 1 100%;
  }

  .ad-info {
    padding: 14px 16px 16px;
  }

  .ad-info h2 {
    font-size: 18px;
    padding-bottom: 8px;
  }

  .ledger-rows > div {
    grid-template-columns: 7em minmax(0, 1fr);
    gap: 2px 10px;
    padding: 7px 0;
  }

  .ledger-rows dt {
    font-size: 14px;
  }

  .warning-box {
    font-size: 14px;
    padding: 10px 12px;
  }

  .section {
    padding: 40px 0;
  }

  .section-head h2 {
    font-size: 23px;
  }

  .summary-table {
    padding: 2px 16px;
  }

  .steps {
    grid-template-columns: minmax(0, 1fr);
  }

  .steps li {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 16px;
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 0 12px;
  }

  .steps li:first-child {
    border-top: 0;
  }

  .steps .step-num {
    grid-row: span 2;
    margin: 0;
  }

  .choice-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .choice {
    padding: 20px 16px;
  }

  .choice .btn {
    align-self: stretch;
  }

  .caution {
    padding: 16px;
  }

  .caution-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .page-head {
    padding: 28px 0 20px;
  }

  .page-head h1 {
    font-size: 28px;
  }

  .page-head .lead {
    font-size: 15px;
  }

  .ledger-table th,
  .ledger-table td {
    display: block;
    width: 100%;
    padding: 10px 12px;
  }

  .ledger-table th {
    border-bottom: 0;
    padding-bottom: 2px;
  }

  .ledger-table td {
    padding-top: 2px;
  }

  .product-kind {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }

  .categories {
    padding: 16px;
  }

  /* 320px 폭에서도 2열 유지: (256 - 8) / 2 = 124px 칸 ≥ 7글자 × 14px + 좌우 여백 20px = 118px */
  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .category-grid li {
    font-size: 14px;
    padding: 8px 10px 8px 9px;
  }

  .timeline li {
    padding-left: 60px;
  }

  .timeline h2 {
    font-size: 19px;
  }

  .notice-card,
  .review-empty,
  .policy-intro {
    padding: 16px;
  }

  .apply-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }

  .apply-panel,
  .apply-form-col {
    grid-column: 1;
    grid-row: auto;
  }

  .apply-panel {
    padding: 16px;
  }

  .consult-form {
    padding: 16px;
  }

  .legal-footer {
    font-size: 14px;
  }
}

/* 움직임 줄이기 */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- 대출후기 (사용자 제공 캡처, 2026-10-05) ---------- */
.review-block {
  padding: 24px;
}

.review-list {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
  gap: 24px;
  align-items: start;
}

.review-item figure {
  margin: 0;
}

/* 영상 기본: 9:16 녹화본(폰 목업은 영상 안에 있음, 후기 목록 안에서는 아래 영상 카드 규칙이 흰 여백을 잘라 냄). 로딩 전 배경 = 첫 화면 대화 배경색 #abc0d1. */
.material-video {
  display: block;
  box-sizing: border-box;
  width: 100%;
  height: auto;
  aspect-ratio: 9 / 16;
  object-fit: contain;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #abc0d1;
}

/* 사진 폰 화면(figure·확대 링크): 9:16 창. 캡처는 화면 폭에 꽉 맞추고(폭 100%, 높이는 원본 비율, 자르지 않음) 가독성을 우선한다(사용자 변경 3, 2026-10-05).
   화면보다 짧은 캡처는 세로 가운데 + 여백 #abc0d1(메신저 캡처 배경 픽셀값), 긴 캡처는 위에서 시작해 js/ticker.js 가 머무는 동안 천천히 아래로 스크롤한다. */
.ticker-list > li > figure,
.material-zoom {
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border-radius: 11% / 6.2%;
  background: #abc0d1;
}

.review-item img,
.material-zoom img {
  display: block;
  flex: none;
  box-sizing: border-box;
  width: 100%;
  height: auto;
  margin: auto 0;
  padding: 0;
  border: 0;
}

.review-item figcaption {
  margin-top: 8px;
  font-size: 14px;
  color: var(--ink-soft);
}

#summary-reviews .notice-line {
  margin-top: 20px;
}

@media (max-width: 639px) {
  .review-block {
    padding: 16px;
  }
}

/* ---------- 후기 폰 프레임 자동 전환 (js/ticker.js) ----------
   카드가 제자리에 고정되고 몇 초마다 다음 묶음으로 크로스페이드(영상 묶음 → 사진 묶음 → 처음).
   한 번에 보이는 카드 수 = --ticker-cols(640px 미만 1장, 이상 2장, 사용자 결정 9). JS 가 이 값을 읽어 묶음을 만든다.
   페이드·캡처 스크롤은 Web Animations API 라 위의 전역 prefers-reduced-motion 규칙(CSS transition·animation 끔)과 무관하게 동작한다(사용자 결정 2026-10-05).
   JS 가 없으면 2열 격자에 모든 항목이 정지 상태로 보인다(긴 캡처는 화면 안에서 직접 스크롤).
   폰 프레임은 이미지 파일 없이 CSS 만: 사진 카드 li = 베젤, 안의 figure·확대 링크 = 화면. 영상 카드는 프레임 없음(녹화본에 목업이 있음).
   가독성 우선(변경 3·5·9): 카드는 최대한 크게 — 모바일은 1장 + 좌우로 12px 넓힘, PC 는 사진 폰 최대 350px·영상 카드 최대 420px.
   세로 상한: 사진 폰 높이 ≤ 화면 높이 약 75%(폭 ≤ 41.5vh), 영상 카드 높이 ≤ 약 90%(폭 ≤ 44vh, 640px 미만은 상단·하단 바 사이 높이). */
.ticker {
  --ticker-cols: 1;
  --phone-max: 350px;
  --video-max: 420px;
  --ticker-gap: 8px;
  --ticker-bleed: 12px;
  --bezel-y: 5.5%;
  --bezel-x: 2.5%;
  --phone-bezel: var(--green-deep);
  --phone-edge: var(--brass);
  --phone-detail: rgba(246, 243, 234, 0.28);
  --phone-shadow: 0 12px 28px rgba(19, 61, 46, 0.22), 0 2px 6px rgba(19, 61, 46, 0.12);
  width: calc(100% + var(--ticker-bleed) * 2);
  max-width: calc(var(--video-max) * 2 + var(--ticker-gap));
  min-width: 0;
  margin: 16px auto 0;
  margin-inline: calc(var(--ticker-bleed) * -1);
}

/* JS 없음: 모든 폭 2열 격자(정지). */
.review-list.ticker-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--ticker-gap);
  align-items: start;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* 베젤: % 패딩·모서리는 폭 기준이라 폰 크기에 비례(위아래 --bezel-y, 좌우 --bezel-x). */
.ticker-list > li {
  position: relative;
  justify-self: center;
  align-self: center;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  max-width: min(var(--phone-max), 41.5vh);
  padding: var(--bezel-y) var(--bezel-x);
  border: 1px solid var(--phone-edge);
  border-radius: 15% / 8.35%;
  background: var(--phone-bezel);
  box-shadow: var(--phone-shadow);
}

/* 상단 스피커(::before, 높이 = 폭 22% / 8)·카메라(::after): 위쪽 베젤 안 세로 가운데(화면을 가리지 않음). */
.ticker-list > li::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 22%;
  aspect-ratio: 8 / 1;
  margin-top: calc((var(--bezel-y) - 2.75%) / 2);
  transform: translateX(-50%);
  border-radius: 999px;
  background: var(--phone-detail);
}

.ticker-list > li::after {
  content: "";
  position: absolute;
  top: 0;
  left: calc(50% + 15%);
  width: 3.2%;
  aspect-ratio: 1;
  margin-top: calc((var(--bezel-y) - 3.2%) / 2);
  border-radius: 50%;
  background: var(--phone-detail);
}

/* 영상 카드: 녹화본 안에 이미 폰 목업이 있으므로 CSS 폰 프레임을 씌우지 않는다(사용자 변경 2026-10-05).
   녹화본(1080x1920)은 목업 좌우에 흰 여백이 있다(변경 4·5). 영상 파일은 그대로 두고 CSS 로 목업 외곽에 딱 맞게 잘라 낸다:
   ffmpeg 프레임 측정(7개 영상 모두 같음): 목업 x 68~1011·y 0~1919, 좌우 대칭, 바깥 모서리 반경 약 155px.
   바깥 12px(x 68~79, 위아래 0~11)은 밝은·회색 은색 테두리(RGB 183~235)라 흰/연회색 테두리처럼 보여 함께 잘라 낸다(사용자 보고 10).
   → 보이는 영역 x 80~999·y 12~1907 = 920x1896: 감싸개(li) 비율 920:1896 + overflow hidden + 모서리 150/920 · 150/1896,
   영상은 아래 규칙에서 위아래로 12px 씩 넘치게 키우고 cover 로 채움(좌우 80px 씩 잘림, controls 는 하단에 그대로). */
/* 세로 상한(640px 미만): 카드 높이 ≤ 화면 높이 − 상단 바 − 하단 고정 바(각 --bar-height) − 여백 20px
   → 재생바가 하단 바에 가리지 않는다(리뷰 2026-10-05). 폭 = 그 높이 × 920 / 1896. svh 미지원이면 vh 줄을 쓴다. */
.ticker-list > li:has(> .material-video) {
  max-width: min(var(--video-max), calc((100vh - var(--bar-height) * 2 - 20px) * 920 / 1896));
  max-width: min(var(--video-max), calc((100svh - var(--bar-height) * 2 - env(safe-area-inset-bottom, 0px) - 20px) * 920 / 1896));
  aspect-ratio: 920 / 1896;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 16.3% / 7.91%;
  background: none;
  box-shadow: none;
}

.ticker-list > li:has(> .material-video)::before,
.ticker-list > li:has(> .material-video)::after {
  content: none;
}

/* 영상 요소 자체도 같은 모서리로 둥글게: 하단 controls 의 검은 그라데이션 띠가 목업 모서리 밖으로 나오지 않게. */
.ticker-list > li > .material-video {
  width: 100%;
  height: auto;
  aspect-ratio: 920 / 1920;
  margin-top: -1.304%; /* 위 12px(영상 기준) = 12 / 920 × 폭 */
  border-radius: inherit;
  object-fit: cover;
  object-position: 50% 50%;
}

/* 영상 확대 버튼(js/lightbox.js 가 만듦): 카드 위쪽을 덮는 투명 영역. 아래쪽 20% 는 비워 둬 controls(재생바)를 그대로 쓴다. */
.video-zoom {
  position: absolute;
  inset: 0 0 20% 0;
  z-index: 1;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.video-zoom:focus-visible {
  outline: 3px solid var(--phone-edge);
  outline-offset: -3px;
}

.material-zoom {
  cursor: zoom-in;
}

/* JS 없음: 긴 캡처는 화면 안에서 직접 스크롤. */
.ticker:not(.is-running) .ticker-list > li > figure,
.ticker:not(.is-running) .material-zoom {
  overflow-y: auto;
}

/* JS 실행 시: 열 수 = --ticker-cols. 모든 항목을 같은 줄에 겹쳐 쌓고(칸은 JS 가 grid-column 으로 지정) 현재 묶음(is-active)만 보인다.
   줄 높이 = 가장 큰 카드 높이로 고정 → 묶음이 바뀌어도 영역 높이가 출렁이지 않는다.
   나가는 묶음(is-leaving)은 페이드가 끝날 때까지 보인 채 JS 가 opacity 1 → 0 으로 내린다. */
.ticker.is-running .review-list.ticker-list {
  grid-template-columns: repeat(var(--ticker-cols), minmax(0, 1fr));
}

.ticker.is-running .ticker-list > li {
  grid-row: 1;
  opacity: 0;
  visibility: hidden;
}

.ticker.is-running .ticker-list > li.is-active {
  opacity: 1;
  visibility: visible;
  z-index: 2;
}

.ticker.is-running .ticker-list > li.is-leaving {
  opacity: 1;
  visibility: visible;
  z-index: 1;
}

@media (min-width: 640px) {
  .ticker {
    --ticker-cols: 2;
    --ticker-gap: 20px;
    --ticker-bleed: 0px;
    --bezel-y: 8%;
    --bezel-x: 4%;
    margin-inline: auto;
  }

  /* 640px 이상: 영상 카드 높이 ≤ 화면 높이 약 90%(폭 ≤ 44vh). */
  .ticker-list > li:has(> .material-video) {
    max-width: min(var(--video-max), 44vh);
  }
}

/* 영상 확대 보기(js/lightbox.js 의 같은 dialog): 화면 높이에 맞춰 재생. */
.lightbox.is-video {
  width: auto;
}

.lightbox-video {
  display: block;
  width: auto;
  max-width: 100%;
  height: calc(94vh - 64px);
  margin: 0 auto;
  background: #ffffff;
}

/* 사진 확대 보기 (js/lightbox.js): 원본 크기(가로 1080px)까지, 화면이 좁으면 화면 폭에 맞춤. 비율은 원본 그대로 */
.lightbox {
  width: min(96vw, 1080px);
  max-width: 96vw;
  max-height: 94vh;
  padding: 0;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}

.lightbox[open] {
  display: flex;
  flex-direction: column;
}

.lightbox::backdrop {
  background: rgba(0, 0, 0, 0.75);
}

.lightbox-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
}

.lightbox-title {
  margin: 0;
  font-weight: 700;
}

.lightbox-close {
  min-width: 48px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.lightbox-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.lightbox-img {
  display: block;
  width: 100%;
  height: auto;
}
