/* ================================================
   QR 코드 생성기 — qr.css
   폰트: Gmarket Sans (Light 300 / Medium 500 / Bold 700)
   포인트 컬러: #37c06a
   ================================================ */

@font-face {
  font-family: 'GmarketSans';
  src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_2001@1.1/GmarketSansLight.woff') format('woff');
  font-weight: 300;
  font-style: normal;
}
@font-face {
  font-family: 'GmarketSans';
  src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_2001@1.1/GmarketSansMedium.woff') format('woff');
  font-weight: 500;
  font-style: normal;
}
@font-face {
  font-family: 'GmarketSans';
  src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_2001@1.1/GmarketSansBold.woff') format('woff');
  font-weight: 700;
  font-style: normal;
}

/* ── 기본 리셋 ── */
.qr-page * {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
/* [2026-08-24] 큰 구조 정렬: 다른 도구 페이지와 동일한 중앙 컬럼(.qr-tool) + 공통 .page-title/.tool-guide */
.qr-tool {
  font-family: 'GmarketSans', 'Noto Sans KR', sans-serif;
  font-weight: 500;
  width: 1080px;
  max-width: 100%;
  margin: 48px auto;
}
/* 공통 제목 스타일 (.rsz/.wm/.bgm 등과 동일 규격: 28px, 중앙정렬) */
.qr-tool .page-title {
  text-align: center;
  margin-bottom: 28px;
}
.qr-tool .page-title h1 {
  font-size: clamp(20px,4.7vw,28px);
  font-weight: 700;
  color: #16181d;
  letter-spacing: -.02em;
  margin-bottom: 8px;
}
.qr-tool .page-title p {
  font-size: clamp(13px,2.6vw,15px);
  color: #5b6270;
  line-height: 1.6;
}

/* [2026-08-24] 수정 전 - 전체폭 회색 배경 + 100vh (다른 페이지와 상이) */
/* .qr-page {
  font-family: 'GmarketSans', 'Noto Sans KR', sans-serif;
  font-weight: 500;
  background: #f8faf8;
  min-height: calc(100vh - 60px);
  padding: 2rem 1rem;
} */
/* [2026-08-24] 수정 후 - 배경/높이 제거, 중앙 정렬은 .qr-tool 이 담당. 폰트만 유지 */
.qr-page {
  font-family: 'GmarketSans', 'Noto Sans KR', sans-serif;
  font-weight: 500;
}

/* [2026-08-24] 수정 전 - 자체 헤더(.qr-page-header) → 공통 .page-title 로 대체 */
/* .qr-page-header {
  text-align: center;
  margin-bottom: 1.75rem;
}
.qr-page-header h1 {
  font-size: 26px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 8px;
}
.qr-page-header p {
  font-size: 15px;
  color: #888;
  font-weight: 300;
} */

/* ── 스텝바 ── */
.qr-stepbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 1.75rem;
}
.qr-step {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: 22px;
  font-size: 14px;
  font-weight: 500;
  color: #aaa;
  transition: all .15s;
  font-family: 'GmarketSans', sans-serif;
}
.qr-step.active {
  background: #37c06a;
  color: #fff;
}
.qr-step.done {
  color: #37c06a;
  cursor: pointer;
}
.qr-step-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
  background: #eee;
  color: #aaa;
  font-weight: 700;
}
.qr-step.active .qr-step-num {
  background: rgba(255,255,255,0.3);
  color: #fff;
}
.qr-step.done .qr-step-num {
  background: #e6f7ee;
  color: #37c06a;
}
.qr-step-arrow {
  color: #ccc;
  font-size: 14px;
  margin: 0 3px;
}

/* ── 메인 레이아웃 (legacy main.css .qr-main 과 충돌 → .qr-page 로 스코프) ── */
.qr-page .qr-main {
  display: grid;
  /* [2026-08-24] 수정 전 - 미리보기 컬럼 240px (캔버스 표시 최대 ~192px) */
  /* grid-template-columns: 1fr 240px; */
  /* [2026-08-24] 수정 후 - 컬럼 320px 로 확대해 미리보기 QR 표시 크기(256px) 확보 */
  grid-template-columns: 1fr 320px;
  gap: 1.5rem;
  margin: 0 auto;
}

