/* アセスメントモーダル */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 2000;
    overflow-y: auto;
}

.modal-content {
    background-color: #ffffff;
    margin: 2rem auto;
    padding: 2rem;
    max-width: 800px;
    border-radius: 10px;
    position: relative;
}

.close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 2rem;
    cursor: pointer;
    color: #999;
}

.close-btn:hover {
    color: #333;
}

.assessment-form {
    margin-top: 2rem;
}

.form-section {
    margin-bottom: 2rem;
}

.form-section h3 {
    color: #ae4480;
    margin-bottom: 1rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.progress-bar {
    background-color: #e0e0e0;
    height: 10px;
    border-radius: 5px;
    margin: 2rem 0;
}

.progress-fill {
    background-color: #ae4480;
    height: 100%;
    border-radius: 5px;
    transition: width 0.3s;
}

.form-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
}

.nav-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s;
}

.prev-btn {
    background-color: #e0e0e0;
    color: #333;
}

.next-btn, .submit-btn {
    background-color: #ae4480;
    color: #ffffff;
}

.nav-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}

/* アセスメントページスタイル */
.assessment-section {
    padding: 4rem 0;
    background-color: #f5f5f5;
    min-height: calc(100vh - 200px);
}

.assessment-section h2 {
    text-align: center;
    color: #ae4480;
    margin-bottom: 1rem;
}

.assessment-section p {
    text-align: center;
    color: #666;
    margin-bottom: 3rem;
}

/* 1ページアセスメントフォームのスタイル */
.assessment-form-onepage {
    display: grid;
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.assessment-category {
    background-color: #ffffff;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.category-title {
    color: #ae4480;
    font-size: 1.25rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #d975a9;
}

.category-items {
    display: grid;
    gap: 1rem;
}

.form-submit-area {
    text-align: center;
    margin-top: 3rem;
    padding: 2rem 0;
}

.form-submit-area .submit-btn {
    padding: 1rem 3rem;
    font-size: 1.125rem;
}

/* スクロール可能なコンテナ */
.assessment-section {
    min-height: 100vh;
    padding-bottom: 4rem;
}

/* チャットボットスタイル */

.chat-header {
    text-align: center;
    margin-bottom: 1.5rem;
	padding: 1.5rem;
    background: #d975a9;
    color: #ffffff;
    border-top-left-radius: 18px;
    border-top-right-radius: 18px;
}

.chat-header h3 {font-size: 1.3rem;}

.progress-container {
    position: fixed;
    right: 20px;
    top: 120px;
    background-color: #ffffff;
    padding: 1rem;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
    z-index: 400;
    width: 120px;
    text-align: center;
	opacity: 0;
	transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.progress-container.fade_in {opacity: 1;}

.progress-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 1rem;
}

.progress-percentage {
    font-size: 1.8rem;
    font-weight: bold;
    color: #ae4480;
    margin-bottom: 0.5rem;
}

.progress-text {
    font-size: 0.8rem;
    color: #666;
    text-align: center;
    line-height: 1.2;
}

.progress-bar {
    background-color: #e0e0e0;
    width: 8px;
    height: 160px;
    border-radius: 4px;
    overflow: hidden;
    margin: 0 auto;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.progress-fill {
    background-color: #ae4480;
    height: 0%;
    border-radius: 0;
    transition: height 0.3s;
    width: 100%;
    display: block;
}

.progress-steps {
    margin-top: 1rem;
    font-size: 0.8rem;
    color: #666;
}

.chat-container {
    background-color: transparent;
    border-radius: 0;
    box-shadow: none;
    max-width: 1000px;
    margin: 0 auto;
    display: block;
    height: auto;
    min-height: 70vh;
	padding: 0 50px;
}

.chat-messages {
    padding: 2rem 1rem;
    overflow-y: scroll;
    background-color: transparent;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    min-height: 3rem;
	max-height: 500px;
}

.chat-message {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    animation: fadeInUp 0.3s ease-out;
}

.chat-message.bot-message {
    justify-content: flex-start;
}

.chat-message.user-message {
    justify-content: flex-end;
}

.message-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.bot-message .message-avatar {
    background-color: #ae4480;
}

.user-message .message-avatar {
    background-color: #4caf50;
	 border: 1px solid #4caf50;
}

.message-content {
    max-width: 70%;
    padding: 0.75rem 1rem;
    border-radius: 18px;
    font-size: 0.95rem;
    line-height: 1.4;
    word-wrap: break-word;
}

.bot-message .message-content, .ai-message .message-content {
    background-color: #fdf7e3;
    border: 1px solid #d2ba7f;
    color: #333;
}

.user-message .message-content {
    background-color: #ffffff;
    border: 1px solid #999;
    color: #333;
}

.chat-message.explanation .message-content {
    background-color: #fbeef2;
    border: 1px solid #eabad0;
	color: #333;
}

.chat-input-area {
    padding: 2rem 1rem;
    background-color: #fefbee;
    border-top: none;
    border-radius: 12px;
	border: 2px solid #d2ba7f;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.chat-buttons {
    display: grid;
    gap: 0.75rem;
    max-width: 600px;
    margin: 0 auto;
}

.chat-option-btn {
    padding: 1rem 1.5rem;
    background-color: #5ea344;
	border: 2px solid #5ea344;
	color: #ffffff;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    font-size: 1rem;
    line-height: 1.4;
}

.chat-option-btn:hover {
    background-color: #b0cf00;
	border: 2px solid #5ea344;
    transform: translateY(-2px);
}

.chat-skip-btn {
    padding: 1rem 2rem;
    background-color: #dadce0;
	border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1rem;
	font-weight: 500;
    color: #333;
    max-width: 300px;
    margin: 1rem auto 0;
}

.chat-skip-btn:hover {
    background-color: #999999;
	color: #ffffff;
    transform: translateY(-2px);
}

.chat-back-btn {
    padding: 1rem 2rem;
    background-color: #dadce0;
	border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1rem;
	font-weight: 500;
    color: #333;
	max-width: 300px;
    margin: 1rem auto 0;
    display: block;
}

.chat-back-btn:hover {
    background-color: #999999;
	color: #ffffff;
    transform: translateY(-2px);
}

.chat-text-input {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 600px;
    margin: 0 auto;
}

.chat-text-input textarea {
    padding: 1rem;
    border: 2px solid #e0e0e0;
    font-size: 1rem;
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
    line-height: 1.5;
}

.chat-text-input textarea:focus {
    outline: none;
    border-color: #979797;
}

.chat-input-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
	flex-grow: 1;
}

.chat-submit-btn {
    padding: 1rem 2rem;
    background-color: #5ea344;
    color: #ffffff;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1rem;
    font-weight: 500;
	max-width: 300px;
	margin: 1rem auto 0;
}

.chat-submit-btn:hover {
    background-color: #b0cf00;
    transform: translateY(-2px);
}

.chat-help {
    background-color: #ffffff;
    padding: 2rem;
    border-radius: 18px;
    border: 2px solid #d975a9;
    max-width: 1000px;
    margin: 2rem auto;
}

.chat-help h4 {
    color: #ae4480;
    margin-bottom: 1rem;
}

.chat-help ul {
    list-style: none;
    padding: 0;
}

.chat-help li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #f0f0f0;
    position: relative;
    padding-left: 1.5rem;
}

