#main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  position: relative;
  transition: background 0.2s, outline 0.2s;
}

/* ドラッグ＆ドロップ時の枠線フィードバック */
#main.drag-over {
  background: rgba(79, 209, 197, 0.05);
  outline: 2px dashed var(--accent);
  outline-offset: -6px;
}

#log { flex: 1; overflow-y: auto; padding: 24px; }

.msg { margin-bottom: 18px; max-width: 720px; }
.msg .role {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.msg.user .role { color: var(--accent); }
.msg .content { line-height: 1.6; font-size: 14px; }
.msg.system .content { color: var(--text-muted); font-family: 'IBM Plex Mono', monospace; font-size: 12px; }

/* marked.js が出力するMarkdown要素の見た目調整 */
.msg .content :first-child { margin-top: 0; }
.msg .content :last-child { margin-bottom: 0; }
.msg .content pre {
  background: var(--panel-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  overflow-x: auto;
}
.msg .content code {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
}
.msg .content :not(pre) > code {
  background: var(--panel-alt);
  padding: 1px 5px;
  border-radius: 4px;
}
.msg .content a { color: var(--accent); }
.msg .content blockquote {
  border-left: 3px solid var(--accent-dim);
  margin: 0;
  padding-left: 12px;
  color: var(--text-muted);
}

#inputArea {
  display: flex;
  gap: 10px;
  padding: 16px 24px;
  background: var(--panel);
  border-top: 1px solid var(--border);
}
#inputArea input, #inputArea textarea { margin-bottom: 0; }
#inputArea button { flex-shrink: 0; }
#messageInput {
  max-height: 200px;
  overflow-y: auto;
  resize: none;
  line-height: 1.4;
}
