:root{
    --bg:#f3f6fb;
    --card:#fff;
    --text:#111827;
    --muted:#6b7280;
    --line:#e5e7eb;

    --primary:#1d5bff;
    --primary-600:#174ae0;
    --primary-100:#e9efff;

    --dark:#2f2f2f;
    --dark-2:#1f1f1f;

    --shadow:0 20px 55px rgba(17,24,39,.14);
    --radius:14px;
    --focus:0 0 0 4px rgba(29,91,255,.18);

    --btn-h:56px;
    --input-h:52px;
    --danger:#ff3b30;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
    margin:0;
    font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, "Noto Sans KR", "Apple SD Gothic Neo", Arial, sans-serif;
    color:var(--text);
    background:var(--bg);
}

.page{
    min-height:100%;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:flex-start;
    padding:72px 16px;
    gap:18px;
}

/* Logo */
.brand{
    width:100px;
    display:flex;
    align-items:center;
    gap:10px;
    user-select:none;
}

/* Card */
.card{
    width:min(440px,100%);
    background:var(--card);
    border-radius:var(--radius);
    box-shadow:var(--shadow);
    overflow:hidden;
}

/* Header title */
.header{
    padding:18px 26px 12px;
    border-bottom:1px solid var(--line);
    background:#fff;
}
.header h1{
    margin:0;
    font-size:20px;
    font-weight:900;
    letter-spacing:-0.02em;
}

/* Tabs */
.tabs{
    display:grid;
    grid-template-columns:1fr 1fr;
    border-bottom:1px solid var(--line);
    background:#f8fafc;
}
.tab{
    border:0;
    background:transparent;
    height:56px;
    font-size: 17px;
    font-weight:900;
    cursor:pointer;
    color:#6b7280;
    transition:.15s ease;
}
.tab:focus-visible{outline:none; box-shadow:var(--focus); position:relative; z-index:1;}

