.svg-tip {
    padding: 10px;
    background: rgba(0, 0, 0, 0.8);
    color: #bbb;
    font-size: 12px;
    position: absolute;
    z-index: 99999;
    text-align: center;
    border-radius: 3px;
}

.svg-tip:after {
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    position: absolute;
    left: 50%;
    height: 5px;
    width: 5px;
    bottom: -10px;
    margin: 0 0 0 -5px;
    content: " ";
    border: 5px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.8);
}

#activity-graph {
    font-size: small;
}

.heart-div {
    right: 6rem;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 120ms ease-in-out;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.group:hover .heart-div,
.heart-div.is-favorite {
    opacity: 1;
    pointer-events: auto;
}

.heart-emoji {
    display: inline-block;
    font-size: 20px;
    line-height: 1;
}

.heart-emoji::before {
    content: "🤍";
}

.group:hover .heart-div:not(.is-favorite) .heart-emoji::before {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

.heart-div.is-favorite .heart-emoji {
    font-size: 24px;
}

.heart-div.is-favorite .heart-emoji::before {
    content: "♡";
    color: #ef4444;
    text-shadow: none;
}

.group:hover .heart-div.is-favorite .heart-emoji::before {
    content: "♡";
    color: #dc2626;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.25);
}

.provider-badge {
    font-size: 10px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 9999px;
    font-weight: 700;
}

.provider-chatgpt {
    background: #dcfce7;
    color: #166534;
}

.provider-claude {
    background: #ffedd5;
    color: #9a3412;
}

.render-mode-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}

.render-mode-btn {
    border: 1px solid #d1d5db;
    border-radius: 9999px;
    padding: 2px 10px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.3;
    background: #ffffff;
    color: #9ca3af;
}

.render-mode-btn:hover {
    background: #f3f4f6;
}

.render-mode-btn.is-active.is-markdown {
    border-color: #9ca3af;
    background: #f3f4f6;
    color: #4b5563;
}

.render-mode-btn.is-active.is-plain {
    border-color: #9ca3af;
    background: #f3f4f6;
    color: #4b5563;
}

.activity-day-filter-chip {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    background: #ffffff;
    min-height: 2.5rem;
    padding: 0.35rem 0.6rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.activity-day-filter-chip.is-loading {
    color: #6b7280;
}

.activity-day-filter-main {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    min-width: 0;
}

.activity-day-filter-label {
    font-size: 0.875rem;
    color: #374151;
    white-space: nowrap;
}

.activity-day-filter-clear {
    border: 0;
    background: transparent;
    color: #6b7280;
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1;
    padding: 0.1rem 0.25rem;
    border-radius: 6px;
}

.activity-day-filter-clear:hover {
    color: #111827;
    background: #f3f4f6;
}

html.conversation-preload #main-content {
    min-height: 140px;
    position: relative;
}

html.conversation-preload #main-content > * {
    display: none !important;
}

html.conversation-preload #main-content::before {
    content: "Loading conversation...";
    display: block;
    padding-top: 2.5rem;
    text-align: center;
    color: #6b7280;
}

.activity-settings-btn {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 4px 6px;
    color: #4b5563;
    background: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.activity-settings-btn:hover {
    background: #f3f4f6;
}

.activity-settings-menu {
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 8px;
    width: 320px;
    text-align: left;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.16);
    z-index: 40;
    padding: 10px;
}

.activity-settings-section {
    margin-top: 8px;
}

.activity-settings-section:first-child {
    margin-top: 0;
}

