#session-selector {
    max-width: 600px;
    margin: 0 auto;
}

.session-list {
    margin: 1rem 0;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.25rem;
    margin: 1rem 0;
    flex-wrap: wrap;
}

.pagination-btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
    min-width: 2.5rem;
    cursor: pointer;
}

.pagination-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pagination-btn.active {
    font-weight: bold;
    background: var(--pico-primary-focus-background-color);
}

.pagination-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.new-session {
    display: flex;
    gap: 0.5rem;
    margin: 1rem 0;
    align-items: stretch;
}

#new-session-name {
    flex: 1;
    height: 100%;
}

.new-session button {
    height: 100%;
}

.new-session {
    display: flex;
    gap: 0.5rem;
    margin: 1rem 0;
}

#new-session-name {
    flex: 1;
}

.session-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    margin: 0.5rem 0;
    background: var(--pico-card-background-color);
    border: var(--pico-border-color);
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.session-item:hover {
    background: var(--pico-secondary-focus-background-color);
}

.session-name {
    font-weight: bold;
}

.session-info {
    color: var(--pico-muted-color);
    font-size: 0.875rem;
}

#chat-container {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 200px);
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--pico-border-color);
    margin-bottom: 1rem;
}

.messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 0;
}

.message {
    margin: 1rem 0;
    padding: 1rem;
    border-radius: 0.5rem;
    max-width: 85%;
}

.message.user {
    margin-left: auto;
    background: var(--pico-primary-focus-background-color);
    color: var(--pico-primary-color);
}

.message.assistant {
    margin-right: auto;
    background: var(--pico-card-background-color);
    border: 1px solid var(--pico-border-color);
}

/* streaming: live tokens being typed — same style as thinking */
.message.assistant.streaming {
    background: transparent;
    border: none;
    padding: 0.15rem 0.75rem;
    font-size: 0.72em;
    font-style: italic;
    opacity: 0.4;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* thinking: chain-of-thought / reasoning — italic pre style like usage */
.message.assistant.thinking {
    background: transparent;
    border: none;
    padding: 0.15rem 0.75rem;
    font-size: 0.72em;
    font-style: italic;
    opacity: 0.4;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* tool_call: tool invocation lines — monospace code-like appearance */
.message.tool-call {
    margin-right: auto;
    background: transparent;
    border: none;
    border-left: 3px solid var(--pico-primary-focus-background-color);
    padding: 0.2rem 0.75rem;
    font-size: 0.82em;
    opacity: 0.65;
    font-family: monospace;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* usage: token cost stats — tiny footer line */
.message.usage {
    margin-right: auto;
    background: transparent;
    border: none;
    padding: 0.15rem 0.75rem;
    font-size: 0.72em;
    opacity: 0.4;
    font-style: italic;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* activity / progress: ephemeral spinner */
.message.activity {
    margin-right: auto;
    background: transparent;
    border: none;
    padding: 0.25rem 0.75rem;
    font-size: 0.85em;
    opacity: 0.5;
    font-style: italic;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.message-content {
    white-space: pre-wrap;
    word-wrap: break-word;
}

.approval-panel {
    border: 2px solid var(--pico-primary-focus-background-color);
    border-radius: 0.5rem;
    padding: 1rem;
    margin: 1rem 0;
    background: var(--pico-card-background-color);
}

.approval-buttons {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.edit-panel {
    margin-top: 1rem;
}

#edit-args {
    width: 100%;
    min-height: 100px;
    font-family: monospace;
    margin-bottom: 0.5rem;
}

.input-area {
    display: flex;
    gap: 0.5rem;
    padding: 1rem 0;
    border-top: 1px solid var(--pico-border-color);
    align-items: stretch;
}

#message-input {
    flex: 1;
    resize: none;
    height: auto;
}

#send-btn {
    height: auto;
}

.hidden {
    display: none !important;
}