* { box-sizing: border-box; margin: 0; padding: 0; } /* ── Dark theme (default) ───────────────────────────────── */ :root { --bg: #1a1228; --surface: #221840; --border: #3a2852; --user-bg: #5c1528; --user-border: #7a1f36; --inara-bg: #261d42; --inara-border: #3d2a55; --accent: #c4935a; --text: #e8e0f0; --muted: #b0a2c8; --error-bg: #3b0f0f; --error-border: #7f1d1d; --error-text: #fca5a5; --shadow: rgba(0,0,0,0.55); --modal-overlay: rgba(0,0,0,0.72); --code-bg: rgba(0,0,0,0.30); --pre-bg: rgba(0,0,0,0.35); --success: #6abf6a; --success-dim: #2a4a2a; } /* ── Light theme ─────────────────────────────────────────── */ @media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) { --bg: #f2eef9; --surface: #e8e1f4; --border: #c0afd8; --user-bg: #f5dae2; --user-border: #d890aa; --inara-bg: #ede5f8; --inara-border: #b8a0d8; --accent: #7a4818; --text: #1c1030; --muted: #60487a; --error-bg: #fde8e8; --error-border: #d88888; --error-text: #8b0f0f; --shadow: rgba(0,0,0,0.18); --modal-overlay: rgba(0,0,0,0.45); --code-bg: rgba(0,0,0,0.06); --pre-bg: rgba(0,0,0,0.07); --success: #1e6e1e; --success-dim: #5aaa5a; } } /* Manual overrides — take precedence over system preference */ [data-theme="dark"] { --bg: #1a1228; --surface: #221840; --border: #3a2852; --user-bg: #5c1528; --user-border: #7a1f36; --inara-bg: #261d42; --inara-border: #3d2a55; --accent: #c4935a; --text: #e8e0f0; --muted: #b0a2c8; --error-bg: #3b0f0f; --error-border: #7f1d1d; --error-text: #fca5a5; --shadow: rgba(0,0,0,0.55); --modal-overlay: rgba(0,0,0,0.72); --code-bg: rgba(0,0,0,0.30); --pre-bg: rgba(0,0,0,0.35); --success: #6abf6a; --success-dim: #2a4a2a; } [data-theme="light"] { --bg: #f2eef9; --surface: #e8e1f4; --border: #c0afd8; --user-bg: #f5dae2; --user-border: #d890aa; --inara-bg: #ede5f8; --inara-border: #b8a0d8; --accent: #7a4818; --text: #1c1030; --muted: #60487a; --error-bg: #fde8e8; --error-border: #d88888; --error-text: #8b0f0f; --shadow: rgba(0,0,0,0.18); --modal-overlay: rgba(0,0,0,0.45); --code-bg: rgba(0,0,0,0.06); --pre-bg: rgba(0,0,0,0.07); --success: #1e6e1e; --success-dim: #5aaa5a; } body { font-family: 'Inter', system-ui, -apple-system, sans-serif; font-weight: 450; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; background: var(--bg); color: var(--text); height: 100vh; display: flex; flex-direction: column; } header { padding: 12px 20px; background: var(--surface); border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 12px; position: relative; flex-wrap: wrap; } .header-emoji { font-size: 1.6rem; display: inline-block; } @keyframes shimmer { 0% { transform: scale(1) rotate(0deg); opacity: 1; } 25% { transform: scale(1.2) rotate(-12deg); opacity: 0.7; } 75% { transform: scale(1.2) rotate(12deg); opacity: 0.7; } 100% { transform: scale(1) rotate(0deg); opacity: 1; } } .header-emoji.processing { animation: shimmer 0.75s ease-in-out infinite; } header .name { font-size: 1.1rem; font-weight: 600; color: var(--accent); } header .subtitle { font-size: 0.78rem; color: var(--muted); } /* Persona switcher */ .persona-switcher { position: relative; cursor: pointer; user-select: none; } .persona-switcher:hover .name { text-decoration: underline dotted; } .persona-dropdown { display: none; position: absolute; top: calc(100% + 6px); left: 0; min-width: 160px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 4px 16px rgba(0,0,0,0.4); z-index: 200; overflow: hidden; } .persona-dropdown.open { display: block; } .persona-dropdown a { display: block; padding: 0.55rem 0.85rem; color: var(--text); text-decoration: none; font-size: 0.85rem; transition: background 0.1s; } .persona-dropdown a:hover { background: var(--border); } .persona-dropdown a.active { color: var(--accent); font-weight: 600; } .persona-dropdown .pd-divider { border-top: 1px solid var(--border); margin: 0.25rem 0; } .persona-dropdown .pd-add { color: var(--muted); font-size: 0.8rem; } .persona-dropdown .pd-add:hover { color: var(--text); } /* Lucide SVG icon alignment */ .btn-icon { display: inline-block; vertical-align: middle; flex-shrink: 0; pointer-events: none; } .hdr-btn { display: inline-flex; align-items: center; gap: 5px; background: var(--bg); border: 1px solid var(--border); border-radius: 6px; color: var(--muted); font-size: 0.75rem; padding: 5px 10px; cursor: pointer; transition: border-color 0.15s, color 0.15s; white-space: nowrap; } .hdr-btn:hover { border-color: var(--muted); color: var(--text); } /* Right-side nav group — pushed to the end */ #hdr-nav { display: flex; align-items: center; gap: 8px; margin-left: auto; } /* Settings dropdown */ .hdr-dropdown-wrap { position: relative; } .hdr-dropdown { display: none; position: absolute; top: calc(100% + 6px); right: 0; min-width: 170px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 4px 16px rgba(0,0,0,0.4); z-index: 200; overflow: hidden; } .hdr-dropdown.open { display: block; } .hdr-dd-item { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; padding: 0.55rem 0.85rem; color: var(--text); text-decoration: none; font-size: 0.85rem; background: none; border: none; cursor: pointer; transition: background 0.1s; box-sizing: border-box; } .hdr-dd-item:hover { background: var(--border); } .hdr-dd-divider { border-top: 1px solid var(--border); margin: 0.25rem 0; } /* Sessions panel */ #sessions-panel { display: none; position: absolute; top: calc(100% + 4px); right: 12px; width: min(300px, calc(100vw - 24px)); max-height: 340px; overflow-y: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; z-index: 100; box-shadow: 0 8px 24px var(--shadow); } #sessions-panel.open { display: block; } .session-item { padding: 10px 14px; cursor: pointer; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; gap: 8px; } .session-item:last-child { border-bottom: none; } .session-item:hover { background: var(--bg); } .session-item.new { color: var(--accent); justify-content: center; } .session-delete-btn { background: none; border: none; color: var(--muted); font-size: 1.1rem; line-height: 1; padding: 2px 6px; cursor: pointer; border-radius: 3px; flex-shrink: 0; transition: color 0.15s; min-width: 28px; text-align: center; } .session-delete-btn:hover { color: #e06c75; } .session-rename-btn { background: none; border: none; color: var(--muted); font-size: 0.9rem; line-height: 1; padding: 2px 6px; cursor: pointer; border-radius: 3px; flex-shrink: 0; opacity: 0.4; transition: opacity 0.15s, color 0.15s; min-width: 24px; text-align: center; } .session-item:hover .session-rename-btn { opacity: 1; } .session-rename-btn:hover { color: var(--accent); } .session-rename-input { flex: 1; min-width: 0; background: var(--bg); border: 1px solid var(--accent); border-radius: 4px; color: var(--text); font-family: monospace; font-size: 0.85rem; padding: 1px 5px; outline: none; } .session-id { font-family: monospace; font-size: 0.85rem; color: var(--text); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .session-meta { font-size: 0.78rem; color: var(--muted); white-space: nowrap; text-align: right; flex-shrink: 0; } /* Messages */ #messages { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 14px; } .message { max-width: 75%; padding: 10px 14px; border-radius: 12px; line-height: 1.55; word-wrap: break-word; font-size: 0.95rem; } .message.user { white-space: pre-wrap; } .message.user { align-self: flex-end; background: var(--user-bg); border: 1px solid var(--user-border); border-bottom-right-radius: 3px; } .message.assistant { align-self: flex-start; background: var(--inara-bg); border: 1px solid var(--inara-border); border-bottom-left-radius: 3px; } /* Markdown rendering inside assistant messages */ .message.assistant p { margin: 0 0 0.6em; } .message.assistant p:last-child { margin-bottom: 0; } .message.assistant ul, .message.assistant ol { margin: 0.4em 0 0.6em 1.4em; padding: 0; } .message.assistant li { margin-bottom: 0.2em; } .message.assistant h1, .message.assistant h2, .message.assistant h3 { margin: 0.8em 0 0.3em; font-weight: 600; color: var(--accent); line-height: 1.3; } .message.assistant h1 { font-size: 1.1em; } .message.assistant h2 { font-size: 1.0em; } .message.assistant h3 { font-size: 0.95em; } .message.assistant strong { color: var(--text); font-weight: 600; } .message.assistant em { color: var(--accent); font-style: italic; } .message.assistant a { color: var(--accent); text-decoration: underline; } .message.assistant hr { border: none; border-top: 1px solid var(--border); margin: 0.8em 0; } .message.assistant blockquote { border-left: 3px solid var(--border); margin: 0.5em 0; padding: 0.2em 0.8em; color: var(--muted); } .message.assistant code { font-family: 'Courier New', monospace; font-size: 0.88em; background: var(--code-bg); border: 1px solid var(--border); border-radius: 4px; padding: 0.1em 0.35em; } .message.assistant pre { background: var(--pre-bg); border: 1px solid var(--border); border-radius: 6px; padding: 10px 12px; overflow-x: auto; margin: 0.5em 0; } .message.assistant pre code { background: none; border: none; padding: 0; font-size: 0.85em; } /* Syntax highlighting — app theme controls the pre background; hljs adds token colors */ .message.assistant pre code.hljs { background: transparent; padding: 0; } .message.system { align-self: center; font-size: 0.72rem; color: var(--muted); background: none; padding: 2px 0; } /* ── Tool call step cards (agent mode) ── */ .tool-calls-container { display: flex; flex-direction: column; gap: 3px; margin: 4px 0 6px; align-self: stretch; } .tool-call { background: var(--surface); border: 1px solid var(--border); border-radius: 6px; overflow: hidden; font-size: 0.78rem; } .tool-call summary { display: flex; align-items: baseline; gap: 0.5rem; padding: 0.35rem 0.65rem; cursor: pointer; list-style: none; user-select: none; color: var(--muted); } .tool-call summary::-webkit-details-marker { display: none; } .tool-call summary::before { content: '▶'; font-size: 0.55rem; color: var(--muted); transition: transform 0.12s; flex-shrink: 0; } .tool-call[open] summary::before { transform: rotate(90deg); } .tool-call summary:hover { color: var(--text); background: rgba(255,255,255,0.03); } .tc-name { font-weight: 600; color: var(--accent); font-family: 'Courier New', monospace; } .tc-snippet { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 36ch; } .tc-body { padding: 0 0.65rem 0.5rem; display: flex; flex-direction: column; gap: 0.4rem; } .tc-section { display: flex; flex-direction: column; gap: 2px; } .tc-label { font-size: 0.68rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); } .tc-body pre { margin: 0; background: var(--pre-bg); border: 1px solid var(--border); border-radius: 4px; padding: 6px 8px; font-size: 0.78rem; white-space: pre-wrap; word-break: break-word; color: var(--text); overflow-x: auto; } .message.error { align-self: flex-start; background: var(--error-bg); border: 1px solid var(--error-border); color: var(--error-text); border-bottom-left-radius: 3px; } .message.thinking { color: var(--muted); font-style: italic; } /* Copy button */ .message.assistant, .message.user { position: relative; } .copy-btn { display: inline-flex; align-items: center; gap: 4px; position: absolute; top: 7px; right: 8px; background: var(--bg); border: 1px solid var(--border); border-radius: 4px; color: var(--muted); font-size: 0.7rem; padding: 2px 7px; cursor: pointer; opacity: 0; transition: opacity 0.15s, color 0.15s, border-color 0.15s; } .message.assistant:hover .copy-btn, .message.user:hover .copy-btn { opacity: 1; } .copy-btn:hover { color: var(--text); border-color: var(--muted); } .copy-btn.copied { color: var(--success); border-color: var(--success-dim); } /* Model tag — shown at the bottom of every assistant message */ .model-tag { display: block; font-size: 0.67rem; color: #475569; margin-top: 0.55rem; padding-top: 0.4rem; border-top: 1px solid #2d3148; text-align: right; letter-spacing: 0.02em; } .model-tag.fallback { color: #f59e0b; } /* Retry button — shown in error message bubbles */ .retry-btn { display: inline-block; margin-top: 0.6rem; margin-left: 0.15rem; padding: 0.25rem 0.7rem; font-size: 0.78rem; font-family: inherit; background: transparent; color: var(--error-text); border: 1px solid var(--error-border); border-radius: 4px; cursor: pointer; transition: background 0.15s, color 0.15s; } .retry-btn:hover { background: var(--error-border); color: #fff; } /* Note messages */ .message.note-private { align-self: flex-end; background: rgba(100, 70, 5, 0.15); border: 1px dashed rgba(180, 130, 40, 0.45); border-bottom-right-radius: 3px; font-size: 0.9rem; max-width: 70%; } .message.note-public { align-self: flex-end; background: rgba(5, 70, 70, 0.15); border: 1px dashed rgba(40, 170, 150, 0.45); border-bottom-right-radius: 3px; font-size: 0.9rem; max-width: 70%; } .note-label { display: block; font-size: 0.62rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 5px; opacity: 0.65; } .message.note-private .note-label { color: #c9a84c; } .message.note-public .note-label { color: #4abfb0; } .message.note-private .note-content { color: #c9a84c; white-space: pre-wrap; } .message.note-public .note-content { color: #4abfb0; white-space: pre-wrap; } /* ── Input area — 3-col: [mode-toggle] [textarea] [send-col] ── */ #input-area { padding: 12px 20px; background: var(--surface); border-top: 1px solid var(--border); display: flex; flex-direction: row; gap: 10px; align-items: flex-end; } /* ── Mode select — compact dropdown ─────────────────────────── */ #mode-select { position: relative; flex-shrink: 0; display: flex; flex-direction: row; align-items: center; gap: 4px; } #mode-select-btn { display: flex; align-items: center; gap: 7px; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; color: var(--muted); padding: 8px 11px; cursor: pointer; font-size: 0.85rem; white-space: nowrap; transition: border-color 0.15s, color 0.15s; } #mode-select-btn:hover { border-color: var(--muted); color: var(--text); } #mode-select-btn.mode-note { border-color: rgba(180,130,40,0.6); color: #c9a84c; } #mode-select-btn.mode-otr { border-color: rgba(120,80,160,0.6); color: #a87fd4; } #mode-icon { display: flex; align-items: center; } .mode-arrow { font-size: 0.55rem; color: var(--muted); margin-left: 2px; opacity: 0.5; } /* Dropdown — opens upward; MRU at bottom = closest to button */ #mode-dropdown { display: none; position: absolute; bottom: calc(100% + 4px); left: 0; min-width: 100%; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 -4px 16px var(--shadow); z-index: 100; overflow: hidden; } #mode-dropdown.open { display: block; } .mode-option { display: flex; align-items: center; gap: 8px; padding: 0.5rem 0.85rem; cursor: pointer; font-size: 0.85rem; color: var(--muted); border: none; background: none; width: 100%; text-align: left; transition: background 0.1s, color 0.1s; } .mode-option:hover { background: var(--border); color: var(--text); } .mode-option.current { color: var(--text); font-weight: 500; } .mode-option .opt-icon { display: flex; align-items: center; } .mode-option .opt-check { margin-left: auto; font-size: 0.7rem; opacity: 0.7; } /* Note visibility sub-button — shown below mode-select when note is active */ #note-vis-btn { display: none; background: var(--bg); border: 1px solid rgba(180,130,40,0.35); border-radius: 6px; color: rgba(180,130,40,0.75); font-size: 0.7rem; padding: 4px 8px; cursor: pointer; text-align: center; transition: opacity 0.15s; } #note-vis-btn:hover { opacity: 0.75; } #note-vis-btn.pub { border-color: rgba(40,170,150,0.35); color: rgba(40,170,150,0.75); } /* Tools toggle — OFF: dim/muted; ON: amber with glow */ #tools-toggle { background: var(--bg); border: 1px solid rgba(255,255,255,0.1); border-radius: 6px; color: rgba(255,255,255,0.2); font-size: 0.85rem; padding: 4px 8px; cursor: pointer; text-align: center; transition: color 0.15s, border-color 0.15s, box-shadow 0.15s; } #tools-toggle:hover { color: rgba(255,255,255,0.4); border-color: rgba(255,255,255,0.2); } #tools-toggle.local-on { color: #f59e0b; border-color: #92400e; box-shadow: 0 0 6px rgba(245,158,11,0.35); } #tools-toggle.local-on:hover { box-shadow: 0 0 10px rgba(245,158,11,0.5); } #input { flex: 1; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; color: var(--text); padding: 10px 14px; font-size: 0.95rem; font-family: inherit; resize: none; line-height: 1.4; overflow-y: auto; transition: border-color 0.2s; } #input:focus { outline: none; border-color: var(--muted); } #input.mode-note { border-color: rgba(180,130,40,0.55); } #input.mode-note:focus { border-color: rgba(180,130,40,0.85); } #input.mode-note.public { border-color: rgba(40,170,150,0.55); } #input.mode-note.public:focus { border-color: rgba(40,170,150,0.85); } #input.mode-otr { border-color: rgba(120,80,160,0.4); background: rgba(120,80,160,0.04); } /* Send column — right side, stacked */ #send-col { display: flex; flex-direction: column; align-items: stretch; gap: 4px; flex-shrink: 0; } /* Send button */ #send { display: flex; align-items: center; justify-content: center; gap: 6px; background: var(--user-bg); border: 1px solid var(--user-border); color: var(--text); border-radius: 8px; padding: 10px 14px; cursor: pointer; font-size: 0.9rem; text-align: center; white-space: nowrap; transition: background 0.15s; } #send:hover { background: var(--user-border); } #send:disabled { background: var(--surface); color: var(--muted); border-color: var(--border); cursor: not-allowed; } /* Stop button */ #stop { display: none; align-items: center; justify-content: center; gap: 6px; background: var(--error-bg); border: 1px solid var(--error-border); color: var(--error-text); border-radius: 8px; padding: 10px 14px; cursor: pointer; font-size: 0.9rem; text-align: center; transition: background 0.15s; } #stop:hover { background: #5c1a1a; } #session-id { font-size: 0.7rem; color: var(--border); padding: 0 20px 6px; background: var(--surface); } /* ── Message wrappers (edit/delete controls) ──────────────── */ .msg-wrapper { display: flex; flex-direction: column; max-width: 75%; } .msg-wrapper.user { align-self: flex-end; } .msg-wrapper.assistant { align-self: flex-start; } /* Inner message fills wrapper width */ .msg-wrapper .message.user, .msg-wrapper .message.assistant { align-self: stretch; max-width: none; } .msg-actions { display: flex; gap: 4px; opacity: 0; transition: opacity 0.15s; padding: 2px 2px 0; } .msg-wrapper.user .msg-actions { justify-content: flex-end; } .msg-wrapper.assistant .msg-actions { justify-content: flex-start; } .msg-wrapper:hover .msg-actions { opacity: 1; } .msg-act-btn { display: inline-flex; align-items: center; gap: 4px; background: none; border: 1px solid var(--border); border-radius: 4px; color: var(--muted); font-size: 0.65rem; padding: 1px 6px; cursor: pointer; transition: color 0.15s, border-color 0.15s; } .msg-act-btn:hover { color: var(--text); border-color: var(--muted); } .msg-act-btn.del:hover { color: var(--error-text); border-color: var(--error-border); } /* Inline edit */ .edit-textarea { width: 100%; background: var(--bg); border: 1px solid var(--muted); border-radius: 6px; color: var(--text); padding: 6px 10px; font-size: 0.9rem; font-family: inherit; resize: vertical; line-height: 1.4; } .edit-textarea:focus { outline: none; border-color: var(--accent); } .edit-btns { display: flex; gap: 6px; margin-top: 6px; justify-content: flex-end; } .edit-save-btn, .edit-cancel-btn { display: inline-flex; align-items: center; gap: 4px; background: none; border: 1px solid var(--border); border-radius: 4px; color: var(--muted); font-size: 0.75rem; padding: 3px 10px; cursor: pointer; transition: color 0.15s, border-color 0.15s, background 0.15s; } .edit-save-btn { border-color: var(--inara-border); color: var(--accent); } .edit-save-btn:hover { background: var(--inara-bg); } .edit-cancel-btn:hover { color: var(--text); border-color: var(--muted); } /* ── File editor modal ───────────────────────────────────── */ #file-modal { display: none; position: fixed; inset: 0; background: var(--modal-overlay); z-index: 200; align-items: center; justify-content: center; } #file-modal.open { display: flex; } #file-modal-inner { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; width: min(860px, 96vw); height: min(82vh, 800px); display: flex; flex-direction: column; overflow: hidden; } #file-modal-header { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--border); background: var(--bg); flex-shrink: 0; } #file-modal-title { font-size: 0.9rem; font-weight: 600; color: var(--accent); } .fm-spacer { flex: 1; } .fm-btn { background: var(--bg); border: 1px solid var(--border); border-radius: 5px; color: var(--muted); font-size: 0.75rem; padding: 4px 10px; cursor: pointer; transition: color 0.15s, border-color 0.15s; } .fm-btn:hover { color: var(--text); border-color: var(--muted); } .fm-btn.active { color: var(--accent); border-color: var(--accent); } .fm-btn.save { color: var(--accent); border-color: var(--inara-border); } .fm-btn.save:hover { background: var(--inara-bg); } #file-modal-content { flex: 1; display: flex; overflow: hidden; } /* ── File sidebar ── */ #file-sidebar-wrap { width: 190px; flex-shrink: 0; border-right: 1px solid var(--border); display: flex; flex-direction: column; background: var(--bg); } #file-sidebar { flex: 1; overflow-y: auto; } /* ── Session search (within sidebar) ── */ #session-search-wrap { border-top: 1px solid var(--border); padding: 8px 8px 10px; } #session-search-label { font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 5px; } #session-search-row { display: flex; gap: 4px; } #session-search-input { flex: 1; min-width: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 4px; color: var(--text); font-size: 0.78rem; padding: 3px 6px; } #session-search-btn { background: var(--surface); border: 1px solid var(--border); border-radius: 4px; color: var(--muted); font-size: 0.78rem; padding: 3px 8px; cursor: pointer; } #session-search-btn:hover { color: var(--accent); border-color: var(--accent); } /* ── Session search results panel ── */ #session-search-results { flex: 1; overflow-y: auto; padding: 12px 14px; font-size: 0.82rem; } .sr-header { color: var(--muted); font-size: 0.72rem; margin-bottom: 10px; } .sr-date { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--accent); margin: 14px 0 4px; } .sr-date:first-of-type { margin-top: 0; } .sr-excerpt { background: var(--surface); border-left: 2px solid var(--border); border-radius: 0 4px 4px 0; padding: 6px 10px; margin-bottom: 6px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; color: var(--text); } .sr-excerpt mark { background: rgba(139,92,246,0.25); color: var(--accent); border-radius: 2px; padding: 0 1px; } .sr-empty, .sr-error { color: var(--muted); padding: 8px 0; } .fg-header { display: flex; align-items: center; gap: 0.3rem; padding: 7px 10px 5px; font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); cursor: pointer; user-select: none; } .fg-header::before { content: '▾'; font-size: 0.7rem; transition: transform 0.15s; } .fg-header.collapsed::before { transform: rotate(-90deg); } .fg-header.collapsed + .fg-items { display: none; } .fg-items { display: flex; flex-direction: column; } .file-item { padding: 6px 10px 6px 16px; cursor: pointer; border-left: 2px solid transparent; transition: background 0.1s, border-color 0.1s; } .file-item:hover { background: var(--surface); } .file-item.active { background: var(--inara-bg); border-left-color: var(--accent); } .file-item.missing { opacity: 0.45; } .fi-name { font-size: 0.8rem; color: var(--text); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .file-item.active .fi-name { color: var(--accent); } .fi-meta { display: flex; gap: 0.5rem; margin-top: 2px; font-size: 0.68rem; color: var(--muted); } #file-modal-body { flex: 1; overflow: hidden; display: flex; flex-direction: column; } #file-editor { flex: 1; width: 100%; background: var(--bg); color: var(--text); border: none; outline: none; padding: 16px; font-family: 'Courier New', monospace; font-size: 0.85rem; line-height: 1.55; resize: none; display: block; } #file-preview { flex: 1; overflow-y: auto; padding: 16px 20px; display: none; line-height: 1.6; } #file-preview.active { display: block; } #file-editor.hidden { display: none; } /* Talk activity badge on Sessions button */ #sessions-btn.talk-badge::after { content: '●'; color: #7cb9e8; margin-left: 5px; font-size: 0.55rem; vertical-align: middle; } /* ── Context panel ───────────────────────────────────────── */ #ctx-panel { display: none; position: absolute; top: calc(100% + 4px); right: 12px; width: min(280px, calc(100vw - 24px)); background: var(--surface); border: 1px solid var(--border); border-radius: 8px; z-index: 100; box-shadow: 0 8px 24px var(--shadow); overflow: hidden; } #ctx-panel.open { display: block; } .ctx-section { padding: 10px 14px; border-bottom: 1px solid var(--border); } .ctx-section:last-child { border-bottom: none; } .ctx-section-title { font-size: 0.65rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; } .ctx-row { display: flex; gap: 6px; flex-wrap: wrap; } .ctx-btn { background: var(--bg); border: 1px solid var(--border); border-radius: 4px; color: var(--muted); font-size: 0.73rem; padding: 4px 10px; cursor: pointer; transition: color 0.15s, border-color 0.15s, background 0.15s; } .ctx-btn:hover { color: var(--text); border-color: var(--muted); } .ctx-btn.active { color: var(--accent); border-color: var(--accent); } .ctx-btn.mem-on { color: var(--success); border-color: var(--success-dim); } .ctx-btn.local-on { color: #f59e0b; border-color: #92400e; } #backend-model-hint { font-size: 0.68rem; color: #f59e0b; opacity: 0.8; margin-top: 4px; word-break: break-all; line-height: 1.3; } #ctx-distill-status { margin-top: 6px; font-size: 0.68rem; color: var(--success); min-height: 1em; opacity: 0; transition: opacity 0.3s; } #ctx-distill-status.show { opacity: 1; } #ctx-distill-status.err { color: var(--error-text); } #ctx-schedule { margin-top: 6px; font-size: 0.66rem; color: var(--muted); line-height: 1.7; font-family: 'Courier New', monospace; } /* Ctx header button — shows current tier as a dim superscript */ #ctx-open-btn .tier-badge { font-size: 0.6em; opacity: 0.7; margin-left: 2px; vertical-align: super; } /* ── Help modal ──────────────────────────────────────────── */ #help-modal { display: none; position: fixed; inset: 0; background: var(--modal-overlay); z-index: 200; align-items: center; justify-content: center; } #help-modal.open { display: flex; } #help-modal-inner { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; width: min(780px, 96vw); height: min(85vh, 860px); display: flex; flex-direction: column; overflow: hidden; } #help-modal-header { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--border); background: var(--bg); flex-shrink: 0; } #help-modal-header h2 { font-size: 0.95rem; font-weight: 600; color: var(--accent); flex: 1; margin: 0; } #help-modal-body { flex: 1; overflow-y: auto; padding: 20px 24px; line-height: 1.65; font-size: 0.92rem; } /* Markdown rendering shared by file-preview and help-modal-body */ #file-preview, #help-modal-body { color: var(--text); } #file-preview p, #help-modal-body p { margin: 0 0 0.7em; } #file-preview p:last-child, #help-modal-body p:last-child { margin-bottom: 0; } #file-preview ul, #file-preview ol, #help-modal-body ul, #help-modal-body ol { margin: 0.4em 0 0.7em 1.5em; } #file-preview li, #help-modal-body li { margin-bottom: 0.25em; } #file-preview h1, #file-preview h2, #file-preview h3, #help-modal-body h1, #help-modal-body h2, #help-modal-body h3 { margin: 1em 0 0.4em; font-weight: 600; color: var(--accent); line-height: 1.3; } #file-preview h1, #help-modal-body h1 { font-size: 1.15em; } #file-preview h2, #help-modal-body h2 { font-size: 1.05em; } #file-preview h3, #help-modal-body h3 { font-size: 0.95em; } #file-preview strong, #help-modal-body strong { color: var(--text); font-weight: 600; } #file-preview em, #help-modal-body em { color: var(--accent); font-style: italic; } #file-preview a, #help-modal-body a { color: var(--accent); text-decoration: underline; } #file-preview hr, #help-modal-body hr { border: none; border-top: 1px solid var(--border); margin: 0.9em 0; } #file-preview blockquote, #help-modal-body blockquote { border-left: 3px solid var(--border); margin: 0.5em 0; padding: 0.2em 0.8em; color: var(--muted); } #file-preview code, #help-modal-body code { font-family: 'Courier New', monospace; font-size: 0.88em; background: var(--code-bg); border: 1px solid var(--border); border-radius: 4px; padding: 0.1em 0.35em; } #file-preview pre, #help-modal-body pre { background: var(--pre-bg); border: 1px solid var(--border); border-radius: 6px; padding: 10px 12px; overflow-x: auto; margin: 0.5em 0; } #file-preview pre code, #help-modal-body pre code { background: none; border: none; padding: 0; font-size: 0.85em; } #file-preview table, #help-modal-body table { border-collapse: collapse; width: 100%; margin: 0.6em 0; font-size: 0.9em; } #file-preview th, #file-preview td, #help-modal-body th, #help-modal-body td { border: 1px solid var(--border); padding: 5px 10px; text-align: left; } #file-preview th, #help-modal-body th { background: var(--bg); color: var(--accent); font-weight: 600; } /* ── Help modal collapsible sections ────────────────────── */ #help-modal-body details { border-bottom: 1px solid var(--border); } #help-modal-body details:last-of-type { border-bottom: none; } #help-modal-body summary { cursor: pointer; padding: 10px 4px; font-size: 1.0em; font-weight: 600; color: var(--accent); display: flex; align-items: center; gap: 8px; user-select: none; list-style: none; } #help-modal-body summary::-webkit-details-marker { display: none; } #help-modal-body summary::before { content: '▶'; font-size: 0.6em; opacity: 0.55; transition: transform 0.15s; flex-shrink: 0; } #help-modal-body details[open] > summary::before { transform: rotate(90deg); } #help-modal-body summary:hover { color: var(--text); } /* Content inside a details block gets a little left indent */ #help-modal-body details > *:not(summary) { padding-left: 12px; } /* ── Auth warning banner ─────────────────────────────────── */ #auth-banner { display: none; align-items: center; gap: 10px; padding: 8px 20px; background: rgba(160, 100, 0, 0.18); border-bottom: 1px solid rgba(200, 140, 20, 0.45); font-size: 0.82rem; color: #c9a84c; } #auth-banner.show { display: flex; } #auth-banner.expired { background: rgba(120, 20, 20, 0.25); border-color: rgba(200, 60, 60, 0.45); color: var(--error-text); } #auth-banner-text { flex: 1; display: flex; flex-direction: column; gap: 2px; } #auth-banner-msg { font-weight: 500; } #auth-banner-hint { font-size: 0.76rem; opacity: 0.8; } #auth-banner-hint code { font-family: 'Courier New', monospace; background: rgba(0,0,0,0.2); border-radius: 3px; padding: 0 4px; } #auth-banner-close { background: none; border: 1px solid currentColor; border-radius: 4px; color: inherit; font-size: 0.7rem; padding: 2px 7px; cursor: pointer; opacity: 0.7; flex-shrink: 0; } #auth-banner-close:hover { opacity: 1; } /* ── Toasts ──────────────────────────────────────────────── */ #toast-container { position: fixed; bottom: 1.25rem; right: 1.25rem; display: flex; flex-direction: column; align-items: flex-end; gap: 0.4rem; z-index: 9999; pointer-events: none; } .toast { padding: 0.45rem 0.85rem; border-radius: 6px; font-size: 0.8rem; font-weight: 500; color: #fff; background: #334155; border: 1px solid #475569; box-shadow: 0 4px 12px rgba(0,0,0,0.35); opacity: 0; transform: translateY(6px); transition: opacity 0.18s ease, transform 0.18s ease; pointer-events: none; white-space: nowrap; } .toast.show { opacity: 1; transform: translateY(0); } .toast.success { background: #14532d; border-color: #16a34a; } .toast.error { background: #7f1d1d; border-color: #dc2626; } /* Sessions backdrop — hidden by default, visible only as mobile drawer overlay */ #sessions-backdrop { display: none; position: fixed; inset: 0; background: rgba(0, 0, 0, 0.5); z-index: 98; animation: backdrop-in 0.2s ease; } @keyframes backdrop-in { from { opacity: 0; } to { opacity: 1; } } /* ── Mobile responsive ───────────────────────────────────── */ @media (max-width: 520px) { header { padding: 8px 12px; gap: 8px; } header .subtitle { display: none; } .btn-label { display: none; } /* Persona dropdown: avoid clipping off left edge */ .persona-dropdown { left: 0; right: auto; min-width: 140px; } #messages { padding: 12px; } /* dvh adjusts as soft keyboard opens/closes */ body { height: 100dvh; } /* Hide session ID — saves vertical space */ #session-id { display: none; } /* * Footer on mobile: textarea on top (full width), then * mode-toggle + send-col side by side below. * flex-wrap + order:-1 achieves this without a wrapper div. */ #input-area { flex-wrap: wrap; align-items: center; padding: 8px 12px; gap: 6px; } /* Textarea floats to top row, full width */ #input { order: -1; width: 100%; flex-basis: 100%; font-size: 16px; /* prevent iOS Safari auto-zoom */ } /* Mode select: grows to fill left side of bottom row */ #mode-select { flex: 1; } #mode-select-btn { flex: 1; justify-content: center; } /* Dropdown still opens upward on mobile */ #mode-dropdown { min-width: 140px; } /* Send col: horizontal in bottom row */ #send-col { flex-direction: row; width: auto; gap: 6px; } /* Larger touch targets */ #send, #stop { padding: 12px 14px; font-size: 1rem; } /* File modal: sidebar collapses to a narrow strip */ #file-modal-inner { width: 100vw; height: 100dvh; border-radius: 0; } #file-sidebar-wrap { width: 130px; } .fi-meta { display: none; } /* Sessions backdrop active on mobile */ #sessions-backdrop.open { display: block; } /* Sessions panel → full-height drawer sliding in from the right */ #sessions-panel { display: block !important; /* keep rendered so transition works */ position: fixed; top: 0; right: 0; bottom: 0; width: min(300px, 85vw); max-height: none; height: 100%; border-radius: 0; border-top: none; border-right: none; border-bottom: none; border-left: 1px solid var(--border); transform: translateX(110%); transition: transform 0.25s ease; z-index: 99; overflow-y: auto; } #sessions-panel.open { transform: translateX(0); } } /* ── Touch devices — no hover capability ─────────────────── */ /* Always show message controls; make tap targets finger-sized */ @media (hover: none) { .msg-actions { opacity: 1; padding: 4px 2px 2px; } .msg-act-btn { font-size: 0.78rem; padding: 6px 12px; min-height: 36px; } .session-delete-btn { font-size: 1.3rem; padding: 4px 8px; min-width: 36px; min-height: 36px; } } @media (max-width: 380px) { header .name { font-size: 1rem; } .header-emoji { font-size: 1.3rem; } .hdr-btn { padding: 5px 8px; } }