/* 1. 기본 배경 및 높이 설정 (기존 html, body 부분 수정) */
html, body {
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
  height: 100%; /* 화면 높이를 꽉 채움 */
 overflow: hidden; /*  전체 화면이 위아래로 꿀렁이는 것 방지, 새로 고침 안할때 */
 /* overscroll-behavior-y: contain; 당겨서 새로고침은 유지하되, 고무줄 효과만 제어 */
}

body {
  background: var(--bg-color);
  display: flex;
  justify-content: center;
  align-items: center; /* PC 환경에서도 카드가 중앙에 오도록 */
  overflow-x: hidden; /* 좌우 흔들림만 방지 */
}
    /* =========================================
       ✨ 찍어방 디자인 시스템 (Premium Theme)
       ========================================= */
    :root {
        --primary-color: #6200ea;
        --primary-grad: linear-gradient(135deg, #6200ea 0%, #7c43bd 100%);
        --accent-color: #00c853;
        --bg-color: #f4f5f9;
        --text-main: #1a1a1a;
        --text-sub: #757575;
        --error: #ff3d00;
        --success: #00e676;
    }

    * { margin:0; padding:0; box-sizing:border-box; }
    
    .wrap { 
  max-width: 480px; 
  width: 100%; 
  height: 100vh; /* 기기 높이 전체 사용 */
  margin: 0 auto; 
  display: flex;
  flex-direction: column;
}
    
    .card { 
  background: #fff; 
  flex: 1; /* 남는 공간을 카드가 모두 차지 */
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 40px rgba(0,0,0,0.08); 
  position: relative;
  overflow-y: auto; /* 내용이 카드보다 길어질 때만 내부 스크롤 */
}

    /* 🔥 헤더 디자인 */
    .top { 
      padding: 30px 20px 25px; 
      background: var(--primary-grad); 
	  border-radius: 0 !important;
      color: #fff; 
      text-align: center; 
      position: relative;
    }
    .top::after { /* 하단 곡선 효과 */
        content: '';
        position: absolute;
        bottom: -20px; left: 0; right: 0;
        height: 40px;
        background: #fff;
        border-radius: 50% 50% 0 0 / 20px 20px 0 0;
    }

    .brand { display: flex; flex-direction: column; align-items: center; gap: 5px; }
    .brand .logo { font-size: 42px; animation: bounce 2s ease-in-out infinite; margin-bottom: 5px; filter: drop-shadow(0 4px 6px rgba(0,0,0,0.2)); }
    @keyframes bounce{0%,100%{transform:translateY(0)}50%{transform:translateY(-8px)}}
    
    .brand .t1 { font-weight: 800; font-size: 26px; letter-spacing: -0.5px; }
    .brand .sub { font-size: 13px; opacity: 0.9; font-weight: 400; letter-spacing: 0.5px; }

    /* 🔥 탭 디자인 (Pill Style) */
    .tabs { 
      display: flex; 
      background: #fff; 
      padding: 10px 20px 0;
      position: relative;
      z-index: 5;
    }
    .tab { 
      flex: 1; 
      padding: 14px; 
      font-weight: 700; 
      color: var(--text-sub); 
      cursor: pointer; 
      font-size: 15px; 
      text-align: center; 
      transition: 0.3s;
      border-bottom: 3px solid transparent;
    }
    .tab.active { 
      color: var(--primary-color); 
      border-bottom-color: var(--primary-color);
    }

    /* 🔥 섹션 및 폼 */
    .section { 
      padding: 25px 25px 35px; 
      display: none; 
      animation: fadeIn 0.3s ease-out;
    }
    @keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
    
    .section.active { display: block; }
    
    .form-group { margin-bottom: 18px; }
    label { 
      display: block; font-size: 13px; font-weight: 700; 
      color: var(--text-sub); margin-bottom: 8px; margin-left: 4px;
    }
    
    /* 인풋 스타일 업그레이드 */
    input { 
      width: 100%; 
      border: 2px solid #f0f0f0; 
      border-radius: 16px; 
      padding: 14px 16px; 
      font-size: 15px; 
      outline: none; 
      background: #f9f9f9; 
      font-family: inherit;
      transition: 0.2s;
      color: #333;
    }
    input:focus { 
        border-color: var(--primary-color); 
        background: #fff;
        box-shadow: 0 4px 12px rgba(98, 0, 234, 0.1);
    }

    /* 버튼 스타일 */
    .btn { 
      border: none; border-radius: 16px; padding: 16px; 
      font-weight: 800; font-size: 16px; cursor: pointer; width: 100%; 
      margin-top: 15px; transition: 0.2s;
      box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    }
    .primary { 
        background: var(--primary-grad); 
        color: #fff; 
    }
    .primary:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(98, 0, 234, 0.3); }
    .primary:active { transform: scale(0.98); }
    .primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

    /* 메시지 박스 */
    .msg { 
      margin-bottom: 20px; padding: 12px; border-radius: 12px; 
      font-weight: 700; font-size: 13px; display: none; white-space: pre-line;
      text-align: center;
    }
    .ok { background: #e8f5e9; color: #2e7d32; border: 1px solid #c8e6c9; }
    .err { background: #ffebee; color: #c62828; border: 1px solid #ffcdd2; }

    /* 로그인 옵션 */
    .login-options { 
      display: flex; align-items: center; justify-content: space-between; 
      margin-top: 12px; font-size: 13px; color: var(--text-sub); font-weight: 500;
    }
    .opt { display: flex; align-items: center; gap: 6px; cursor: pointer; }
    .opt input { width: 18px; height: 18px; margin: 0; border: 2px solid #ddd; border-radius: 4px; }

    /* 데모 박스 */
    .demoBox { 
      margin-top: 25px; background: #fff; border: 1px dashed #cbd5e0; 
      border-radius: 16px; padding: 15px; 
    }
    .demoTitle { font-weight: 800; font-size: 12px; margin-bottom: 8px; color: var(--primary-color); text-align: center; }
    .demoBtns { display: flex; gap: 8px; }
    .demoBtn { 
      flex: 1; border: 1px solid #e2e8f0; background: #f8fafc; border-radius: 12px; 
      padding: 10px; font-weight: 700; cursor: pointer; font-size: 11px; color: #4a5568;
      transition: 0.2s;
    }
    .demoBtn:hover { background: #edf2f7; color: var(--primary-color); border-color: var(--primary-color); }

    .link-text { text-align: center; margin-top: 20px; color: #718096; font-size: 13px; font-weight: 500; }
    .link-text a { color: var(--primary-color); text-decoration: none; font-weight: 700; }

    /* 🔥 역할 선택 카드 (회원가입) */
    .role-pick { 
      display: flex; gap: 10px; 
      margin-bottom: 20px; 
    }
    .role-card { 
      flex: 1; border: 2px solid #f0f0f0; background: #fff; border-radius: 16px; 
      padding: 15px; cursor: pointer; transition: .2s; color: #2d3748; 
      text-align: center;
    }
    .role-card:hover { transform: translateY(-2px); }
    .role-card.active { 
      border-color: var(--primary-color); background: #f3e5f5; color: var(--primary-color);
      box-shadow: 0 4px 12px rgba(98, 0, 234, 0.15);
    }
    .role-title { font-size: 16px; font-weight: 800; margin-bottom: 6px; }
    .role-desc { font-size: 11px; color: #718096; font-weight: 600; }
    .role-card.active .role-desc { color: var(--primary-color); opacity: 0.8; }

    /* 주소 및 버튼 그룹 */
    .addr-box { display: flex; gap: 8px; align-items: center; }
    .icon-btn { 
      width: 50px; height: 50px; flex-shrink: 0; 
      background: #fff; border: 2px solid #e2e8f0; border-radius: 14px; 
      cursor: pointer; display: flex; align-items: center; justify-content: center; 
      font-size: 1.4rem; transition: .2s; 
    }
    .icon-btn:hover { border-color: var(--primary-color); background: #f3e5f5; }
    .icon-btn.verified { background: var(--success); border-color: var(--success); color: #fff; pointer-events: none; }

/* 기존 display: none; 을 지우거나 아래처럼 display: block; 으로 변경 */
#robotBox { 
  margin-top: 10px; 
  padding: 12px; 
  border: 2px solid #e2e8f0; 
  border-radius: 14px; 
  background: #f8fafc; 
  display: none; /* 👈 기본숨김 none에서 block으로 변경하여 항상 노출 */
  text-align: center; 
}
    .robot-label { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 800; color: #2d3748; font-size: 14px; }
    .robot-label input { width: 20px; height: 20px; margin: 0; accent-color: var(--primary-color); }

    .hide { display: none !important; }
    
    /* 로딩 애니메이션 */
    .loading { 
        display: none; 
        position: absolute; top: 0; left: 0; width: 100%; height: 100%;
        background: rgba(255,255,255,0.9); z-index: 50;
        border-radius: 24px;
        flex-direction: column; align-items: center; justify-content: center;
    }
    .spinner { 
      border: 4px solid #f3f3f3; border-top: 4px solid var(--primary-color); border-radius: 50%; 
      width: 40px; height: 40px; animation: spin 1s linear infinite; margin: 0 auto; 
    }
    @keyframes spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}

    /* =====================
       📢 안내 팝업 (Glassmorphism Style)
       ===================== */
    .modal-overlay {
      position: fixed; top: 0; left: 0; width: 100%; height: 100%;
      background: rgba(0, 0, 0, 0.75); /* 더 진하게 */
      z-index: 9999;
      display: none; 
      align-items: center; justify-content: center;
      padding: 20px;
      backdrop-filter: blur(5px);
    }
    .modal-content {
      background: #fff;
      width: 100%; max-width: 380px;
      border-radius: 24px;
      overflow: hidden;
      box-shadow: 0 20px 50px rgba(0,0,0,0.5);
      animation: popUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }
    @keyframes popUp {
      from { transform: scale(0.8) translateY(20px); opacity: 0; }
      to { transform: scale(1) translateY(0); opacity: 1; }
    }
    .modal-body { padding: 0; }
    
    .modal-text-box {
        padding: 30px 25px;
        background: linear-gradient(135deg, #2d3436 0%, #000000 100%); /* 고급스러운 블랙 테마 */
        color: #fff;
        position: relative;
        overflow: hidden;
    }
    /* 팝업 배경 데코레이션 */
    .modal-text-box::before {
        content: ''; position: absolute; top: -50px; right: -50px;
        width: 150px; height: 150px; background: var(--primary-color);
        border-radius: 50%; opacity: 0.3; filter: blur(40px);
    }

    .modal-footer {
      padding: 15px 20px;
      background: #fff;
      display: flex; justify-content: space-between; align-items: center;
    }
    .modal-close-btn {
      background: var(--text-main); color: #fff; border: none;
      padding: 10px 18px; border-radius: 12px; font-weight: 800;
      cursor: pointer; font-size: 13px; transition: 0.2s;
    }
    .modal-close-btn:active { transform: scale(0.95); }
    .modal-check-label {
      font-size: 13px; color: #555; font-weight: 700;
      display: flex; align-items: center; gap: 8px; cursor: pointer;
    }
    .modal-check-label input { width: 18px; height: 18px; margin: 0; accent-color: var(--primary-color); }

    /* PC에서만 상단 고정 */
    @media (min-width: 481px) {
      body { display: block; }
      .wrap { margin-top: 0; }
    }

    /* =========================================
       🔐 비밀번호 찾기 모달 (추가된 스타일)
       ========================================= */
    #findPwModal { display: none; z-index: 10000; } /* 기존 공지팝업보다 위에 뜨게 설정 */
    
    .pw-modal-box {
        background: #fff; width: 100%; max-width: 400px;
        border-radius: 20px; padding: 25px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.2);
        position: relative;
    }
    .pw-title { font-size: 18px; font-weight: 800; margin-bottom: 20px; text-align: center; color: #333; }
    
    /* 난수 확인 디자인 */
    .captcha-wrap {
        background: #edf2f7; padding: 15px; border-radius: 12px;
        text-align: center; margin-bottom: 15px; border: 1px solid #e2e8f0;
    }
    .captcha-code {
        font-size: 24px; font-weight: 900; letter-spacing: 8px;
        color: #4a5568; text-decoration: line-through; opacity: 0.7;
        font-family: 'Courier New', monospace;
    }
    .refresh-icon { cursor: pointer; font-size: 12px; color: var(--primary-color); font-weight: 700; margin-top: 5px; display: block;}
    
    .pw-btn-group { display: flex; gap: 10px; margin-top: 20px; }
    .btn-cancel { background: #f1f3f5; color: #495057; }
    
    /* 폰번호 확인 버튼 그룹 스타일 */
    .input-with-btn {
        display: flex; gap: 8px; align-items: center;
    }
    .btn-check {
        padding: 0 16px; height: 50px; /* 인풋 높이와 맞춤 */
        border-radius: 16px; border: 1px solid #ddd;
        background: #fff; color: #555; font-weight: 700; font-size: 13px;
        cursor: pointer; transition: 0.2s; white-space: nowrap;
    }
    .btn-check:hover { background: #f1f3f5; border-color: #ccc; }
    .btn-check.verified { 
        background: var(--success); color: white; border-color: var(--success); 
        cursor: default; 
    }
	
/* -----------------------------------------
   ✨ 가이드 풍선 전용 스타일 (중앙 글자 고정형)
   ----------------------------------------- */
.guide-wrapper {
    position: fixed;
    top: 45%; /* 화면 우측 중앙 */
    right: 15px;
    z-index: 10001;
}
.guide-pulse {
    position: absolute;
    top: 0; right: 0;
    width: 60px; height: 60px;
    background: rgba(98, 0, 234, 0.2);
    border-radius: 50%;
    animation: guide-ani 2s infinite;
}
@keyframes guide-ani {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(2.2); opacity: 0; }
}
.guide-main-btn {
    position: relative;
    width: 60px; height: 60px;
    background: var(--primary-grad);
    border: 2px solid #fff; /* 파동 테두리 색 두께 */
    border-radius: 50%;
    cursor: pointer;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    z-index: 10;
}
/* 🚩 버튼 안의 글자 고정 */
.guide-main-btn span {
    color: white; font-weight: 900; font-size: 10px; line-height: 1.2;
}
.guide-pop-bubble {
    position: absolute;
    top: -30px; right: 75px; /* 왼쪽으로 팝업 */
    width: 260px; background: #fff;
    border: 2px solid var(--primary-color);
    border-radius: 20px; padding: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    display: none; /* 클릭전 숨김 */
}
.guide-pop-bubble::after {
    content: ''; position: absolute; top: 45px; right: -12px;
    border-width: 12px 0 12px 12px; border-style: solid;
    border-color: transparent transparent transparent var(--primary-color);
}
.g-link {
    display: block; width: 100%; padding: 12px; margin-top: 8px;
    border-radius: 12px; text-decoration: none; font-size: 13px;
    font-weight: 800; text-align: center; color: #fff;
    background: var(--primary-grad);
}

    /* -----------------------------------------
       👑 VIP 사전등록 (황금색 반투명 파동 - 우측 중앙 고정)
       ----------------------------------------- */
    .pre-reg-wrapper {
        position: fixed;
        top: 62%; /* 화면 우측 중앙 */
        right: 10px;
        transform: translateY(-50%);
        z-index: 10001;
    }

    .pre-reg-pulse {
        position: absolute;
        top: 0; right: 0;
        width: 65px; height: 65px;
        background: rgba(255, 193, 7, 0.2); /* 반투명 처리 */
        border-radius: 50%;
        animation: gold-pulse-ani 2s infinite;
    }

    @keyframes gold-pulse-ani {
        0% { transform: scale(1); opacity: 0.8; }
        100% { transform: scale(2.3); opacity: 0; }
    }

    .pre-reg-btn {
        position: relative;
        width: 60px; height: 60px;
        background: linear-gradient(135deg, #ffc107 0%, #ff8f00 100%);
        border: 2px solid #fff;
        border-radius: 50%;
        cursor: pointer;
        display: flex; flex-direction: column; align-items: center; justify-content: center;
        box-shadow: 0 4px 15px rgba(255, 143, 0, 0.4);
        z-index: 10;
    }

    .pre-reg-btn span {
        color: white; font-weight: 900; font-size: 10.5px; line-height: 1.2;
    }

    .pre-reg-bubble {
        position: absolute;
        top: -60px; right: 80px; /* 왼쪽으로 팝업 */
        width: 270px; background: rgba(255, 255, 255, 0.98);
        border: 2px solid #ffc107;
        border-radius: 22px; padding: 20px;
        box-shadow: 0 10px 40px rgba(0,0,0,0.2);
        display: none;
        backdrop-filter: blur(5px); /* 배경 살짝 흐리게 */
    }

    .pre-reg-bubble::after {
        content: ''; position: absolute; top: 80px; right: -12px;
        border-width: 12px 0 12px 12px; border-style: solid;
        border-color: transparent transparent transparent #ffc107;
    }

    .gold-link {
        display: block; width: 100%; padding: 14px; margin-top: 10px;
        border-radius: 14px; text-decoration: none; font-size: 15px;
        font-weight: 900; text-align: center; color: #fff;
        background: linear-gradient(135deg, #ffc107 0%, #ff8f00 100%);
        box-shadow: 0 4px 10px rgba(255, 143, 0, 0.3);
    }
    .gold-link:active { transform: scale(0.96); }