/**
 * login.css — 로그인/가입 공용 화면 스타일 (Soft 테마)
 * 경로: /common/login/login.css
 *
 * Soft 팔레트 HEX 하드코딩 (output.css 비로드 standalone 페이지).
 * 네임스페이스: .auth-*
 */

html, body {
    margin: 0;
    padding: 0;
    background: #f4efe4;
}
.auth-body {
    min-height: 100vh;
    color: #2d3126;
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
}
.auth-body *, .auth-body *::before, .auth-body *::after { box-sizing: border-box; }

/* ─── 배경 데코 ─── */
.auth-body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(circle at 18% 24%, rgba(201,125,90,0.15), transparent 42%),
        radial-gradient(circle at 82% 76%, rgba(122,139,111,0.15), transparent 42%),
        #f4efe4;
    pointer-events: none;
}

/* ═══ 레이아웃 ═══ */
.auth-wrap {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px 24px;
}
.auth-card {
    width: 100%;
    max-width: 420px;
    background: #fbf7ec;
    border: 1px solid rgba(45,49,38,0.10);
    border-radius: 24px;
    padding: 36px 32px;
    box-shadow:
        0 24px 64px rgba(45,49,38,0.10),
        0 8px 24px rgba(45,49,38,0.06),
        0 0 0 1px rgba(45,49,38,0.04);
}
.auth-card__head { text-align: center; margin-bottom: 28px; }
.auth-card__brand { display: inline-block; margin: 0 auto 18px; }
.auth-card__brand svg { height: 40px; width: auto; display: block; }
.auth-card__title {
    font-family: 'Noto Serif KR', Georgia, serif;
    font-size: 26px;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin: 0 0 6px;
    color: #2d3126;
}
.auth-card__sub {
    font-size: 13.5px;
    color: rgba(45,49,38,0.62);
    margin: 0;
}