.activity-settings-title {
    font-size: 12px;
    font-weight: 700;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.activity-provider-filters {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.activity-provider-option {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
}

.activity-view-mode-options {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.activity-radio-inline {
    display: inline-flex;
    gap: 8px;
    font-size: 12px;
    align-items: center;
    white-space: nowrap;
}

.activity-provider-panel {
    margin-top: 10px;
}

.activity-provider-panel:first-child {
    margin-top: 0;
}

.activity-provider-heading {
    font-size: 12px;
    font-weight: 700;
    color: #374151;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.activity-empty-state {
    border: 1px dashed #d1d5db;
    border-radius: 8px;
    padding: 14px;
    text-align: center;
    color: #6b7280;
    background: #f9fafb;
}

.activity-year-badges {
    margin-top: 10px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
}

.activity-year-badge {
    border: 1px solid #d1d5db;
    border-radius: 9999px;
    background: #ffffff;
    color: #4b5563;
    font-size: 12px;
    padding: 2px 10px;
}

.activity-year-badge:hover {
    background: #f3f4f6;
}

.activity-year-badge.is-active {
    background: #1f2937;
    border-color: #1f2937;
    color: #ffffff;
}

#chat-statistics {
    max-width: 960px;
}

.stats-tables-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.stats-table-card {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #ffffff;
    overflow: hidden;
}

.stats-table-title {
    padding: 8px 10px;
    font-size: 12px;
    font-weight: 700;
    color: #374151;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 8px;
}

.msg-block {
    margin-top: 8px;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
}

.msg-block:first-child {
    margin-top: 4px;
}

.msg-block-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #4b5563;
    margin-bottom: 4px;
}

.msg-block-body {
    white-space: normal;
    word-break: break-word;
    line-height: 1.4;
}

.msg-block-body > *:first-child {
    margin-top: 0;
}

.msg-block-body > *:last-child {
    margin-bottom: 0;
}

.msg-block-body p {
    margin: 0.55rem 0;
}

.msg-block-body ul {
    list-style-type: disc;
    list-style-position: outside;
    margin: 0.35rem 0;
    padding-left: 1.25rem;
}

.msg-block-body ol {
    list-style-type: decimal;
    list-style-position: outside;
    margin: 0.35rem 0;
    padding-left: 1.25rem;
}

.msg-block-body li {
    margin: 0.2rem 0;
}

.msg-block-body h1,
.msg-block-body h2,
.msg-block-body h3,
.msg-block-body h4,
.msg-block-body h5,
.msg-block-body h6 {
    margin: 0.6rem 0 0.25rem;
    font-weight: 700;
    line-height: 1.25;
    color: #111827;
}

.msg-block-body h1 {
    font-size: 1rem;
}

.msg-block-body h2 {
    font-size: 0.95rem;
}

.msg-block-body h3,
.msg-block-body h4,
.msg-block-body h5,
.msg-block-body h6 {
    font-size: 0.9rem;
}

.msg-block-body a {
    color: #1f2937;
    text-decoration: underline;
}

.msg-block-body blockquote {
    margin: 0.5rem 0;
    padding: 0.35rem 0.6rem;
    border-left: 3px solid #d1d5db;
    background: #f9fafb;
    color: #4b5563;
}

.msg-block-body hr {
    border: 0;
    border-top: 1px solid #e5e7eb;
    margin: 0.6rem 0;
}

.msg-block-body code {
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    padding: 0 0.25em;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.9em;
}

.msg-block-body pre {
    margin: 0.5rem 0;
    padding: 0.55rem 0.65rem;
    border-radius: 6px;
    border: 1px solid #d1d5db;
    background: #111827;
    overflow-x: auto;
}

.msg-block-body pre code {
    background: transparent;
    border: 0;
    padding: 0;
    color: #f9fafb;
    white-space: pre;
}

.msg-block-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 0.5rem 0;
}

.msg-block-body th,
.msg-block-body td {
    border: 1px solid #e5e7eb;
    padding: 0.25rem 0.4rem;
    text-align: left;
}

.msg-block-body th {
    background: #f9fafb;
}

.msg-block-text {
    background: #ffffff;
}

.msg-block-thinking {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.msg-block-summary {
    cursor: pointer;
    font-size: 11px;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 8px;
}

.msg-block-summary-label {
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    white-space: nowrap;
    flex-shrink: 0;
}

.msg-block-summary-preview {
    color: #9ca3af;
    font-size: 11px;
    font-weight: 400;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    flex: 1 1 auto;
}

.msg-block[open] .msg-block-summary-preview {
    display: none;
}

.msg-block-thinking-summary .msg-block-summary-label {
    color: #1d4ed8;
}

.msg-block-tool {
    background: #f5f3ff;
    border-color: #ddd6fe;
}

.msg-block-tool-summary .msg-block-summary-label {
    color: #5b21b6;
}

.msg-block-asset {
    background: #ecfdf5;
    border-color: #a7f3d0;
}

.msg-block-asset .msg-block-label {
    color: #047857;
}

.msg-block-system {
    background: #fef2f2;
    border-color: #fecaca;
}

.msg-block-system .msg-block-label {
    color: #b91c1c;
}

.msg-block-code {
    background: #111827;
    border-color: #374151;
}

.msg-block-code .msg-block-label {
    color: #d1d5db;
}

.msg-block-code-summary .msg-block-summary-label {
    color: #d1d5db;
}

.msg-block-code pre {
    margin: 0;
    overflow-x: auto;
}

.msg-block-code code {
    color: #f9fafb;
    white-space: pre-wrap;
}

.msg-block-code .msg-block-body pre {
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.msg-block-code .msg-block-body pre code {
    background: transparent;
    border: 0;
    padding: 0;
    color: #f9fafb;
    white-space: pre-wrap;
}

.msg-block-empty {
    font-style: italic;
    color: #6b7280;
}
