.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.auth-page {
    box-sizing: border-box;
    position: relative;
    display: grid;
    place-items: center;
    width: 100%;
    min-height: 100vh;
    margin-top: -100px;
    padding: 96px 40px 40px;
    overflow: hidden;
}

.auth-image-frame {
    position: relative;
    z-index: 1;
    width: min(100%, 1080px);
    aspect-ratio: 1576 / 998;
    filter: drop-shadow(0 20px 34px rgba(68, 55, 38, 0.13));
}

.auth-login-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.signup-image-frame {
    width: min(100%, 1240px);
    aspect-ratio: 1800 / 960;
}

.auth-form {
    position: absolute;
    inset: 0;
    z-index: 2;
}

.auth-field {
    position: absolute;
    display: block;
}

.auth-field-id {
    left: 51%;
    top: 26.49%;
    width: 40.3%;
    height: 6.9%;
}

.auth-field-password {
    left: 51%;
    top: 41.3%;
    width: 40.3%;
    height: 6.9%;
}

.auth-field input {
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    padding: 0 22px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #111;
    font-size: clamp(17px, 1.52vw, 21px);
    font-weight: 400;
    outline: none;
    
}

.auth-field input:-webkit-autofill,
.auth-field input:-webkit-autofill:hover,
.auth-field input:-webkit-autofill:focus {
    -webkit-text-fill-color: #111;
    box-shadow: 0 0 0 1000px transparent inset;
    transition: background-color 9999s ease-out;
}

.auth-field input:focus {
    box-shadow: none;
}

.auth-field.has-error input {
    box-shadow: 0 0 0 2px rgba(239, 100, 97, 0.35);
}

.auth-field-password input {
    padding-right: 50px;
}

.password-toggle {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    min-width: 38px;
    height: 28px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #8a8a8a;
    font-size: clamp(14px, 1.2vw, 17px);
    font-weight: 800;
    cursor: pointer;
}

.auth-field input::placeholder {
    color: #777777;
    opacity: 1;
}

.password-toggle img {
    display: block;
    width: 24px;
    height: 24px;
}

.auth-page-login .password-toggle {
    right: 4px;
}

.auth-page-signup .password-toggle {
    right: 10px;
    top: 22px;
}

.field-message {
    position: absolute;
    left: 10px;
    top: calc(100% + 4px);
    color: #ef6461;
    font-size: 11px;
    font-weight: 800;
}

