:root {
    --bg-1: #faf8ff;
    --bg-2: #f3efff;
    --bg-3: #fff6fb;

    --text: #47435a;
    --muted: #918ca0;

    --border: #e7e2ef;

    --primary: #7f72dc;
    --primary-2: #ee8fca;

    --error-bg: #fff1f5;
    --error-border: #f2ccd9;
    --error-text: #b64c70;

    --success-bg: #f5f2ff;
    --success-border: #ddd7f5;
    --success-text: #7064ba;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    min-height: 100svh;

    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Noto Sans JP",
        "Yu Gothic",
        "Hiragino Kaku Gothic ProN",
        Meiryo,
        sans-serif;

    color: var(--text);

    background:
        radial-gradient(
            circle at 12% 10%,
            rgba(238, 143, 202, 0.18),
            transparent 34%
        ),
        radial-gradient(
            circle at 88% 12%,
            rgba(127, 114, 220, 0.18),
            transparent 36%
        ),
        radial-gradient(
            circle at 50% 100%,
            rgba(150, 220, 236, 0.14),
            transparent 38%
        ),
        linear-gradient(
            145deg,
            var(--bg-1),
            var(--bg-2) 50%,
            var(--bg-3)
        );
}

button,
input {
    font: inherit;
}

a {
    color: inherit;
}


/* =========================================
   Page
========================================= */

.auth-page {
    width: 100%;
    min-height: 100vh;
    min-height: 100svh;

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

    padding: 28px 16px 22px;

    position: relative;
    overflow: hidden;
}


/* Decorative background */

.auth-page::before {
    content: "";
    position: absolute;

    width: 230px;
    height: 230px;

    top: -100px;
    left: -110px;

    border-radius: 50%;

    background:
        radial-gradient(
            circle,
            rgba(238, 143, 202, 0.12),
            transparent 70%
        );

    pointer-events: none;
}

.auth-page::after {
    content: "";
    position: absolute;

    width: 280px;
    height: 280px;

    right: -150px;
    bottom: -130px;

    border-radius: 50%;

    background:
        radial-gradient(
            circle,
            rgba(127, 114, 220, 0.11),
            transparent 70%
        );

    pointer-events: none;
}


/* =========================================
   Main card
========================================= */

.auth-card {
    width: 100%;
    max-width: 430px;

    padding: 30px 22px 27px;

    border: 1px solid rgba(255, 255, 255, 0.88);
    border-radius: 28px;

    background: rgba(255, 255, 255, 0.91);

    box-shadow:
        0 20px 55px rgba(88, 76, 126, 0.12),
        0 2px 8px rgba(88, 76, 126, 0.04);

    position: relative;
    z-index: 1;

    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}


/* =========================================
   Logo
========================================= */

.auth-brand {
    width: 100%;

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

    margin-bottom: 22px;
}

.brand-logo {
    display: block;

    width: 100%;
    max-width: 350px;
    height: auto;

    object-fit: contain;
}


/* =========================================
   Heading
========================================= */

.auth-heading {
    margin-bottom: 21px;
}

.auth-heading h1 {
    margin: 0;

    font-size: 21px;
    line-height: 1.45;

    font-weight: 700;
    letter-spacing: 0.03em;
}

.auth-heading p {
    margin: 5px 0 0;

    color: var(--muted);

    font-size: 13px;
    line-height: 1.6;
}


/* =========================================
   Error
========================================= */

.auth-error {
    margin-bottom: 17px;

    padding: 12px 14px;

    border: 1px solid var(--error-border);
    border-radius: 12px;

    background: var(--error-bg);

    color: var(--error-text);

    font-size: 13px;
    line-height: 1.6;
}


/* =========================================
   Form
========================================= */

.auth-form {
    display: flex;
    flex-direction: column;

    gap: 17px;
}

.form-field {
    width: 100%;
}

.form-field label {
    display: block;

    margin-bottom: 8px;

    font-size: 13px;
    font-weight: 600;

    line-height: 1.4;
}

.field-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 10px;
}

.field-label-row label {
    margin-bottom: 8px;
}

.field-link {
    margin-bottom: 8px;

    color: var(--primary);

    font-size: 11px;
    line-height: 1.4;

    text-decoration: none;
    white-space: nowrap;
}

.field-link:hover {
    text-decoration: underline;
}


/* =========================================
   Inputs
========================================= */

