* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP", Meiryo, sans-serif;
    font-size: 14px;
    color: #333;
    background: #f6f7f9;
    line-height: 1.6;
    min-height: 100vh;
}

a {
    color: #0066cc;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.link-dead {
    color: #0066cc;
    cursor: default;
    pointer-events: none;
}

/* Rakuten login page */
.rakuten-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 16px 48px;
}

.page-brand {
    width: 100%;
    max-width: 480px;
    margin-bottom: 24px;
}

.page-brand-logo {
    display: block;
    height: 20px;
    width: auto;
}

.login-container {
    width: 100%;
    max-width: 480px;
}

.login-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    padding: 32px 40px 28px;
}

.login-card-header {
    margin-bottom: 28px;
}

.login-logo {
    display: block;
    height: 24px;
    width: auto;
    margin-bottom: 20px;
}

.login-title {
    font-size: 18px;
    font-weight: 700;
    color: #000;
    line-height: 1.4;
}

.form-step.is-hidden {
    display: none;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 400;
    color: #333;
    margin-bottom: 8px;
}

.label-required {
    color: #333;
}

.form-group input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    background: #fff;
    color: #333;
}

.form-group input:focus {
    outline: none;
    border-color: #bf0000;
    box-shadow: 0 0 0 2px rgba(191, 0, 0, 0.12);
}

.form-note {
    font-size: 12px;
    color: #666;
    margin-top: 6px;
}

.btn-row {
    margin-top: 8px;
}

.btn {
    display: inline-block;
    padding: 14px 24px;
    font-size: 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 700;
    text-align: center;
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-primary {
    background: #bf0000;
    color: #fff;
}

.btn-primary:hover {
    background: #a80000;
}

.btn-primary:disabled {
    background: #d98080;
    cursor: wait;
}

.btn-dead {
    background: #e8e8e8;
    color: #aaa;
    cursor: not-allowed;
    pointer-events: none;
}

.login-notice {
    margin-top: 28px;
    padding-top: 4px;
    font-size: 12px;
    color: #333;
    line-height: 1.75;
}

.login-notice p + p {
    margin-top: 12px;
}

/* Modal */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: #fff;
    border-radius: 4px;
    width: 100%;
    max-width: 420px;
    padding: 28px 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
    border: 1px solid #e5e7eb;
}

.modal h2 {
    font-size: 17px;
    margin-bottom: 12px;
    color: #000;
}

.modal p {
    font-size: 13px;
    color: #666;
    margin-bottom: 20px;
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

.modal-actions .btn-dead {
    padding: 10px 20px;
    font-size: 14px;
}

.alert {
    display: none;
    padding: 10px 14px;
    border-radius: 4px;
    margin-bottom: 16px;
    font-size: 13px;
}

.alert.show {
    display: block;
}

.alert-error {
    background: #fdecea;
    color: #c62828;
    border: 1px solid #f5c6cb;
}

.alert-success {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

@media (max-width: 520px) {
    .login-card {
        padding: 24px 20px 20px;
    }

    .page-brand {
        padding-left: 4px;
    }
}