.auth-hotspot {
    position: absolute;
    display: block;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.auth-submit {
    left: 51.25%;
    top: 53%;
    width: 40%;
    height: 7.2%;
}

.social-google {
    left: 51.25%;
    top: 66.2%;
    width: 40%;
    height: 6.1%;
}

.social-naver {
    left: 51.25%;
    top: 73.8%;
    width: 40%;
    height: 6.1%;
}

.social-kakao {
    left: 51.25%;
    top: 81.3%;
    width: 40%;
    height: 6.1%;
}

.auth-signup {
    left: 74.4%;
    top: 90.5%;
    width: 6%;
    height: 3.2%;
}



.signup-field-id {
    left: 46.3%;
    top: 30.1%;
    width: 38.9%;
    height: 6.9%;
}

.signup-field-password {
    left: 46.3%;
    top: 46.9%;
    width: 38.9%;
    height: 6.9%;
}

.signup-field-password-confirm {
    left: 46.3%;
    top: 63.65%;
    width: 38.9%;
    height: 6.9%;
}

.signup-submit {
    left: 46.35%;
    top: 75.1%;
    width: 38.9%;
    height: 6.5%;
}

.signup-login-link {
    left: 70%;
    top: 91.9%;
    width: 4.8%;
    height: 4%;
}


@media (max-width: 1023px) {
    .auth-page {
        min-height: 100vh;
        margin-top: -116px;
        padding: 148px 28px 34px;
    }

    .auth-image-frame {
        width: min(100%, 760px);
        filter: drop-shadow(0 18px 30px rgba(68, 55, 38, 0.16));
    }

    .signup-image-frame {
        width: min(100%, 880px);
    }

    .auth-field input {
        padding: 0 14px;
        font-size: 14px;
    }

    .auth-field-password input {
        padding-right: 42px;
    }

    .password-toggle {
        min-width: 32px;
    }

    .password-toggle img {
        width: 20px;
        height: 20px;
    }

    .auth-page-signup .password-toggle {
        right: -4px;
        top: 50%;
    }

    .field-message {
        top: calc(100% + 2px);
        font-size: 10px;
    }
}

@media (max-width: 767px) {
    .auth-page {
        min-height: auto;
        margin-top: -150px;
        padding: 188px 20px 28px 14px;
        overflow: visible;
        place-items: start center;
    }

    .auth-image-frame {
        width: min(calc(100% - 20px), 520px);
        filter: drop-shadow(0 18px 30px rgba(68, 55, 38, 0.16));
    }

    .signup-image-frame {
        width: min(100%, 620px);
    }

    .auth-field input {
        padding: 0 7px;
        font-size: clamp(9px, 2.7vw, 12px);
    }

    .auth-field-password input {
        padding-right: 30px;
    }

    .password-toggle {
        right: 0;
        min-width: 24px;
        height: 22px;
    }

    .password-toggle img {
        width: 12px;
        height: 12px;
    }

    .auth-page-login .password-toggle {
        right: 0;
    }

    .auth-page-signup .password-toggle {
        right: -18px;
        top: 50%;
    }

    .field-message {
        left: 4px;
        top: calc(100% + 3px);
        font-size: 8px;
    }

    .auth-field-id .field-message,
    .signup-field-id .field-message {
        top: calc(100% + 1px);
        font-size: 7px;
    }
}

@media (min-width: 520px) and (max-width: 767px) {
    .auth-page-login .auth-image-frame {
        width: min(100%, 460px);
    }
}

@media (max-width: 430px) {
    .auth-field input {
        padding-top: 0;
        border-radius: 3px;
        font-size: 8px;
        transform: translateY(-3px);
    }

    .auth-field-id .field-message,
    .signup-field-id .field-message {
        top: calc(100% + 3px);
        font-size: 6px;
    }

    .auth-field-password .field-message,
    .signup-field-password .field-message,
    .signup-field-password-confirm .field-message {
        top: calc(100% + 3px);
        font-size: 6px;
    }
}

.auth-page-login,
.auth-page-signup {
    min-height: 100vh;
    margin-top: -100px;
    padding: 118px 40px 44px;
    overflow: hidden;
}

.auth-login-card {
    box-sizing: border-box;
    display: grid;
    grid-template-columns: minmax(320px, 0.98fr) minmax(320px, 0.92fr);
    align-items: center;
    gap: clamp(56px, 5vw, 78px);
    width: min(100%, 1060px);
    padding: 28px 42px 28px 28px;
    border-radius: 38px;
    background: #fff;
    filter: drop-shadow(0 20px 34px rgba(68, 55, 38, 0.13));
}

.auth-login-visual img {
    display: block;
    width: 100%;
    border-radius: 28px;
}

.auth-page-login .auth-form,
.auth-page-signup .auth-form {
    position: static;
    inset: auto;
    z-index: auto;
}

.auth-login-form {
    display: grid;
    gap: 17px;
}

.auth-login-heading h1 {
    margin: 0 0 12px;
    color: #111;
    font-size: clamp(34px, 3.45vw, 50px);
    line-height: 1;
    font-weight: 900;
    letter-spacing: 0;
}

.auth-login-heading p {
    margin: 0;
    color: #333;
    font-size: clamp(18px, 1.55vw, 23px);
    font-weight: 500;
}

.auth-page-login .auth-field,
.auth-page-signup .auth-field {
    position: relative;
    display: grid;
    gap: 9px;
    width: 100%;
    height: auto;
    color: #111;
    font-size: clamp(17px, 1.45vw, 21px);
    font-weight: 800;
}

.auth-page-login .auth-field input,
.auth-page-signup .auth-field input {
    height: 48px;
    padding: 0 20px;
    border: 1.5px solid #b8bec8;
    border-radius: 10px;
    background: #fff;
    font-size: 18px;
    font-weight: 500;
}

.auth-page-login .auth-field.has-error input,
.auth-page-signup .auth-field.has-error input {
    border-color: #ef8b8d;
    box-shadow: 0 0 0 2px rgba(239, 100, 97, 0.24);
}

.auth-password-control {
    position: relative;
    display: block;
}

.auth-page-login .auth-field-password input,
.auth-page-login .auth-login-field-password input,
.auth-page-signup .auth-login-field-password input {
    padding-right: 54px;
}

.auth-page-login .password-toggle,
.auth-page-signup .password-toggle {
    right: 12px;
    top: 50%;
    min-width: 32px;
    height: 32px;
    transform: translateY(-50%);
}

.auth-page-login .password-toggle img,
.auth-page-signup .password-toggle img {
    width: 20px;
    height: 20px;
}

.auth-page-login .field-message,
.auth-page-signup .field-message {
    position: absolute;
    left: 0;
    top: calc(100% + 4px);
    color: #ef6461;
    font-size: 12px;
    font-weight: 800;
}

.auth-login-submit {
    height: 58px;
    margin-top: 8px;
    border: 0;
    border-radius: 20px;
    background: #ffd9a8;
    color: #111;
    font-size: 22px;
    font-weight: 900;
    cursor: pointer;
    box-shadow: none;
    transition: transform 0.16s ease, background-color 0.16s ease;
}

.auth-login-submit:hover {
    background: #ffd19a;
    transform: translateY(-1px);
}

.auth-login-submit:active {
    transform: translateY(1px);
}

.auth-login-divider {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 28px;
    color: #222;
    font-size: 18px;
    font-weight: 500;
}

.auth-login-divider::before,
.auth-login-divider::after {
    height: 1.5px;
    background: #d7dbe2;
    content: "";
}

.auth-social-list {
    display: grid;
    gap: 10px;
}

.auth-social-button {
    box-sizing: border-box;
    position: relative;
    display: grid;
    grid-template-columns: 44px 1fr 44px;
    align-items: center;
    min-height: 48px;
    padding: 0 18px;
    border: 1.5px solid #c9ced8;
    border-radius: 12px;
    background: #fff;
    color: #222;
    font-size: 18px;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
}

.auth-social-button img {
    justify-self: center;
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.auth-social-naver {
    border-color: #00c864;
    color: #008c41;
}

.auth-social-kakao {
    border-color: #f0b400;
    color: #7a4f00;
}

.auth-login-switch {
    margin: 12px 0 0;
    color: #333;
    font-size: 18px;
    font-weight: 500;
    text-align: center;
}

.auth-login-switch a {
    color: #1683ff;
    font-weight: 800;
    text-decoration: none;
}

.auth-signup-form {
    gap: 15px;
}

.auth-signup-form .auth-login-submit {
    margin-top: 36px;
}

.auth-signup-form .auth-login-switch {
    margin-top: 22px;
}

@media (max-width: 1023px) {
    .auth-page-login,
    .auth-page-signup {
        min-height: 100vh;
        margin-top: -116px;
        padding: 148px 28px 34px;
    }

    .auth-login-card {
        grid-template-columns: minmax(250px, 0.92fr) minmax(270px, 1fr);
        gap: 34px;
        width: min(100%, 760px);
        padding: 22px 28px 22px 22px;
        border-radius: 32px;
    }

    .auth-login-visual img {
        border-radius: 24px;
    }

    .auth-login-form {
        gap: 16px;
    }

    .auth-login-heading h1 {
        margin-bottom: 10px;
        font-size: 38px;
    }

    .auth-login-heading p {
        font-size: 17px;
    }

    .auth-page-login .auth-field,
    .auth-page-signup .auth-field {
        gap: 7px;
        font-size: 16px;
    }

    .auth-page-login .auth-field input,
    .auth-page-signup .auth-field input {
        height: 38px;
        font-size: 13px;
    }

    .auth-page-login .field-message,
    .auth-page-signup .field-message {
        font-size: 9px;
    }

    .auth-login-submit {
        height: 42px;
        margin-top: 6px;
        border-radius: 15px;
        font-size: 15px;
    }

    .auth-login-divider {
        gap: 16px;
        font-size: 13px;
    }

    .auth-social-list {
        gap: 8px;
    }

    .auth-social-button {
        grid-template-columns: 32px 1fr 32px;
        min-height: 34px;
        padding: 0 12px;
        border-radius: 8px;
        font-size: 13px;
    }

    .auth-social-button img {
        width: 20px;
        height: 20px;
    }

    .auth-login-switch {
        margin-top: 6px;
        font-size: 12px;
    }

    .auth-signup-form .auth-login-submit {
        margin-top: 22px;
    }

    .auth-signup-form .auth-login-switch {
        margin-top: 14px;
    }
}

@media (max-width: 767px) {
    .auth-page-login,
    .auth-page-signup {
        min-height: auto;
        margin-top: -150px;
        padding: 188px 20px 28px 14px;
        overflow: visible;
        place-items: start center;
    }

    .auth-login-card {
        grid-template-columns: minmax(0, 0.86fr) minmax(0, 1fr);
        gap: 22px;
        width: min(calc(100% - 20px), 520px);
        padding: 12px 14px 12px 12px;
        border-radius: 20px;
    }

    .auth-login-visual img {
        border-radius: 14px;
    }

    .auth-login-form {
        gap: 8px;
    }

    .auth-login-heading h1 {
        margin-bottom: 4px;
        font-size: clamp(19px, 5.1vw, 24px);
    }

    .auth-login-heading p {
        font-size: clamp(9px, 2.5vw, 12px);
    }

    .auth-page-login .auth-field,
    .auth-page-signup .auth-field {
        gap: 3px;
        font-size: clamp(8px, 2.2vw, 11px);
    }

    .auth-page-login .auth-field input,
    .auth-page-signup .auth-field input {
        height: clamp(22px, 5.8vw, 30px);
        padding: 0 8px;
        border-radius: 6px;
        font-size: clamp(8px, 2vw, 10px);
        transform: none;
    }

    .auth-page-login .auth-login-field-password input,
    .auth-page-signup .auth-login-field-password input {
        padding-right: 26px;
    }

    .auth-page-login .password-toggle,
    .auth-page-signup .password-toggle {
        right: 4px;
        min-width: 20px;
        height: 20px;
    }

    .auth-page-login .password-toggle img,
    .auth-page-signup .password-toggle img {
        width: 11px;
        height: 11px;
    }

    .auth-page-login .field-message,
    .auth-page-signup .field-message {
        top: calc(100% + 1px);
        font-size: 6px;
    }

    .auth-login-submit {
        height: clamp(28px, 6.8vw, 36px);
        margin-top: 4px;
        border-radius: 11px;
        font-size: clamp(9px, 2.2vw, 12px);
    }

    .auth-login-divider {
        gap: 8px;
        font-size: 8px;
    }

    .auth-social-list {
        gap: 5px;
    }

    .auth-social-button {
        grid-template-columns: 22px 1fr 22px;
        min-height: clamp(20px, 5vw, 28px);
        padding: 0 8px;
        border-radius: 6px;
        font-size: clamp(7px, 1.85vw, 10px);
    }

    .auth-social-button img {
        width: 14px;
        height: 14px;
    }

    .auth-login-switch {
        margin-top: 3px;
        font-size: clamp(7px, 1.8vw, 9px);
    }

    .auth-signup-form .auth-login-submit {
        margin-top: 12px;
    }

    .auth-signup-form .auth-login-switch {
        margin-top: 8px;
    }
}

@media (max-width: 430px) {
    .auth-login-card {
        gap: 18px;
        padding: 10px 12px 10px 10px;
    }

    .auth-login-form {
        gap: 6px;
    }

    .auth-page-login .auth-field,
    .auth-page-signup .auth-field {
        gap: 2px;
    }

    .auth-login-visual img {
        min-height: 238px;
        object-fit: cover;
    }
}

@media (min-width: 431px) and (max-width: 520px) {
    .auth-login-visual img {
        min-height: 270px;
        object-fit: cover;
    }
}

.character-page {
    box-sizing: border-box;
    min-height: 100vh;
    margin-top: -100px;
    padding: 132px 32px 18px;
    overflow-x: hidden;
}

.character-form {
    width: min(1180px, 100%);
    margin: 0 auto;
    display: grid;
    justify-items: center;
}

.character-heading {
    text-align: center;
}

.character-heading h1 {
    margin: 0 0 16px;
    color: #2d1f14;
    font-size: clamp(42px, 4vw, 64px);
    line-height: 1.1;
    font-weight: 900;
}

.character-heading p {
    margin: 0 0 24px;
    color: #8a6f58;
    font-size: clamp(22px, 2vw, 32px);
    font-weight: 800;
}

.profile-name-field {
    display: grid;
    grid-template-columns: auto minmax(280px, 520px);
    align-items: center;
    gap: 34px;
    margin-bottom: 24px;
    color: #6d533c;
    font-size: clamp(22px, 2vw, 32px);
    font-weight: 900;
}

.profile-name-field input {
    box-sizing: border-box;
    min-width: 0;
    width: 100%;
    height: 58px;
    padding: 0 28px;
    border: 3px solid #eadccf;
    border-radius: 8px;
    background: #fff;
    color: #2d1f14;
    font-size: clamp(22px, 2vw, 32px);
    font-weight: 800;
    outline: none;
}

.profile-name-field input:focus {
    border-color: #ffb15f;
    box-shadow: 0 0 0 4px rgba(255, 177, 95, 0.18);
}

.character-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 22px 30px;
    width: min(1020px, 100%);
}

.character-card {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 178px;
    padding: 22px;
    border: 4px solid #6f5a4a;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 6px 0 rgba(83, 65, 52, 0.26), 0 13px 24px rgba(91, 67, 49, 0.1);
    cursor: pointer;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.character-card:nth-child(1),
.character-card:nth-child(2),
.character-card:nth-child(3) {
    grid-column: span 2;
}

.character-card:nth-child(4) {
    grid-column: 2 / span 2;
}

.character-card:nth-child(5) {
    grid-column: 4 / span 2;
}

.character-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.character-card img {
    display: block;
    width: min(100%, 190px);
    height: 146px;
    object-fit: contain;
}

.character-card.is-selected {
    border-color: #6f5a4a;
    background: #ffe5ca;
    box-shadow: 0 6px 0 rgba(83, 65, 52, 0.42), 0 13px 24px rgba(91, 67, 49, 0.13);
}

.character-card.is-selected .character-check {
    opacity: 1;
    transform: scale(1);
}

.character-check {
    position: absolute;
    top: 20px;
    right: 20px;
    display: grid;
    place-items: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #ffad5f;
    color: #fff;
    font-size: 30px;
    font-weight: 900;
    opacity: 0;
    transform: scale(0.75);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.character-submit {
    display: grid;
    place-items: center;
    width: min(360px, 82vw);
    height: 88px;
    margin-top: 30px;
    padding: 0 34px;
    border: 4px solid #6f5a4a;
    border-radius: 24px;
    background: #ffe5ca;
    color: #2d1f14;
    font-size: 34px;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 6px 0 rgba(83, 65, 52, 0.42), 0 13px 24px rgba(91, 67, 49, 0.13);
    transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.character-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 0 rgba(83, 65, 52, 0.38), 0 16px 26px rgba(91, 67, 49, 0.15);
}

.character-submit:active {
    transform: translateY(3px);
    box-shadow: 0 3px 0 rgba(83, 65, 52, 0.42), 0 9px 18px rgba(91, 67, 49, 0.12);
}

.character-submit span {
    display: block;
}

.character-error {
    margin: -18px 0 22px;
    color: #ef6461;
    font-size: 15px;
    font-weight: 800;
}

@media (max-width: 1023px) {
    .character-page {
        margin-top: -116px;
        padding: 176px 28px 24px;
    }

    .character-form {
        width: min(820px, 100%);
    }

    .character-heading h1 {
        font-size: 50px;
    }

    .character-heading p {
        margin-bottom: 30px;
        font-size: 28px;
    }

    .profile-name-field {
        grid-template-columns: auto minmax(260px, 460px);
        gap: 24px;
        font-size: 24px;
    }

    .profile-name-field input {
        height: 60px;
        font-size: 24px;
    }

    .character-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 22px;
        width: min(720px, 100%);
    }

    .character-card,
    .character-card:nth-child(1),
    .character-card:nth-child(2),
    .character-card:nth-child(3),
    .character-card:nth-child(4),
    .character-card:nth-child(5) {
        grid-column: auto;
    }

    .character-card {
        min-height: 205px;
        padding: 24px;
        border-width: 3px;
        border-radius: 22px;
    }

    .character-card img {
        height: 168px;
    }

    .character-submit {
        width: min(320px, 82vw);
        height: 78px;
        margin-top: 42px;
        border-width: 3px;
        border-radius: 22px;
        font-size: 30px;
    }
}

@media (max-width: 767px) {
    .character-page {
        margin-top: -132px;
        padding: 160px 14px 20px;
    }

    .character-form {
        width: min(100%, 520px);
    }

    .character-heading h1 {
        margin-bottom: 14px;
        font-size: clamp(27px, 7.6vw, 32px);
    }

    .character-heading p {
        margin-bottom: 24px;
        font-size: clamp(16px, 4.7vw, 19px);
    }

    .profile-name-field {
        grid-template-columns: 1fr;
        gap: 10px;
        width: 100%;
        margin-bottom: 24px;
        font-size: 18px;
    }

    .profile-name-field input {
        height: 52px;
        padding: 0 16px;
        font-size: 18px;
    }

    .character-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .character-card,
    .character-card:nth-child(1),
    .character-card:nth-child(2),
    .character-card:nth-child(3),
    .character-card:nth-child(4),
    .character-card:nth-child(5) {
        grid-column: auto;
    }

    .character-card {
        min-height: 168px;
        padding: 20px;
        border-width: 3px;
        border-radius: 18px;
        box-shadow: 0 5px 0 rgba(83, 65, 52, 0.35), 0 10px 18px rgba(91, 67, 49, 0.11);
    }

    .character-card img {
        height: 138px;
    }

    .character-check {
        top: 14px;
        right: 14px;
        width: 42px;
        height: 42px;
        font-size: 24px;
    }

    .character-submit {
        width: min(100%, 280px);
        height: 68px;
        margin-top: 34px;
        border-width: 3px;
        border-radius: 18px;
        font-size: 25px;
        box-shadow: 0 5px 0 rgba(83, 65, 52, 0.42), 0 10px 18px rgba(91, 67, 49, 0.12);
    }
}
