/* ============================================================
 * 배때지 V2 · 회원 인증 화면 공통 (로그인 / 회원가입)
 * 브레이크포인트: 모바일 ≤600 / 태블릿 601~1023 / PC ≥1024
 * ============================================================ */

.v2auth {
    min-height: calc(100vh - 160px);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 32px 16px calc(96px + env(safe-area-inset-bottom));
    background: #f6f6f4;
    box-sizing: border-box;
}

.v2auth-box {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 16px;
    padding: 28px 20px 24px;
    box-sizing: border-box;
}

.v2auth-h1 {
    margin: 0 0 6px;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #111;
}

.v2auth-sub {
    margin: 0 0 22px;
    font-size: 13px;
    color: #888;
}

/* ── 입력 ─────────────────────────────── */
.v2auth-field { margin-bottom: 14px; }

.v2auth-label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #333;
}

.v2auth-input {
    width: 100%;
    height: 50px;
    padding: 0 14px;
    font-size: 16px;              /* iOS 자동 확대 방지 — 16px 미만으로 낮추지 말 것 */
    color: #111;
    background: #fafafa;
    border: 1px solid #e3e3e3;
    border-radius: 10px;
    box-sizing: border-box;
    transition: border-color .15s, background .15s;
    -webkit-appearance: none;
    appearance: none;
}

.v2auth-input:focus {
    outline: none;
    background: #fff;
    border-color: #111;
}

.v2auth-input::placeholder { color: #b5b5b5; }

.v2auth-pwwrap { position: relative; }

.v2auth-pwwrap .v2auth-input { padding-right: 64px; }

.v2auth-pweye {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    min-width: 48px;              /* 탭 타겟 확보 */
    height: 40px;
    padding: 0 8px;
    font-size: 12px;
    color: #666;
    background: transparent;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
}

.v2auth-pweye:hover { background: #f1f1f1; }

/* ── 옵션 ─────────────────────────────── */
.v2auth-opts {
    display: flex;
    align-items: center;
    gap: 18px;
    margin: 4px 0 20px;
    flex-wrap: wrap;
}

.v2auth-chk {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 44px;             /* 탭 타겟 */
    font-size: 13px;
    color: #555;
    cursor: pointer;
    user-select: none;
}

.v2auth-chk input {
    width: 18px;
    height: 18px;
    accent-color: #111;
    margin: 0;
    cursor: pointer;
}

/* ── 버튼 ─────────────────────────────── */
.v2auth-submit {
    width: 100%;
    height: 52px;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    background: #111;
    border: 0;
    border-radius: 10px;
    cursor: pointer;
    transition: opacity .15s;
}

.v2auth-submit:hover  { opacity: .88; }
.v2auth-submit:active { opacity: .75; }

/* ── 구분선 ───────────────────────────── */
.v2auth-div {
    position: relative;
    margin: 22px 0 16px;
    text-align: center;
}

.v2auth-div::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    background: #ececec;
}

.v2auth-div span {
    position: relative;
    padding: 0 12px;
    font-size: 12px;
    color: #aaa;
    background: #fff;
}

/* ── Google ───────────────────────────── */
.v2auth-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 52px;
    font-size: 15px;
    font-weight: 600;
    color: #333;
    text-decoration: none;
    background: #fff;
    border: 1px solid #dadada;
    border-radius: 10px;
    box-sizing: border-box;
}

.v2auth-google:hover { background: #fafafa; }

.v2auth-glogo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    font-weight: 700;
    color: #4285f4;
}

/* ── 하단 링크 ────────────────────────── */
.v2auth-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 22px;
}

.v2auth-links a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    font-size: 13px;
    color: #555;
    text-decoration: none;
}

