/* ============================================================
   로그인 페이지 리뉴얼 v1 (2026-09-16)
   - 상단 히어로(헤드라인+캐릭터)는 이미지 통배경 + 텍스트 오버레이
   - 하단 폼은 실제 HTML (기기·키보드 대응 위해 이미지 미사용)
   - 스코프: .lg-page
   ============================================================ */

.lg-page {
    --lg-orange:      #F9781A;
    --lg-orange-deep: #E56610;
    --lg-cream:       #FDF8F2;
    --lg-line:        #E8E1D6;
    --lg-ink:         #1F1815;
    --lg-ink-2:       #4A423B;
    --lg-ink-3:       #9A928A;

    background: var(--lg-cream);
    min-height: 100vh;
    /* SE(375x667) 한 화면에 전부 들어가도록 간격을 압축 */
    padding-bottom: 8px;
    font-family: 'Pretendard', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
    color: var(--lg-ink);
}
.lg-page *,
.lg-page *:before,
.lg-page *:after {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}
.lg-page a { text-decoration: none; }
.lg-page a:hover { text-decoration: none; }

/* ---------- 전용 상단바 (← 로그인) ---------- */
.lg-page .lg-topbar {
    position: relative;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.lg-page .lg-back {
    position: absolute;
    left: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--lg-ink);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.lg-page .lg-back svg { width: 24px; height: 24px; display: block; }
.lg-page .lg-back:active { opacity: .55; }
.lg-page .lg-topbar-title {
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -.03em;
    color: var(--lg-ink);
}

/* ---------- 히어로 (통배경 이미지 + 텍스트 오버레이) ---------- */
.lg-page .lg-hero {
    position: relative;
    display: flex;
    align-items: center;
    padding: 10px 20px 12px;
    /* 기본형: 투명 캐릭터 이미지 + HTML 문구 오버레이 (회원가입 등) */
    aspect-ratio: 375 / 165;
    min-height: 155px;
    background-color: var(--lg-cream);
    background-image: url('/images/login/join-hero.png');
    background-repeat: no-repeat;
    background-position: right center;
    background-size: cover;
    overflow: hidden;
}
/* 좌측 텍스트 가독성 오버레이 (기본형 전용) */
.lg-page .lg-hero:before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg,
        rgba(253, 248, 242, .96) 0%,
        rgba(253, 248, 242, .82) 30%,
        rgba(253, 248, 242, .28) 48%,
        rgba(253, 248, 242, 0)   62%);
    pointer-events: none;
}

/* 통이미지형: 문구·배경이 이미지에 모두 포함된 경우
   이미지 원본 비율에 맞춰야 잘리지 않음 */
.lg-page .lg-hero.is-full {
    padding: 0;
    min-height: 0;
    /* login-hero.png / join-hero.png 실측 1125 x 495 와 동일하게 (어긋나면 잘림) */
    aspect-ratio: 1125 / 495;
    background-position: center;
    background-size: 100% auto;
}
.lg-page .lg-hero.is-full:before { content: none; }
.lg-page .lg-hero.is-full.hero-login { background-image: url('/images/login/login-hero.png'); }
.lg-page .lg-hero.is-full.hero-join  { background-image: url('/images/login/join-hero.png'); }
.lg-page .lg-hero-txt {
    position: relative;
    z-index: 1;
    /* 캐릭터 좌측(≈50%) 을 넘지 않도록 */
    max-width: 56%;
}
.lg-page .lg-hero-title {
    margin: 0;
    font-size: 24px;
    font-weight: 900;
    line-height: 1.22;
    letter-spacing: -.045em;
    color: var(--lg-ink);
}
.lg-page .lg-hero-sub {
    margin: 9px 0 0;
    font-size: 11.5px;
    white-space: nowrap;
    font-weight: 600;
    letter-spacing: -.025em;
    color: #8A7F72;
    line-height: 1.4;
}

/* ---------- 폼 ---------- */
.lg-page .lg-form { padding: 2px 20px 0; }

