.btn-login-register {
    display: inline-flex;
    appearance: none;
    -webkit-box-align: center;
    align-items: center;
    -webkit-box-pack: center;
    justify-content: center;
    user-select: none;
    position: relative;
    white-space: nowrap;
    vertical-align: middle;
    outline: none;
    line-height: 1;
    border-radius: 9999px;
    font-weight: 700;
    height: 32px;
    font-size: 11px;
    letter-spacing: 0.02em;
    padding: 0 16px;
    background: url('/royale/assets/frontend/images/btn_login_register.png') no-repeat center / 100% 100%, linear-gradient(180deg, #9b0b42 0%, #6f002b 100%);
    color: #ffffff !important;
    min-width: 120px;
    text-decoration: none !important;
    border: none;
    box-shadow: 0 2px 8px rgba(155, 11, 66, 0.4);
}

.form-login {
    margin-top: 15px;
    justify-content: center;
    /* display: flex; */
    align-items: center;
}

.form-login form {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-width: 300px;
}

.form-login form div {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.form-login form input {
    border-radius: 10px;
    width: 100%;
    padding: 10px;
    border: white;
    /* border-bottom-width: 1px;
    border-bottom-style: solid; */
    /* border-color: #a7264d; */
    background: rgb(255 255 255);
    /* outline: transparent solid 2px; */
    outline-color: #00000017;
    outline-style: solid;
    outline-width: 1px;
}

.form-login form button {
    display: inline-flex;
    appearance: none;
    -webkit-box-align: center;
    align-items: center;
    -webkit-box-pack: center;
    justify-content: center;
    user-select: none;
    position: relative;
    white-space: nowrap;
    vertical-align: middle;
    outline: transparent solid 2px;
    outline-offset: 2px;
    line-height: 1.2;
    font-weight: 600;
    transition-property: background-color, border-color, color, fill, stroke,
        opacity, box-shadow, transform;
    transition-duration: 200ms;
    height: 44px;
    font-size: 14px;
    padding-inline-start: 0.75rem;
    padding-inline-end: 0.75rem;
    background: red;
    color: #fff;
    border-radius: 9999px;
    min-width: 160px;
    border: none;
    margin-top: 25px;
    width: 100px;
    text-align: center;
}
.form-login form button:hover{
    background: #000;
}
.register-link {
    color: red;
    margin-top: 15px;
    font-size: 12px;
    text-decoration: none;
    text-align: center;
    text-wrap: nowrap;
    /* align-self: baseline; */
}

.register-link:hover {
    /* color: #ce3256 !important; */
    text-decoration: none;
}

.forgot-pass-link{
    color:red;
    text-decoration: none;
    white-space: nowrap;
}
.forgot-pass-link:hover{
    color:rgb(164, 30, 30);
}
/* This css is for normalizing styles. You can skip this. */
*,
*:before,
*:after {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.checkbox-group {
    display: flex;
    /* margin-bottom: 15px; */
    flex-direction: row !important;
    justify-content: flex-start !important;
    align-items: center;

}

.checkbox-group input {
    padding: 0;
    height: initial;
    width: initial;
    /* margin-bottom: 0 !important; */
    display: none;
    cursor: pointer;
}

.checkbox-group label {
    position: relative;
    cursor: pointer;
    font-size: larger;
}

.checkbox-group label:before {
    content: "";
    appearance: none;
    -webkit-appearance: none;
    background-color: transparent;
    border: 2px solid red;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05),
        inset 0px -15px 10px -12px rgba(0, 0, 0, 0.05);
    padding: 10px;
    display: inline-block;
    position: relative;
    vertical-align: middle;
    cursor: pointer;
    margin-right: 5px;
    width: 22px;
    height: 22px;
    border-radius: 5px;
}

.checkbox-group input:checked + label:after {
    content: "";
    display: block;
    position: absolute;
    top: 3px;
    left: 8px;
    width: 6px;
    height: 14px;
    border: solid red;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
@media only screen and (min-width:550px) {
    .checkbox-result input:checked + label:after {
        top: 5px !important;
    }
}
.checkbox-select-all input:checked + label:after {
    top: 4px !important;
    left: 9px !important;
}

.main {
    padding-top: 0;
}

.back {
    text-decoration: none;
    color: #000;
}
.back svg {
    width: 1em;
    height: 1em;
    display: inline-block;
    line-height: 1em;
    flex-shrink: 0;
    color: currentcolor;
    vertical-align: middle;
    /* margin-right: 0.5rem; */
    font-size: 13px;
}

@media (min-width: 760px) {
    .back {
        /* padding: 20px 200px; */
        margin-top: 20px;
    }
    .form-login form {
        min-width: 500px;
    }
    .padding-main {
        padding-top: 0;
        /* padding-left: 10vw;
        padding-right: 10vw; */
    }
    .form-login {
        margin-top: 25px;
        justify-content: center;
        display: flex;
        align-items: center;
    }
    .form-login label {
        font-size: 13px;
        margin-top: 15px;
        margin-bottom: 15px;

    }
}
.form-login label {
    font-size: 13px;
    margin-top: 8px;
    margin-bottom: 8px;

}

.scroll-to-top {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 30px;
    z-index: 99;
    border: none;
    border-radius: 9999px;
    outline: none;
    background-color: #f17979;
    color: white;
    cursor: pointer;
    padding: 15px;
}


.header-before-login {
    width: 100% !important;
}

@media only screen and (max-width: 550px) {
    .header-before-login {
        height: 42px !important;
    }
}

/* ========================================================
   Royale Redesigned Login Page Styles
   ======================================================== */

.royale-login-page-wrapper {
    width: 100%;
    padding: 10px 0 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: transparent;
}

.royale-login-container {
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    padding: 0;
    box-sizing: border-box;
}

.royale-login-card {
    position: relative;
    width: 100%;
    background: url('/royale/assets/frontend/images/login_bg.png') no-repeat center top / 100% 100%;
    padding: 68px 34px 102px 34px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

/* Top Section: Photo (Left) + Form Column (Right) */
.royale-login-top {
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    justify-content: flex-end;
    width: 100%;
    margin-bottom: 12px;
    position: relative;
    min-height: 290px;
}

.royale-login-photo-wrap {
    position: absolute;
    left: 0;
    bottom: -50px;
    width: 48%;
    max-width: 220px;
    z-index: 3;
    pointer-events: none; /* Allows clicks to reach input underneath */
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    margin: 0;
}

.royale-login-photo {
    width: 100%;
    height: auto;
    max-height: 330px;
    object-fit: contain;
    object-position: bottom left;
    display: block;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));
}

.royale-login-fields-wrap {
    width: 58%;
    max-width: 58%;
    margin-left: auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding-left: 0;
    box-sizing: border-box;
    position: relative;
    z-index: 1;
}

.royale-login-logo-box {
    text-align: center;
    margin-top: 14px;
    margin-bottom: 6px;
}

.royale-login-logo-img {
    width: 128px;
    max-width: 100%;
    height: auto;
    display: inline-block;
}

.royale-login-slogan {
    text-align: center;
    color: #e5be75;
    font-size: 13.5px;
    font-weight: 600;
    letter-spacing: 0.08em;
    font-family: "Yu Mincho", "Hiragino Mincho ProN", "Noto Serif JP", serif;
    margin-bottom: 12px;
    white-space: nowrap;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
}

.royale-auth-title {
    text-align: center;
    color: #f1cf87;
    font-size: 14.5px;
    font-weight: 700;
    letter-spacing: 0.08em;
    font-family: "Yu Mincho", "Hiragino Mincho ProN", "Noto Serif JP", serif;
    margin-bottom: 6px;
    white-space: nowrap;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
}

.royale-auth-desc {
    text-align: center;
    color: #e0e0e0;
    font-size: 11px;
    line-height: 1.45;
    margin-bottom: 10px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.royale-login-alert {
    width: 100% !important;
    max-width: 100% !important;
    align-self: stretch !important;
    box-sizing: border-box !important;
    background: rgba(180, 33, 76, 0.35) !important;
    border: 1px solid #ff4d6d !important;
    color: #ffffff !important;
    font-size: 11.5px !important;
    border-radius: 6px !important;
    text-align: center !important;
    padding: 7px 10px !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    margin-bottom: 10px !important;
    display: block !important;
}

/* Input Fields - Custom Luxury Gold Border & Black Background */
.royale-input-group {
    position: relative;
    width: 100%;
    margin-bottom: 9px;
    box-sizing: border-box;
}

.royale-input-wrapper {
    position: relative;
    width: 100%;
    height: 40px;
    background: #000000 !important;
    border: 1px solid #c9a664 !important;
    border-radius: 6px !important;
    box-sizing: border-box !important;
    display: flex;
    align-items: center;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden !important;
}

.royale-input-wrapper:focus-within {
    border-color: #f1cf87 !important;
    box-shadow: 0 0 8px rgba(201, 166, 100, 0.4);
}

.royale-input-wrapper .royale-form-input {
    width: 100% !important;
    height: 100% !important;
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    border: none !important;
    border-radius: 5px !important;
    outline: none !important;
    box-shadow: none !important;
    color: #ffffff !important;
    font-size: 12.5px !important;
    letter-spacing: 0.02em !important;
    padding: 0 12px !important;
    box-sizing: border-box !important;
    display: block !important;
    line-height: normal !important;
}

.royale-input-wrapper .royale-form-input.royale-input-password {
    padding-right: 38px !important;
}

.royale-input-wrapper .royale-form-input::placeholder {
    color: #888888 !important;
    opacity: 1 !important;
    font-size: 12px !important;
}

/* Chrome / Safari / Edge Autofill Fix: Keep pitch black and white text without overflowing rounded corners */
.royale-input-wrapper .royale-form-input:-webkit-autofill,
.royale-input-wrapper .royale-form-input:-webkit-autofill:hover, 
.royale-input-wrapper .royale-form-input:-webkit-autofill:focus, 
.royale-input-wrapper .royale-form-input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px #000000 inset !important;
    -webkit-text-fill-color: #ffffff !important;
    caret-color: #ffffff !important;
    border: none !important;
    border-radius: 5px !important;
    transition: background-color 5000s ease-in-out 0s;
}

.royale-input-wrapper .royale-form-input:-moz-autofill {
    background-color: #000000 !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 5px !important;
}

.royale-password-toggle-btn {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    background: transparent;
    border: none;
    outline: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 3;
    padding: 0;
    opacity: 0.85;
}

.royale-eye-svg {
    display: block;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
}

.royale-input-error {
    color: #ff4d6d;
    font-size: 10.5px;
    margin-top: 2px;
    padding-left: 2px;
    line-height: 1.2;
}

.royale-forgot-pass-wrap {
    text-align: center;
    margin-top: 3px;
    margin-bottom: 6px;
}

.royale-forgot-pass-link {
    color: #ffffff !important;
    font-size: 11px !important;
    text-decoration: underline !important;
    letter-spacing: 0.01em;
    display: inline-block;
}

/* ログイン CTA Button */
.royale-btn-cta-login {
    position: relative;
    z-index: 5;
    width: 100%;
    height: 48px;
    background: url('/royale/assets/frontend/images/btn_cta_login.png') no-repeat center / 100% 100%;
    border: none;
    border-radius: 8px;
    color: #ffffff !important;
    font-size: 19px;
    font-weight: 700;
    letter-spacing: 0.12em;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    outline: none;
    box-shadow: 0 3px 12px rgba(180, 33, 76, 0.4);
    margin-top: 2px;
    margin-bottom: 12px;
}

.royale-btn-cta-login:disabled,
.royale-btn-cta-login[disabled] {
    opacity: 0.6 !important;
    cursor: not-allowed !important;
    filter: grayscale(0.5);
}

.royale-btn-cta-login:hover:not(:disabled) {
    filter: brightness(1.08);
}

.royale-input-wrapper .royale-form-input.text-center {
    text-align: center !important;
    letter-spacing: 0.2em !important;
    font-size: 16px !important;
    font-weight: 700 !important;
}

.royale-auth-expired-box {
    padding: 10px 0 15px;
    text-align: center;
    width: 100%;
}

.royale-auth-expired-text {
    color: #ff4d6d;
    font-size: 13.5px;
    font-weight: 600;
    margin-bottom: 15px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
    line-height: 1.5;
}

/* Divider または */
.royale-login-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 8px 0 12px;
    width: 100%;
}

.royale-login-divider .divider-line {
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.22);
}

