body {
    font-family: 'Noto Sans JP', sans-serif;
    background-color: #f8fafc; /* slate-50 */
    color: #334155; /* slate-700 */
}
.section-title {
    border-bottom: 2px solid #0d9488; /* teal-600 */
}
.nav-link.active {
    background-color: #ccfbf1; /* teal-100 */
    color: #0f766e; /* teal-700 */
    font-weight: 700;
}
.wbs-toggle::before {
    content: '▶';
    display: inline-block;
    margin-right: 0.5rem;
    transition: transform 0.2s;
    font-size: 0.7em;
}
.wbs-toggle.open::before {
    transform: rotate(90deg);
}
.issue-card {
    transition: all 0.3s ease;
    border-left-width: 4px;
}
.issue-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}
.chart-container {
    position: relative;
    width: 100%;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    height: 500px;
    max-height: 70vh;
}
.modal-bg {
    transition: opacity 0.3s ease;
}
.modal-content {
    transition: all 0.3s ease;
}
.spinner {
    border-color: #f3f3f3;
    border-top-color: #0d9488;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
.code-block {
    position: relative;
}
.copy-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background-color: #e2e8f0;
    color: #475569;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    cursor: pointer;
    transition: background-color 0.2s;
}
.copy-btn:hover {
    background-color: #cbd5e1;
}
.code-path {
    color: #94a3b8; /* slate-400 */
    -webkit-user-select: none; /* Safari */
    -ms-user-select: none; /* IE 10+ */
    user-select: none; /* Standard syntax */
}

/* ===== チャットボットのスタイル ===== */
#chatbot-icon {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 60px;
    height: 60px;
    background-color: #0d9488; /* Teal-600 */
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    transition: transform 0.2s ease-in-out, opacity 0.3s ease;
}

#chatbot-icon.hidden {
    transform: scale(0.5);
    opacity: 0;
    pointer-events: none;
}

#chatbot-icon:hover {
    transform: scale(1.1);
}

#chatbot-container {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 370px;
    max-width: 90vw;
    height: 70vh;
    max-height: 600px;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    z-index: 1001;
    overflow: hidden;
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
}

#chatbot-container.hidden {
    transform: translateY(20px) scale(0.95);
    opacity: 0;
    pointer-events: none;
}

#chatbot-header {
    background-color: #0d9488; /* Teal-600 */
    color: white;
    padding: 12px 16px;
    font-weight: 500;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

#chatbot-close-btn {
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s;
}

#chatbot-close-btn:hover {
    opacity: 1;
}

#chatbot-messages {
    flex-grow: 1;
    padding: 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-message {
    padding: 10px 14px;
    border-radius: 18px;
    max-width: 85%;
    line-height: 1.5;
    word-wrap: break-word;
}

.user-message {
    background-color: #ccfbf1; /* Teal-100 */
    color: #134e4a; /* Teal-900 */
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.bot-message {
    background-color: #f1f5f9; /* Slate-100 */
    color: #334155; /* Slate-700 */
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.bot-message.loading {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
}

.bot-message.loading::after {
    content: '';
    display: inline-block;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background-color: #64748b;
    animation: typing-dot 1.2s infinite steps(4, end);
}

@keyframes typing-dot {
    0%, 20% { box-shadow: 0 0 0 -5px #64748b, 10px 0 0 -5px #64748b, 20px 0 0 -5px #64748b; }
    40% { box-shadow: 0 0 0 0 #64748b, 10px 0 0 -5px #64748b, 20px 0 0 -5px #64748b; }
    60% { box-shadow: 0 0 0 0 #64748b, 10px 0 0 0 #64748b, 20px 0 0 -5px #64748b; }
    80%, 100% { box-shadow: 0 0 0 0 #64748b, 10px 0 0 0 #64748b, 20px 0 0 0 #64748b; }
}

#chatbot-input-container {
    display: flex;
    padding: 12px;
    border-top: 1px solid #e2e8f0; /* Slate-200 */
    flex-shrink: 0;
}

#chatbot-input {
    flex-grow: 1;
    border: 1px solid #cbd5e1; /* Slate-300 */
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

#chatbot-input:focus {
    border-color: #0d9488; /* Teal-600 */
}

#chatbot-send-btn {
    background: none;
    border: none;
    color: #0d9488; /* Teal-600 */
    cursor: pointer;
    padding: 0 8px 0 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

#chatbot-send-btn:hover {
    color: #134e4a; /* Teal-900 */
}

/* ===== Markdownのコード表示用スタイル ===== */

/* pre: コードブロック全体を囲むコンテナ */
.bot-message pre {
    background-color: #1e293b; /* Slate-800 */
    color: #e2e8f0; /* Slate-200 */
    padding: 1rem;
    border-radius: 0.5rem;
    margin-top: 0.5rem;
    margin-bottom: 1rem;
    overflow-x: auto; /* 横に長い場合はスクロールバーを表示 */
}

/* code: コードテキストそのもの */
.bot-message pre code {
    background-color: transparent; /* 親の背景色を継承 */
    padding: 0;
}

/* `バッククォート`で囲まれたインラインコード */
.bot-message :not(pre) > code {
    background-color: #e2e8f0; /* Slate-200 */
    color: #c2410c; /* Amber-700 */
    padding: 0.2em 0.4em;
    margin: 0;
    font-size: 85%;
    border-radius: 3px;
    font-family: 'Courier New', Courier, monospace;
}

.bot-message ul,
.bot-message ol {
    padding-left: 1.5rem; /* リストのインデント */
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.bot-message li {
    margin-bottom: 0.25rem; /* リスト項目の間隔 */
}

.bot-message p {
    margin-bottom: 0.75rem; /* 段落の間隔 */
}
.bot-message p:last-child {
    margin-bottom: 0;
}

.bot-message strong {
    font-weight: 600; /* 太字を少し強調 */
    color: #1e293b; /* slate-800 */
}
