/* =====================================================================
   동물칩 등록 (chip-register.html) — 사이트 레이아웃 + 5단계 폼
   account.css(폼 필드) + components.css(상품카드) 와 함께 사용
   ===================================================================== */
.reg-main { padding: 36px 0 80px; }

/* 서브탭 */
.reg-tabs { display: flex; gap: 28px; border-bottom: 1px solid var(--neutral-90); margin-bottom: 44px; overflow-x: auto; scrollbar-width: none; }
.reg-tabs::-webkit-scrollbar { display: none; }
.reg-tab { position: relative; padding: 0 2px 16px; font-size: var(--fs-base); font-weight: var(--fw-semibold); color: var(--neutral-50); }
.reg-tab.is-active { color: var(--neutral-10); }
.reg-tab.is-active::after { content: ""; position: absolute; left: 0; bottom: -1px; width: 100%; height: 2px; background: var(--orange-65); }

/* 위저드 (중앙 460) */
.reg-wizard { max-width: 480px; margin: 0 auto; }
.reg-head { font-size: var(--fs-xl); font-weight: var(--fw-bold); color: var(--neutral-10); line-height: var(--lh-heading); letter-spacing: var(--tracking); }
.reg-subhead { margin: 8px 0 28px; font-size: 14px; color: var(--neutral-50); line-height: var(--lh-body); }

/* 안내 박스 */
.notice-box { border: 1px solid var(--orange-90); border-radius: var(--radius-sm); padding: 22px; margin-bottom: 22px; background: var(--orange-100); }
.notice-box h4 { font-size: 14px; font-weight: 700; color: var(--orange-60); margin: 14px 0 6px; }
.notice-box h4:first-child { margin-top: 0; }
.notice-box p, .notice-box li { font-size: 13px; color: var(--neutral-40); line-height: 1.7; }
.notice-box ol { padding-left: 18px; list-style: decimal; }

/* 단계 이동 버튼 */
.reg-actions {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin-top: 26px;
}
.reg-actions .btn-line,
.reg-actions .btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
  height: 56px;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s, transform .15s;
}
.reg-actions .btn-line {
  border: 1px solid var(--neutral-80);
  background: #fff;
  color: var(--neutral-30);
  box-shadow: 0 6px 14px rgba(16, 24, 40, .04);
}
.reg-actions .btn-line:hover {
  border-color: var(--orange-80);
  background: var(--orange-100);
  color: var(--orange-60);
}
.reg-actions .btn-primary {
  border: 1px solid var(--orange-65);
  background: var(--orange-65);
  color: #fff;
  box-shadow: 0 10px 22px rgba(255, 95, 32, .18);
}
.reg-actions .btn-primary:hover { background: var(--orange-60); border-color: var(--orange-60); }
.reg-actions .btn-line:active,
.reg-actions .btn-primary:active { transform: translateY(1px); }
.reg-actions .btn-primary:disabled {
  border-color: var(--neutral-85, var(--neutral-90));
  background: var(--neutral-90);
  color: var(--neutral-50);
  box-shadow: none;
  cursor: not-allowed;
}

