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

body {
    font-family: 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', sans-serif;
    background: linear-gradient(165deg, #e8f4fc 0%, #f2edfc 50%, #fce7f3 100%);
    min-height: 100vh;
    padding: 24px 20px 40px;
    color: #1f2937;
}

.page-wrap {
    max-width: 480px;
    margin: 0 auto;
    background: #fff;
    border-radius: 20px;
    padding: 28px 24px;
    box-shadow:
        0 2px 12px rgba(0, 0, 0, 0.06),
        0 1px 2px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.8);
}

h1 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: #1e3a5f;
    text-align: center;
    letter-spacing: -0.02em;
}

.lead {
    font-size: 0.95rem;
    color: #4b5563;
    margin-bottom: 24px;
    text-align: center;
    line-height: 1.6;
}

.choice-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.btn {
    display: block;
    padding: 16px 24px;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border-radius: 14px;
    border: none;
    cursor: pointer;
    transition:
        transform 0.15s,
        box-shadow 0.15s,
        opacity 0.2s;
}

.btn:hover {
    opacity: 0.95;
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.btn-secondary {
    background: #475569;
    color: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.top-link {
    text-align: center;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

.top-link a {
    color: #4b5563;
    text-decoration: none;
    font-size: 0.9rem;
    padding: 4px 8px;
    border-radius: 6px;
    transition:
        background 0.15s,
        color 0.15s;
}

.top-link a:hover {
    color: #1e40af;
    background: #eff6ff;
}

.message {
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 16px;
    font-size: 0.9rem;
}

.message.error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.message.success {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

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

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: #374151;
}

.form-group input {
    width: 100%;
    padding: 12px 14px;
    font-size: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
    transition:
        border-color 0.2s,
        box-shadow 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.form-actions {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-actions .btn {
    width: 100%;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 20px;
}

.modal {
    background: #fff;
    border-radius: 20px;
    padding: 28px 24px;
    max-width: 400px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.modal h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: #1e3a5f;
}

.hint {
    font-size: 0.8rem;
    color: #6b7280;
    margin-top: 4px;
}

.section-heading {
    font-size: 1rem;
    font-weight: 700;
    color: #1e3a5f;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e5e7eb;
}

.login-section {
    margin-bottom: 28px;
    padding-bottom: 24px;
    border-bottom: 1px solid #e5e7eb;
}

.create-section .create-lead {
    margin-bottom: 12px;
}

/* Toast通知 */
.sr-toast-container {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
    width: calc(100% - 40px);
    max-width: 440px;
}

.sr-toast {
    padding: 13px 18px;
    border-radius: 14px;
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.5;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.18);
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.25s, transform 0.25s;
    pointer-events: auto;
}

.sr-toast.sr-toast--show {
    opacity: 1;
    transform: translateY(0);
}

.sr-toast.sr-toast--error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.sr-toast.sr-toast--success {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.sr-toast.sr-toast--info {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

/* タブUI */
.tab-bar {
    display: flex;
    border-bottom: 2px solid #e5e7eb;
    margin-bottom: 20px;
    gap: 4px;
}

.tab-btn {
    flex: 1;
    padding: 10px 8px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    border-radius: 8px 8px 0 0;
    transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.tab-btn.active {
    color: #2563eb;
    border-bottom-color: #2563eb;
    background: #eff6ff;
}

.tab-btn:hover:not(.active) {
    color: #374151;
    background: #f9fafb;
}

.event-badge {
    display: inline-block;
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
    border-radius: 20px;
    padding: 5px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 16px;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}
