/* Existing black/gold identity; compact inbox/list-detail rather than chat walls. */
.history-workspace{min-width:0}.history-filters{margin:0 0 18px}.history-filter-line{display:flex;gap:12px;align-items:flex-end;flex-wrap:wrap}.history-filter-line>label{display:flex;flex-direction:column;gap:7px;min-width:145px;flex:1;font-size:12px;color:var(--muted)}.history-filter-line .history-search{flex:3;min-width:240px}.history-filter-line input,.history-filter-line select{width:100%;min-width:0;margin:0;font-size:13px}.history-period-line{display:flex;align-items:center;gap:13px;flex-wrap:wrap;margin-top:14px;font-size:11px;color:var(--muted)}.history-presets{display:flex;flex-wrap:wrap;gap:5px}.history-period{border:1px solid var(--line-strong,var(--line));background:transparent;color:var(--muted);border-radius:4px;min-height:34px;padding:7px 11px;font:inherit;font-size:12px;cursor:pointer}.history-period[aria-pressed=true]{background:var(--accent);border-color:var(--accent);color:#171108}.history-period:hover{border-color:var(--accent)}.history-period:focus-visible,.history-thread:focus-visible{outline:2px solid var(--accent);outline-offset:-3px}.history-custom-dates{display:flex;gap:9px;align-items:center}.history-custom-dates[hidden]{display:none}.history-custom-dates>label{display:flex;align-items:center;gap:6px;font-size:11px}.history-custom-dates input{min-height:34px;padding:6px 8px;font-size:12px;width:150px}.history-retention{margin-left:auto;color:var(--faint,var(--muted));white-space:nowrap}
.history-inbox{display:grid;grid-template-columns:minmax(270px,34%) minmax(0,1fr);border:1px solid var(--line);border-radius:7px;background:var(--surface);overflow:hidden;height:clamp(510px,calc(100dvh - 300px),1000px)}.history-master{display:flex;flex-direction:column;min-width:0;min-height:0;border-right:1px solid var(--line)}.history-master-heading{display:flex;gap:12px;align-items:center;padding:15px 17px;border-bottom:1px solid var(--line);font-size:13px;font-weight:500}.history-master-heading>span{color:var(--muted);font-size:11px;font-weight:400}.history-thread-list{overflow:auto;overscroll-behavior:contain;flex:1;min-height:0}.history-thread{display:block;width:100%;text-align:left;padding:16px 17px;border:0;border-bottom:1px solid var(--line);border-radius:0;background:transparent;color:var(--ink);cursor:pointer;font:inherit}.history-thread:hover{background:var(--accent-soft)}.history-thread.is-selected{background:var(--accent);color:#171108;border-color:var(--accent)}.history-thread-top{display:flex;justify-content:space-between;align-items:center;gap:10px;font-size:11px}.history-thread-top strong{font-size:12px;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.history-thread-top time{font-size:10px;white-space:nowrap;color:var(--muted)}.history-thread-question{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;line-height:1.55;font-size:13px;margin-top:8px;overflow-wrap:anywhere}.history-thread-answer{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px;line-height:1.5;margin-top:6px;color:var(--muted)}.history-thread-bottom{display:flex;justify-content:space-between;gap:8px;margin-top:11px;font-size:10px;color:var(--faint,var(--muted))}.history-thread.is-selected .history-thread-answer,.history-thread.is-selected time,.history-thread.is-selected .history-thread-bottom{color:#3f321b}.history-pagination{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:12px 16px;border-top:1px solid var(--line);font-size:11px;color:var(--muted)}.history-pagination>div{display:flex;gap:6px}.history-pagination .button{font-size:11px;min-height:34px;padding:7px 10px}.history-master .history-pagination{padding:10px 12px;gap:7px}
.history-reader{display:flex;flex-direction:column;min-width:0;min-height:0}.history-reader-header{display:flex;align-items:center;gap:12px;border-bottom:1px solid var(--line);padding:16px 22px;flex-shrink:0}.history-reader-header h2{font-size:15px;font-weight:500;margin:0 0 5px}.history-reader-header span{color:var(--muted);font-size:11px}.history-reader-header [data-history-back]{display:none}.history-reader-scroll{padding:0 24px 24px;min-height:0;overflow:auto;overscroll-behavior:contain;flex:1}.history-message{padding:24px 0;border-bottom:1px solid var(--line);min-width:0}.history-message:last-child{border-bottom:0}.history-message>header{display:flex;align-items:baseline;gap:12px;justify-content:space-between;margin-bottom:12px;font-size:11px;color:var(--muted)}.history-message>header strong{font-size:13px;font-weight:500;color:var(--ink)}.history-message-assistant>header strong{color:var(--accent)}.history-message>header time{font-size:10px;white-space:nowrap}.history-message-content{white-space:pre-wrap;overflow-wrap:anywhere;font-size:14px;line-height:1.85;max-width:85ch;margin:0}.history-long-text{display:flex;gap:9px;align-items:center;flex-wrap:wrap;margin-top:14px;font-size:11px;color:var(--muted)}.history-long-text>span{flex-basis:100%}.history-long-text .button{min-height:34px;font-size:11px}.history-empty{padding:36px 24px;text-align:center;color:var(--muted);font-size:12px;line-height:1.65;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;flex:1}.history-empty>strong{font-size:14px;color:var(--ink);font-weight:500}.history-empty>p{max-width:44ch;margin:0}.history-empty .button{margin-top:8px}.history-message-tool{font-size:12px;color:var(--muted)}.history-message-tool>summary{cursor:pointer;min-height:30px}.history-message-tool[open]>summary{margin-bottom:12px}.history-detail-pagination{display:flex;justify-content:space-between;gap:10px;align-items:center;flex-wrap:wrap;padding:15px 0;border-bottom:1px solid var(--line);color:var(--muted);font-size:11px}.history-detail-pagination>div{display:flex;gap:6px}.history-detail-pagination .button{font-size:11px;min-height:34px}
.history-attachment{border-top:1px solid var(--line);padding-top:15px;margin-top:16px;min-width:0}.history-attachment-meta{display:flex;align-items:center;gap:9px;flex-wrap:wrap;margin-bottom:10px;font-size:11px}.history-attachment-meta strong{font-size:12px;font-weight:500;overflow-wrap:anywhere;max-width:100%}.history-attachment-meta span{color:var(--muted)}.history-attachment-meta a{color:var(--accent);margin-left:auto}.history-attachment img{display:block;max-width:min(100%,430px);max-height:440px;height:auto;object-fit:contain;border:1px solid var(--line);background:#000}.history-attachment video{display:block;width:min(100%,520px);max-height:440px;background:#000}.history-attachment audio{display:block;width:min(100%,440px)}.history-attachment details{font-size:12px;color:var(--muted);margin-top:14px}.history-attachment summary{cursor:pointer;margin-bottom:10px}
.history-log-panel{min-width:0}.history-log-table th,.history-log-table td{vertical-align:top}.history-log-table td:first-child{white-space:nowrap;font-size:11px;width:140px}.history-log-table td:nth-child(2){font-size:12px;max-width:150px;overflow-wrap:anywhere}.history-log-table td:last-child{width:95px}.history-log-preview{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere;font-size:12px;line-height:1.65}.history-log-table td>small{display:block;color:var(--muted);font-size:10px;margin-top:5px}.history-log-table .button{min-height:34px;font-size:11px;padding:7px 10px}.history-log-meta{display:flex;align-items:center;gap:14px;flex-wrap:wrap;font-size:12px;color:var(--muted);margin-bottom:20px}.history-log-meta strong{font-weight:500;color:var(--ink)}.history-log-json{margin-top:24px;font-size:12px;color:var(--muted)}.history-log-json>summary{cursor:pointer}.history-log-json pre,.history-full-text{white-space:pre-wrap;overflow-wrap:anywhere;font-family:inherit;font-size:13px;line-height:1.8;max-height:63vh;overflow:auto;margin-top:14px}.history-log-json pre{font-family:var(--mono,monospace);font-size:11px}.history-text-tools{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;font-size:12px;color:var(--muted);border-bottom:1px solid var(--line);padding-bottom:14px}.history-text-tools>div{display:flex;gap:7px;flex-wrap:wrap}.history-text-tools .button{min-height:34px;font-size:11px}
@media(max-width:979px){.history-inbox{display:block;height:auto;min-height:450px}.history-master{border-right:0;min-height:450px}.history-thread-list{max-height:65dvh}.history-reader{display:none;min-height:450px}.history-inbox[data-open=true] .history-master{display:none}.history-inbox[data-open=true] .history-reader{display:flex}.history-reader-header [data-history-back]{display:inline-flex}.history-reader-scroll{max-height:75dvh;padding:0 18px 18px}.history-reader-header{padding:14px 18px;align-items:flex-start}.history-reader-header .button{min-height:36px;padding:8px 10px;font-size:11px}.history-retention{margin-left:0}.history-filter-line>label{min-width:135px}.history-log-table td:first-child{width:115px}.history-log-table th:nth-child(3),.history-log-table td:nth-child(3){display:none}}
@media(max-width:540px){.history-filter-line{gap:10px}.history-filter-line .history-search{flex-basis:100%;min-width:0}.history-filter-line>label{min-width:0}.history-period-line{gap:10px}.history-presets{gap:4px}.history-period{padding:7px 9px;font-size:11px;min-height:36px}.history-custom-dates{width:100%}.history-custom-dates>label{flex:1;min-width:0}.history-custom-dates input{width:100%;min-width:0}.history-reader-header{flex-wrap:wrap}.history-reader-header [data-history-back]{flex-basis:100%;width:max-content}.history-log-table th:nth-child(2),.history-log-table td:nth-child(2){display:none}.history-log-table td:first-child{max-width:96px;white-space:normal;line-height:1.5}.history-message-content{font-size:13px;line-height:1.8}.history-reader-scroll{padding:0 14px 18px}.history-pagination{padding:12px}.history-attachment-meta a{margin-left:0}}

#history-selection-note{display:block;color:var(--muted);font-size:10px;margin-top:6px;line-height:1.5}#history-selection-note[hidden]{display:none}

.history-log-mobile-meta{display:none}@media(max-width:979px){.history-log-mobile-meta{display:flex;align-items:center;gap:7px;margin-bottom:7px}.history-log-mobile-meta>span:last-child{display:none}}@media(max-width:540px){.history-log-mobile-meta>span:last-child{display:inline;font-size:10px;color:var(--muted)}}
