@font-face { font-family: 'SCDream'; src: url('../fonts/SCDream1.otf') format('opentype'); font-weight: 100; }
@font-face { font-family: 'SCDream'; src: url('../fonts/SCDream2.otf') format('opentype'); font-weight: 200; }
@font-face { font-family: 'SCDream'; src: url('../fonts/SCDream3.otf') format('opentype'); font-weight: 300; }
@font-face { font-family: 'SCDream'; src: url('../fonts/SCDream4.otf') format('opentype'); font-weight: 400; }
@font-face { font-family: 'SCDream'; src: url('../fonts/SCDream5.otf') format('opentype'); font-weight: 500; }
@font-face { font-family: 'SCDream'; src: url('../fonts/SCDream6.otf') format('opentype'); font-weight: 600; }
@font-face { font-family: 'SCDream'; src: url('../fonts/SCDream7.otf') format('opentype'); font-weight: 700; }
@font-face { font-family: 'SCDream'; src: url('../fonts/SCDream8.otf') format('opentype'); font-weight: 800; }

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

.kb-toast {
  position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%);
  background: rgba(30,30,30,0.88); color: #fff;
  padding: 13px 28px; border-radius: 24px;
  font-size: 14px; font-weight: 500; letter-spacing: -0.01em;
  z-index: 9999; pointer-events: none;
  opacity: 0; transition: opacity 0.3s;
  white-space: nowrap;
}
.kb-toast.show { opacity: 1; }

:root {
  --gold: #B89650;
  --gold-light: #D4AF6A;
  --black: #1A1A1A;
  --gray: #666;
  --gray-light: #F5F5F3;
  --border: #E0D9CE;
  --header-h: 64px;
}

html { font-size: 16px; }
body {
  font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--black);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }

/* ── 헤더 ── */
.kb-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: #fff;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
}
.kb-header--border {
  border-bottom: 1px solid var(--border);
}
.kb-header-left { display: flex; align-items: center; gap: 16px; }
.kb-menu-btn {
  background: none; border: none; cursor: pointer;
  display: flex; align-items: center; padding: 4px;
}
.kb-menu-logo {
  display: block;
  height: 37px;
  width: auto;
}
.kb-logo {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -40%);
  font-family: 'SCDream', sans-serif;
  font-size: 18px; font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--black);
  white-space: nowrap;
}
.kb-phone-text { display: none; }
@media (min-width: 640px) {
  .kb-phone-text { display: inline; }
  .kb-logo { font-size: 18px; }
}
.kb-header-right { display: flex; align-items: center; gap: 2px; }
@media (min-width: 640px) {
  .kb-header-right { gap: 14px; }
}
.kb-icon-btn {
  background: none; border: none; cursor: pointer;
  color: var(--black); padding: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; line-height: 1;
}
.kb-kakao-btn { color: var(--black); }
.kb-phone-btn { color: var(--black); }

/* ── 드로어 메뉴 ── */
.kb-drawer {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: 280px;
  background: #fff;
  z-index: 300;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
}
.kb-drawer.open { transform: translateX(0); }
.kb-drawer-header {
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 4px 20px 0;
  background: rgba(0,0,0,0.04);
}
.kb-drawer-title {
  font-family: 'SCDream', sans-serif;
  font-size: 18px; font-weight: 800;
  letter-spacing: -0.02em;
}
.kb-drawer-close {
  background: none; border: none; cursor: pointer;
  font-size: 22px; color: var(--gray); padding: 4px;
}
.kb-drawer nav ul { list-style: none; padding: 0; margin: 0; }
.kb-drawer nav ul li button {
  display: block; width: 100%; padding: 20px 24px;
  font-size: 17px; font-weight: 500;
  letter-spacing: -0.02em;
  border: none; border-bottom: 1px solid var(--gray-light);
  background: none; cursor: pointer;
  text-align: left; font-family: 'Pretendard Variable', Pretendard, sans-serif; color: inherit;
  transition: color 0.15s, background 0.15s;
}
.kb-drawer nav ul li button:hover {
  color: var(--gold); background: var(--gray-light);
}
.kb-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 250;
}
.kb-overlay.open { display: block; }

/* ── 메인 ── */
.kb-main { margin-top: var(--header-h); }