.theme-member .tab[data-tab="member"]{ background:var(--primary); color:#fff; }
.theme-member .tab[data-tab="pro"]{ background:transparent; color:#6b7280; }

.theme-pro .tab[data-tab="pro"]{ background:var(--dark); color:#fff; }
.theme-pro .tab[data-tab="member"]{ background:#fff; color:#6b7280; }

.content{ padding:20px 26px 26px; }

/* Validation area (닫기 버튼) */
.validation{
    display:none;
    position:relative;
    background:#fff1f2;
    border:1px solid rgba(255,59,48,.25);
    color:#7f1d1d;
    border-radius:12px;
    padding:12px 44px 12px 12px;
    font-size:15px;
    line-height:1.35;
    margin-bottom:12px;
}
.validation.show{ display:block; }
.validation .close{
    position:absolute;
    right:10px;
    top:10px;
    width:28px;height:28px;
    border-radius:10px;
    border:0;
    background:#ffe4e6;
    cursor:pointer;
    font-weight:900;
}

/* Pro promo */
.pro-hero{
    display:none;
    background:#f3f4f6;
    border-radius:14px;
    padding:14px 14px;
    margin-bottom:12px;
}
.pro-hero .title{
    font-weight:900;
    margin:0 0 6px;
}
.pro-hero .desc{
    margin:0;
    color:var(--muted);
    font-size:15px;
    line-height:1.4;
}
.pro-hero .links{
    margin-top:10px;
    display:flex;
    gap:12px;
    font-size:15px;
    font-weight:900;
}
.link{
    background:none;
    border:0;
    padding:0;
    cursor:pointer;
    color:var(--muted);
    text-decoration:none;
    font-weight:900;
    font-size:12px;
}
.link:hover{ text-decoration:underline; }

/* Form */
.section-title{
    margin:14px 0 10px;
    font-weight:900;
    font-size:16px;
    color:#111827;
}

.field{ margin-top:10px; }
.control{ position:relative; }

.input{
    width:100%;
    height:var(--input-h);
    padding:0 48px 0 14px;
    border:1px solid #d1d5db;
    border-radius:12px;
    font-size:16px;
    outline:none;
    transition:.15s ease;
    background:#fff;
}
.input::placeholder{color:#9ca3af}
.input:focus{ border-color:var(--primary); box-shadow:var(--focus); }

.clear-btn{
    position:absolute;
    right:12px;
    top:50%;
    transform:translateY(-50%);
    width:28px;height:28px;
    border-radius:999px;
    border:0;
    background:#eef2f7;
    color:#64748b;
    display:none;
    align-items:center;
    justify-content:center;
    font-weight:900;
    cursor:pointer;
    line-height:1;
}
.clear-btn:focus-visible{ outline:none; box-shadow:var(--focus); }

.error-msg{
    margin-top:6px;
    font-size:14px;
    color:var(--danger);
    display:none;
    font-weight:600;
}
.error-msg.show{ display:block; }

/* Email 인증 버튼 */
.btn-row{
    margin-top:10px;
    display:flex;
    gap:10px;
}
.btn{
    height:var(--btn-h);
    border-radius:12px;
    border:0;
    font-weight:900;
    font-size:18px;
    cursor:pointer;
    display:flex;
    align-items:center;
    justify-content:center;
    transition:.15s ease;
    width:100%;
}
.btn-primary{
    background:var(--primary);
    color:#fff;
}
.btn-primary:hover{ background:var(--primary-600); }

.btn-dark{
    background:var(--dark);
    color:#fff;
}
.btn-dark:hover{ background:var(--dark-2); }

.btn-ghost{
    background:var(--primary-100);
    color:var(--primary);
}
.btn-ghost:hover{ filter:brightness(.99); }

.btn-small{
    height:46px;
    font-size:16px;
    border-radius:12px;
}

/* Agreements */
.agreements{
    margin-top:14px;
    padding-top:12px;
    border-top:1px solid var(--line);
}
.agreements .top-msg{
    font-weight:900;
    margin:0 0 10px;
}
.check{
    display:flex;
    align-items:flex-start;
    gap:10px;
    padding:10px 10px;
    border-radius:12px;
    background:#f8fafc;
    margin-top:10px;
}
.check input{ margin-top:3px; }
.check label{
    flex:1;
    font-size:15px;
    line-height:1.35;
    color:#111827;
    cursor:pointer;
}
.check .right{
    display:flex;
    align-items:center;
    gap:8px;
    flex:0 0 auto;
}
.pill{
    font-size:13px;
    font-weight:900;
    padding:4px 8px;
    border-radius:999px;
    background:#eef2ff;
    color:#1d5bff;
    white-space:nowrap;
}
.hint{
    margin:10px 0 0;
    color:var(--muted);
    font-size:14px;
    line-height:1.4;
}

/* Toggle blocks */
.member-only{ display:block; }
.pro-only{ display:none; }
.theme-pro .member-only{ display:none; }
.theme-pro .pro-only{ display:block; }
.theme-pro .pro-hero{ display:block; }

/* Modal */
.backdrop{
    position:fixed;
    inset:0;
    background:rgba(17,24,39,.45);
    display:none;
    align-items:center;
    justify-content:center;
    padding:18px;
    z-index:50;
}
.backdrop[aria-hidden="false"]{ display:flex; }
.modal{
    width:min(420px, 100%);
    background:#fff;
    border-radius:16px;
    box-shadow:0 30px 70px rgba(17,24,39,.22);
    overflow:hidden;
}
.modal-head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:14px 16px;
    border-bottom:1px solid var(--line);
    background:#fff;
}
.modal-title{ font-weight:900; }
.icon-btn{
    width:36px;height:36px;
    border-radius:10px;
    border:0;
    background:white;
    cursor:pointer;
    font-weight:900;
}
.icon-btn:focus-visible{ outline:none; box-shadow:var(--focus); }
.modal-body{ padding:16px; }
.modal-desc{
    margin:0 0 12px;
    color:var(--muted);
    font-size:15px;
    line-height:1.5;
}
.code-inputs{
    display:flex;
    gap:10px;
    justify-content:center;
    margin:10px 0 6px;
}
.code-inputs input{
    width:46px;
    height:52px;
    border-radius:12px;
    border:1px solid #d1d5db;
    text-align:center;
    font-size:19px;
    font-weight:900;
    outline:none;
}
.code-inputs input:focus{ border-color:var(--primary); box-shadow:var(--focus); }
.modal-actions{
    display:flex;
    gap:10px;
    padding:0 16px 16px;
}
.btn-mini{
    flex:1;
    height:46px;
    border-radius:12px;
    border:0;
    font-weight:900;
    cursor:pointer;
}
.btn-mini.primary{ background:var(--primary); color:#fff; }
.btn-mini.ghost{ background:#f3f4f6; color:#111827; }

@media (max-width:420px){
    .content{ padding:18px 16px 22px; }
    .header{ padding:16px 16px 10px; }
}

.email-row{
    display:flex;
    gap:10px;
    align-items:stretch;
}

/* 이메일 input 영역이 남은 공간 다 먹게 */
.email-row .control{
    flex:1;
}

.btn-verify{
    width:140px;      /* 필요하면 120~160 조정 */
    flex:0 0 auto;
    height: var(--input-h);  /* 인풋 높이랑 동일 */
    border-radius:12px;
    font-size:16px;
}

.theme-pro .join-form-area {
    display: none;
}

/* 기본은 숨김 */
.pro-area{
    display:none;
    margin-top:20px;
}

/* 중개전문가 탭일 때만 표시 */
.theme-pro .pro-area{
    display:block;
}

/* 타이틀 */
.pro-title{
    font-size:22px;
    font-weight:900;
    margin:10px 0 12px;
}

/* 설명 */
.pro-desc{
    color:#444;
    line-height:1.5;
    margin-bottom:18px;
}

/* 안내 카드 */
.pro-card{
    display:flex;
    gap:14px;
    align-items:center;
    background:#f3f4f6;
    padding:16px;
    border-radius:14px;
    margin-bottom:20px;
}

.pro-icon{
    font-size:28px;
    color:#1d5bff;
}

.pro-card-title{
    font-weight:900;
    color:#1d5bff;
    margin-bottom:4px;
}

.pro-card-desc{
    font-size:15px;
    color:#555;
}

/* 가입 버튼 */
.btn-pro-join{
    width:100%;
    height:56px;
    border-radius:14px;
    border:0;
    background:#1d5bff;
    color:#fff;
    font-weight:900;
    font-size:16px;
    cursor:pointer;
}

#logo {
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.agreements-area{
    margin-top:14px;
    padding-top:12px;
    border-top:1px solid var(--line);
}

.agree-title{
    font-weight:900;
    font-size:14px;
    margin:0 0 12px;
    color:#111827;
}

/* 공통 row */
.agree-row, .agree-item{
    display:flex;
    align-items:center;
    gap:10px;
    padding:10px 0;
    cursor:pointer;
    user-select:none;
}

/* 실제 checkbox 숨기고 커스텀 체크 */
.agree-row input, .agree-item input{
    position:absolute;
    opacity:0;
    pointer-events:none;
}

.agree-icon{
    width:18px;
    height:18px;
    border-radius:4px;
    border:1px solid #d1d5db;
    background:#fff;
    display:inline-block;
    position:relative;
    flex:0 0 auto;
}

/* 체크되면 체크표시 */
.agree-row input:checked + .agree-icon,
.agree-item input:checked + .agree-icon{
    background:#111827;
    border-color:#111827;
}
.agree-row input:checked + .agree-icon::after,
.agree-item input:checked + .agree-icon::after{
    content:"";
    position:absolute;
    left:5px;
    top:2px;
    width:5px;
    height:9px;
    border:2px solid #fff;
    border-top:0;
    border-left:0;
    transform:rotate(45deg);
}

.agree-text{
    font-size:13px;
    font-weight:800;
    color:#111827;
}

.agree-hint{
    margin:6px 0 0;
    color:#9ca3af;
    font-size:11px;
    line-height:1.4;
}

/* 구분선 */
.agree-divider{
    height:1px;
    background:var(--line);
    margin:14px 0;
}

/* 보기 링크(오른쪽) */
.agree-view{
    margin-left:auto;
    border:0;
    background:none;
    color:#6b7280;
    font-weight:900;
    font-size:12px;
    cursor:pointer;
}
.agree-view:hover{ text-decoration:underline; }

.terms-toolbar {
    flex: 0 0 auto;
    padding: 12px 16px;
    background: #fff;
    border-bottom: 1px solid #f1f5f9;
    /* 스크롤해도 계속 상단에 두고 싶으면 sticky */
    position: sticky;
    top: 0;
    z-index: 5;
}

.terms-version-select {
    width: 100%;
    height: 44px;
    padding: 0 12px;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    background: #fff;
    font-size: 16px;
}

.login_back_echo {
    position: absolute;
    top: 60%;
    left: -175px;
    transform: translate(0, -50%);
    width: 36px;
    height: 36px;
    background: url(https://accounts.valueupmap.com/images/ico-btn-back-gray.png) no-repeat;
    background-size: 36px;
    border: none;
    cursor: pointer;
}

header {
    margin: 0;
    position: relative;
    text-align: center;
}

.overlay_dialog {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: white;
    z-index: 99999;
    opacity: 0.5;
    filter: alpha(opacity=50);
    -ms-filter: "alpha(opacity=50)";
    -khtml-opacity: 0.5;
    -moz-opacity: 0.5;
    display: flex;
    justify-content: center;
    align-items: center;
}

overlay_dialog img {
    width: 160px;
    height: 160px;
}