@charset 'UTF-8';

/* =========================================================
   ログイン・新規登録・メール認証・ロック解除 共通スタイル
   （サービスサイトのデザインに統一）
   ========================================================= */

body.auth-page {
    position: relative;
    min-height: 100vh;
    overflow-x: hidden;
    background: var(--bg);
    color: var(--text);
    user-select: auto;
}

/* 背景の罫線・点・流れる光（装飾） */
.auth-lines {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.auth-lines span {
    position: absolute;
    background: var(--line);
}

.auth-lines .v-left {
    left: 12%;
    top: 0;
    bottom: 0;
    width: 1px;
}

.auth-lines .v-right {
    right: 16%;
    top: 0;
    bottom: 0;
    width: 1px;
}

.auth-lines .h-top {
    left: 0;
    right: 0;
    top: 96px;
    height: 1px;
}

.auth-lines .dot-left,
.auth-lines .dot-right {
    top: 92px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
}

.auth-lines .dot-left {
    left: calc(12% - 4px);
    background: var(--ink);
}

.auth-lines .dot-right {
    right: calc(16% - 4px);
    background: var(--accent);
}

.auth-lines .runner {
    left: calc(12% - 2px);
    top: -40px;
    width: 5px;
    height: 40px;
    border-radius: 3px;
    background: linear-gradient(180deg, rgba(18, 181, 214, 0), var(--accent));
    animation: runY 7s linear infinite;
}

@keyframes runY {
    from {
        top: -40px;
    }

    to {
        top: 100%;
    }
}

@keyframes drawCheck {
    from {
        stroke-dashoffset: 40;
    }

    to {
        stroke-dashoffset: 0;
    }
}

/* ヘッダー（ロゴ） */
.auth-header {
    position: relative;
    z-index: 1;
    height: 96px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
    padding: 0 calc(16% + 28px) 0 calc(12% + 28px);
}

/* 中央のカード */
.auth-main {
    position: relative;
    z-index: 1;
    min-height: calc(100vh - 96px - 60px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
    box-sizing: border-box;
}

.auth-card {
    width: 496px;
    max-width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 22px;
    padding: 44px 48px;
    background: var(--surface);
    border: 1px solid transparent;
    border-radius: 22px;
    box-shadow: 0 30px 60px rgba(17, 20, 23, 0.08);
}

.auth-card.is-compact {
    gap: 16px;
}

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

.auth-card-head h1,
.auth-card-head h2 {
    margin: 0;
    font-size: 32px;
    font-weight: 900;
}

.auth-card-head p:not(.eyebrow) {
    margin: 0;
    font-size: 14px;
    line-height: 1.8;
    color: var(--text-2);
}

/* 入力欄 */
.field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.field label {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
}

.field .hint {
    font-size: 12px;
    color: var(--text-3);
}

.input {
    position: relative;
    display: flex;
    align-items: center;
}

.input svg.lead {
    position: absolute;
    left: 16px;
    color: var(--text-3);
    pointer-events: none;
}

.input input {
    width: 100%;
    height: 52px;
    box-sizing: border-box;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    padding: 0 16px 0 46px;
    font: inherit;
    font-size: 15px;
    color: var(--text);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.input input[type="password"],
.input input.has-eye {
    padding-right: 52px;
}

.input input::placeholder {
    color: #9AA3AD;
}

.input input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(18, 181, 214, 0.16);
}

/* エラー表示中は入力欄を赤枠に（エラー文が空でないとき） */
.auth-card:has(.error-message:not(:empty)) .input input {
    border-color: var(--error);
}

/* パスワード表示切替（目のアイコン） */
.eye {
    position: absolute;
    right: 10px;
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    border-radius: 8px;
    color: var(--text-3);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
}

.eye:hover {
    color: var(--text);
    background: var(--surface-2);
}

.eye .eye-off {
    display: none;
}

.eye.is-visible .eye-on {
    display: none;
}

.eye.is-visible .eye-off {
    display: block;
}

/* ボタン */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 52px;
    padding: 0 24px;
    border-radius: 12px;
    border: none;
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.btn-primary {
    background: var(--ink);
    color: var(--ink-contrast);
}

.btn-primary:hover {
    background: var(--accent-ink);
    color: #fff;
}

.btn-block {
    width: 100%;
}

.btn[disabled] {
    background: #C9CFD6;
    color: #fff;
    cursor: not-allowed;
}

/* エラーメッセージ（空のときは非表示） */
.error-message {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    background: var(--error-soft);
    border: 1px solid #FBCACA;
    color: #B91C1C;
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 13px;
    line-height: 1.7;
    font-weight: 500;
}

.error-message::before {
    content: '';
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    margin-top: 2px;
    background-color: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 8v5M12 16h.01'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 8v5M12 16h.01'/%3E%3C/svg%3E") center / contain no-repeat;
}

.error-message:empty {
    display: none;
}

/* 区切り線「または」 */
.divider {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 12px;
    color: var(--text-3);
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--line-soft);
}

.register-link,
.login-link {
    margin: 0;
    font-size: 14px;
    color: var(--text-2);
    text-align: center;
}

.register-link a,
.login-link a {
    font-weight: 700;
    color: var(--accent-ink);
}

.register-link a:hover,
.login-link a:hover {
    color: var(--ink);
}

.auth-footer {
    position: relative;
    z-index: 1;
    height: 60px;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: var(--text-3);
}

/* メール認証完了・ロック解除のカード */
.verify-card {
    width: 480px;
    align-items: center;
    text-align: center;
    gap: 16px;
    padding: 48px 44px 40px;
}

.verify-card h2 {
    margin: 0;
    font-size: 26px;
    font-weight: 900;
    line-height: 1.5;
    /* 折り返したとき、最後の1文字だけが、次の行に落ちないように、行の長さをそろえる */
    text-wrap: balance;
    /* 日本語は、単語の途中ではなく、文節の切れ目で改行する（対応していないブラウザでは、無視される） */
    word-break: auto-phrase;
}

.verify-card .message {
    margin: 0;
    font-size: 14px;
    line-height: 1.95;
    color: var(--text-2);
}

.verify-card .eyebrow {
    margin-top: 6px;
}

.verify-card #go-login {
    margin-top: 10px;
}