.form-field input {
    display: block;

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

    padding: 13px 15px;

    border: 1px solid var(--border);
    border-radius: 14px;

    outline: none;

    background: #ffffff;

    color: var(--text);

    font-size: 16px;

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

.form-field input::placeholder {
    color: #aaa5b4;
}

.form-field input:focus {
    border-color: rgba(127, 114, 220, 0.65);

    box-shadow:
        0 0 0 4px rgba(127, 114, 220, 0.10);
}


/* =========================================
   Login / primary button
========================================= */

.auth-button {
    width: 100%;
    min-height: 54px;

    margin-top: 2px;

    border: 0;
    border-radius: 15px;

    background:
        linear-gradient(
            135deg,
            var(--primary),
            var(--primary-2)
        );

    color: #ffffff;

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

    letter-spacing: 0.04em;

    cursor: pointer;

    box-shadow:
        0 10px 22px rgba(127, 114, 220, 0.21);

    transition:
        transform 0.16s ease,
        box-shadow 0.16s ease;
}

.auth-button:hover {
    transform: translateY(-1px);

    box-shadow:
        0 13px 27px rgba(127, 114, 220, 0.25);
}

.auth-button:active {
    transform: translateY(0);
}


/* =========================================
   Divider
========================================= */

.auth-divider {
    display: flex;
    align-items: center;

    gap: 12px;

    margin: 25px 0 21px;

    color: #aaa5b4;

    font-size: 11px;
}

.auth-divider::before,
.auth-divider::after {
    content: "";

    height: 1px;

    flex: 1;

    background: var(--border);
}

.auth-divider span {
    flex: 0 0 auto;
}


/* =========================================
   Register / secondary button
========================================= */

.register-area {
    text-align: center;
}

.register-area p {
    margin: 0 0 11px;

    color: var(--muted);

    font-size: 12px;
    line-height: 1.6;
}

.register-button {
    width: 100%;
    min-height: 50px;

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

    padding: 12px 16px;

    border: 1px solid #dcd5ea;
    border-radius: 14px;

    background: rgba(255, 255, 255, 0.75);

    color: #7465c8;

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

    text-decoration: none;

    transition:
        background-color 0.16s ease,
        border-color 0.16s ease,
        transform 0.16s ease;
}

.register-button:hover {
    background: #ffffff;

    border-color: #cec5e4;

    transform: translateY(-1px);
}


/* =========================================
   Verification
========================================= */

.verification-message {
    margin-bottom: 20px;

    padding: 16px;

    border: 1px solid var(--border);
    border-radius: 15px;

    background: rgba(250, 248, 255, 0.75);

    text-align: center;

    color: var(--muted);

    font-size: 12px;

    line-height: 1.7;
}

.verification-message p {
    margin: 0;
}

.verification-message strong {
    display: block;

    margin: 4px 0;

    color: var(--text);

    font-size: 14px;

    font-weight: 600;

    letter-spacing: 0.02em;

    word-break: break-all;
}

.verification-help {
    margin-top: 18px;

    text-align: center;

    color: var(--muted);

    font-size: 11px;

    line-height: 1.7;
}

.verification-help p {
    margin: 0;
}


/* Verification complete */

.verification-complete {
    margin-bottom: 23px;

    padding: 20px 15px;

    border: 1px solid var(--success-border);
    border-radius: 17px;

    background:
        linear-gradient(
            145deg,
            rgba(248, 246, 255, 0.92),
            rgba(255, 247, 252, 0.92)
        );

    text-align: center;
}

.verification-complete-mark {
    width: 52px;
    height: 52px;

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

    margin: 0 auto 12px;

    border-radius: 50%;

    background:
        linear-gradient(
            135deg,
            var(--primary),
            var(--primary-2)
        );

    color: #ffffff;

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

    box-shadow:
        0 9px 20px rgba(127, 114, 220, 0.20);
}

.verification-complete-title {
    margin: 0 0 8px;

    color: var(--success-text);

    font-size: 16px;

    font-weight: 700;
}

.verification-complete-text {
    margin: 0;

    color: var(--muted);

    font-size: 12px;

    line-height: 1.8;
}


/* =========================================
   Footer
========================================= */

.auth-footer {
    position: relative;
    z-index: 1;

    margin-top: 17px;

    color: #aaa5b4;

    font-size: 10px;

    letter-spacing: 0.05em;

    text-align: center;
}

.auth-copyright-link {
    color: inherit;
    text-decoration: none;
}

.auth-copyright-link:hover,
.auth-copyright-link:focus-visible {
    text-decoration: underline;
}

.auth-footer p {
    margin: 0;
}


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

@media (min-width: 700px) {

    .auth-page {
        padding: 45px 24px 28px;
    }

    .auth-card {
        padding: 35px 34px 31px;
    }

    .brand-logo {
        max-width: 330px;
    }
}


/* =========================================
   Small mobile
========================================= */

@media (max-width: 360px) {

    .auth-page {
        padding: 20px 12px 18px;
    }

    .auth-card {
        padding: 25px 17px 23px;

        border-radius: 24px;
    }

    .auth-brand {
        margin-bottom: 18px;
    }

    .brand-logo {
        max-width: 315px;
    }

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

    .field-label-row {
        align-items: flex-start;

        flex-direction: column;

        gap: 0;
    }

    .field-link {
        margin-top: -2px;
    }
}
/* =========================================
   Register page position
========================================= */

.register-page {
    justify-content: flex-start;
    padding-top: 28px;
}

@media (min-width: 700px) {
    .register-page {
        padding-top: 45px;
    }
}

@media (max-width: 360px) {
    .register-page {
        padding-top: 20px;
    }
}

/* =========================================
   Login page
========================================= */

.login-page {
    width: 100%;
    min-height: 100vh;
    min-height: 100svh;

    margin: 0;

    overflow-x: hidden;
    overflow-y: auto;
}

.login-page .auth-page {
    width: 100%;

    height: auto;
    min-height: 100vh;
    min-height: 100svh;

    overflow: hidden;

    justify-content: flex-start;

    padding-top: 22px;
    padding-bottom: 24px;
}


@media (min-width: 700px) {

    .login-page .auth-page {
        padding-top: 34px;
        padding-bottom: 28px;
    }

}


/*
|--------------------------------------------------------------------------
| Public legal footer links
|--------------------------------------------------------------------------
*/

.auth-footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin-top: 8px;
    font-size: 0.78rem;
    line-height: 1.7;
}