.v2auth-links a:hover { color: #111; text-decoration: underline; }

.v2auth-bar {
    width: 1px;
    height: 12px;
    background: #ddd;
}

/* ── 태블릿 601~1023 ──────────────────── */
@media (min-width: 601px) {
    .v2auth      { padding-top: 48px; }
    .v2auth-box  { max-width: 440px; padding: 32px 28px 28px; }
    .v2auth-h1   { font-size: 24px; }
}

/* ── PC ≥1024 ─────────────────────────── */
@media (min-width: 1024px) {
    .v2auth      { align-items: center; padding: 56px 24px 72px; }
    .v2auth-box  { max-width: 460px; padding: 40px 36px 32px; }
    .v2auth-h1   { font-size: 26px; }
    .v2auth-sub  { margin-bottom: 26px; }
}

/* ============================================================
 * 회원가입 추가 (v2/register.php)
 * ============================================================ */
.v2auth-box--wide { max-width: 480px; }

.v2auth-req {
    margin-left: 4px;
    font-size: 11px;
    font-style: normal;
    font-weight: 600;
    color: #d33;
}

.v2auth-inline { display: flex; gap: 8px; }
.v2auth-inline .v2auth-input { flex: 1 1 auto; min-width: 0; }

.v2auth-mini {
    flex: 0 0 auto;
    min-width: 88px;
    height: 50px;
    padding: 0 12px;
    font-size: 13px;
    font-weight: 600;
    color: #111;
    background: #f1f1ef;
    border: 1px solid #e3e3e3;
    border-radius: 10px;
    cursor: pointer;
    white-space: nowrap;
}
.v2auth-mini:hover:not(:disabled) { background: #e8e8e5; }
.v2auth-mini:disabled { opacity: .5; cursor: default; }

.v2auth-mt8 { margin-top: 8px; }

.v2auth-msg { margin: 6px 0 0; font-size: 12px; line-height: 1.5; min-height: 0; }
.v2auth-msg.is-ok  { color: #1a7f37; }
.v2auth-msg.is-err { color: #d33; }

.v2auth-hint { margin: 6px 0 0; font-size: 12px; color: #999; }

.v2auth-chk--block { display: flex; width: 100%; }

.v2auth-agree { border-top: 1px solid #f0f0f0; padding-top: 2px; }

.v2auth-terms { margin: 0 0 6px 25px; }

.v2auth-terms summary {
    font-size: 12px;
    color: #888;
    cursor: pointer;
    min-height: 32px;
    display: flex;
    align-items: center;
}

.v2auth-termsbody {
    max-height: 180px;
    overflow-y: auto;
    padding: 12px;
    margin-bottom: 8px;
    font-size: 12px;
    line-height: 1.65;
    color: #555;
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow-wrap: break-word;
    word-break: break-all;
}

.v2auth-note { font-size: 13px; color: #888; }

@media (min-width: 601px) { .v2auth-box--wide { max-width: 520px; } }
@media (min-width: 1024px) { .v2auth-box--wide { max-width: 560px; } }

/* Google 버튼 — 준비중 상태 */
.v2auth-google.is-soon {
    position: relative;
    color: #999;
    background: #fafafa;
    border-style: dashed;
    cursor: not-allowed;
    font-family: inherit;
}
.v2auth-google.is-soon .v2auth-glogo { opacity: .45; }
.v2auth-soon {
    margin-left: 6px;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 700;
    color: #888;
    background: #eee;
    border-radius: 999px;
    white-space: nowrap;
}

/* ============================================================
 * 회원가입 완료 (v2/register_result.php)
 * ============================================================ */
.v2auth-done { text-align: center; }

.v2auth-doneic {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 68px;
    height: 68px;
    margin-bottom: 16px;
    color: #111;                 /* 과한 초록 성공화면을 만들지 않는다 */
    background: #f3f3f1;
    border-radius: 50%;
}

.v2auth-done .v2auth-h1 { margin-bottom: 12px; }

.v2auth-donetxt {
    margin: 0 0 20px;
    font-size: 14px;
    line-height: 1.7;
    color: #666;
}
.v2auth-donetxt strong { color: #111; font-weight: 700; }

.v2auth-count {
    margin: 0 0 20px;
    padding: 11px 12px;
    font-size: 13px;
    color: #666;
    background: #f6f6f4;
    border-radius: 10px;
}
.v2auth-count strong {
    display: inline-block;
    min-width: 1.2em;            /* 3→2→1 숫자 폭 변화로 흔들리지 않게 고정 */
    font-size: 15px;
    font-weight: 700;
    color: #111;
    font-variant-numeric: tabular-nums;
}

.v2auth-donebtns { display: flex; flex-direction: column; gap: 10px; }

.v2auth-submit--link {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-sizing: border-box;
}

.v2auth-ghost {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 52px;
    font-size: 15px;
    font-weight: 600;
    color: #333;
    text-decoration: none;
    background: #fff;
    border: 1px solid #dadada;
    border-radius: 10px;
    box-sizing: border-box;
}
.v2auth-ghost:hover { background: #fafafa; }

@media (prefers-reduced-motion: reduce) {
    .v2auth-submit, .v2auth-ghost, .v2auth-input { transition: none; }
}

/* 인증 실패/경고 아이콘 */
.v2auth-doneic.is-warn { color: #b4884a; background: #faf4ea; }

/* ============================================================
 * 신규회원 혜택 배너 (v2/register.php 전용 — 로그인 화면에는 없음)
 * 폼과 같은 폭을 쓰도록 .v2auth-field 와 동일한 흐름에 둔다.
 * ============================================================ */
.v2auth-bonus {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    width: 100%;
    margin: 0 0 18px;
    padding: 16px 16px 14px;
    box-sizing: border-box;

    background: linear-gradient(180deg, #fffaf0 0%, #fdf3dd 100%);
    border: 1px solid #f0dfb4;
    border-radius: 15px;
    box-shadow: 0 2px 8px rgba(180, 140, 60, .10);

    animation: v2authBonusUp .3s ease-out both;   /* 진입 시 1회만 */
}

@keyframes v2authBonusUp {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: none; }
}

.v2auth-bonus-ic {
    flex: 0 0 auto;
    font-size: 24px;
    line-height: 1.2;
}

.v2auth-bonus-txt { flex: 1 1 auto; min-width: 0; }

.v2auth-bonus-ttl {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 700;
    color: #6b4e12;           /* 대비 확보 (연노랑 배경 대비 약 7:1) */
    letter-spacing: -0.01em;
}

.v2auth-bonus-lead {
    margin: 0 0 2px;
    font-size: 13px;
    color: #7a6023;
}

.v2auth-bonus-point {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 0 10px;
}

.v2auth-bonus-num {
    font-size: 26px;
    font-weight: 800;
    line-height: 1.15;
    color: #b8860b;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}

.v2auth-bonus-now {
    font-size: 14px;
    font-weight: 700;
    color: #6b4e12;
}

.v2auth-bonus-note,
.v2auth-bonus-warn {
    margin: 0;
    font-size: 12px;
    line-height: 1.6;
    color: #7a6023;
    overflow-wrap: break-word;
    word-break: keep-all;      /* 한글 단어 중간 줄바꿈 방지 */
}

.v2auth-bonus-warn { margin-top: 4px; color: #8a6a2a; }

.v2auth-bonus-badge {
    display: inline-block;
    padding: 2px 8px;
    font-size: 12px;
    font-style: normal;
    font-weight: 700;
    color: #fff;
    background: #d93025;       /* 흰 글자 대비 약 4.9:1 */
    border-radius: 999px;
    white-space: nowrap;
}

/* 태블릿 601~1023 */
@media (min-width: 601px) {
    .v2auth-bonus     { padding: 18px 18px 16px; gap: 14px; }
    .v2auth-bonus-ic  { font-size: 26px; }
    .v2auth-bonus-num { font-size: 28px; }
}

/* PC ≥1024 */
@media (min-width: 1024px) {
    .v2auth-bonus     { padding: 20px; }
    .v2auth-bonus-ic  { font-size: 28px; }
    .v2auth-bonus-ttl { font-size: 15px; }
    .v2auth-bonus-num { font-size: 30px; }
    .v2auth-bonus-now { font-size: 15px; }
}

/* 애니메이션 최소화 설정 존중 */
@media (prefers-reduced-motion: reduce) {
    .v2auth-bonus { animation: none; }
}

/* ── 네이버 간편로그인 (구글 버튼 아래) ───────────────────── */
.v2auth-naver {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; height: 50px; margin-top: 10px;
    border: 1px solid #03C75A; border-radius: 10px;
    background: #03C75A; color: #fff;
    font-size: 15px; font-weight: 600; line-height: 1;
    text-decoration: none; cursor: pointer; box-sizing: border-box;
    -webkit-appearance: none; appearance: none;
    transition: background .15s ease;
}
.v2auth-naver:hover { background: #02b350; }
.v2auth-naver:active { background: #029a45; }
.v2auth-naver .v2auth-nlogo { display: block; flex: 0 0 auto; }
.v2auth-naver.is-soon { opacity: .55; cursor: default; }
.v2auth-naver.is-soon:hover { background: #03C75A; }

/* ===== 연령대 선택(회원가입 필수) — 2026-07-21 ===== */
.v2auth-ageband{ display:grid; grid-template-columns:repeat(2,1fr); gap:8px; }
@media (min-width:480px){ .v2auth-ageband{ grid-template-columns:repeat(4,1fr); } }
.v2auth-ageband-opt{ position:relative; display:flex; }
.v2auth-ageband-opt input{ position:absolute; opacity:0; width:0; height:0; }
.v2auth-ageband-opt span{
    flex:1 1 auto; display:flex; align-items:center; justify-content:center;
    min-height:46px; padding:0 10px; border:1px solid var(--au-line,#e5e5e8); border-radius:12px;
    background:#fff; color:#4a4a52; font-size:14px; font-weight:700; text-align:center;
    cursor:pointer; transition:border-color .15s, background .15s, color .15s, box-shadow .15s;
    -webkit-user-select:none; user-select:none;
}
.v2auth-ageband-opt input:checked + span{
    border-color:#16161a; background:#16161a; color:#fff; box-shadow:0 4px 14px rgba(0,0,0,.14);
}
.v2auth-ageband-opt input:focus-visible + span{ outline:2px solid #3d5afe; outline-offset:2px; }
.v2auth-ageband-opt span:hover{ border-color:#c9ccd2; }