.verify-icon {
    position: relative;
    width: 84px;
    height: 84px;
    border-radius: 50%;
    background: var(--ink);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pop 0.5s cubic-bezier(.3, 1.4, .5, 1) both;
}

.verify-icon::before {
    content: '';
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    border: 1px dashed var(--line);
}

.verify-icon .check {
    stroke-dasharray: 40;
    animation: drawCheck 0.6s 0.3s ease both;
}

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

    .auth-lines .runner,
    .verify-icon,
    .verify-icon .check {
        animation: none;
    }
}

/* スマホ */
@media (max-width: 768px) {
    .auth-lines .v-left {
        left: 7px;
    }

    .auth-lines .v-right {
        right: 7px;
    }

    .auth-lines .h-top {
        top: 72px;
    }

    .auth-lines .dot-left {
        left: 3px;
        top: 68px;
    }

    .auth-lines .dot-right {
        right: 3px;
        top: 68px;
    }

    .auth-lines .runner {
        left: 5px;
    }

    .auth-header {
        height: 72px;
        padding: 0 24px;
    }

    .auth-header .logo b {
        font-size: 22px;
    }

    .auth-main {
        min-height: calc(100vh - 72px - 60px);
        align-items: flex-start;
        padding: 40px 16px 24px;
    }

    .auth-card {
        padding: 32px 22px;
        gap: 18px;
    }

    .auth-card-head h1,
    .auth-card-head h2 {
        font-size: 26px;
    }

    .verify-card {
        padding: 40px 22px 32px;
    }

    .verify-card h2 {
        font-size: 22px;
    }
}

/* ログイン画面の「パスワードをお忘れの方」（パスワード欄の下・右寄せ） */
.forgot-link {
    margin-top: -6px;
    text-align: right;
    font-size: 13px;
}

/* お問い合わせフォーム（セレクト・複数行の入力欄） */
.input select,
.input textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    padding: 0 16px;
    font: inherit;
    font-size: 15px;
    color: var(--text);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.input select {
    height: 52px;
}

.input textarea {
    padding: 14px 16px;
    min-height: 140px;
    resize: vertical;
    line-height: 1.7;
}

.input select:focus,
.input textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(18, 181, 214, 0.16);
}

.input input.no-icon {
    padding-left: 16px;
}

/* 自動投稿のボット除け（人間には見えない欄） */
.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* 認証画面の下のリンク */
.auth-footer a {
    color: var(--text-2);
    margin: 0 8px;
}


/* 新規登録：利用規約・プライバシーポリシーへの同意 */
.consent-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    line-height: 1.7;
    color: var(--text-2);
    cursor: pointer;
}

.consent-row input {
    margin-top: 4px;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    accent-color: var(--accent);
}

.consent-row a {
    color: var(--accent-ink);
    text-decoration: underline;
}