/* Rhymix 페이지 모듈 자동 제목 숨기기 */
.kb-main .document_title,
.kb-page-content h1,
.kb-page-content .title { display: none; }
.kb-page-content { padding: 0; }
.kb-page-content:empty { display: none; }

/* 한국어 줄바꿈 - 음절 단위 잘림 방지 */
.kb-page-content, .kb-page-wrap,
.rhymix_content, .xe_content {
  word-break: keep-all;
  overflow-wrap: break-word;
}

/* ── 금시세 섹션 ── */
.kb-price-section {
  background: var(--gray-light);
  padding: 32px 20px 36px;
}
.kb-price-date {
  font-size: 12px; color: var(--gray);
  letter-spacing: 0.02em;
}

/* ── 금시세 보드 ── */
.kb-price-board { display: flex; flex-direction: column; gap: 6px; }
.kb-pb-title-bar {
  background: rgba(255,255,255,0.6);
  border: 1px solid rgba(0,0,0,0.08);
  color: var(--black);
  padding: 17px 16px 12px;
  border-radius: 6px;
  font-family: 'SCDream', sans-serif;
  font-size: 16px; font-weight: 700;
  letter-spacing: -0.02em;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.kb-pb-title-main {
  text-align: center;
}
.kb-pb-title-unit {
  position: absolute;
  right: 16px;
  font-size: 11px; font-weight: 400;
  color: rgba(0,0,0,0.5);
  letter-spacing: 0;
}
.kb-pb-header, .kb-pb-row {
  display: grid;
  grid-template-columns: 64px 1fr 1fr;
  gap: 6px;
}
.kb-pb-hd {
  background: rgba(0,0,0,0.07);
  border: 1px solid rgba(0,0,0,0.1);
  color: var(--black);
  font-size: 14px; font-weight: 700;
  letter-spacing: -0.01em;
  padding: 11px 6px;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
}
.kb-pb-metal {
  background: rgba(0,0,0,0.07);
  border: 1px solid rgba(0,0,0,0.1);
  color: var(--black);
  font-size: 14px; font-weight: 700;
  letter-spacing: -0.02em;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 6px;
  text-align: center;
}
.kb-pb-cell {
  background: #fff;
  border-radius: 6px;
  padding: 14px 16px;
  display: flex; flex-direction: column;
  align-items: flex-end; justify-content: center;
  gap: 5px; text-align: right;
  min-height: 70px;
}
.kb-pb-price {
  font-size: 17px; font-weight: 700;
  color: var(--black);
  letter-spacing: -0.03em; line-height: 1;
  font-variant-numeric: tabular-nums;
}
.kb-pb-product {
  font-size: 13px; font-weight: 700;
  color: var(--black);
  letter-spacing: -0.02em; line-height: 1.4;
}
.kb-pb-diff {
  font-size: 12px; font-weight: 600; line-height: 1;
  font-variant-numeric: tabular-nums;
}
.up   { color: #C62828; }
.down { color: #1565C0; }
.kb-price-loading {
  text-align: center; padding: 40px 0;
  color: #fff; font-size: 14px;
}

/* ── 일반 페이지 콘텐츠 ── */
.kb-page-wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 48px 16px 40px;
}
.kb-page-wrap > *:last-child {
  margin-bottom: 0;
}
@media (min-width: 640px) {
  .kb-page-wrap {
    padding-left: 24px;
    padding-right: 24px;
  }
}
.kb-page-wrap:has(+ .kb-page-wrap) {
  padding-bottom: 24px;
}
.kb-page-wrap + .kb-page-wrap,
.kbp-wrap + .kb-page-wrap {
  padding-top: 0;
}
.kbp-wrap + .kb-page-wrap > .kb-divider:first-child {
  margin-top: 0 !important;
}
.kb-page-wrap + .kb-page-wrap > h3:first-child {
  margin-top: 0;
}
.kb-page-wrap h2 {
  font-family: 'SCDream', sans-serif;
  font-size: 22px; font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 28px;
  color: var(--black);
}
.kb-page-wrap h2:first-of-type {
  font-size: 19px;
  color: var(--black);
  font-family: 'Pretendard Variable', Pretendard, sans-serif;
  font-weight: 700;
  margin-bottom: 12px;
}
.kb-page-wrap h3 {
  font-size: 16px; font-weight: 700;
  color: var(--gold);
  letter-spacing: -0.02em;
  margin: 32px 0 12px;
}
.kb-page-wrap p {
  font-size: 15px; line-height: 1.9;
  color: #444;
  letter-spacing: -0.01em;
  margin-bottom: 14px;
}
.kb-page-wrap ul {
  list-style: none; padding: 0;
  margin-bottom: 14px;
}
.kb-page-wrap ul li {
  font-size: 15px; line-height: 1.9;
  color: #444; padding-left: 16px;
  position: relative;
  letter-spacing: -0.01em;
}
.kb-page-wrap ul li::before {
  content: '·'; position: absolute; left: 0;
  color: var(--gold); font-weight: 700;
}
.kb-notice-box {
  background: var(--gray-light);
  border-left: 3px solid var(--gold);
  padding: 20px 20px 20px 20px;
  border-radius: 0 4px 4px 0;
  margin: 20px 0;
}
.kb-notice-box p, .kb-notice-box ul li { color: #555; font-size: 14px; }
.kb-step {
  display: flex; gap: 16px; align-items: flex-start;
  margin-bottom: 20px;
}
.kb-step-num {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--black); color: var(--gold-light);
  font-size: 14px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 2px;
}
.kb-step-text { font-size: 15px; line-height: 1.8; color: #444; }
.kb-divider {
  border: none; border-top: 1px solid var(--border);
  margin: 36px 0;
}
.kb-cta {
  display: flex; gap: 12px; flex-wrap: wrap;
  margin-top: 32px;
}
.kb-cta a {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 24px;
  font-size: 15px; font-weight: 700;
  border-radius: 4px;
  letter-spacing: -0.02em;
  text-decoration: none;
}
.kb-cta-primary { background: var(--black); color: #fff; }
.kb-cta-secondary { background: var(--gray-light); color: var(--black); border: 1px solid var(--border); }

/* ── 연락처/오시는 길 섹션 ── */
.kb-contact-section {
  padding-top: 40px;
  padding-left: 20px;
  padding-right: 20px;
  padding-bottom: 60px;
  background: var(--gray-light);
}
.kb-section-title {
  font-family: 'SCDream', sans-serif;
  font-size: 17px; font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: -0.03em;
}
.kb-contact-cards { display: flex; flex-direction: column; gap: 14px; }
.kb-contact-card {
  background: rgba(255,255,255,0.6);
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 6px;
  padding: 20px;
  min-height: 100px;
  display: flex; align-items: flex-start;
}
.kb-contact-label {
  display: flex; align-items: center; gap: 6px;
  font-size: 15px; font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--black); margin-bottom: 8px;
}
.kb-contact-label i { font-size: 17px; line-height: 1; margin-top: -2px; }
.kb-contact-value {
  font-size: 15px; font-weight: 700;
  letter-spacing: -0.02em; line-height: 1.4;
  padding-left: 23px;
}
.kb-contact-sub {
  font-size: 11px; color: var(--gray); margin-top: 3px;
  padding-left: 23px;
}
.kb-contact-value--sm {
  font-size: 15px;
}
.kb-btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}
.kb-map-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px;
  background: rgba(255,255,255,0.6);
  border: 1px solid rgba(0,0,0,0.1);
  color: var(--black);
  font-size: 15px;
  font-weight: 700;
  border-radius: 6px;
  letter-spacing: -0.02em;
  transition: background 0.15s;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
}
.kb-map-btn:hover { background: rgba(255,255,255,0.9); }

/* ── 푸터 ── */
.kb-footer {
  position: relative;
  background: var(--black);
  padding: 32px 20px;
  color: #fff;
  font-size: 12px; line-height: 1.8;
  letter-spacing: -0.01em;
  text-align: center;
}
.kb-footer-inner {
  display: block;
}
.kb-footer strong {
  display: block; color: #fff;
  font-size: 14px; margin-bottom: 10px;
  font-family: 'SCDream', sans-serif;
  letter-spacing: -0.02em;
}
.kb-admin-fab {
  position: absolute;
  bottom: 20px; right: 20px;
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  line-height: 1;
  font-size: 20px;
  display: flex; align-items: center;
  transition: color 0.15s;
}
.kb-admin-fab:hover { color: #fff; }

/* ── 반응형 ── */
@media (min-width: 640px) {
  .kb-header { padding: 0 36px; }
  .kb-logo { font-size: 26px; }
  .kb-pb-title-bar { font-size: 18px; }
  .kb-icon-btn { font-size: 26px; }
  .kb-price-section { padding: 40px 36px 48px; }
  .kb-pb-header, .kb-pb-row { grid-template-columns: 80px 1fr 1fr; gap: 8px; }
  .kb-pb-price { font-size: 20px; }
  .kb-pb-diff { font-size: 13px; }
  .kb-pb-metal { font-size: 15px; }
  .kb-pb-hd { font-size: 15px; padding: 12px 8px; }
  .kb-pb-cell { min-height: 78px; padding: 16px 14px; }
  .kb-contact-section { padding-left: 36px; padding-right: 36px; padding-bottom: 72px; }
  .kb-contact-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
  .kb-map-wrap { aspect-ratio: 16/7; }
}

@media (min-width: 960px) {
  .kb-price-section { padding: 48px max(36px, calc(50vw - 440px)) 56px; }
  .kb-price-header { max-width: 600px; margin: 0 auto; }
  .kb-price-board { max-width: 600px; margin: 0 auto; }
  .kb-pb-header, .kb-pb-row { grid-template-columns: 90px 1fr 1fr; gap: 8px; }
  .kb-price-title { font-size: 18px; }
  .kb-price-date { font-size: 14px; }
  .kb-pb-price { font-size: 22px; }
  .kb-pb-diff { font-size: 14px; }
  .kb-price-loading { font-size: 16px; }
  .kb-contact-section { padding-left: max(36px, calc(50vw - 520px)); padding-right: max(36px, calc(50vw - 520px)); padding-bottom: 80px; }
  .kb-footer { padding: 40px max(36px, calc(50vw - 520px)); }
  .kb-contact-cards { grid-template-columns: repeat(3, 1fr); }
}

/* ══ 상품 카탈로그 (kbgold-product 스킨) ══ */
.kbp-wrap {
  padding: 28px 16px 64px;
  max-width: 1080px;
  margin: 0 auto;
}
.kbp-empty {
  text-align: center;
  padding: 80px 20px;
  color: #999;
  font-size: 15px;
}
.kbp-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
@media (min-width: 640px) {
  .kbp-wrap { padding: 36px 24px 72px; }
  .kbp-grid { gap: 20px; }
}
@media (min-width: 900px) {
  .kbp-grid { grid-template-columns: repeat(3, 1fr); gap: 24px; }
}
.kbp-card {
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
  transition: box-shadow 0.2s;
}
.kbp-card:hover { box-shadow: 0 4px 18px rgba(0,0,0,0.1); }
.kbp-img-wrap {
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--gray-light);
  position: relative;
}
.kbp-img-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}
.kbp-card:hover .kbp-img-wrap img { transform: scale(1.04); }
.kbp-no-img {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  color: #ccc; font-size: 13px;
}
.kbp-img-wrap.sold-out::after {
  content: '품절';
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.45);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 22px; font-weight: 700;
  letter-spacing: 0.05em;
}
.kbp-info { padding: 12px 14px 16px; }
.kbp-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 3px;
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 8px;
  white-space: nowrap;
}
.badge-sell-now { background: #E8F5E9; color: #2E7D32; }
.badge-sell-2w  { background: #FFF8E1; color: #E65100; }
.badge-reserved { background: #E3F2FD; color: #1565C0; }
.badge-sold-out { background: #F5F5F5; color: #9E9E9E; }
.kbp-name {
  font-size: 14px; font-weight: 700;
  line-height: 1.4; letter-spacing: -0.02em;
  margin-bottom: 5px;
}
.kbp-name a { color: var(--black); }
.kbp-name a:hover { color: var(--gold); }
.kbp-weight { font-size: 12px; color: var(--gray); margin-bottom: 4px; }
.kbp-price {
  font-size: 16px; font-weight: 700;
  color: var(--black); letter-spacing: -0.02em;
  margin-bottom: 14px;
}
@media (min-width: 640px) { .kbp-price { font-size: 17px; } }
.kbp-actions { display: flex; gap: 8px; }
.kbp-btn-call, .kbp-btn-kakao {
  flex: 1; padding: 9px 4px;
  font-size: 12px; font-weight: 700;
  border-radius: 4px; cursor: pointer;
  text-align: center; letter-spacing: -0.01em;
  display: flex; align-items: center; justify-content: center;
  white-space: nowrap; text-decoration: none;
  transition: opacity 0.15s;
}
.kbp-btn-call { background: var(--black); color: #fff; }
.kbp-btn-call:hover { opacity: 0.85; }
.kbp-btn-kakao { background: #FEE500; color: #3C1E1E; }
.kbp-btn-kakao:hover { opacity: 0.85; }
.kbp-view-wrap {
  max-width: 780px; margin: 0 auto;
  padding: 32px 16px 64px;
}
@media (min-width: 640px) { .kbp-view-wrap { padding: 40px 24px 80px; } }
.kbp-view-img {
  width: 100%; aspect-ratio: 1; max-width: 480px;
  margin: 0 auto 28px; border-radius: 8px;
  overflow: hidden; background: var(--gray-light);
}
.kbp-view-img img { width: 100%; height: 100%; object-fit: cover; }
.kbp-view-badge { margin-bottom: 12px; }
.kbp-view-title {
  font-family: 'SCDream', sans-serif;
  font-size: 22px; font-weight: 700;
  letter-spacing: -0.03em; margin-bottom: 10px; line-height: 1.4;
}
.kbp-view-meta { margin-bottom: 20px; }
.kbp-view-weight { font-size: 14px; color: var(--gray); margin-bottom: 6px; }
.kbp-view-price { font-size: 26px; font-weight: 700; letter-spacing: -0.03em; color: var(--black); }
.kbp-view-divider { border: none; border-top: 1px solid var(--border); margin: 24px 0; }
.kbp-view-desc { font-size: 15px; line-height: 1.9; color: #444; letter-spacing: -0.01em; }
.kbp-view-actions { display: flex; gap: 12px; margin-top: 28px; flex-direction: column; }
@media (min-width: 480px) { .kbp-view-actions { flex-direction: row; } }
.kbp-view-btn-call, .kbp-view-btn-kakao {
  flex: 1; padding: 16px;
  font-size: 15px; font-weight: 700; border-radius: 6px; cursor: pointer;
  text-align: center; letter-spacing: -0.02em;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  text-decoration: none; transition: opacity 0.15s;
}
.kbp-view-btn-call { background: var(--black); color: #fff; }
.kbp-view-btn-call:hover { opacity: 0.85; }
.kbp-view-btn-kakao { background: #FEE500; color: #3C1E1E; }
.kbp-view-btn-kakao:hover { opacity: 0.85; }
.kbp-view-back {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 14px; color: var(--gray); margin-top: 32px;
  text-decoration: none; transition: color 0.15s;
}
.kbp-view-back:hover { color: var(--gold); }

/* Gold Bar Calculator */
.kb-goldcalc-heading {
  font-size: 16px; font-weight: 700;
  font-family: 'SCDream', sans-serif;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}
.kb-goldcalc-input-row {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 20px; margin-bottom: 28px;
  background: var(--gray-light); border-radius: 8px;
}
.kb-goldcalc-label {
  font-size: 13px; font-weight: 600; color: var(--gray); white-space: nowrap;
}
.kb-goldcalc-field { display: flex; align-items: center; gap: 8px; flex: 1; }
.kb-goldcalc-field input {
  width: 100%; max-width: 160px;
  padding: 8px 12px; border: 1.5px solid var(--border); border-radius: 6px;
  font-size: 15px; font-family: inherit; font-weight: 600;
  color: var(--black); background: #fff; text-align: right; outline: none;
  transition: border-color .2s;
}
.kb-goldcalc-field input:focus { border-color: var(--gold); }
.kb-goldcalc-field span { font-size: 13px; color: var(--gray); white-space: nowrap; }
.kb-goldcalc-sections { display: flex; flex-direction: column; gap: 24px; }
@media (min-width: 640px) {
  .kb-goldcalc-sections { display: grid; grid-template-columns: repeat(3, 1fr); align-items: start; }
}
.kb-goldcalc-section-label {
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em;
  color: var(--gold); margin-bottom: 8px;
  padding-bottom: 6px; border-bottom: 1px solid var(--border);
}
.kb-goldcalc-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0; border-bottom: 1px solid #f0ebe0; font-size: 14px;
}
.kb-goldcalc-row:last-child { border-bottom: none; }
.kb-goldcalc-weight { color: var(--gray); }
.kb-goldcalc-price { font-weight: 700; color: var(--black); font-variant-numeric: tabular-nums; }