/* ═══ 알림 ═══ */
.auth-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 13.5px;
    line-height: 1.55;
    margin-bottom: 18px;
    border: 1px solid;
}
.auth-alert .material-symbols-outlined { font-size: 20px; flex-shrink: 0; margin-top: 1px; }
.auth-alert--ok  { background: #eef1eb; border-color: rgba(122,139,111,0.35); color: #4b5844; }
.auth-alert--err { background: #fbeeee; border-color: rgba(194,77,77,0.35); color: #a03a3a; }

/* ═══ Google 버튼 ═══ */
.auth-gbtn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    height: 52px;
    padding: 0 20px;
    border-radius: 9999px;
    background: #ffffff;
    color: #2d3126;
    border: 1px solid rgba(45,49,38,0.18);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: transform .15s ease, box-shadow .2s ease, border-color .2s ease, background .15s ease;
    box-shadow: 0 2px 6px rgba(45,49,38,0.04);
}
.auth-gbtn:hover {
    border-color: rgba(45,49,38,0.35);
    box-shadow: 0 8px 24px rgba(45,49,38,0.10);
    transform: translateY(-1px);
    background: #fefefe;
}
.auth-gbtn:active { transform: translateY(0); }
.auth-gbtn__logo { width: 20px; height: 20px; flex-shrink: 0; }

.auth-note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 12.5px;
    color: rgba(45,49,38,0.72);
    margin: 16px 0 0;
    padding: 10px 12px;
    background: rgba(217,164,65,0.10);
    border: 1px solid rgba(217,164,65,0.28);
    border-radius: 10px;
    line-height: 1.55;
}
.auth-note strong { font-weight: 600; color: #2d3126; }
.auth-note .material-symbols-outlined { font-size: 16px; flex-shrink: 0; margin-top: 1px; color: #b98830; }

/* ═══ 구분선 ═══ */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 24px 0 20px;
    color: rgba(45,49,38,0.40);
    font-size: 12px;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
.auth-divider::before, .auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(45,49,38,0.12);
}

/* ═══ 관리자 접기 섹션 ═══ */
.auth-admin {
    border: 1px solid rgba(45,49,38,0.10);
    border-radius: 14px;
    background: #f6f0df;
    overflow: hidden;
}
.auth-admin__toggle {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    font-size: 13px;
    font-weight: 500;
    color: rgba(45,49,38,0.75);
    user-select: none;
    transition: background .15s ease;
}
.auth-admin__toggle::-webkit-details-marker { display: none; }
.auth-admin__toggle::marker { content: ''; }
.auth-admin__toggle:hover { background: rgba(45,49,38,0.03); }
.auth-admin__toggle > .material-symbols-outlined:first-child {
    font-size: 18px;
    color: #5a7a95;
}
.auth-admin__chev {
    margin-left: auto;
    font-size: 20px;
    transition: transform .2s ease;
    color: rgba(45,49,38,0.55);
}
.auth-admin[open] .auth-admin__chev { transform: rotate(180deg); }

.auth-admin__form {
    padding: 4px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    border-top: 1px solid rgba(45,49,38,0.08);
    margin-top: 0;
    padding-top: 16px;
    background: #fbf7ec;
}
.auth-field { display: flex; flex-direction: column; gap: 4px; }
.auth-field__label {
    font-size: 12px;
    font-weight: 500;
    color: rgba(45,49,38,0.72);
}
.auth-field__input {
    height: 42px;
    padding: 0 14px;
    border-radius: 10px;
    border: 1px solid rgba(45,49,38,0.18);
    background: #ffffff;
    color: #2d3126;
    font-family: inherit;
    font-size: 14px;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.auth-field__input:focus {
    outline: 0;
    border-color: #c97d5a;
    box-shadow: 0 0 0 3px rgba(201,125,90,0.18);
}

.auth-check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: rgba(45,49,38,0.80);
    cursor: pointer;
}
.auth-check input {
    width: 16px;
    height: 16px;
    accent-color: #c97d5a;
    cursor: pointer;
}

.auth-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 44px;
    padding: 0 20px;
    border-radius: 9999px;
    background: #2d3126;
    color: #fbf7ec;
    border: 1px solid #2d3126;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background .15s ease, transform .1s ease;
    margin-top: 4px;
}
.auth-submit:hover { background: #1e211a; }
.auth-submit:active { transform: translateY(1px); }
.auth-submit .material-symbols-outlined { font-size: 18px; }

/* ═══ 푸터 링크 ═══ */
.auth-foot {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 24px;
    font-size: 12.5px;
    color: rgba(45,49,38,0.55);
    padding: 0 8px;
}
.auth-foot a {
    color: rgba(45,49,38,0.75);
    text-decoration: none;
    transition: color .15s ease;
}
.auth-foot a:hover { color: #2d3126; text-decoration: underline; }
.auth-foot__sep { opacity: 0.5; }

/* ═══ 온보딩(welcome) ═══ */
.auth-card--wide { max-width: 520px; }

.auth-welcome__badge {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(201,125,90,0.18), rgba(217,164,65,0.24));
    color: #c97d5a;
    display: inline-grid;
    place-items: center;
    margin: 0 auto 14px;
}
.auth-welcome__badge .material-symbols-outlined { font-size: 30px; }
.auth-welcome__skip-hint {
    display: block;
    margin-top: 6px;
    font-size: 11.5px;
    color: rgba(45,49,38,0.50);
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 0.04em;
}

.auth-welcome__step { margin-top: 22px; }
.auth-welcome__step-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}
.auth-welcome__step-num {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #2d3126;
    color: #fbf7ec;
    display: inline-grid;
    place-items: center;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}
.auth-welcome__step-title {
    margin: 0;
    font-family: 'Noto Serif KR', Georgia, serif;
    font-size: 15.5px;
    font-weight: 600;
    color: #2d3126;
    letter-spacing: -0.01em;
}

.auth-welcome__input { width: 100%; }
.auth-welcome__hint {
    margin: 6px 2px 0;
    font-size: 11.5px;
    color: rgba(45,49,38,0.55);
    line-height: 1.55;
}

.auth-welcome__readonly {
    background: #f4efe4;
    border: 1px solid rgba(45,49,38,0.12);
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 14px;
    color: rgba(45,49,38,0.78);
}

/* Chip 라디오 */
.auth-welcome__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.auth-welcome__chip {
    position: relative;
    cursor: pointer;
}
.auth-welcome__chip input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.auth-welcome__chip span {
    display: inline-flex;
    align-items: center;
    height: 34px;
    padding: 0 14px;
    border-radius: 9999px;
    background: #fbf7ec;
    border: 1px solid rgba(45,49,38,0.18);
    font-size: 13px;
    color: #2d3126;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
    user-select: none;
}
.auth-welcome__chip:hover span {
    border-color: rgba(45,49,38,0.40);
    background: #f4efe4;
}
.auth-welcome__chip input:checked + span {
    background: #2d3126;
    border-color: #2d3126;
    color: #fbf7ec;
    font-weight: 600;
}
.auth-welcome__chip--custom input:checked + span {
    background: #c97d5a;
    border-color: #c97d5a;
}
.auth-welcome__custom-input {
    margin-top: 10px;
    width: 100%;
    transition: opacity .15s ease, background .15s ease;
}
.auth-welcome__custom-input:disabled {
    opacity: 0.45;
    background: #f4efe4;
    cursor: not-allowed;
}
.auth-welcome__custom-input.is-active { opacity: 1; }

