.profile-entry-icon.history-icon { background: #e4f6ef; color: #408e79; }
.history-page { min-height: 100svh; background: #f2effc; }
.history-list-body,.history-detail-body { padding: 20px 20px 42px; }
.history-note { margin: 0 0 18px; color: #a095ad; font-size: 12px; line-height: 1.8; }
.history-group { margin-bottom: 14px; border: 1px solid #e4dbef; border-radius: 18px; background: #fff; overflow: hidden; }
.history-group > summary { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 18px; color: #715387; cursor: pointer; font-size: 15px; list-style: none; }
.history-group > summary::-webkit-details-marker { display: none; }
.history-group > summary strong { flex: 1; min-width: 0; font-weight: 600; }
.history-group > summary span { color: #a18ab2; font-size: 12px; }
.history-group > summary::after { content: '⌄'; color: #9474ac; }
.history-group[open] > summary::after { content: '⌃'; }
.history-group-empty { padding: 0 18px 18px; color: #a095ad; font-size: 13px; }
.history-group .history-card { display: block; margin: 0; border-top: 1px solid #eee7f5; border-radius: 0; }
.history-record-heading { display: flex; align-items: center; gap: 12px; }
.history-questions { margin-top: 16px; padding-left: 12px; border-left: 2px solid #e4d9f3; }
.history-question { display: block; width: 100%; margin-top: 12px; padding: 0; border: 0; background: transparent; color: #51465f; text-align: left; }
.history-question-label { display: block; margin-bottom: 5px; color: #9c88b0; font-size: 11px; }
.history-question-text { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 3; -webkit-box-orient: vertical; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; line-height: 1.8; }
.history-card { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; padding: 18px; border-radius: 20px; background: #fff; }
.history-open { flex: 1; min-width: 0; padding: 0; border: 0; background: transparent; text-align: left; }
.history-module-tag { display: inline-block; margin-bottom: 10px; color: #9170ad; font-size: 11px; }
.history-open strong { display: block; color: #46364f; font-size: 16px; line-height: 1.7; overflow-wrap: anywhere; }
.history-meta { display: block; margin-top: 10px; color: #b0a5ba; font-size: 11px; }
.history-delete { flex-shrink: 0; padding: 7px 10px; border: 0; border-radius: 10px; background: #fff0ef; color: #cd8287; font-size: 12px; }
.history-empty { padding: 64px 20px; color: #a499b2; text-align: center; font-size: 14px; line-height: 1.9; }
.history-error,.conversation-save-warning { margin: 16px 0; padding: 12px 14px; border-radius: 10px; background: #fff2ed; color: #b27b66; font-size: 12px; line-height: 1.8; }
.history-detail-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; color: #9c88b0; font-size: 12px; }
.history-detail-heading time { color: #b1a4bd; font-size: 11px; }
.history-detail-body h2 { margin: 16px 0 22px; color: #4a365b; font-size: 21px; line-height: 1.7; overflow-wrap: anywhere; }
.history-input { margin: 0 0 24px; border: 1px solid #e6dcf0; border-radius: 14px; background: #fbf9fe; }
.history-input summary { padding: 14px 16px; color: #8d72a0; font-size: 13px; cursor: pointer; }
#history-input-details { padding: 0 16px 16px; }
#history-input-details p { margin-top: 10px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; line-height: 1.8; color: #8f819c; }
#history-input-details strong { font-weight: 500; color: #765e8a; }
.history-message { margin-bottom: 18px; padding: 20px; border-radius: 18px; background: #fff; }
.history-message.user { margin-left: 24px; background: #eae1f6; }
.history-speaker { color: #ab92be; font-size: 11px; }
.history-message p { margin-top: 10px; color: #4a3b57; font-size: 15px; line-height: 1.95; white-space: pre-wrap; overflow-wrap: anywhere; }
.history-saved-result { margin: 22px 0; padding: 20px; border-radius: 18px; background: #fff; }
.history-saved-result h3 { margin: 24px 0 14px; color: #673acb; font-size: 17px; }
.history-saved-result h3:first-child { margin-top: 0; }
.history-saved-result h4 { margin: 20px 0 10px; color: #715387; font-size: 14px; }
.history-saved-result p { margin: 10px 0; color: #51465f; font-size: 14px; line-height: 1.9; white-space: pre-wrap; overflow-wrap: anywhere; }
.history-chart-image { display: block; width: 100%; height: auto; margin: 20px 0; border-radius: 14px; }
.history-page button:focus-visible,.history-page select:focus-visible,.history-page summary:focus-visible { outline: 2px solid #673acb; outline-offset: 3px; }
@media(max-width:480px) { .history-list-body,.history-detail-body { padding: 18px 12px 36px; } .history-card,.history-message { padding: 16px; border-radius: 16px; } }
