:root {
    --navy-950: #050d1c;
    --navy-900: #071226;
    --navy-800: #0b1d3a;
    --navy-700: #12305c;
    --ink: #0f172a;
    --sub: #475569;
    --muted: #94a3b8;
    --line: #c9d4e5;
    --accent: #2f6bff;
    /* WHITE / MASTER 공통 포인트 색상 */
    --error: #d93636;
    --ok: #12855a;
}

* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    font-family: "Pretendard", "Malgun Gothic", "Apple SD Gothic Neo", system-ui, sans-serif;
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
    background:
        radial-gradient(ellipse at 20% 15%, rgba(56, 120, 255, .28) 0%, transparent 55%),
        radial-gradient(ellipse at 85% 90%, rgba(0, 180, 255, .16) 0%, transparent 50%),
        linear-gradient(160deg, var(--navy-700) 0%, var(--navy-800) 45%, var(--navy-900) 100%);
    background-attachment: fixed;
}

body.modal-open {
    overflow: hidden;
}

/* ---------- 배경 ---------- */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px);
    background-size: 48px 48px;
    pointer-events: none;
}

.bg-net {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.bg-net .net-lines line {
    stroke: rgba(120, 170, 255, .22);
    stroke-width: 1;
}

.bg-net .net-nodes circle {
    fill: rgba(140, 190, 255, .65);
}

/* ---------- 좌측 상단 사이트명 ---------- */
.site-name {
    position: fixed;
    top: 36px;
    left: 44px;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0;
    font-size: 50px;
    font-weight: 800;
    letter-spacing: -.02em;
    text-shadow: 0 2px 16px rgba(0, 0, 0, .35);
    color: khaki;
    font-family: cursive;
}

/* .site-name::before {
    content: "";
    width: 12px;
    height: 12px;
    border-radius: 3px;
    background: var(--accent);
    box-shadow: 0 0 12px rgba(47, 107, 255, .9);
} */

.site-name span {
    display: none;
}

body[data-variant="white"] .site-name .sn-white {
    display: inline;
}

body[data-variant="master"] .site-name .sn-master {
    display: inline;
}

@media (max-width: 480px) {
    .site-name {
        position: absolute;
        top: 22px;
        left: 20px;
        font-size: 19px;
        gap: 10px;
    }

    .site-name::before {
        width: 9px;
        height: 9px;
    }

    body {
        padding-top: 76px;
    }
}

/* ---------- 카드 공통 ---------- */
.panel {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 400px;
    background: linear-gradient(180deg, #eef3fb 0%, #e3eaf6 100%);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .5), 0 0 0 1px rgba(255, 255, 255, .06);
}

/* 상단 어두운 헤더 */
.panel-head {
    position: relative;
    padding: 20px 20px;
    text-align: center;
    color: #fff;
    background:
        radial-gradient(circle at 85% -20%, rgba(47, 107, 255, .45) 0%, transparent 55%),
        linear-gradient(180deg, var(--navy-800) 0%, var(--navy-950) 100%);
    overflow: hidden;
}

.panel-head::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
    background-size: 22px 22px;
    -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 100%);
    mask-image: linear-gradient(180deg, #000 0%, transparent 100%);
}

.panel-head::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(120, 170, 255, .6), transparent);
}

.panel-head>* {
    position: relative;
}

.logo {
    display: flex;
    justify-content: center;
}

.logo img {
    max-height: 60px;
}

.logo-text {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: .22em;
    padding-left: .22em;
    /* 자간 보정 */
    color: #fff;
}

.logo-white,
.logo-master {
    display: none;
}

body[data-variant="white"] .logo-white {
    display: block;
}

body[data-variant="master"] .logo-master {
    display: block;
}

.head-title {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -.01em;
}

.head-sub {
    margin: 6px 0 0;
    font-size: 13px;
    color: rgba(255, 255, 255, .6);
}

.panel-body {
    padding: 32px 32px 28px;
}

/* ---------- 플로팅 라벨 입력 ---------- */
.fl {
    position: relative;
    margin-bottom: 22px;
}

.modal .fl {
    margin-bottom: 30px;
}

.fl .hint {
    /* position: absolute; */
    left: 0;
    top: calc(100% + 5px);
    margin: 0;
}

.fl .hint#hAccount {
    color: darkred;
}

.fl input {
    width: 100%;
    height: 48px;
    padding: 18px 0 6px;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    background: transparent;
    font-size: 15px;
    color: var(--ink);
    outline: none;
    font-family: inherit;
}

.fl.has-btn input {
    padding-right: 44px;
}

.fl label {
    position: absolute;
    left: 0;
    top: 15px;
    font-size: 15px;
    color: var(--muted);
    pointer-events: none;
    transform-origin: left top;
    transition: transform .18s ease, color .18s ease;
}

.fl input:focus+label,
.fl input:not(:placeholder-shown)+label {
    transform: translateY(-14px) scale(.8);
}

.fl input:focus+label {
    color: var(--accent);
}

/* 포커스 시 하단 라인 */
.fl .bar {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transition: transform .25s ease;
}

.fl input:focus~.bar {
    transform: scaleX(1);
}

.fl.invalid input {
    border-bottom-color: var(--error);
}

.fl.invalid label {
    color: var(--error);
}

.fl.invalid .bar {
    background: var(--error);
}

.eye {
    position: absolute;
    right: 0;
    bottom: 6px;
    width: 32px;
    height: 32px;
    border: 0;
    background: none;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--muted);
}

.eye:hover {
    color: var(--sub);
}

.eye svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
}

.eye .off {
    display: none;
}