/* 이모지 그리드 */
.auth-welcome__emojis {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(46px, 1fr));
    gap: 6px;
}
.auth-welcome__emoji {
    position: relative;
    cursor: pointer;
    aspect-ratio: 1;
}
.auth-welcome__emoji input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.auth-welcome__emoji span {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    border-radius: 12px;
    background: #fbf7ec;
    border: 1px solid rgba(45,49,38,0.12);
    font-size: 24px;
    line-height: 1;
    transition: background .15s ease, border-color .15s ease, transform .1s ease;
    color: rgba(45,49,38,0.55);
}
.auth-welcome__emoji:hover span {
    border-color: rgba(45,49,38,0.30);
    background: #f4efe4;
}
.auth-welcome__emoji input:checked + span {
    border-color: #c97d5a;
    background: rgba(201,125,90,0.14);
    transform: scale(1.06);
}
.auth-welcome__emoji--none span .material-symbols-outlined { font-size: 18px; }

/* 액션 바 */
.auth-welcome__actions {
    display: flex;
    gap: 10px;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid rgba(45,49,38,0.08);
}
.auth-btn {
    flex: 1;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 18px;
    border-radius: 9999px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background .15s ease, border-color .15s ease, transform .1s ease;
}
.auth-btn--ghost {
    background: transparent;
    color: rgba(45,49,38,0.72);
    border-color: rgba(45,49,38,0.18);
    flex: 0 0 auto;
    padding: 0 22px;
}
.auth-btn--ghost:hover { background: #f4efe4; color: #2d3126; border-color: rgba(45,49,38,0.40); }
.auth-btn--ink {
    background: #2d3126;
    color: #fbf7ec;
    border-color: #2d3126;
    font-weight: 600;
}
.auth-btn--ink:hover { background: #1e211a; }
.auth-btn:active { transform: translateY(1px); }
.auth-btn .material-symbols-outlined { font-size: 18px; }

/* ═══ 반응형 ═══ */
@media (max-width: 480px) {
    .auth-wrap { padding: 24px 16px; }
    .auth-card { padding: 28px 22px; border-radius: 20px; }
    .auth-card__title { font-size: 22px; }
    .auth-welcome__actions { flex-direction: column-reverse; }
    .auth-btn--ghost { flex: 1; padding: 0 18px; }
    .auth-welcome__emojis { grid-template-columns: repeat(auto-fill, minmax(42px, 1fr)); }
}

/* ═══ 역할 선택 (role-select) ═══ */
.auth-role { margin-top: 8px; }
.auth-role__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
.auth-role__card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
    padding: 28px 18px;
    border-radius: 18px;
    background: #fbf7ec;
    border: 1px solid rgba(45,49,38,0.16);
    cursor: pointer;
    font-family: inherit;
    color: #2d3126;
    transition: transform .15s ease, box-shadow .2s ease, border-color .2s ease, background .15s ease;
    box-shadow: 0 2px 6px rgba(45,49,38,0.04);
}
.auth-role__card:hover {
    transform: translateY(-2px);
    border-color: rgba(45,49,38,0.32);
    box-shadow: 0 12px 30px rgba(45,49,38,0.12);
    background: #fefdf8;
}
.auth-role__card:active { transform: translateY(0); }
.auth-role__icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    font-size: 30px;
    margin-bottom: 4px;
}
.auth-role__card[value="mentor"] .auth-role__icon { background: rgba(122,139,111,0.16); color: #5f7250; }
.auth-role__card[value="learner"] .auth-role__icon { background: rgba(201,125,90,0.16); color: #c97d5a; }
.auth-role__name {
    font-family: 'Noto Serif KR', Georgia, serif;
    font-size: 16px;
    font-weight: 600;
}
.auth-role__desc {
    font-size: 12.5px;
    color: rgba(45,49,38,0.62);
    line-height: 1.5;
}
@media (max-width: 480px) {
    .auth-role__grid { grid-template-columns: 1fr; gap: 12px; }
    .auth-role__card { padding: 22px 16px; }
}
