:root {
    --primary-color: #016fcd;
}
.form-fields-wrapper {
    margin-bottom: 30px;
}
.register-form, .custom-login-form {
    max-width: 500px;
    margin: 0 auto;
    margin-top: 20px;
    margin-bottom: 10px;
    text-align: left; /* ← 入力欄やラベルを左揃えに */
}
/* 登録ボタン（submit）を統一スタイルで */
.custom-login-form .form-submit-wrapper,
.register-form .form-submit-wrapper
 {
    text-align: center; /* ← ボタンを中央に並べたい場合 */
    margin-top: 20px;
}

.custom-login-form .form-submit-wrapper button[type="submit"],
.register-form .form-submit-wrapper button[type="submit"] {
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    padding: 10px 60px;
    border-radius: 45px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    max-width: 300px;
    margin: 0 auto; /* ← これで中央寄せ！ */
    display: block; /* ← inlineでは中央にならないので追加 */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2); /* 横4px、縦4px、ぼかし10px、やや薄めの黒 */
}

.custom-login-form .form-submit-wrapper button[type="submit"]:hover,
.register-form .form-submit-wrapper button[type="submit"]:hover {
    background-color: #005177;
}

.form-field {
    margin-bottom: 1rem;
}

.form-field label {
    display: block;
    margin-bottom: 0.3rem;
    font-weight: bold;
}

.form-field input {
    width: 100%;
    max-width: none;      /* ← 最大幅を指定 */
    margin: 0 auto;        /* ← 自動で中央寄せ */
    display: block;        /* ← 中央寄せに必要 */
    padding: 0.5rem 2.5rem 0.5rem 0.5rem;
    border: 2px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.form-field input.valid {
    border-color: var(--primary-color);
}

.form-field input.invalid {
    border-color: red;
}

.form-field .icon-btn {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.form-field .input-wrapper {
    position: relative;
}

.form-message {
    font-size: 0.9rem;
    min-height: 1.5em; /* ← 高さを確保 */
    visibility: hidden; /* ← 非表示だけどスペースは維持 */
    margin-top: 0px !important;
    margin-bottom: 0.5rem;
}

.form-message.error {
    color: red;
}

.form-message.success {
    color: var(--primary-color);
}

.form-message.visible {
    visibility: visible; /* ← 表示するときだけ visible にする */
}

.form-field.password-confirm {
    min-height: 110px; /* 実測して調整してもOK */
}

.form-error {
    color: red;
    font-weight: bold;
}

.form-success {
    color: var(--primary-color);
    font-weight: bold;
}

.icon {
    width: 1.2rem;
    height: 1.2rem;
    color: #555;
}
.terms-label {
    display: flex;
    align-items: center;
    gap: 0.5em;
    flex-wrap: nowrap;
    line-height: 1.4;
    width: auto; /* ← 幅を制限しない */
    margin-left: 0; /* 左寄せ */

}
.terms-text {
    line-height: 1.4;
    display: inline;
}
.terms-text a {
    text-decoration: underline;
}
.form-terms {
    margin-top: 1rem;
    font-weight: normal;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.button-outline {
    background: #fff;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    border-radius: 4px;
    font-size: 0.9rem;
    line-height: 1.4;
    display: inline-block;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.button-outline:hover {
    background: var(--primary-color);
    color: #fff;
}

.line-button {
    background-color: #06C755; /* LINEグリーン */
    color: #fff;
    border: none;
    padding: 6px 14px;
    border-radius: 24px;
    font-size: 0.95rem;
    font-weight: bold;
    cursor: pointer;
    display: inline-block;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.line-button:hover {
    background-color: #05b14c; /* 少し濃いグリーン */
}
.input-wrapper.email-edit-inline {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: nowrap;
}

.input-wrapper.email-edit-inline input {
    flex: 1;
    margin: 0;
    display: inline-block;
    padding: 0.5rem 0.75rem;
    border-radius: 5px;
    font-size: 1rem;
    border: 2px solid #ccc;
}

.input-wrapper.email-edit-inline .save-email-btn .save-feedback-setting-btn .save-feedback-setting-btn {
    white-space: nowrap;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.form-field input[type="checkbox"] {
    width: auto;
    margin: 0 0.5em 0 0;
    display: inline-block;
}

.form-text-field {
    font-size: 1rem;
}