.royale-login-divider .divider-text {
    color: #ffffff;
    font-size: 13.5px;
    font-weight: 500;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

/* Sign in with Apple Button */
.royale-btn-apple {
    width: 100%;
    height: 44px;
    background: #ffffff;
    color: #000000 !important;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    text-decoration: none !important;
    box-sizing: border-box;
    margin-bottom: 12px;
}

.royale-btn-apple .apple-svg-icon {
    display: inline-block;
    vertical-align: middle;
}

/* Social Buttons Row (LINE & X) */
.royale-login-social-row {
    display: flex;
    gap: 10px;
    width: 100%;
    margin-bottom: 18px;
}

.royale-btn-social {
    flex: 1;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none !important;
    border-radius: 8px;
    box-sizing: border-box;
}

.royale-btn-line {
    background: url('/royale/assets/frontend/images/btn_line_login.png') no-repeat center / 100% 100%;
}

.royale-btn-line .btn-social-text {
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.02em;
    padding-left: 28px;
}

.royale-btn-x {
    background: url('/royale/assets/frontend/images/btn_x_login.png') no-repeat center / 100% 100%;
}

.royale-btn-x .btn-social-text {
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.02em;
    padding-left: 22px;
}

/* Register Link */
.royale-register-link-box {
    text-align: center;
    margin-top: 2px;
    margin-bottom: 0;
    width: 100%;
}

.royale-register-link {
    color: #ffffff !important;
    font-size: 15px !important;
    font-weight: 500;
    text-decoration: underline !important;
    letter-spacing: 0.02em;
    display: inline-block;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .royale-login-page-wrapper {
        margin-left: -8px !important;
        margin-right: -8px !important;
        width: calc(100% + 16px) !important;
        max-width: calc(100% + 16px) !important;
    }
    .royale-login-container {
        padding: 0 !important;
        max-width: 100% !important;
    }
}

@media (max-width: 480px) {
    .royale-login-card {
        padding: 58px 28px 98px 28px;
    }
    .royale-login-top {
        min-height: 260px;
        margin-bottom: 10px;
    }
    .royale-login-photo-wrap {
        width: 48%;
        max-width: 190px;
        bottom: -22px;
    }
    .royale-login-photo {
        max-height: 290px;
    }
    .royale-login-fields-wrap {
        width: 58%;
        max-width: 58%;
    }
    .royale-login-slogan {
        font-size: 12.5px;
    }
    .royale-auth-title {
        font-size: 13.5px;
    }
    .royale-auth-desc {
        font-size: 10.5px;
    }
    .royale-login-logo-box {
        margin-top: 12px;
    }
    .royale-login-logo-img {
        width: 118px;
    }
    .royale-btn-cta-login {
        height: 46px;
        font-size: 18px;
    }
}

@media (max-width: 375px) {
    .royale-login-card {
        padding: 52px 24px 90px 24px;
    }
    .royale-login-top {
        min-height: 230px;
    }
    .royale-login-photo-wrap {
        width: 48%;
        max-width: 165px;
        bottom: -40px;
    }
    .royale-login-photo {
        max-height: 250px;
    }
    .royale-login-fields-wrap {
        width: 58%;
        max-width: 58%;
    }
    .royale-login-slogan {
        font-size: 11.5px;
    }
    .royale-auth-title {
        font-size: 12.5px;
    }
    .royale-auth-desc {
        font-size: 10px;
    }
    .royale-login-logo-box {
        margin-top: 10px;
    }
    .royale-login-logo-img {
        width: 105px;
    }
    .royale-btn-line .btn-social-text {
        font-size: 11.5px;
        padding-left: 22px;
    }
    .royale-btn-x .btn-social-text {
        font-size: 11.5px;
        padding-left: 18px;
    }
    .royale-btn-cta-login {
        font-size: 16px;
        height: 42px;
    }
    .royale-register-link {
        font-size: 13.5px !important;
    }
}