.auth-footer-links a {
    color: inherit;
    text-decoration: none;
    opacity: 0.78;
}

.auth-footer-links a:hover,
.auth-footer-links a:focus-visible {
    text-decoration: underline;
    opacity: 1;
}

.auth-footer-links span {
    opacity: 0.35;
}



/* =========================================
   RIPUE about modal
========================================= */

.ripue-about-entry {
    position: relative;
    z-index: 1;
    margin-top: 14px;
    text-align: center;
}

.ripue-about-entry p {
    margin: 7px 0 0;
    color: #8f8a9d;
    font-size: 11px;
    line-height: 1.6;
}

.ripue-about-open {
    appearance: none;
    border: 0;
    background: transparent;
    color: #7566b8;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.ripue-about-modal {
    position: fixed;
    inset: 0;
    z-index: 5000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
}

.ripue-about-modal.is-open {
    display: flex;
}

.ripue-about-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(41, 35, 61, 0.42);
    backdrop-filter: blur(8px);
}

.ripue-about-dialog {
    position: relative;
    z-index: 1;
    width: min(100%, 620px);
    max-height: min(88vh, 760px);
    overflow-y: auto;
    box-sizing: border-box;
    padding: 28px 24px 24px;
    border: 1px solid rgba(120, 110, 150, 0.12);
    border-radius: 26px;
    background:
        radial-gradient(
            circle at top right,
            rgba(220, 210, 255, 0.48),
            transparent 34%
        ),
        linear-gradient(
            180deg,
            #ffffff 0%,
            #fbfaff 100%
        );
    box-shadow: 0 24px 70px rgba(53, 44, 83, 0.22);
}

.ripue-about-close {
    position: absolute;
    top: 14px;
    right: 16px;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #f4f1fb;
    color: #6f648a;
    font-size: 25px;
    line-height: 1;
    cursor: pointer;
}

.ripue-about-header {
    padding: 0 34px 20px 0;
}

.ripue-about-kicker {
    margin-bottom: 6px;
    color: #9a83ca;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
}

.ripue-about-header h2 {
    margin: 0;
    color: #342b4d;
    font-size: clamp(1.45rem, 5vw, 1.9rem);
}

.ripue-about-header p {
    margin: 9px 0 0;
    color: #777086;
    font-size: 13px;
    line-height: 1.7;
}

.ripue-about-tabs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 7px;
    margin-bottom: 20px;
}

.ripue-about-tab {
    min-width: 0;
    padding: 10px 6px;
    border: 1px solid rgba(120, 110, 150, 0.12);
    border-radius: 12px;
    background: #f8f7fc;
    color: #777086;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
}

.ripue-about-tab.is-active {
    border-color: rgba(117, 102, 184, 0.28);
    background: linear-gradient(
        135deg,
        #eee9ff,
        #fbeefa
    );
    color: #6551a0;
}

