.rm-auth-page {
    width: 100%;
}

.rm-auth-frame {
    display: grid;
    min-height: 620px;
    grid-template-columns: minmax(360px, 420px) minmax(0, 1fr);
    overflow: hidden;
    border: 1px solid #dfe6f2;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 18px 50px rgba(31, 71, 168, 0.08);
}

.rm-auth-brand-panel {
    position: relative;
    display: flex;
    min-width: 0;
    flex-direction: column;
    padding: 42px;
    overflow: hidden;
    color: #ffffff;
    background:
        radial-gradient(circle at 102% 4%, rgba(255, 255, 255, 0.13) 0 112px, transparent 114px),
        radial-gradient(circle at 88% 32%, rgba(255, 255, 255, 0.07) 0 68px, transparent 70px),
        linear-gradient(155deg, #3479f3 0%, #245dcc 48%, #1b459f 100%);
}

.rm-auth-brand-copy {
    position: relative;
    z-index: 1;
    margin-top: auto;
}

.rm-auth-route {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    color: rgba(255, 255, 255, 0.92);
    font-size: 15px;
    font-weight: 900;
    letter-spacing: 0.04em;
}

.rm-auth-route-line {
    position: relative;
    flex: 1;
    height: 1px;
    border-top: 1px dashed rgba(255, 255, 255, 0.52);
}

.rm-auth-route-line svg {
    position: absolute;
    top: 50%;
    left: 48%;
    width: 18px;
    height: 18px;
    padding: 2px;
    color: #ffffff;
    background: #245dcc;
    transform: translate(-50%, -50%);
}

.rm-auth-brand-title {
    margin: 0;
    color: #ffffff;
    font-size: 27px;
    font-weight: 800;
    line-height: 1.35;
    letter-spacing: -0.01em;
}

.rm-auth-brand-description {
    margin: 14px 0 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 13.5px;
    font-weight: 500;
    line-height: 1.75;
}

.rm-auth-workspace {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: center;
    padding: 48px clamp(36px, 6vw, 76px);
    background: #ffffff;
}

.rm-auth-content {
    width: 100%;
    max-width: 400px;
}

.rm-auth-heading {
    margin-bottom: 26px;
}

.rm-auth-heading h1 {
    margin: 0;
    color: #191d26;
    font-size: 24px;
    font-weight: 800;
    line-height: 1.35;
    letter-spacing: -0.025em;
}

.dev-email-login-form .rm-auth-heading h1,
.dev-password-reset-form .rm-auth-heading h1 {
    font-size: 21px;
}

.rm-auth-heading p {
    margin: 8px 0 0;
    color: #6a7383;
    font-size: 13.5px;
    font-weight: 500;
    line-height: 1.6;
}

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

.rm-auth-social-button,
.rm-auth-primary {
    display: inline-flex;
    width: 100%;
    min-height: 52px;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 14.5px;
    font-weight: 800;
    line-height: 1.2;
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease, opacity 160ms ease;
}

.rm-auth-social-button {
    position: relative;
    gap: 10px;
}

.rm-auth-social-button svg {
    width: 19px;
    height: 19px;
    flex: 0 0 auto;
    fill: currentColor;
}

.rm-auth-social-button:hover:not(:disabled),
.rm-auth-primary:hover:not(:disabled) {
    transform: translateY(-1px);
}

.rm-auth-social-button:disabled,
.rm-auth-primary:disabled {
    cursor: wait;
    opacity: 0.58;
}

.rm-auth-kakao {
    color: #191d26;
    background: #fee500;
}

.rm-auth-kakao:hover:not(:disabled) {
    box-shadow: 0 7px 18px rgba(91, 81, 0, 0.16);
}

.rm-auth-naver {
    color: #ffffff;
    background: #03c75a;
}

.rm-auth-naver:hover:not(:disabled) {
    box-shadow: 0 7px 18px rgba(3, 148, 68, 0.2);
}

.rm-auth-google {
    border-color: #dbe3ef;
    color: #191d26;
    background: #ffffff;
}

.rm-auth-google:hover:not(:disabled) {
    border-color: #bfcbe0;
    box-shadow: 0 7px 18px rgba(23, 38, 84, 0.08);
}

.rm-auth-apple {
    color: #ffffff;
    background: #191d26;
}

.rm-auth-apple:hover:not(:disabled) {
    box-shadow: 0 7px 18px rgba(25, 29, 38, 0.2);
}

.rm-auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 22px 0 16px;
    color: #8a94a7;
    font-size: 12px;
}

.rm-auth-divider::before,
.rm-auth-divider::after {
    content: "";
    flex: 1;
    border-top: 1px solid #e7ebf3;
}

.rm-auth-switch {
    display: flex;
    width: 100%;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border-radius: 10px;
    color: #1f54c4;
    font-size: 14px;
    font-weight: 750;
    transition: color 160ms ease, background-color 160ms ease;
}

.rm-auth-switch:hover {
    color: #17439f;
    background: #f4f7fd;
}

.rm-auth-switch svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.rm-auth-switch-back {
    margin-top: 14px;
}