.chat-help li:before {
    content: "•";
    color: #ae4480;
    position: absolute;
    left: 0;
}

.chat-help li:last-child {
    border-bottom: none;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* チャットボットのスクロールバーカスタマイズ */
.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}


@media (max-width: 768px) {
    
.chat-container {
	display: flex;
	flex-direction: column;
	height: auto;
	margin: 0 1rem 2rem;
	padding: 0;
	min-height: auto;
}

.chat-messages {
	max-height: 200px;
	min-height: 150px;
	overflow-y: scroll;
	flex-shrink: 0;
	padding: 1rem 0.5rem;
}

.chat-input-area {
	flex-grow: 1;
	overflow-y: auto;
	max-height: calc(100vh - 400px);
	padding: 1rem;
}

.progress-container {
	width: auto;
    padding: 0.8rem;
    border-radius: 8px;
}

.progress-bar {height: 60px;}

.progress-info {margin-bottom: 0.5rem;}

.progress-percentage {font-size: 1.2rem; margin-bottom: 0.3rem;}

.progress-text {font-size: 0.7rem;}

.progress-steps {
    margin-top: 0.3rem;
    font-size: 0.9rem;
	font-weight: bold;
}

.chat-help {margin: 0 1rem; padding: 1rem;}
    
.message-content {max-width: 85%;}

.message-avatar {width: 35px;height: 35px;}
    
.chat-buttons {gap: 0.75rem; max-width: 100%;}
    
.chat-option-btn {
	padding: 1rem;
	font-size: 1rem;
	width: 100%;
}
    
.chat-input-buttons {flex-direction: column; gap: 0.5rem;}
    
.chat-submit-btn, .chat-skip-btn, .chat-back-btn {
	width: 100% !important;
	padding: 1rem !important;
	margin: 0.5rem 0 !important;
	max-width: none !important;
	display: block !important;
}

}

/* 極小画面（480px以下） */
@media screen and (max-width: 480px) {
	.chat-option-btn {font-size: 0.85rem; padding: 0.7rem 0.8rem;}

	.message-avatar {font-size: 1.2rem;}
}