@layer views {


.agent-toggle-button {
  position: relative;
  width: var(--hit-target);
  height: var(--hit-target);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: color-mix(in oklch, var(--surface) 90%, transparent);
  color: var(--ink);
  cursor: pointer;
  z-index: 55;
}

.agent-toggle-button::before,
.agent-toggle-button::after {
  content: "";
  position: absolute;
  border: 2px solid currentColor;
}

.agent-toggle-button::before {
  inset: 10px 9px 12px;
  border-radius: 9px 9px 9px 3px;
}

.agent-toggle-button::after {
  width: 6px;
  height: 6px;
  left: 14px;
  bottom: 8px;
  border-top: 0;
  border-right: 0;
  transform: rotate(-25deg);
}

.agent-toggle-button.active,
.agent-toggle-button:hover {
  background: var(--primary-soft);
  color: var(--primary-text);
  border-color: color-mix(in oklch, var(--primary) 28%, var(--line));
}

.agent-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.agent-head h2 {
  margin: 4px 0 0;
  font-size: 22px;
  line-height: 28px;
}

.agent-head-actions {
  display: flex;
  gap: 7px;
  position: relative;
}

.agent-icon-button {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  position: relative;
}

.agent-icon-button:hover {
  background: var(--primary-soft);
  color: var(--primary-text);
}

.agent-icon-button.history::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.agent-icon-button.history::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 6px;
  left: 16px;
  top: 11px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
}

.agent-icon-button.add::before,
.agent-icon-button.add::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 14px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transform: translate(-50%, -50%);
}

.agent-icon-button.add::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.agent-session-menu {
  position: absolute;
  top: 42px;
  right: 0;
  z-index: 60;
  width: 230px;
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: color-mix(in oklch, var(--surface) 98%, white);
  box-shadow: var(--shadow-paper);
  padding: 8px;
}

.agent-session-menu button {
  min-height: 46px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  padding: 8px 10px;
  cursor: pointer;
}

.agent-session-menu button.active,
.agent-session-menu button:hover {
  background: var(--primary-soft);
  color: var(--primary-text);
}

.agent-session-menu b,
.agent-session-menu span {
  display: block;
}

.agent-session-menu span {
  color: var(--muted);
  font-size: 11px;
  margin-top: 2px;
}

.agent-message {
  position: relative;
  max-width: 92%;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: color-mix(in oklch, var(--surface) 94%, white);
  padding: 12px 38px 12px 14px;
}

.agent-message.user {
  justify-self: end;
  background: color-mix(in oklch, var(--primary-soft) 78%, var(--surface));
  color: var(--primary-text);
}

.agent-message p {
  margin: 0;
  font-size: 13px;
  line-height: 22px;
}

.agent-message-actions {
  position: absolute;
  right: 8px;
  bottom: 8px;
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity var(--motion-fast) var(--ease-out);
}

.agent-message:hover .agent-message-actions {
  opacity: 1;
}

.agent-copy,
.agent-regen {
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 8px;
  background: color-mix(in oklch, var(--surface) 80%, transparent);
  color: var(--muted);
  cursor: pointer;
  position: relative;
}

.agent-copy::before {
  content: "";
  position: absolute;
  inset: 6px 7px 7px 6px;
  border: 1.8px solid currentColor;
  border-radius: 3px;
  box-shadow: 3px -3px 0 -1px var(--surface), 3px -3px 0 0 currentColor;
}

.agent-regen::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 2px solid currentColor;
  border-left-color: transparent;
  border-radius: 50%;
}

/* ===== 2026-06-06: AI 输入框左侧添加按钮补齐图标 ===== */
#agentAddMenuBtn {
  position: relative;
  display: grid;
  place-items: center;
  color: var(--muted);
}

#agentAddMenuBtn::before,
#agentAddMenuBtn::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 16px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transform: translate(-50%, -50%);
}

#agentAddMenuBtn::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

#agentAddMenuBtn:hover,
#agentAddMenuBtn:focus-visible {
  color: var(--primary-text);
  background: var(--primary-soft);
  border-color: color-mix(in oklch, var(--primary) 28%, var(--line));
}@media (max-width: 900px) {

  .agent-head h2 {
    font-size: 18px;
    line-height: 24px;
  }}
}