.rm-auth-form {
    display: grid;
    gap: 15px;
}

.rm-auth-field {
    display: grid;
    gap: 7px;
}

.rm-auth-field label {
    color: #4b5566;
    font-size: 12.5px;
    font-weight: 750;
}

.rm-auth-field input {
    width: 100%;
    min-height: 52px;
    border: 1px solid #dbe3ef;
    border-radius: 13px;
    outline: none;
    padding: 0 15px;
    color: #191d26;
    background: #ffffff;
    font-size: 14px;
    line-height: 1.4;
    transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.rm-auth-field input::placeholder {
    color: #9aa3b5;
    opacity: 1;
}

.rm-auth-field input:hover {
    border-color: #bec9dc;
}

.rm-auth-field input:focus {
    border-color: #2f6fed;
    box-shadow: 0 0 0 4px rgba(47, 111, 237, 0.12);
}

.rm-auth-primary {
    margin-top: 5px;
    color: #ffffff;
    background: #2f6fed;
    box-shadow: 0 8px 20px rgba(47, 111, 237, 0.22);
}

.rm-auth-primary:hover:not(:disabled) {
    background: #255fda;
    box-shadow: 0 10px 24px rgba(47, 111, 237, 0.28);
}

.rm-auth-form-links {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 14px;
    font-size: 13px;
    font-weight: 700;
}

.rm-auth-form-links button,
.rm-auth-form-links a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    border-radius: 8px;
}

.rm-auth-form-links button {
    color: #6a7383;
}

.rm-auth-form-links a {
    color: #1f54c4;
}

.rm-auth-form-links button:hover,
.rm-auth-form-links a:hover {
    color: #17439f;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.rm-auth-status {
    margin: 16px 0 0;
    border-radius: 12px;
    padding: 11px 13px;
    color: #4b5566;
    background: #f4f7fd;
    font-size: 12.5px;
    font-weight: 650;
    line-height: 1.55;
}

.rm-auth-status.is-error {
    color: #9f3015;
    background: #fff3ef;
}

.rm-auth-form > .rm-auth-status { margin: 0; }

.rm-auth-status.is-success {
    color: #087052;
    background: #ecfbf5;
}

@media (max-width: 900px) {
    .rm-auth-frame {
        min-height: 0;
        grid-template-columns: 1fr;
    }

    .rm-auth-brand-panel {
        min-height: 196px;
        padding: 26px 28px;
    }

    .rm-auth-brand-copy {
        margin-top: 0;
    }

    .rm-auth-route {
        margin-bottom: 15px;
        font-size: 11px;
    }

    .rm-auth-brand-title {
        font-size: 25px;
        line-height: 1.28;
    }

    .rm-auth-brand-description {
        display: none;
    }

    .rm-auth-workspace {
        padding: 34px 24px 38px;
    }
}

@media (max-width: 767px) {
    .rm-auth-field input {
        font-size: 16px; /* Prevent iOS focus zoom without changing the PC type scale. */
    }

    .rm-auth-frame {
        border-radius: 20px;
        box-shadow: 0 10px 28px rgba(31, 71, 168, 0.07);
    }

    .rm-auth-brand-panel {
        min-height: 178px;
        padding: 22px 20px;
    }

    .rm-auth-route {
        gap: 9px;
        margin-bottom: 13px;
        letter-spacing: 0.055em;
    }

    .rm-auth-brand-title {
        font-size: 25px;
    }

    .rm-auth-workspace {
        padding: 30px 20px 34px;
    }

    .rm-auth-heading {
        margin-bottom: 22px;
    }

    .rm-auth-heading h1 {
        font-size: 16px;
    }

    .dev-email-login-form .rm-auth-heading h1,
    .dev-password-reset-form .rm-auth-heading h1 {
        font-size: 16px;
    }

    .rm-auth-social-button,
    .rm-auth-primary,
    .rm-auth-field input {
        min-height: 54px;
    }
}

