  @import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;500;600;700;900&display=swap');

  :root {
    --primary: #1B1B6B;
    --primary-hover: #14145a;
    --text: #222;
    --text-light: #666;
    --text-muted: #999;
    --border: #ddd;
    --border-light: #eee;
    --bg-modal: #fff;
    --bg-overlay: rgba(0,0,0,0.55);
    --bg-section: #f8f8fa;
    --radius: 16px;
    --radius-sm: 8px;
    --radius-xs: 4px;
    --font: 'Noto Sans KR', sans-serif;
  }
h1, h2, h3, h4, h5, h6 {     font-family: var(--font);}
  * { margin:0; padding:0; box-sizing:border-box; }

  body {
    font-family: var(--font);
    color: var(--text);
    background: #2a2a2a;
    min-height: 100vh;
  }

  /* ── Trigger Button (데모용) ── */
  .trigger-btn {
    position: fixed;
    bottom: 40px;
    right: 40px;
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 16px 32px;
    border-radius: 60px;
    font-size: 16px;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    z-index: 100;
    transition: transform .2s, box-shadow .2s;
  }
  .trigger-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(27,27,107,0.4);
  }

  /* ── Overlay ── */
  .modal-overlay {
    position: fixed;
    inset: 0;
    background: var(--bg-overlay);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s ease, visibility .3s ease;
  }
  .modal-overlay.active {
    opacity: 1;
    visibility: visible;
  }

  /* ── Modal Container ── */
  .modal {
	font-size:14px;
    background: var(--bg-modal);
    border-radius: var(--radius);
    width: 94%;
    max-width: 1000px;
    max-height: 88vh;
    position: relative;
    transform: translateY(30px) scale(0.96);
    transition: transform .35s cubic-bezier(.22,1,.36,1);
    display: flex;
    flex-direction: column;
  }
  .modal-overlay.active .modal {
    transform: translateY(0) scale(1);
  }

  /* ── Close Button ── */
  .modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 36px;
    height: 36px;
    border: none;
    background: none;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .modal-close::before,
  .modal-close::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 2px;
    background: #888;
    transition: background .2s;
  }
  .modal-close::before { transform: rotate(45deg); }
  .modal-close::after { transform: rotate(-45deg); }
  .modal-close:hover::before,
  .modal-close:hover::after { background: var(--text); }

  /* ── Modal Header (고정) ── */
  .modal-header {
    padding: 48px 40px 24px;
    text-align: center;
    flex-shrink: 0;
  }
  .modal-header h2 {
    font-size: 50px;
    font-weight: 700;
    letter-spacing: -0.5px;
  }
  .modal-header h2 .dot {
    color: var(--primary);
  }

  /* ── Step Indicators ── */
  .step-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
  }
  .step-dots .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border);
    transition: background .3s, transform .3s;
  }
  .step-dots .dot.active {
    background: var(--primary);
    transform: scale(1.15);
  }

  /* ── Modal Body (스크롤 영역) ── */
  .modal-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0 40px 40px;
    scroll-behavior: smooth;
  }
  .modal-body::-webkit-scrollbar { width: 6px; }
  .modal-body::-webkit-scrollbar-track { background: transparent; }
  .modal-body::-webkit-scrollbar-thumb { background: #ccc; border-radius: 3px; }
  .modal-body::-webkit-scrollbar-thumb:hover { background: #aaa; }

  /* ── Steps ── */
  .step { display: none; }
  .step.active { display: block; }

  /* ══════════════════════════════
     STEP 1 — 초진/재진 선택
  ══════════════════════════════ */
  .step-select {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding-top: 40px;
  }
  .btn-select {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 20px;
    border-radius: 60px;
    font-size: 18px;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    transition: all .25s ease;
    position: relative;
  }
  .btn-select .arrow {
    position: absolute;
    right: 28px;
    font-size: 20px;
    transition: transform .25s;
  }
  .btn-select:hover .arrow {
    transform: translateX(4px);
  }
  .btn-primary {
    background: var(--primary);
    color: #fff;
    border: 2px solid var(--primary);
  }
  .btn-primary:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
  }
  .btn-outline {
    background: #fff;
    color: var(--text);
    border: 2px solid var(--border);
  }
  .btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
  }

  /* ══════════════════════════════
     STEP 2 — 초진 폼
  ══════════════════════════════ */

  /* 개인정보 동의 아코디언 */
  .privacy-section {
    margin-bottom: 28px;
  }
  .privacy-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background: none;
    border: none;
    padding: 12px 0;
    cursor: pointer;
    font-family: var(--font);
    font-size: 18px;
    color: var(--text);
    border-bottom: 1px solid var(--border-light);
  }
  .privacy-toggle .label {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .privacy-toggle .check-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: transparent;
    transition: all .2s;
  }
  .privacy-toggle.agreed .check-icon {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
  }
  .privacy-toggle .arrow-icon {
    font-size: 12px;
    color: var(--text-muted);
    transition: transform .3s;
  }
  .privacy-toggle.open .arrow-icon {
    transform: rotate(180deg);
  }

  .privacy-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height .4s ease;
    background: var(--bg-section);
    border-radius: var(--radius-sm);
  }
  .privacy-content.open {
    max-height: 500px;
  }
  .privacy-inner {
    padding: 20px;
    font-size: 12.5px;
    line-height: 1.9;
    color: var(--text-light);
  }
  .privacy-inner h4 {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    margin: 14px 0 6px;
  }
  .privacy-inner h4:first-child { margin-top: 0; }
  .privacy-table {
    width: 100%;
    border-collapse: collapse;
    margin: 6px 0 12px;
    font-size: 12px;
  }
  .privacy-table td {
    padding: 4px 8px;
    border-bottom: 1px solid var(--border-light);
    vertical-align: top;
  }
  .privacy-table td:first-child {
    width: 100px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
  }

  /* 특이사항 체크리스트 */
  .notice-list {
    margin-bottom: 28px;
    padding: 0;
    list-style: none;
  }
  .notice-list li {
    position: relative;
    padding-left: 18px;
    font-size: 13px;
    line-height: 1.8;
    color: var(--text-light);
  }
  .notice-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--text-muted);
    font-weight: 600;
  }
  .notice-list li.highlight {
    color: var(--primary);
    font-weight: 500;
  }
  .notice-list li.highlight::before {
    content: '-';
    color: var(--primary);
  }

  /* 폼 공통 */
  .form-section-title {
    font-size: 18px;
    font-weight: 700;
    text-align: center;
    padding: 24px 0 20px;
    margin-top: 8px;
    border-top: 1px solid var(--text);
    letter-spacing: -0.3px;
  }

  .form-row {
    display: flex;
    align-items: flex-start;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
    gap: 12px;
  }
  .form-row:last-child { border-bottom: none; }

  .form-label {
    width: 100px;
    flex-shrink: 0;
    font-size: 16px;
    font-weight: 500;
    padding-top: 8px;
    display: flex;
    align-items: center;
    gap: 2px;
  }
  .form-label .req {
    color: #e84118;
    font-weight: 700;
  }

  .form-fields {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
  }

  input[type="text"],
  input[type="tel"],
  input[type="number"],
  textarea,
  select {
    font-family: var(--font);
    font-size: 16px;
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    outline: none;
    transition: border-color .2s;
    background: #fff;
    color: var(--text);
  }
  input:focus, textarea:focus, select:focus {
    border-color: var(--primary);
  }
  input::placeholder, textarea::placeholder {
    color: var(--text-muted);
    font-size: 16px;
  }

  .input-sm { width: 80px; }
  .input-md { width: 130px; }
  .input-lg { width: 100%; }
  .input-tel { width: 100px; text-align: center; }

  .form-fields .sep {
    color: var(--text-muted);
    font-size: 13px;
  }
  .form-fields .unit {
    font-size: 13px;
    color: var(--text-light);
    margin-left: -4px;
  }

  .btn-sub {
  margin:5px 0 ;
    padding: 8px 16px;
    font-size: 15px;
    font-family: var(--font);
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    background: #fff;
    cursor: pointer;
    color: var(--text-light);
    transition: all .2s;
  }
  .btn-sub:hover {
    border-color: var(--primary);
    color: var(--primary);
  }

  /* 사전설문 필드 */
  .survey-group {
    padding: 16px 0;
    border-bottom: 1px solid var(--border-light);
  }
  .survey-group:last-child { border-bottom: none; }

  .survey-label {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.5;
  }
  .survey-label .req {
    color: #e84118;
    font-weight: 700;
  }

  .survey-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    font-family: var(--font);
    font-size: 16px;
    outline: none;
    transition: border-color .2s;
  }
  .survey-input:focus { border-color: var(--primary); }
  .survey-input::placeholder {
    color: var(--text-muted);
    font-size: 16px;
  }

  textarea.survey-input {
    min-height: 60px;
    resize: vertical;
  }

  /* 체크박스 / 라디오 그리드 */
  .option-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
  }
  .option-item {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 16px;
    color: var(--text);
    padding: 4px 0;
    user-select: none;
  }
  .option-item input[type="checkbox"],
  .option-item input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid var(--border);
    border-radius: 3px;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    transition: all .15s;
  }
  .option-item input[type="radio"] {
    border-radius: 50%;
  }
  .option-item input[type="checkbox"]:checked,
  .option-item input[type="radio"]:checked {
    background: var(--primary);
    border-color: var(--primary);
  }
  .option-item input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
  }
  .option-item input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 4px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #fff;
  }

  /* 상담 요일 선택 */
  .day-grid {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
  }
  .day-item {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 16px;
    user-select: none;
    padding: 4px 0;
    min-width: 60px;
  }
  .day-item input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid var(--border);
    border-radius: 3px;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    transition: all .15s;
  }
  .day-item input[type="checkbox"]:checked {
    background: var(--primary);
    border-color: var(--primary);
  }
  .day-item input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
  }

  /* 제출 버튼 */
  .submit-area {
    padding-top: 32px;
    text-align: center;
  }
  .btn-submit {
    width: 100%;
    max-width: 360px;
    padding: 18px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 60px;
    font-size: 18px;
    font-weight: 700;
    font-family: var(--font);
    cursor: pointer;
    transition: background .25s, transform .15s;
  }
  .btn-submit:hover {
    background: var(--primary-hover);
  }
  .btn-submit:active {
    transform: scale(0.98);
  }
  .submit-note {
    font-size: 16px;
    color: var(--text-muted);
    margin-top: 10px;
  }

  /* File upload */
  .file-upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    background: #fff;
    font-size: 16px;
    color: var(--text-light);
    cursor: pointer;
    font-family: var(--font);
    transition: all .2s;
  }
  .file-upload-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
  }
  .file-upload-btn input[type="file"] {
    display: none;
  }
  .file-name {
    font-size: 14px;
    color: var(--text-muted);
    margin-left: 4px;
  }

  /* 생년월일 */
  .birth-group {
    display: flex;
    align-items: center;
    gap: 4px;
  }
  .birth-group input { width: 60px; text-align: center; }
  .birth-group input:first-child { width: 72px; }
  .birth-group .unit { margin: 0 2px 0 0; }

  /* 전화번호 */
  .tel-group {
    display: flex;
    align-items: center;
    gap: 4px;
  }

  /* ══════════════════════════════
     STEP 3 — 결제
  ══════════════════════════════ */

  .section-title-sm {
    font-size: 18px;
    font-weight: 700;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--text);
    margin-bottom: 0;
  }

  /* 배송지 정보 테이블 */
  .info-table {
    width: 100%;
    border-collapse: collapse;
  }
  .info-table tr {
    border-bottom: 1px solid var(--border-light);
  }
  .info-table td {
    padding: 13px 0;
    font-size: 16px;
    vertical-align: middle;
  }
  .info-table td:first-child {
    width: 100px;
    font-weight: 500;
    color: var(--text);
    white-space: nowrap;
  }
  .info-table td:first-child .req { color: #e84118; font-weight: 700; }
  .info-table td:last-child {
    color: var(--text-light);
  }

  /* 주문 상품 카드 */
  .product-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 16px 0 20px;
  }
  .product-card .product-img {
    width: 100px;
    height: 100px;
    background: var(--bg-section);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    border: 1px solid var(--border-light);
  }
  .product-card .product-img img {
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
  }
  /* 해 글자 SVG 대체 */
  .product-card .product-img .hae-char {
    font-size: 48px;
    font-weight: 900;
    color: var(--primary);
    font-family: serif;
  }
  .product-info {
    flex: 1;
  }
  .product-info .product-name {
    font-size: 16px;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 4px;
  }
  .product-info .product-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
  }
  .product-qty {
    font-size: 16px;
    color: var(--text-light);
    flex-shrink: 0;
  }

  /* 결제수단 */
  .payment-section {
    margin-top: 28px;
  }
  .payment-section-label {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-light);
  }
  .payment-methods {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
  }
  .payment-btn {
    flex: 1;
    min-width: 140px;
    padding: 14px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fff;
    font-size: 18px;
    font-weight: 500;
    font-family: var(--font);
    cursor: pointer;
    text-align: center;
    transition: all .2s;
    color: var(--text);
  }
  .payment-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
  }
  .payment-btn.selected {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(27,27,107,0.03);
    font-weight: 600;
  }

  .save-payment-check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    color: var(--text-light);
    margin-top: 8px;
    cursor: pointer;
    user-select: none;
  }
  .save-payment-check input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid var(--border);
    border-radius: 3px;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    transition: all .15s;
  }
  .save-payment-check input[type="checkbox"]:checked {
    background: var(--primary);
    border-color: var(--primary);
  }
  .save-payment-check input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
  }

  /* 총 결제 금액 */
  .total-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 0 16px;
    margin-top: 20px;
    border-top: 1px solid var(--border-light);
  }
  .total-row .total-label {
    font-size: 17px;
    font-weight: 800;
    color: var(--text);
  }
  .total-row .total-price {
    font-size: 30px;
    font-weight: 900;
    color: var(--text);
  }
  .total-row .total-price .currency {
    font-size:20px;
    font-weight: 700;
  }

  /* 약관 동의 아코디언 (결제) */
  .terms-agree {
    margin-top: 4px;
  }
  .terms-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background: none;
    border: none;
    padding: 12px 0;
    cursor: pointer;
    font-family: var(--font);
    font-size: 16px;
    color: var(--text);
    border-bottom: 1px solid var(--border-light);
  }
  .terms-toggle .label {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .terms-toggle .check-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: transparent;
    transition: all .2s;
  }
  .terms-toggle.agreed .check-icon {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
  }
  .terms-toggle .badge-req {
    display: inline-block;
    padding: 2px 8px;
    background: var(--primary);
    color: #fff;
    border-radius: 3px;
    font-size: 13px;
    font-weight: 600;
    margin-left: 6px;
  }
  .terms-toggle .arrow-icon {
    font-size: 14px;
    color: var(--text-muted);
    transition: transform .3s;
  }
  .terms-toggle.open .arrow-icon {
    transform: rotate(180deg);
  }
  .terms-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height .4s ease;
    background: var(--bg-section);
    border-radius: var(--radius-sm);
    margin-top: 4px;
  }
  .terms-content.open {
    max-height: 400px;
    overflow-y: auto;
  }
  .terms-inner {
    padding: 20px;
    font-size: 16px;
    line-height: 1.9;
    color: var(--text-light);
  }
  .terms-inner h4 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    margin: 14px 0 6px;
  }
  .terms-inner h4:first-child { margin-top: 0; }

  /* 결제 버튼 */
  .btn-pay {
    width: 100%;
    max-width: 420px;
    margin: 28px auto 0;
    display: block;
    padding: 18px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 60px;
    font-size: 20px;
    font-weight: 700;
    font-family: var(--font);
    cursor: pointer;
    transition: background .25s, transform .15s;
  }
  .btn-pay:hover { background: var(--primary-hover); }
  .btn-pay:active { transform: scale(0.98); }

  /* ══════════════════════════════
     STEP 4 — 완료
  ══════════════════════════════ */
  .complete-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 260px;
    padding: 40px 0;
    text-align: center;
  }
  .complete-wrap .complete-msg {
    font-size: 20px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 40px;
  }
  .btn-close-final {
    width: 100%;
    padding: 20px;
    border: 2px solid var(--border);
    border-radius: 60px;
    background: #fff;
    font-size: 18px;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    color: var(--text);
    transition: all .25s;
  }
  .btn-close-final:hover {
    border-color: var(--primary);
    color: var(--primary);
  }

  /* Responsive */
  @media (max-width: 600px) {
    .modal { max-width: 100%; width: 100%; border-radius: var(--radius) var(--radius) 0 0; max-height: 92vh; }
    .modal-header { padding: 36px 24px 18px; }
    .modal-header h2 { font-size: 26px; }
    .modal-body { padding: 0 24px 32px; }
    .form-row { flex-direction: column; gap: 6px; }
    .form-label { width: auto; padding-top: 0; }
    .option-grid { gap: 4px 12px; }
  }