/* ── 설정 패널 ── */
.qr-panel {
  background: #fff;
  border-radius: 14px;
  border: 1px solid #e8f5ee;
  padding: 12px 16px;
}
.qr-section {
  margin-bottom: 1.75rem;
}
.qr-section:last-child {
  margin-bottom: 0;
}
.qr-sec-title {
  font-size: 13px;
  font-weight: 700;
  color: #37c06a;
  letter-spacing: .04em;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: 'GmarketSans', sans-serif;
}
.qr-sec-title::before {
  content: '';
  width: 3px;
  height: 14px;
  background: #37c06a;
  border-radius: 2px;
  display: inline-block;
  flex-shrink: 0;
}
.qr-sec-note {
  font-size: 12px;
  font-weight: 300;
  color: #aaa;
  margin-left: 6px;
}

/* ── 코드 스타일 선택 ── */
.qr-style-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.qr-style-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 4px;
  border-radius: 10px;
  border: 1.5px solid #e8e8e8;
  background: #fafafa;
  cursor: pointer;
  transition: all .15s;
}
.qr-style-btn:hover,
.qr-style-btn.on {
  border-color: #37c06a;
  background: #f0fbf5;
}
.qr-style-btn span {
  font-size: 12px;
  color: #888;
  font-weight: 500;
  font-family: 'GmarketSans', sans-serif;
}
.qr-style-btn.on span {
  color: #37c06a;
}

