*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --ink: #111;
    --ink2: #444;
    --ink3: #777;
    --ink4: #aaa;
    --bg: #f8f8f8;
    --sur: #fff;
    --brd: #e5e5e5;
    --f: 'Inter', 'Noto Sans KR', system-ui, sans-serif;
}

html, body {
    height: 100%;
    font-family: var(--f);
    -webkit-font-smoothing: antialiased;
    background: var(--sur);
    color: var(--ink);
}

.auth-shell {
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

.auth-topbar {
    height: 56px;
    border-bottom: 1px solid var(--brd);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
}

.auth-brand {
    display: inline-flex;
    align-items: center;
}

.auth-brand-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.auth-brand-icon {
    display: block;
    width: 26px;
    height: 26px;
    object-fit: contain;
}

.auth-brand-img {
    display: block;
    height: 24px;
    width: auto;
}

.auth-top-link {
    font-size: 13px;
    font-weight: 600;
    color: var(--ink3);
    text-decoration: none;
}

.auth-topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.locale-switcher {
    position: relative;
}

.locale-switcher__button,
.locale-switcher__item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 999px;
    font: inherit;
}

.locale-switcher__button {
    border: 1px solid var(--brd);
    background: var(--sur);
    color: var(--ink2);
    padding: 7px 10px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
}

.locale-switcher__button:hover,
.locale-switcher__item:hover {
    background: var(--bg);
}

.locale-switcher__flag {
    width: 18px;
    height: 18px;
    border-radius: 999px;
    overflow: hidden;
    flex: 0 0 18px;
}

.locale-switcher__flag svg {
    display: block;
    width: 100%;
    height: 100%;
}

.locale-switcher__chevron {
    width: 12px;
    height: 12px;
}

.locale-switcher__menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 88px;
    padding: 6px;
    border: 1px solid var(--brd);
    border-radius: 14px;
    background: var(--sur);
    box-shadow: 0 16px 40px rgba(17, 17, 17, .08);
}

.locale-switcher__item {
    width: 100%;
    padding: 8px 10px;
    color: var(--ink2);
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
}

.locale-switcher__item.is-active {
    background: var(--bg);
}

.auth-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
}

.auth-main-inner {
    width: 100%;
    max-width: 440px;
}

.auth-page-brand {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}

.auth-page-brand-icon {
    display: block;
    width: 54px;
    height: 54px;
    object-fit: contain;
}

.auth-card {
    width: 100%;
    border: 1px solid var(--brd);
    border-radius: 16px;
    background: var(--sur);
    padding: 24px 20px 20px;
}

.auth-step {
    font-size: 10px;
    font-weight: 700;
    color: var(--ink4);
    letter-spacing: .08em;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.auth-title {
    font-size: 28px;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -.6px;
}

.auth-sub {
    margin-top: 8px;
    margin-bottom: 22px;
    font-size: 13.5px;
    color: var(--ink3);
    line-height: 1.6;
}

.sb-item.is-locked {
    opacity: .48;
    cursor: not-allowed;
    pointer-events: none;
}

.sb-item.is-locked:hover {
    background: transparent;
}

.sb-chip.chip-lock {
    background: rgba(0, 0, 0, .05);
    color: var(--ink3);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.auth-label {
    margin-top: 2px;
    font-size: 10.5px;
    font-weight: 700;
    color: var(--ink4);
    letter-spacing: .04em;
    text-transform: uppercase;
}

.auth-input {
    width: 100%;
    border: 1.5px solid var(--brd);
    border-radius: 11px;
    padding: 12px 13px;
    font-family: var(--f);
    font-size: 14px;
    color: var(--ink);
    outline: none;
    transition: border-color .15s;
}

.auth-input:focus {
    border-color: var(--ink4);
}

.auth-input[readonly] {
    background: #efefef;
    color: #555;
    border-color: #d0d0d0;
    cursor: not-allowed;
}

.auth-pw-wrap {
    position: relative;
}

.auth-input-pw {
    padding-right: 64px;
}

.auth-pw-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: var(--ink3);
    font-size: 12px;
    font-weight: 600;
    font-family: var(--f);
    cursor: pointer;
    padding: 5px 8px;
    border-radius: 6px;
}

.auth-pw-toggle:hover {
    background: var(--bg);
}

.auth-btn {
    margin-top: 10px;
    border: none;
    border-radius: 12px;
    background: var(--ink);
    color: #fff;
    padding: 13px 16px;
    font-size: 14px;
    font-weight: 700;
    font-family: var(--f);
    cursor: pointer;
    text-align: center;
}

.auth-btn:hover {
    background: #27272a;
}

.auth-btn-out {
    margin-top: 0;
    background: var(--sur);
    color: var(--ink2);
    border: 1.5px solid var(--brd);
}

.auth-btn-out:hover {
    background: var(--bg);
}

.auth-alert {
    border-radius: 10px;
    border: 1px solid transparent;
    padding: 10px 12px;
    font-size: 12.5px;
    line-height: 1.5;
    margin-bottom: 8px;
}

.auth-alert.ok {
    background: #f0fdf4;
    border-color: #bbf7d0;
    color: #166534;
}

.auth-alert.err {
    background: #fef2f2;
    border-color: #fecaca;
    color: #b91c1c;
}

.auth-foot {
    margin-top: 14px;
    font-size: 12.5px;
    color: var(--ink4);
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.auth-foot a {
    color: var(--ink2);
    font-weight: 600;
    text-decoration: none;
}

@media (max-width: 640px) {
    .auth-topbar {
        padding: 0 14px;
    }

    .auth-card {
        border-radius: 14px;
        padding: 20px 14px 16px;
    }

    .auth-title {
        font-size: 24px;
    }
}