.ripue-about-panel {
    display: none;
    min-height: 210px;
    padding: 25px 22px;
    box-sizing: border-box;
    border: 1px solid rgba(120, 110, 150, 0.10);
    border-radius: 20px;
    background: rgba(255,255,255,0.78);
}

.ripue-about-panel.is-active {
    display: block;
}

.ripue-about-icon {
    margin-bottom: 10px;
    color: #9b7ed1;
    font-size: 28px;
}

.ripue-about-panel h3 {
    margin: 0 0 12px;
    color: #3f345c;
    font-size: 1.15rem;
}

.ripue-about-panel p {
    margin: 8px 0 0;
    color: #686174;
    font-size: 13px;
    line-height: 1.9;
}

.ripue-about-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 18px;
    padding-top: 17px;
    border-top: 1px solid rgba(120, 110, 150, 0.10);
    color: #8a8494;
    font-size: 11px;
}

.ripue-about-footer a {
    color: #7566b8;
    font-weight: 700;
    text-decoration: none;
}

.ripue-about-footer a:hover,
.ripue-about-footer a:focus-visible {
    text-decoration: underline;
}

body.ripue-about-lock {
    overflow: hidden;
}

@media (max-width: 520px) {

    .ripue-about-dialog {
        padding: 25px 18px 20px;
        border-radius: 22px;
    }

    .ripue-about-tabs {
        grid-template-columns: repeat(2, 1fr);
    }

    .ripue-about-panel {
        min-height: 240px;
        padding: 22px 18px;
    }

    .ripue-about-footer {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* =========================================
   Login page final layout
========================================= */

body.login-page {
    min-height: 0;
    background-repeat: no-repeat;
    background-size: cover;
    background-attachment: fixed;
}

.login-page .auth-page {
    height: auto;
    min-height: 0;

    justify-content: flex-start;

    padding-top: 34px;
    padding-bottom: 18px;
}

@media (max-width: 699px) {
    .login-page .auth-page {
        padding-top: 22px;
        padding-bottom: 18px;
    }
}

/* =========================================
   Login footer bottom alignment
========================================= */

body.login-page {
    min-height: 100vh;
    min-height: 100svh;
}

.login-page .auth-page {
    min-height: 100vh;
    min-height: 100svh;
}

.login-page .auth-footer {
    margin-top: auto;
    padding-top: 20px;
}


.ripue-about-footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px 14px;
}

.ripue-about-footer-links a {
    white-space: nowrap;
}

@media (max-width: 520px) {
    .ripue-about-footer-links {
        justify-content: flex-start;
    }
}


/* =========================================
   RIPUE Support Widget - Auth Pages
========================================= */

.ripue-support-launcher {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 3200;

    width: 58px;
    height: 58px;

    border: 0;
    border-radius: 50%;

    background:
        linear-gradient(
            135deg,
            rgba(127,114,220,.96),
            rgba(238,143,202,.96)
        );

    color: #fff;

    display: grid;
    place-items: center;

    font-size: 24px;

    box-shadow:
        0 12px 30px rgba(88,76,126,.24);

    cursor: pointer;
}

.ripue-support-widget {
    position: fixed;
    right: 18px;
    bottom: 86px;
    z-index: 3200;

    width: min(390px, calc(100vw - 28px));
    max-height: min(640px, calc(100vh - 110px));

    display: none;
    flex-direction: column;

    overflow: hidden;

    border:
        1px solid rgba(120,110,150,.14);

    border-radius: 22px;

    background:
        rgba(255,255,255,.98);

    box-shadow:
        0 24px 70px rgba(53,44,83,.24);
}

.ripue-support-widget.is-open {
    display: flex;
}

.ripue-support-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;

    padding: 16px 18px;

    background:
        linear-gradient(
            135deg,
            rgba(240,235,255,.96),
            rgba(255,235,246,.96)
        );

    border-bottom:
        1px solid rgba(120,110,150,.10);
}

.ripue-support-header-main {
    min-width: 0;
}

.ripue-support-kicker {
    margin: 0 0 3px;

    font-size: 10px;
    font-weight: 800;
    letter-spacing: .14em;

    color: #8a77b4;
}

.ripue-support-title {
    margin: 0;

    font-size: 16px;
    font-weight: 800;

    color: #342b4d;
}

.ripue-support-close {
    flex: 0 0 auto;

    width: 34px;
    height: 34px;

    border: 0;
    border-radius: 50%;

    background:
        rgba(255,255,255,.8);

    color: #75698f;

    font-size: 22px;

    cursor: pointer;
}