/* ── 스킨/테두리 선택 ── */
.qr-skin-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.qr-skin-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 4px;
  border-radius: 10px;
  border: 1.5px solid #e8e8e8;
  background: #fafafa;
  cursor: pointer;
  transition: all .15s;
}
.qr-skin-btn:hover,
.qr-skin-btn.on {
  border-color: #37c06a;
  background: #f0fbf5;
}
.qr-skin-btn span {
  font-size: 12px;
  color: #888;
  font-weight: 500;
  font-family: 'GmarketSans', sans-serif;
}
.qr-skin-btn.on span {
  color: #37c06a;
}
.qr-skin-thumb {
  width: 40px;
  height: 40px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
}
/* 스킨 썸네일 미리보기(인라인 스타일 → 클래스) */
.qr-skin-thumb--none i { font-size: 20px; color: #ccc; }
.qr-skin-thumb--simple { border: 2px solid #555; border-radius: 3px; }
.qr-skin-thumb--rounded { border: 2px solid #555; border-radius: 11px; }
.qr-skin-thumb--shadow { border: 2px solid #555; border-radius: 3px; box-shadow: 3px 3px 0 #ccc; }
.qr-skin-thumb--dot { border: 2px dashed #37c06a; border-radius: 5px; }
.qr-skin-thumb--double { border: 3px double #555; border-radius: 3px; }
.qr-skin-thumb--tag { border: 2px solid #555; border-radius: 4px; align-items: flex-end; justify-content: center; padding-bottom: 3px; }
.qr-skin-thumb--tag .qr-thumb-scan { font-size: 8px; color: #555; font-weight: 700; font-family: 'GmarketSans', sans-serif; }
.qr-skin-thumb--icon { border: 2px solid #37c06a; border-radius: 8px; }
.qr-skin-thumb--icon i { font-size: 16px; color: #37c06a; }

/* ── 색상 선택 (테두리에만 적용) ── */
.qr-color-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.qr-cdot,
.qr-capdot {
  width: clamp(20px,3.9vw,30px);
  height: clamp(20px,3.9vw,30px);
  border-radius: 50%;
  cursor: pointer;
  border: 2.5px solid transparent;
  transition: all .15s;
  flex-shrink: 0;
}
.qr-cdot.on,
.qr-capdot.on {
  outline: 2.5px solid #37c06a;
  outline-offset: 2px;
}
.qr-color-row.is-disabled {
  opacity: .4;
  pointer-events: none;
}

/* ── 라디오 (로고/문구 사용 토글) ── */
.qr-radio-row {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
/* [2026-08-27] 신규 추가 - 비로그인 로고 안내 문구 */
.qr-logo-note {
  font-size: 13px;
  line-height: 1.6;
  color: #666;
  background: #f4f7f5;
  border: 1px solid #e2ece6;
  border-radius: 8px;
  padding: 12px 14px;
  margin: 0 0 4px;
}
.qr-logo-note b {
  color: #37c06a;
  font-weight: 700;
}
.qr-radio {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: 'GmarketSans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: #555;
  cursor: pointer;
}
.qr-radio input {
  accent-color: #37c06a;
  width: 16px;
  height: 16px;
  cursor: pointer;
}

/* ── 로고 업로드 ── */
.qr-logo-upload {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.qr-upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1.5px solid #e8e8e8;
  border-radius: 8px;
  padding: 8px 16px;
  background: #fafafa;
  font-family: 'GmarketSans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: #555;
  cursor: pointer;
  transition: border-color .15s;
}
.qr-upload-btn:hover { border-color: #37c06a; }
.qr-upload-btn i { font-size: 16px; color: #37c06a; }
.qr-file-hidden { display: none; }
.qr-logo-name {
  font-size: 12px;
  color: #aaa;
  font-weight: 300;
  font-family: 'GmarketSans', sans-serif;
}
.qr-logo-remove {
  border: none;
  background: none;
  color: #e53935;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  font-family: 'GmarketSans', sans-serif;
}

/* hidden 속성이 display 지정을 이기도록 (로고 업로드/문구 옵션 토글) */
.qr-page [hidden] { display: none !important; }

/* ── 유형 선택 ── */
.qr-type-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.qr-type-btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 18px 6px;
  border-radius: 10px;
  border: 1.5px solid #e8e8e8;
  background: #fafafa;
  cursor: pointer;
  transition: all .15s;
}
.qr-type-btn:hover,
.qr-type-btn.on {
  border-color: #37c06a;
  background: #f0fbf5;
}
.qr-type-btn.disabled {
  opacity: .35;
  pointer-events: none;
}
.qr-type-btn i {
  font-size: 26px;
  color: #bbb;
  transition: color .15s;
}
.qr-type-btn.on i,
.qr-type-btn:hover i {
  color: #37c06a;
}
.qr-type-btn span {
  font-size: 13px;
  color: #888;
  font-weight: 500;
  font-family: 'GmarketSans', sans-serif;
  text-align: center;
  line-height: 1.3;
}
.qr-type-btn.on span {
  color: #37c06a;
}
.qr-coming-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  background: #f0f0f0;
  color: #aaa;
  font-weight: 700;
  font-family: 'GmarketSans', sans-serif;
}
.qr-type-notice {
  font-size: 12px;
  color: #aaa;
  margin-top: 12px;
  line-height: 1.7;
  font-weight: 300;
}
/* [2026-08-24] 링크형 디지털 명함 → 문의 유도 안내 박스 */
.qr-cta-note {
  margin-top: 16px;
  padding: 14px 16px;
  background: #f0fbf5;
  border: 1px solid #c3eed8;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.7;
  color: #45806a;
}
.qr-cta-note b {
  color: #2e9e5b;
  font-weight: 700;
}
.qr-cta-note a {
  display: inline-block;
  margin-top: 8px;
  font-weight: 700;
  color: #37c06a;
  text-decoration: none;
}
.qr-cta-note a:hover {
  text-decoration: underline;
}
@media (max-width: 640px) {
  .qr-cta-note {
    margin-top: clamp(11px, 2.08vw, 16px);
    padding: clamp(10px, 2.08vw, 14px) clamp(11px, 2.08vw, 16px);
    font-size: clamp(11px, 1.69vw, 13px);
    border-radius: clamp(9px, 1.56vw, 12px);
  }
}

/* ── 정보 입력 폼 ── */
.qr-field {
  margin-bottom: 14px;
}
.qr-field:last-child {
  margin-bottom: 0;
}
.qr-field label {
  font-size: 13px;
  font-weight: 700;
  color: #555;
  display: block;
  margin-bottom: 6px;
  font-family: 'GmarketSans', sans-serif;
}
.qr-field input,
.qr-field textarea,
.qr-field select {
  width: 100%;
  padding: 11px 13px;
  border: 1.5px solid #e8e8e8;
  border-radius: 8px;
  font-size: 14px;
  color: #1a1a1a;
  background: #fafafa;
  outline: none;
  transition: border-color .15s, background .15s;
  font-family: 'GmarketSans', sans-serif;
  font-weight: 500;
}
.qr-field input:focus,
.qr-field textarea:focus,
.qr-field select:focus {
  border-color: #37c06a;
  background: #fff;
}
.qr-field textarea {
  height: 100px;
  resize: none;
  line-height: 1.6;
}
/* 주소 입력 + 검색 버튼 한 줄 배치 */
.qr-addr-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.qr-addr-row input {
  flex: 1 1 auto;
}
.qr-addr-row .qr-btn {
  flex: 0 0 auto;
  width: auto;
  white-space: nowrap;
  padding-left: 18px;
  padding-right: 18px;
}

/* ── 버튼 ── */
.qr-btn-row {
  display: flex;
  gap: 10px;
  margin-top: 1.75rem;
}
.qr-btn-row--tight {
  margin-top: 12px;
}
.qr-btn {
  flex: 1;
  padding: 12px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  border: 1.5px solid #e0e0e0;
  background: #fff;
  color: #888;
  transition: all .15s;
  font-family: 'GmarketSans', sans-serif;
}
.qr-btn:hover {
  border-color: #ccc;
  color: #555;
}
.qr-btn.primary {
  background: #37c06a;
  color: #fff;
  border-color: #37c06a;
}
.qr-btn.primary:hover {
  background: #2da85d;
  border-color: #2da85d;
}

/* ── step4 완료 화면 ── */
.qr-done-header {
  text-align: center;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #f0f0f0;
  margin-bottom: 1.5rem;
}
.qr-done-header i {
  font-size: 50px;
  color: #37c06a;
}
.qr-done-header h2 {
  font-size: 18px;
  font-weight: 700;
  color: #1a1a1a;
  margin-top: 10px;
  font-family: 'GmarketSans', sans-serif;
}
.qr-done-header p {
  font-size: 13px;
  color: #888;
  margin-top: 5px;
  font-weight: 300;
}
.qr-info-summary {
  background: #f8faf8;
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 1.5rem;
}
.qr-info-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 7px 0;
  font-size: 13px;
  font-family: 'GmarketSans', sans-serif;
}
.qr-info-row:not(:last-child) {
  border-bottom: 1px solid #eee;
}
.qr-info-label {
  color: #aaa;
  font-weight: 500;
  min-width: 66px;
  flex-shrink: 0;
}
.qr-info-value {
  color: #1a1a1a;
  font-weight: 700;
  word-break: break-all;
}
.qr-dl-btn {
  width: 100%;
  padding: 15px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  background: #37c06a;
  color: #fff;
  font-family: 'GmarketSans', sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all .15s;
}
.qr-dl-btn:hover {
  background: #2da85d;
}
.qr-dl-btn.qr-disabled {
  opacity: .5;
  pointer-events: none;
}

/* ── 미리보기 패널 ── */
.qr-preview {
  background: #fff;
  border-radius: 14px;
  border: 1px solid #e8f5ee;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  position: sticky;
  top: 80px;
  height: fit-content;
}
.qr-preview-title {
  font-size: 13px;
  font-weight: 700;
  color: #888;
  text-align: center;
  font-family: 'GmarketSans', sans-serif;
}
#qrFrame {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  transition: all .2s;
}
#qrCanvas {
  display: block;
  /* [2026-08-24] 백킹 해상도(480px)는 선명도용, 화면 표시 크기는 여기서 축소 제어.
     캔버스 내부 비율 유지를 위해 height:auto, 컬럼보다 좁게 max-width:100%. */
  width: 256px;
  height: auto;
  max-width: 100%;
}
#qrOverlay {
  position: absolute;
  bottom: 7px;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  pointer-events: none;
  font-family: 'GmarketSans', sans-serif;
}
.qr-overlay-text {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
}
.qr-overlay-text i {
  font-size: 30px;
  vertical-align: -1px;
}
.qr-type-badge {
  /* [2026-08-24] 아이콘 + 라벨 정렬을 위해 inline-flex + gap 적용 */
  /* [2026-08-24] 수정 전 - center 정렬 시 아이콘이 텍스트보다 살짝 위로 떠 보임 */
  /* align-items: center; */
  /* [2026-08-24] 수정 후 - flex-end(하단 정렬)로 아이콘과 텍스트 라인 일치 */
  display: inline-flex;
  align-items: flex-end;
  gap: 5px;
  font-size: 13px;
  font-weight: 700;
  padding: 5px 16px;
  border-radius: 20px;
  background: #f0fbf5;
  color: #37c06a;
  border: 1px solid #c3eed8;
  font-family: 'GmarketSans', sans-serif;
}
/* [2026-08-24] 배지 내 유형 아이콘 크기 */
.qr-type-badge i {
  font-size: 15px;
}

/* ── #qrFrame 스킨(테두리) — 색상은 JS가 적용 ── */
#qrFrame.skin-none { border: none; padding: 0; border-radius: 0; }
#qrFrame.skin-simple { border: 2px solid; padding: 12px; border-radius: 0; }
#qrFrame.skin-rounded { border: 2px solid; padding: 14px; border-radius: 16px; }
#qrFrame.skin-shadow { border: 2px solid; padding: 12px; border-radius: 0; }
#qrFrame.skin-dot { border: 2px dashed; padding: 12px; border-radius: 8px; }
#qrFrame.skin-double { border: 2px solid; padding: 12px; border-radius: 0; }
#qrFrame.skin-tag { border: 2px solid; padding: 12px; padding-bottom: 32px; border-radius: 8px; }
#qrFrame.skin-icon { border: 2px solid; padding: 12px; padding-bottom: 32px; border-radius: 8px; }

/* ── 탭 전환 ── */
.qr-tab { display: none; }
.qr-tab.active { display: block; }

/* ── 반응형 ── */
@media (max-width: 768px) {
  .qr-tool {
    width: 92%;
    margin: clamp(28px, 6vw, 48px) auto;
  }
  /* [2026-08-27] 신규 추가 - 비로그인 로고 안내 문구(모바일 clamp) */
  .qr-logo-note {
    font-size: clamp(10px, 1.69vw, 13px);
    padding: clamp(9px, 1.82vw, 12px) clamp(10px, 1.82vw, 14px);
    border-radius: clamp(6px, 1.04vw, 8px);
  }
}
@media (max-width: 640px) {

  .qr-page .qr-main {
    grid-template-columns: 1fr;
    width: auto;
  }
  .qr-preview {
    position: static;
    order: -1;
  }
  /* [2026-08-24] 모바일: 미리보기 캔버스 표시 크기 clamp (선명도는 백킹 480px 유지) */
  #qrCanvas {
    width: clamp(190px, 44vw, 256px);
  }
  .qr-style-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .qr-stepbar {
    gap: 0;
  }
  .qr-step {
    padding: clamp(5px, 1.04vw, 8px) clamp(9px, 2.08vw, 16px);
    font-size: clamp(11px, 1.82vw, 14px);
  }
}
@media (max-width: 425px) {
  .qr-stepbar {
    flex-wrap: wrap;
  }
  /* [2026-08-26] 스텝바 줄바꿈 시 첫 줄 끝에 홀로 남는 화살표(›) 숨김 */
  .qr-step-arrow {
    display: none;
  }
}