@media (max-width: 374px) {
    .rm-auth-brand-panel {
        min-height: 164px;
    }

    .rm-auth-route span:first-child {
        display: none;
    }

    .rm-auth-workspace {
        padding-right: 16px;
        padding-left: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .rm-auth-social-button,
    .rm-auth-primary,
    .rm-auth-switch,
    .rm-auth-field input {
        transition: none;
    }
}

/* Signup extends the login design without changing its shared type scale. */
.rm-signup-page [hidden] { display: none !important; }
.rm-signup-page .rm-auth-workspace { align-items: flex-start; }
.rm-signup-page .rm-auth-content { max-width: 440px; }
.rm-signup-credentials { display: grid; gap: 18px; }
.rm-signup-input-row { display: flex; align-items: stretch; gap: 8px; }
.rm-signup-input-row > input,
.rm-signup-code-input { flex: 1; min-width: 0; }
.rm-signup-secondary {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 44px; padding: 10px 14px; border: 1px solid #c8d6ee;
    border-radius: 12px; color: #1f54c4; background: #f4f7fd;
    font-size: 12.5px; font-weight: 750; line-height: 1.4; white-space: nowrap;
}
.rm-signup-secondary:hover:not(:disabled) { background: #eaf0fc; border-color: #9fb7df; }
.rm-signup-secondary:disabled { color: #667386; background: #f5f6f8; cursor: default; }
.rm-signup-page button:focus-visible,
.rm-signup-page a:focus-visible,
.rm-signup-page input[type="checkbox"]:focus-visible {
    outline: 2px solid #2f6fed; outline-offset: 3px;
}
.rm-signup-page .rm-auth-field input::placeholder { color: #727d90; }
.rm-signup-page .rm-auth-field input[readonly] { background: #f5f7fb; }
.rm-signup-code-input { position: relative; }
.rm-signup-code-input input { padding-right: 66px; }
.rm-signup-timer {
    position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
    color: #6a7383; font-size: 12.5px; font-variant-numeric: tabular-nums;
}
.rm-signup-field-status { margin: 0; color: #087052; font-size: 12.5px; line-height: 1.6; }
.rm-signup-help { margin: 0; color: #6a7383; font-size: 12.5px; line-height: 1.6; overflow-wrap: anywhere; }
.rm-signup-agreements { min-width: 0; margin: 12px 0 0; padding: 0; border: 0; }
.rm-signup-agreements legend { padding: 0; margin-bottom: 14px; font-size: 16px; font-weight: 800; color: #191d26; }
.rm-signup-agree-all {
    display: flex; align-items: center; gap: 10px; min-height: 52px;
    border: 1px solid #c8d6ee; border-radius: 12px; padding: 12px 14px;
    background: #f4f7fd; font-size: 14px; font-weight: 750; cursor: pointer;
}
.rm-signup-page input[type="checkbox"] { width: 19px; height: 19px; flex: 0 0 19px; margin: 0; accent-color: #2f6fed; cursor: pointer; }
.rm-signup-term-list { margin-top: 8px; }
.rm-signup-term-row { display: flex; align-items: center; gap: 6px; }
.rm-signup-term-row label { display: flex; flex: 1; align-items: center; min-width: 0; min-height: 44px; gap: 10px; padding: 8px 0 8px 14px; font-size: 13px; line-height: 1.6; cursor: pointer; }
.rm-signup-term-row label span { overflow-wrap: anywhere; }
.rm-signup-term-link { min-height: 44px; min-width: 44px; padding: 8px; border-radius: 8px; font-size: 12.5px; font-weight: 650; color: #5c687c; text-decoration: underline; text-underline-offset: 3px; }
.rm-signup-term-link:hover { color: #1f54c4; background: #f4f7fd; }
.rm-signup-page .rm-auth-status { margin-top: 0; overflow-wrap: anywhere; }
.rm-signup-dialog-open { overflow: hidden; }
.rm-signup-terms-dialog {
    width: min(680px, calc(100% - 36px)); max-width: none;
    max-height: calc(100dvh - 48px); margin: auto; padding: 0;
    border: 1px solid #c8d6ee; border-radius: 20px; background: #ffffff;
    color: #191d26; box-shadow: 0 18px 50px rgba(31, 50, 85, 0.2); overflow: hidden;
}
.rm-signup-terms-dialog[open] { display: flex; flex-direction: column; }
.rm-signup-terms-dialog::backdrop { background: rgba(20, 30, 50, 0.48); }
.rm-signup-dialog-header { display: flex; flex-shrink: 0; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 24px; border-bottom: 1px solid #dfe6f2; }
.rm-signup-dialog-header h2 { margin: 0; font-size: 21px; line-height: 1.4; font-weight: 800; overflow-wrap: anywhere; }
.rm-signup-dialog-body { padding: 24px; min-height: 0; overflow: auto; overscroll-behavior: contain; font-size: 14px; line-height: 1.8; overflow-wrap: anywhere; }
.rm-signup-dialog-body p + p { margin-top: 12px; }
.rm-signup-dialog-body h2,
.rm-signup-dialog-body h3 { font-size: 16px; font-weight: 750; margin: 20px 0 8px; }
.rm-signup-dialog-body ul { list-style: disc; padding-left: 20px; }
.rm-signup-dialog-body ol { list-style: decimal; padding-left: 20px; }
.rm-signup-dialog-body img { max-width: 100%; height: auto; }
@media (max-width: 767px) {
    .rm-signup-page .rm-auth-brand-panel { display: none; }
    .rm-signup-page .rm-auth-workspace { padding: 24px 20px; }
    .rm-signup-page .rm-auth-heading { margin-bottom: 22px; }
    .rm-signup-agreements legend { font-size: 14px; }
    .rm-signup-dialog-header { padding: 14px 18px; }
    .rm-signup-dialog-header h2 { font-size: 16px; }
    .rm-signup-dialog-body { padding: 18px; font-size: 13px; }
}
@media (max-width: 374px) {
    .rm-signup-page .rm-auth-workspace { padding: 22px 14px; }
    .rm-signup-secondary { padding-right: 10px; padding-left: 10px; }
}