.ripue-support-messages {
    flex: 1 1 auto;
    min-height: 280px;
    max-height: 420px;

    overflow-y: auto;

    padding: 16px;

    background:
        linear-gradient(
            180deg,
            #fcfbff 0%,
            #ffffff 100%
        );
}

.ripue-support-message {
    display: flex;
    margin-bottom: 12px;
}

.ripue-support-message.assistant {
    justify-content: flex-start;
}

.ripue-support-message.user {
    justify-content: flex-end;
}

.ripue-support-bubble {
    max-width: 82%;

    padding: 11px 13px;

    border-radius: 15px;

    white-space: pre-wrap;
    word-break: break-word;

    font-size: 13px;
    line-height: 1.7;
}

.ripue-support-message.assistant
.ripue-support-bubble {
    background:
        rgba(238,235,250,.92);

    color: #403750;

    border-bottom-left-radius: 5px;
}

.ripue-support-message.user
.ripue-support-bubble {
    background:
        linear-gradient(
            135deg,
            rgba(127,114,220,.92),
            rgba(238,143,202,.88)
        );

    color: #fff;

    border-bottom-right-radius: 5px;
}

.ripue-support-status {
    display: none;

    padding: 8px 16px 0;

    font-size: 11px;
    color: #928aa2;
}

.ripue-support-status.is-visible {
    display: block;
}

.ripue-support-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;

    padding: 12px;

    border-top:
        1px solid rgba(120,110,150,.10);

    background: #fff;
}

.ripue-support-input {
    min-width: 0;

    padding: 11px 12px;

    border:
        1px solid rgba(120,110,150,.18);

    border-radius: 13px;

    background: #fff;

    color: inherit;
    font: inherit;
    font-size: 16px;

    outline: none;
}

.ripue-support-send {
    min-width: 58px;

    padding: 0 14px;

    border: 0;
    border-radius: 13px;

    background:
        linear-gradient(
            135deg,
            rgba(127,114,220,.95),
            rgba(238,143,202,.95)
        );

    color: #fff;

    font: inherit;
    font-size: 12px;
    font-weight: 800;

    cursor: pointer;
}

.ripue-support-help {
    padding: 0 14px 14px;

    background: #fff;

    text-align: center;
}

.ripue-support-help a {
    color: #7566b8;

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

    text-decoration: none;
}

@media (max-width: 520px) {

    .ripue-support-launcher {
        right: 14px;
        bottom: 14px;
    }

    .ripue-support-widget {
        right: 14px;
        bottom: 82px;

        width: calc(100vw - 28px);
    }
}


/* RIPUE Support handoff */
.ripue-support-message-content {
    max-width: 82%;
}

.ripue-support-message-content
.ripue-support-bubble {
    max-width: 100%;
}

.ripue-support-handoff {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    margin-top: 8px;
    padding: 9px 13px;

    border-radius: 12px;

    background:
        linear-gradient(
            135deg,
            rgba(127,114,220,.95),
            rgba(238,143,202,.95)
        );

    color: #fff;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
}

.ripue-support-handoff:hover {
    opacity: .92;
}

/* RIPUE Support inline contact form */

.ripue-support-handoff {
    border: 0;
    cursor: pointer;
}

.ripue-support-contact-form {
    display: none;

    margin-top: 9px;
    padding: 11px;

    border:
        1px solid rgba(120,110,150,.12);

    border-radius: 14px;

    background:
        rgba(250,248,255,.96);
}

.ripue-support-contact-form.is-visible {
    display: grid;
    gap: 8px;
}

.ripue-support-contact-input,
.ripue-support-contact-textarea {
    width: 100%;
    box-sizing: border-box;

    padding: 10px 11px;

    border:
        1px solid rgba(120,110,150,.18);

    border-radius: 11px;

    background: #fff;
    color: inherit;

    font: inherit;
    font-size: 16px;

    outline: none;
}

.ripue-support-contact-textarea {
    min-height: 110px;
    resize: vertical;
    line-height: 1.6;
}

.ripue-support-contact-submit {
    padding: 10px 12px;

    border: 0;
    border-radius: 11px;

    background:
        linear-gradient(
            135deg,
            rgba(127,114,220,.95),
            rgba(238,143,202,.95)
        );

    color: #fff;

    font: inherit;
    font-size: 13px;
    font-weight: 800;

    cursor: pointer;
}

.ripue-support-contact-submit:disabled {
    opacity: .55;
    cursor: default;
}

.ripue-support-contact-status {
    min-height: 1em;

    font-size: 11px;
    line-height: 1.5;

    color: #8c819d;
}