.lg-page .lg-field { margin-bottom: 8px; }
.lg-page .lg-label {
    display: block;
    margin: 0 0 4px 2px;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: -.03em;
    color: var(--lg-ink);
}
.lg-page .lg-input-wrap { position: relative; }
.lg-page .lg-input {
    width: 100%;
    height: 44px;
    padding: 0 16px;
    background: #FFFFFF;
    border: 1.5px solid #E3DCD1;
    border-radius: 13px;
    font-size: 14.5px;
    font-weight: 500;
    letter-spacing: -.02em;
    color: var(--lg-ink);
    font-family: inherit;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
    -webkit-appearance: none;
    appearance: none;
}
.lg-page .lg-input::placeholder { color: #BDB5AA; font-weight: 500; }
.lg-page .lg-input:focus {
    border-color: var(--lg-orange);
    box-shadow: 0 0 0 3px rgba(249, 120, 26, .12);
}
/* 브라우저 자동완성이 입력칸을 하늘색으로 덮는 것 방지 (항상 흰색 유지) */
.lg-page .lg-input:-webkit-autofill,
.lg-page .lg-input:-webkit-autofill:hover,
.lg-page .lg-input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px #fff inset;
    box-shadow: 0 0 0 1000px #fff inset;
    -webkit-text-fill-color: var(--lg-ink);
    caret-color: var(--lg-ink);
    /* 자동완성 배경 복원 애니메이션을 사실상 멈춤 */
    transition: background-color 9999s ease-in-out 0s;
}
.lg-page .lg-input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px #fff inset, 0 0 0 3px rgba(249, 120, 26, .12);
    box-shadow: 0 0 0 1000px #fff inset, 0 0 0 3px rgba(249, 120, 26, .12);
}
/* 비밀번호 표시 토글 */
.lg-page .lg-input.has-eye { padding-right: 48px; }
.lg-page .lg-eye {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: #A79E93;
}
.lg-page .lg-eye svg { width: 21px; height: 21px; display: block; }
.lg-page .lg-eye:active { color: var(--lg-orange-deep); }

/* 로그인 버튼 */
.lg-page .lg-submit {
    display: block;
    width: 100%;
    margin-top: 12px;
    padding: 13px 0;
    border: none;
    border-radius: 13px;
    background: linear-gradient(100deg, #FFA04A 0%, #FB7F22 48%, #F26A0C 100%);
    color: #fff;
    font-size: 16.5px;
    font-weight: 900;
    letter-spacing: -.03em;
    text-align: center;
    cursor: pointer;
    font-family: inherit;
    box-shadow: none;
}
.lg-page .lg-submit:hover { color: #fff; }
.lg-page .lg-submit:active { transform: translateY(1px); }

/* 아이디/비밀번호 찾기 */
.lg-page .lg-find {
    margin-top: 10px;
    text-align: center;
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: -.02em;
    color: var(--lg-ink-2);
}
.lg-page .lg-find a { color: var(--lg-ink-2); }
.lg-page .lg-find a:active { color: var(--lg-orange-deep); }
.lg-page .lg-find .lg-find-bar {
    display: inline-block;
    margin: 0 10px;
    color: #D6CEC2;
}

/* 간편 로그인 구분선 */
.lg-page .lg-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 13px 0 10px;
}
.lg-page .lg-divider:before,
.lg-page .lg-divider:after {
    content: '';
    flex: 1 1 auto;
    height: 1px;
    background: var(--lg-line);
}
.lg-page .lg-divider span {
    flex: 0 0 auto;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: -.02em;
    color: var(--lg-ink-3);
}

/* SNS 버튼 */
.lg-page .lg-sns {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 26px;
}
.lg-page .lg-sns li { text-align: center; }
.lg-page .lg-sns a { display: inline-block; }
.lg-page .lg-sns img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    margin: 0 auto;
    box-shadow: 0 3px 8px rgba(0, 0, 0, .10);
}
.lg-page .lg-sns-name {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: -.02em;
    color: var(--lg-ink-2);
}

/* 하단 회원가입 */
.lg-page .lg-join {
    margin-top: 11px;
    padding-top: 10px;
    border-top: 1px solid var(--lg-line);
    text-align: center;
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: -.02em;
    color: var(--lg-ink-3);
}
.lg-page .lg-join a {
    margin-left: 6px;
    color: var(--lg-orange-deep);
    font-weight: 900;
}

/* jQuery validate 에러 메시지 */
.lg-page label.error {
    display: block;
    margin: 6px 2px 0;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: -.02em;
    color: #D64533;
}
.lg-page .lg-input.error { border-color: #E8A79E; }