.eye.on .on-i {
    display: none;
}

.eye.on .off {
    display: block;
}

.inline-btn {
    position: absolute;
    right: 0;
    bottom: 8px;
    height: 28px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
    font-size: 12px;
    font-weight: 600;
    color: var(--sub);
    cursor: pointer;
    font-family: inherit;
}

.inline-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.fl.has-inline input {
    padding-right: 84px;
}

.hint {
    font-size: 12px;
    margin: 6px 0 0;
    min-height: 0;
}

.hint:empty {
    display: none;
}

.hint.err {
    color: var(--error);
}

.hint.ok {
    color: var(--ok);
}

/* ---------- 체크박스 ---------- */
.chk {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    color: var(--sub);
    user-select: none;
}

.chk input {
    appearance: none;
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    margin: 0;
    border: 1.5px solid #c3ccd8;
    border-radius: 4px;
    display: grid;
    place-content: center;
    cursor: pointer;
    transition: background .15s, border-color .15s;
}

.chk input::after {
    content: "";
    width: 8px;
    height: 4px;
    border: 2px solid #fff;
    border-top: 0;
    border-right: 0;
    transform: rotate(-45deg) translate(1px, -1px) scale(0);
    transition: transform .12s ease;
}

.chk input:checked {
    background: var(--accent);
    border-color: var(--accent);
}

.chk input:checked::after {
    transform: rotate(-45deg) translate(1px, -1px) scale(1);
}

.chk input:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.opts {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 4px 0 28px;
}

.find {
    font-size: 13px;
}

.find a {
    color: cadetblue;
    text-decoration: none;
    font-size: 14px;
    font-weight: bold;
}

.find a:hover {
    color: var(--ink);
}

.find i {
    display: inline-block;
    width: 1px;
    height: 10px;
    background: var(--line);
    margin: 0 10px;
    vertical-align: middle;
}

/* ---------- 버튼 ---------- */
.btn {
    position: relative;
    width: 100%;
    height: 52px;
    border: 0;
    border-radius: 10px;
    background: var(--navy-800);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: .02em;
    cursor: pointer;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    overflow: hidden;
    transition: background .2s;
}

.btn::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, var(--accent), #1fa2ff);
    opacity: 0;
    transition: opacity .25s;
}

.btn:hover::before {
    opacity: 1;
}

.btn>* {
    position: relative;
}

.btn svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    transition: transform .2s;
}

.btn:hover svg {
    transform: translateX(3px);
}

.msg {
    font-size: 13px;
    color: var(--error);
    margin: -12px 0 16px;
    display: none;
}

.msg.show {
    display: block;
}

.join-cta {
    margin-top: 22px;
    text-align: center;
    font-size: 13px;
    color: var(--muted);
}

.link-btn {
    background: none;
    border: 0;
    padding: 0;
    margin-left: 8px;
    font: inherit;
    font-weight: 600;
    color: var(--ink);
    cursor: pointer;
    border-bottom: 1px solid var(--ink);
}

.link-btn:hover {
    color: var(--accent);
    border-color: var(--accent);
}

/* 회원가입 버튼 */
.divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 24px 0 14px;
    font-size: 12px;
    color: var(--muted);
}

.divider::before,
.divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--line);
}

.btn-outline {
    width: 100%;
    height: 50px;
    border: 1.5px solid var(--navy-800);
    border-radius: 10px;
    background: transparent;
    color: var(--navy-800);
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background .2s, color .2s;
}

.btn-outline:hover {
    background: var(--navy-800);
    color: #fff;
}

/* ---------- 회원가입 레이어 팝업 ---------- */
.modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.modal.open {
    display: flex;
}

.modal-dim {
    position: absolute;
    inset: 0;
    background: rgba(3, 8, 20, .7);
    backdrop-filter: blur(4px);
    animation: fade .2s ease;
}

.modal .panel {
    max-width: 440px;
    max-height: calc(100vh - 32px);
    display: flex;
    flex-direction: column;
    animation: pop .25s ease;
}

.modal .panel-head {
    padding: 28px 32px 24px;
    text-align: left;
    flex: none;
}

.modal .panel-body {
    overflow-y: auto;
}

@keyframes fade {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes pop {
    from {
        opacity: 0;
        transform: translateY(14px) scale(.98);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

.modal-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .08);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s;
}

.modal-close:hover {
    background: rgba(255, 255, 255, .18);
}

.modal-close svg {
    width: 16px;
    height: 16px;
    stroke: #fff;
    stroke-width: 2;
}

.agree {
    background: rgba(255, 255, 255, .55);
    border: 1px solid var(--line);
    border-radius: 10px;
    margin: 8px 0 24px;
}

.agree .all {
    display: flex;
    padding: 14px 16px;
    font-weight: 600;
    color: var(--ink);
    font-size: 14px;
    border-bottom: 1px solid var(--line);
}

.agree ul {
    list-style: none;
    margin: 0;
    padding: 8px 16px 10px;
}

.agree li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 0;
}

.agree li a {
    font-size: 12px;
    color: var(--muted);
    text-decoration: none;
}

.agree li a:hover {
    color: var(--ink);
}

.tag {
    font-size: 11px;
    font-weight: 700;
    color: var(--accent);
    margin-right: 2px;
}

.tag.opt {
    color: var(--muted);
}

.agree .hint {
    padding: 0 16px 12px;
    margin: 0;
}

@media (max-width: 480px) {
    .panel-head {
        padding: 34px 24px 28px;
    }

    .panel-body {
        padding: 28px 24px 24px;
    }

    .modal .panel-head {
        padding: 24px 24px 20px;
    }
}