* {
    box-sizing: border-box;
}


:root {

    --paper: #f3eee3;
    --paper-light: #faf7f0;
    --paper-deep: #e7ddcc;

    --ink: #302a24;
    --ink-soft: #5b534a;
    --ink-light: #756c61;

    --line: #cfc3b2;

    --green: #66735a;
    --green-deep: #4e5d47;

    --mustard: #b48a3b;
    --seal: #9d4b3f;
}


html,
body {
    margin: 0;
    min-height: 100%;
}


body {

    background:
        radial-gradient(
            circle at 15% 12%,
            rgba(120, 100, 72, 0.035),
            transparent 28%
        ),
        radial-gradient(
            circle at 85% 60%,
            rgba(120, 100, 72, 0.025),
            transparent 30%
        ),
        var(--paper);

    color: var(--ink);

    font-family:
        "Noto Sans KR",
        "Apple SD Gothic Neo",
        "Malgun Gothic",
        sans-serif;

    -webkit-font-smoothing: antialiased;
}


button,
input {
    font: inherit;
}


.login-container {

    width: 100%;
    max-width: 480px;

    min-height: 100svh;

    margin: 0 auto;
}


.login-view {

    min-height: 100svh;

    padding:
        max(52px, env(safe-area-inset-top))
        26px
        max(35px, env(safe-area-inset-bottom));

    display: flex;
    flex-direction: column;
    justify-content: center;
}


/* =========================
   상단
========================= */

.login-header {
    margin-bottom: 30px;
}


.login-seal {

    display: grid;
    place-items: center;

    width: 35px;
    height: 35px;

    margin-bottom: 22px;

    border: 1px solid var(--seal);

    color: var(--seal);

    font-family:
        "Gowun Batang",
        serif;

    font-size: 15px;
}


.login-kicker {

    margin:
        0
        0
        12px;

    color: var(--green-deep);

    font-size: 12px;
    font-weight: 700;

    letter-spacing: 0.12em;
}


.login-header h1 {

    margin:
        0
        0
        15px;

    font-family:
        "Gowun Batang",
        serif;

    font-size:
        clamp(31px, 8vw, 38px);

    font-weight: 600;

    line-height: 1.45;

    letter-spacing: -0.055em;

    word-break: keep-all;
}


.login-description {

    margin: 0;

    color: var(--ink-soft);

    font-size: 14px;
    font-weight: 500;

    line-height: 1.8;

    word-break: keep-all;
}


/* =========================
   로그인 카드
========================= */

.login-card {

    position: relative;

    padding: 23px 21px 22px;

    border:
        1px solid
        rgba(129, 111, 86, 0.18);

    border-radius: 24px;

    background:
        rgba(250, 247, 240, 0.86);

    box-shadow:
        0 9px 28px
        rgba(83, 67, 48, 0.05);
}


/* =========================
   입력창
========================= */

.field-group + .field-group {
    margin-top: 18px;
}


.field-group label {

    display: block;

    margin:
        0
        0
        8px;

    color: var(--ink-soft);

    font-size: 12px;
    font-weight: 700;
}


.field-group input {

    width: 100%;
    height: 50px;

    padding:
        0
        14px;

    border:
        1px solid
        var(--line);

    border-radius: 13px;

    outline: 0;

    background:
        rgba(255, 253, 247, 0.76);

    color: var(--ink);

    font-size: 14px;

    transition:
        border-color .2s ease,
        box-shadow .2s ease;
}


.field-group input:focus {

    border-color:
        var(--green);

    box-shadow:
        0 0 0 3px
        rgba(102, 115, 90, 0.10);
}


/* =========================
   오류 메시지
========================= */

.login-error {

    margin:
        14px
        2px
        -2px;

    color: var(--seal);

    font-size: 12px;

    line-height: 1.5;
}


/* =========================
   로그인 버튼
========================= */

.login-button {

    position: relative;

    width: 100%;
    min-height: 53px;

    margin-top: 22px;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 9px;

    border: 0;
    border-radius: 15px;

    background:
        var(--green-deep);

    color:
        #f8f5ec;

    font-size: 15px;
    font-weight: 700;

    cursor: pointer;

    box-shadow:
        0 7px 18px
        rgba(78, 93, 71, 0.15);
}


.login-button::before {

    content: "";

    position: absolute;

    inset: 5px;

    border:
        1px solid
        rgba(255, 255, 255, 0.17);

    border-radius: 11px;

    pointer-events: none;
}


.login-button:disabled {

    opacity: 0.75;

    cursor: wait;
}


/* =========================
   로딩
========================= */

.button-spinner {

    display: none;

    width: 16px;
    height: 16px;

    border:
        2px solid
        rgba(255, 255, 255, 0.35);

    border-top-color:
        #ffffff;

    border-radius: 50%;

    animation:
        loginSpin
        0.75s
        linear
        infinite;
}


.login-button.loading
.button-spinner {
    display: block;
}


@keyframes loginSpin {

    to {
        transform:
            rotate(360deg);
    }
}


/* =========================
   하단
========================= */

.login-footer {

    margin:
        18px
        0
        0;

    color:
        var(--ink-light);

    font-size: 11px;

    line-height: 1.6;

    text-align: center;
}


/* =========================
   PC
========================= */

@media (min-width: 560px) {

    body {
        padding:
            18px
            0;
    }


    .login-container {

        border-radius: 28px;

        background:
            rgba(243, 238, 227, 0.62);

        box-shadow:
            0 18px 70px
            rgba(48, 42, 36, 0.10);

        overflow: hidden;
    }

}


/* =========================
   작은 화면
========================= */

@media (max-width: 370px) {

    .login-view {

        padding-left: 20px;
        padding-right: 20px;
    }


    .login-header h1 {

        font-size: 30px;
    }

}


@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {

        animation-duration:
            .01ms !important;

        animation-iteration-count:
            1 !important;

        transition-duration:
            .01ms !important;
    }

}
/* V3.3: passwordless demo user selection */
.slot-fieldset {border:0;padding:0;margin:0 0 15px;min-width:0;}
.slot-fieldset legend {font-size:14px;font-weight:700;margin-bottom:12px;color:var(--ink-soft);}
.slot-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;}
.slot-option {display:block;position:relative;cursor:pointer;}
.slot-option input {position:absolute;opacity:0;width:1px;height:1px;}
.slot-option span {display:block;text-align:center;padding:12px 4px;border:1px solid var(--line);border-radius:12px;background:var(--paper-light);color:var(--ink-soft);font-size:14px;font-weight:600;}
.slot-option input:checked + span {background:var(--green-deep);border-color:var(--green-deep);color:white;}
.slot-option input:focus-visible + span {outline:3px solid var(--mustard);outline-offset:2px;}
.demo-notice {font-size:12px;color:var(--ink-light);line-height:1.7;margin:0 0 14px;word-break:keep-all;}
