/* Scheme 07 overrides its own copy of Scheme 05's mail layout. */
:root {
  --sidebar-w: 354px;
}
[hidden] {
  display: none !important;
}
button:focus-visible,
a:focus-visible,
textarea:focus-visible {
  outline: 2px solid #6366f1;
  outline-offset: 3px;
}
.thread-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
}
.thread-header h1 {
  font-size: 19px;
}
.message-toolbar,
.message-toolbar .message-actions,
.message-toolbar .gmail-header-actions {
  gap: 2px;
}
.message-toolbar .time {
  margin-right: 12px;
  color: #5e5e5e;
}
.message-toolbar .gmail-icon-btn {
  position: relative;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: #444746;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition:
    background-color 0.15s ease,
    color 0.15s ease;
}
.message-toolbar .gmail-icon-btn:hover,
.message-toolbar .mail-task-button[aria-expanded="true"] {
  background: rgba(31, 31, 31, 0.08);
  color: #1f1f1f;
}
.message-toolbar .gmail-icon-btn:active {
  background: rgba(31, 31, 31, 0.16);
  transform: none;
}
.message-toolbar .gmail-icon-btn svg {
  width: 20px;
  height: 20px;
}
.message-toolbar .gmail-icon-btn[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: -32px;
  left: 50%;
  transform: translateX(-50%);
  background: #303030;
  color: #fff;
  font-size: 11px;
  font-weight: 500;
  line-height: 16px;
  padding: 4px 8px;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.15s ease,
    transform 0.15s ease;
  pointer-events: none;
  z-index: 10;
}
.message-toolbar .gmail-icon-btn[data-tooltip]:hover::after,
.message-toolbar .gmail-icon-btn[data-tooltip]:focus-visible::after {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(2px);
}
.message-toolbar .gmail-icon-btn[data-tooltip="更多选项"]::after {
  left: auto;
  right: 0;
  transform: translateY(2px);
}
.task-icon {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.avatar.rss {
  background: #eeedff;
  color: #5a47db;
  border: 1px solid #e1ddfa;
  border-radius: 11px;
}
.avatar.rss svg {
  width: 21px;
  height: 21px;
}
.message {
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}
.message.is-selected {
  border-color: #bbb4e8;
  box-shadow: 0 0 0 1px #e4e0fb;
}
.message.located {
  animation: locate 1.8s ease;
}
.message-subject {
  font-size: 13px;
  font-weight: 600;
  color: #3e4250;
  margin: 14px 0 14px 46px;
}
.message-body {
  max-width: 900px;
}
.message-body ol {
  padding-left: 22px;
}
.message-body li {
  margin-bottom: 9px;
}
.message-body blockquote {
  border-left-color: #cec8ed;
  background: #f8f7fc;
}
.message-body a {
  color: #6250c9;
  text-underline-offset: 3px;
}
.message-foot:empty {
  display: none;
}
.sidebar {
  min-height: 0;
  overflow-y: auto;
  border-left: 1px solid #e5e5eb;
  background: #f8f9fc;
  padding: 22px 18px;
}
.task-panel-head {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  justify-content: space-between;
  margin-bottom: 20px;
}
.task-panel-head h2 {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 600;
}
.task-panel-head p {
  color: #9299a7;
  margin: 0;
  font-size: 11px;
  line-height: 1.6;
}
.side-close {
  flex-shrink: 0;
  margin: -4px -5px 0 0;
  color: #8b93a3;
}
.side-close:hover {
  background: #eeeff5;
  color: #444;
}
.delegation-card {
  background: #fff;
  border: 1px solid #e0e4eb;
  border-radius: 16px;
  padding: 22px 20px;
  box-shadow: 0 1px 3px #222c4010;
}
.delegation-section + .delegation-section {
  border-top: 1px solid #edf0f4;
  margin-top: 24px;
  padding-top: 24px;
}
.delegation-section h3 {
  margin: 0 0 16px;
  color: #98a1b1;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.03em;
}
.agent-identity {
  display: flex;
  gap: 12px;
  align-items: center;
}
.agent-identity .avatar {
  width: 36px;
  height: 36px;
}
.agent-identity strong {
  font-size: 15px;
}
.agent-identity p {
  margin: 5px 0 0;
  color: #9aa2b0;
  font-size: 12px;
}
.task-title {
  font-size: 15px;
  margin: 0 0 12px;
  font-weight: 600;
}
.task-requirements {
  list-style: none;
  padding: 0;
  margin: 0;
}
.task-requirements li {
  display: flex;
  align-items: baseline;
  gap: 9px;
  color: #626b7b;
  font-size: 14px;
  line-height: 1.9;
}
.task-requirements li::before {
  content: "·";
  color: #c8cfdb;
  font-weight: 700;
}
.status-card {
  padding: 15px;
  border: 1px solid;
  border-radius: 11px;
}
.status-card h4 {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 15px;
  margin: 0 0 11px;
}
.status-symbol {
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  color: #fff;
  font-size: 11px;
  flex-shrink: 0;
}
.status-card p {
  font-size: 13px;
  line-height: 1.8;
  margin: 0;
}
.status-card.done {
  background: #edfcf5;
  border-color: #aae8ce;
  color: #1c6654;
}
.done .status-symbol {
  background: #159b78;
}
.status-card.confirm {
  background: #fffbed;
  border-color: #f8df85;
  color: #905321;
}
.confirm .status-symbol {
  background: #d88300;
}
.status-card.processing {
  background: #f4f4ff;
  border-color: #dedffa;
  color: #6960c7;
}
.processing h4 {
  color: #3f378b;
}
.processing .status-symbol {
  width: 10px;
  height: 10px;
  background: #6249e4;
  margin: 3px;
  animation: pulse 2s ease-in-out infinite;
}
.delivery-count {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px;
}
.status-action {
  width: 100%;
  border: 1px solid #81d7b8;
  border-radius: 8px;
  background: #fff;
  color: #1c6654;
  padding: 10px 8px;
  margin-top: 15px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
}
.status-action:hover {
  filter: brightness(0.97);
}
.confirm .status-action {
  background: #d98300;
  color: #fff;
  border-color: #d98300;
}
.scope-editor {
  margin-top: 14px;
  border-top: 1px solid #f0dfac;
  padding-top: 12px;
}
.scope-editor fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}
.scope-editor legend {
  font-size: 12px;
  margin-bottom: 10px;
}
.scope-editor label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  color: #715739;
  font-size: 13px;
}
.scope-editor input {
  accent-color: #d98300;
}
.scope-error {
  margin-top: 8px !important;
  color: #b42318;
}
.scope-cancel {
  width: 100%;
  background: transparent;
  border: 0;
  color: #967144;
  font-size: 12px;
  margin-top: 12px;
  cursor: pointer;
}
.sidebar-backdrop {
  display: none;
}
.composer.show {
  display: block;
}
.composer textarea {
  width: 100%;
}
@keyframes pulse {
  50% {
    opacity: 0.45;
  }
}
@keyframes locate {
  20%,
  70% {
    box-shadow: 0 0 0 3px #c6bff2;
  }
}
@media (max-width: 900px) {
  .sidebar {
    width: min(92vw, 354px);
    z-index: 40;
    transform: none;
    background: #f8f9fc;
  }
  .sidebar-backdrop:not([hidden]) {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 39;
    border: 0;
    background: #20213445;
  }
}
@media (max-width: 640px) {
  .thread-header {
    gap: 8px;
  }
  .thread-header h1 {
    font-size: 16px;
  }
  .message-meta {
    flex-wrap: wrap;
  }
  .message-toolbar {
    width: 100%;
    height: 36px;
    margin-top: 4px;
    justify-content: flex-end;
  }
  .message-subject {
    margin-left: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