/* 세그먼트 토글 (강아지/고양이, 중성화) */
.seg { display: flex; gap: 8px; }
.seg button { flex: 1; height: 50px; border: 1px solid var(--neutral-80); border-radius: var(--radius-sm); background: #fff; font-size: 15px; color: var(--neutral-40); transition: background .15s, border-color .15s, color .15s, box-shadow .15s; }
.seg button:hover { border-color: var(--orange-80); }
.seg button.is-on { background: var(--orange-65); border-color: var(--orange-65); color: #fff; font-weight: 600; box-shadow: 0 6px 14px rgba(255,95,32,.16); }

/* 주민번호 인라인 */
.rrn { display: flex; align-items: center; gap: 10px; }
.rrn .field__box { flex: 1 1 0; min-width: 0; }
.rrn input { flex: 1; padding-right: 16px; text-align: center; letter-spacing: .04em; }
.rrn span { flex: 0 0 auto; color: var(--neutral-60); font-weight: 700; }
.field__caption { word-break: keep-all; }

/* 서명 */
.sign-pad { width: 100%; height: 200px; background: var(--neutral-95); border: 1px solid var(--neutral-90); border-radius: var(--radius-sm); touch-action: none; cursor: crosshair; }
.sign-actions { display: flex; gap: 8px; margin-top: 16px; }
.sign-actions .btn-line { flex: 0 0 120px; height: 54px; border: 1px solid var(--neutral-80); border-radius: var(--radius-sm); background: #fff; color: var(--neutral-40); font-size: 15px; font-weight: 600; }
.sign-actions .btn-line:hover { border-color: var(--orange-80); color: var(--orange-60); }
.sign-actions .btn-primary { flex: 1; }

/* 완료 */
.reg-complete { display: none; text-align: center; padding-top: 8px; }
.reg-complete.is-active { display: block; }
.reg-complete__check { width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 50%; background: var(--orange-65); display: flex; align-items: center; justify-content: center; }
.reg-complete__check::after { content: ""; width: 22px; height: 12px; border-left: 3px solid #fff; border-bottom: 3px solid #fff; transform: rotate(-45deg) translateY(-2px); }
.reg-complete__title { font-size: 24px; font-weight: 700; color: var(--neutral-10); margin-bottom: 40px; }

.rec-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; text-align: left; margin-bottom: 64px; }
.rec-card { position: relative; background: var(--neutral-95); border-radius: var(--radius-md); padding: 20px; min-height: 150px; overflow: hidden; }
.rec-card__label { font-size: 12px; color: var(--neutral-50); }
.rec-card__title { display: block; margin-top: 4px; font-size: 17px; font-weight: 700; color: var(--neutral-10); }
.rec-card__btn { display: inline-block; margin-top: 14px; padding: 8px 14px; border: 1px solid var(--neutral-80); border-radius: var(--radius-pill); background: #fff; font-size: 12px; font-weight: 500; color: var(--neutral-40); }
.rec-card__thumb { position: absolute; right: 16px; bottom: 16px; width: 70px; height: 70px; border-radius: 50%; overflow: hidden; }
.rec-card__thumb img { width: 100%; height: 100%; object-fit: cover; }

.reg-complete h2.ctitle { text-align: left; font-size: var(--fs-title-sm); margin-bottom: 24px; letter-spacing: var(--tracking); }
.reg-store-btn { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 56px; margin-top: 40px; background: var(--orange-65); color: #fff; border-radius: var(--radius-sm); font-size: 16px; font-weight: 600; text-decoration: none; box-shadow: 0 8px 18px rgba(255,95,32,.18); }
.reg-store-btn:hover { background: var(--orange-60); }

.postcode-layer { position: fixed; inset: 0; z-index: 10000; display: none; align-items: center; justify-content: center; padding: 20px; background: rgba(17,17,17,.42); }
.postcode-layer.is-open { display: flex; }
.postcode-layer__panel { width: min(520px, 100%); height: min(640px, calc(100vh - 40px)); overflow: hidden; border-radius: 14px; background: #fff; box-shadow: 0 22px 50px rgba(0,0,0,.22); }
.postcode-layer__head { display: flex; align-items: center; justify-content: space-between; height: 52px; padding: 0 16px; border-bottom: 1px solid var(--neutral-90); }
.postcode-layer__head strong { font-size: 15px; font-weight: 800; color: var(--neutral-10); }
.postcode-layer__head button { height: 34px; padding: 0 12px; border: 1px solid var(--neutral-80); border-radius: var(--radius-sm); background: #fff; color: var(--neutral-40); font-size: 13px; font-weight: 700; }
.postcode-layer__body { height: calc(100% - 52px); }

@media (max-width: 768px) {
  .reg-main { padding: 28px 0 64px; }
  .reg-tabs { gap: 20px; margin-bottom: 32px; padding-bottom: 1px; }
  .reg-tab { flex: 0 0 auto; }
  .reg-head { font-size: 19px; }
  .reg-subhead { margin-bottom: 22px; }
  .rec-cards { grid-template-columns: 1fr; }
  .reg-actions { grid-template-columns: 92px minmax(0, 1fr); gap: 10px; margin-top: 22px; }
  .reg-actions .btn-line,
  .reg-actions .btn-primary { height: 54px; font-size: 16px; }
  .rrn { gap: 7px; }
  .rrn input { padding-left: 10px; padding-right: 10px; font-size: 14px; }
  .sign-actions { flex-direction: column; }
  .sign-actions .btn-line { flex: none; width: 100%; }
  .postcode-layer { align-items: flex-end; padding: 10px; }
  .postcode-layer__panel { height: min(620px, calc(100vh - 20px)); border-radius: 14px 14px 8px 8px; }
}
