/* ==========================================================================
   组件：消息流 / 输入区 / 附件 / 思考链 / Markdown / 弹层
   ========================================================================== */

/* ============================ 欢迎态 ============================ */
.welcome {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: clamp(var(--sp-8), 12vh, 140px) 0 var(--sp-6);
  animation: fade-up var(--dur-slow) var(--ease-spring) both;
}

.welcome-mark {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(160deg, #4aa8ff 0%, var(--blue) 55%, #0059c8 100%);
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  margin-bottom: var(--sp-5);
}

.welcome-mark .icon {
  width: 28px;
  height: 28px;
  stroke-width: 1.5;
}

.welcome h2 {
  font-size: var(--fs-title1);
  font-weight: 600;
  letter-spacing: var(--ls-title);
  margin-bottom: var(--sp-2);
}

.welcome p {
  font-size: var(--fs-subhead);
  color: var(--text-3);
  max-width: 42ch;
  line-height: 1.5;
}

.prompt-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-3);
  width: 100%;
  margin-top: var(--sp-7);
}

.prompt-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: var(--sp-3) var(--sp-4);
  text-align: left;
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  transition: transform var(--dur-base) var(--ease-spring),
    box-shadow var(--dur-base) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}

.prompt-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
  border-color: var(--hairline-strong);
}

.prompt-card:active {
  transform: translateY(0) scale(0.985);
}

.prompt-card strong {
  font-size: var(--fs-footnote);
  font-weight: 600;
  letter-spacing: -0.005em;
}

.prompt-card span {
  font-size: var(--fs-caption);
  color: var(--text-3);
  line-height: 1.4;
}

@media (max-width: 640px) {
  .prompt-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================ 日期分隔 ============================ */
.day-sep {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  color: var(--text-4);
  font-size: var(--fs-caption2);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.day-sep::before,
.day-sep::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--hairline);
}

/* ============================ 消息行 ============================ */
.row {
  display: flex;
  gap: var(--sp-3);
  animation: fade-up var(--dur-slow) var(--ease-spring) both;
}

.row[data-role='user'] {
  justify-content: flex-end;
}

.row-inner {
  min-width: 0;
  max-width: 100%;
}

.row[data-role='user'] .row-inner {
  max-width: min(76%, 560px);
}

.row[data-role='assistant'] .row-inner {
  width: 100%;
}

/* 头像 */
.avatar {
  flex: none;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: #fff;
  background: linear-gradient(160deg, #4aa8ff 0%, var(--blue) 60%, #0059c8 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
  margin-top: 1px;
}

.avatar .icon {
  width: 14px;
  height: 14px;
  stroke-width: 1.7;
}

/* 用户气泡：Apple 消息蓝，字重略降以保持轻盈 */
.bubble {
  padding: 9px 14px;
  border-radius: 20px;
  border-bottom-right-radius: 7px;
  background: var(--bubble-user);
  color: var(--bubble-user-fg);
  font-size: var(--fs-body);
  line-height: 1.42;
  letter-spacing: var(--ls-body);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  box-shadow: 0 1px 1.5px rgba(0, 0, 0, 0.12);
}

/* 助手正文：无气泡，直接排版 */
.prose {
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--text-1);
  overflow-wrap: anywhere;
}

.prose > * + * {
  margin-top: var(--sp-4);
}

.prose h2 {
  font-size: var(--fs-title3);
  font-weight: 600;
  letter-spacing: -0.014em;
  margin-top: var(--sp-6);
}

.prose h3 {
  font-size: var(--fs-subhead + 2px);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-top: var(--sp-5);
}

.prose h4 {
  font-size: var(--fs-subhead);
  font-weight: 600;
  margin-top: var(--sp-4);
}

.prose ul,
.prose ol {
  margin: 0;
  padding-left: 1.35em;
}

.prose li + li {
  margin-top: 5px;
}

.prose li::marker {
  color: var(--text-4);
}

.prose strong {
  font-weight: 600;
}

.prose em {
  font-style: italic;
}

.prose code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  padding: 0.14em 0.36em;
  border-radius: 5px;
  background: var(--surface-inset);
  border: 0.5px solid var(--hairline);
  white-space: nowrap;
}

.prose hr {
  border: 0;
  height: 1px;
  background: var(--hairline);
  margin: var(--sp-6) 0;
}

.prose blockquote {
  padding: 2px 0 2px var(--sp-4);
  border-left: 2px solid var(--hairline-strong);
  color: var(--text-2);
}

.prose a {
  font-weight: 500;
}

/* 表格：对标 apple.com 的极简表格 */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  background: var(--surface);
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-footnote + 1px);
}

.prose th,
.prose td {
  padding: 9px var(--sp-4);
  text-align: left;
  border-bottom: 1px solid var(--hairline);
  vertical-align: top;
}

.prose th {
  font-weight: 600;
  font-size: var(--fs-caption);
  letter-spacing: 0.01em;
  color: var(--text-3);
  background: var(--surface-2);
  white-space: nowrap;
}

.prose tr:last-child td {
  border-bottom: 0;
}

/* 代码块 */
.code-block {
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  background: var(--surface-2);
  overflow: hidden;
}

html[data-theme='dark'] .code-block {
  background: #131315;
}

.code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  height: 34px;
  padding: 0 var(--sp-2) 0 var(--sp-4);
  border-bottom: 1px solid var(--hairline);
  background: var(--surface);
}

.code-lang {
  font-size: var(--fs-caption2);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-4);
}

.code-copy {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 8px;
  border-radius: var(--r-xs);
  font-size: var(--fs-caption);
  color: var(--text-3);
  transition: background-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}

.code-copy:hover {
  background: var(--hover);
  color: var(--text-1);
}

.code-copy[data-copied='true'] {
  color: var(--green);
}

.code-copy .icon {
  width: 12px;
  height: 12px;
}

.code-block pre {
  margin: 0;
  padding: var(--sp-4);
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: var(--fs-footnote);
  line-height: 1.55;
  tab-size: 2;
}

.code-block code {
  background: none;
  border: 0;
  padding: 0;
  font-size: inherit;
  white-space: pre;
}

/* 语法着色（克制，仅区分结构） */
.tok-key {
  color: #9b2393;
}
.tok-str {
  color: #c41a16;
}
.tok-num {
  color: #1c00cf;
}
.tok-com {
  color: var(--text-4);
  font-style: italic;
}
.tok-fn {
  color: #3e6fbf;
}
.tok-op {
  color: #4b5563;
}

html[data-theme='dark'] .tok-key {
  color: #ff7ab2;
}
html[data-theme='dark'] .tok-str {
  color: #ff8170;
}
html[data-theme='dark'] .tok-num {
  color: #d9c97c;
}
html[data-theme='dark'] .tok-fn {
  color: #6bdfff;
}
html[data-theme='dark'] .tok-op {
  color: #9aa0a6;
}

/* ============================ 思考链 ============================ */
.thinking {
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  background: var(--surface-2);
  overflow: hidden;
}

.thinking-head {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  width: 100%;
  padding: 9px var(--sp-3) 9px var(--sp-4);
  font-size: var(--fs-footnote);
  color: var(--text-3);
  transition: background-color var(--dur-fast) var(--ease-out);
}

.thinking-head:hover {
  background: var(--hover);
}

.thinking-head .icon {
  width: 13px;
  height: 13px;
  transition: transform var(--dur-base) var(--ease-spring);
}

.thinking[data-open='true'] .thinking-chevron {
  transform: rotate(90deg);
}

.thinking-orb {
  position: relative;
  width: 13px;
  height: 13px;
  flex: none;
}

.thinking-orb i {
  position: absolute;
  inset: 0;
  border-radius: var(--r-full);
  background: var(--blue);
  animation: breathe 1.6s var(--ease-out) infinite;
}

.thinking-orb i:nth-child(2) {
  animation-delay: 0.22s;
}
.thinking-orb i:nth-child(3) {
  animation-delay: 0.44s;
}

.thinking-label {
  flex: 1;
  text-align: left;
  font-weight: 500;
  letter-spacing: var(--ls-small);
}

.thinking-time {
  font-size: var(--fs-caption2);
  color: var(--text-4);
  font-variant-numeric: tabular-nums;
}

.thinking-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--dur-base) var(--ease-spring);
}

.thinking[data-open='true'] .thinking-body {
  grid-template-rows: 1fr;
}

.thinking-body > div {
  overflow: hidden;
}

.thinking-text {
  padding: 0 var(--sp-4) var(--sp-4);
  font-size: var(--fs-footnote + 1px);
  line-height: 1.6;
  color: var(--text-3);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* ============================ 生成中：等待占位 ============================ */
.skeleton {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding-top: 3px;
}

.skeleton i {
  height: 11px;
  border-radius: var(--r-full);
  background: linear-gradient(
    90deg,
    var(--surface-inset) 25%,
    var(--hairline) 37%,
    var(--surface-inset) 63%
  );
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
}

.skeleton i:nth-child(2) {
  width: 82%;
}
.skeleton i:nth-child(3) {
  width: 58%;
}

/* 流式光标 */
.caret {
  display: inline-block;
  width: 2px;
  height: 1.05em;
  margin-left: 2px;
  vertical-align: -0.15em;
  border-radius: 1px;
  background: var(--text-3);
  animation: caret-blink 1s steps(1, end) infinite;
}

/* ============================ 消息操作条 ============================ */
.row-actions {
  display: flex;
  align-items: center;
  gap: 1px;
  margin-top: var(--sp-2);
  opacity: 0;
  transform: translateY(-2px);
  transition: opacity var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out);
}

.row:hover .row-actions,
.row:focus-within .row-actions {
  opacity: 1;
  transform: none;
}

.row[data-role='user'] .row-actions {
  justify-content: flex-end;
}

.act {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 26px;
  padding: 0 7px;
  border-radius: var(--r-xs);
  font-size: var(--fs-caption);
  color: var(--text-4);
  transition: background-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}

.act:hover {
  background: var(--hover);
  color: var(--text-1);
}

.act .icon {
  width: 13px;
  height: 13px;
}

.act[data-copied='true'] {
  color: var(--green);
}

/* ============================ 输入区 ============================ */
.composer {
  position: relative;
  border: 1px solid var(--hairline);
  border-radius: var(--r-2xl);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: border-color var(--dur-base) var(--ease-out),
    box-shadow var(--dur-base) var(--ease-out);
}

.composer:focus-within {
  border-color: color-mix(in srgb, var(--blue) 45%, var(--hairline));
  box-shadow: var(--shadow-md), 0 0 0 3.5px color-mix(in srgb, var(--blue) 16%, transparent);
}

/* 附件条 */
.attachments {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-3) 0;
}

.attachments:empty {
  display: none;
}

.chip {
  position: relative;
  width: 62px;
  height: 62px;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--surface-inset);
  border: 1px solid var(--hairline);
  animation: fade-up var(--dur-base) var(--ease-spring) both;
}

.chip img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.chip-x {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: var(--r-full);
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;
  transform: scale(0.85);
  transition: opacity var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}

.chip:hover .chip-x,
.chip:focus-within .chip-x {
  opacity: 1;
  transform: none;
}

.chip-x .icon {
  width: 10px;
  height: 10px;
  stroke-width: 2.4;
}

.chip-progress {
  position: absolute;
  inset: auto 0 0 0;
  height: 2px;
  background: var(--blue);
  transform-origin: left;
  transition: transform var(--dur-base) var(--ease-out);
}

/* 输入行 */
.composer-row {
  display: flex;
  align-items: flex-end;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-2) var(--sp-2) var(--sp-3);
}

.composer-input {
  flex: 1;
  min-width: 0;
  position: relative;
}
.composer textarea {
  display: block;
  width: 100%;
  max-height: 208px;
  min-height: 30px;
  padding: 5px 0;
  border: 0;
  outline: none;
  resize: none;
  background: none;
  font-size: var(--fs-body);
  line-height: 1.45;
  color: var(--text-1);
  overflow-y: auto;
  scrollbar-width: none;
}

.composer textarea::-webkit-scrollbar {
  display: none;
}

.composer textarea::placeholder {
  color: var(--text-4);
}

/* 发送按钮 */
.send {
  flex: none;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: var(--r-full);
  color: #fff;
  background: var(--blue);
  box-shadow: var(--shadow-xs);
  transition: background-color var(--dur-fast) var(--ease-out),
    transform var(--dur-base) var(--ease-spring), opacity var(--dur-fast) var(--ease-out);
}

.send:hover {
  background: var(--blue-hover);
}

.send:active {
  transform: scale(0.92);
}

.send[disabled] {
  background: var(--fill);
  color: var(--text-4);
  box-shadow: none;
  cursor: default;
  transform: none;
}

.send .icon {
  width: 16px;
  height: 16px;
  stroke-width: 2;
}

.send[data-busy='true'] .icon {
  animation: spin 0.9s linear infinite;
}

/* 底部提示 */
.composer-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  margin-top: var(--sp-3);
  font-size: var(--fs-caption2);
  color: var(--text-4);
}

.composer-hint kbd {
  font-family: var(--font-text);
  font-size: 10px;
  padding: 1px 4px;
  border-radius: 4px;
  border: 0.5px solid var(--hairline-strong);
  background: var(--surface);
  color: var(--text-3);
}

.composer-stop {
  display: none;
  align-items: center;
  gap: 5px;
  height: 28px;
  padding: 0 10px;
  border-radius: var(--r-full);
  font-size: var(--fs-caption);
  color: var(--text-2);
  border: 1px solid var(--hairline);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  animation: fade-up var(--dur-base) var(--ease-spring) both;
}

.composer-stop:not([hidden]) {
  display: inline-flex;
}

.composer-stop:hover {
  background: var(--hover);
  color: var(--text-1);
}

.composer-stop .icon {
  width: 11px;
  height: 11px;
  fill: currentColor;
  stroke: none;
}

/* 拖拽悬停 */
.composer[data-dragover='true'] {
  border-color: var(--blue);
  border-style: dashed;
  box-shadow: var(--shadow-md), 0 0 0 4px color-mix(in srgb, var(--blue) 14%, transparent);
}

/* 拖拽蒙层：默认必须完全不参与布局与绘制 */
.drop-veil {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  place-items: center;
  background: var(--overlay);
  -webkit-backdrop-filter: blur(var(--blur-overlay));
  backdrop-filter: blur(var(--blur-overlay));
  color: var(--text-1);
}

.drop-veil[data-active='true'] {
  display: grid;
  animation: fade-in var(--dur-base) var(--ease-out) both;
}

.drop-veil[data-active='false'] {
  display: none;
}

.drop-veil-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-8) var(--sp-9);
  border-radius: var(--r-xl);
  background: var(--overlay-card);
  border: 1px solid var(--hairline);
  box-shadow: var(--shadow-lg);
}

.drop-veil-card .icon {
  width: 34px;
  height: 34px;
  color: var(--blue);
  stroke-width: 1.3;
}

.drop-veil-card p {
  font-size: var(--fs-subhead);
  font-weight: 500;
}

/* ============================ 消息内图片 ============================ */
.msg-images {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
  margin-bottom: 6px;
}

.msg-image {
  width: 148px;
  height: 148px;
  padding: 0;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--surface-inset);
  border: 1px solid var(--hairline);
  box-shadow: var(--shadow-xs);
  transition: transform var(--dur-base) var(--ease-spring), box-shadow var(--dur-base) var(--ease-out);
}

.msg-image:hover {
  transform: scale(1.015);
  box-shadow: var(--shadow-sm);
}

.msg-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 图片查看器 */
.viewer {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: none;
  place-items: center;
  padding: var(--sp-7);
  background: var(--overlay);
  -webkit-backdrop-filter: blur(var(--blur-overlay));
  backdrop-filter: blur(var(--blur-overlay));
}

.viewer[data-open='true'] {
  display: grid;
  animation: fade-in var(--dur-base) var(--ease-out) both;
}

.viewer img {
  max-width: min(100%, 1080px);
  max-height: 100%;
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  animation: fade-up var(--dur-base) var(--ease-spring) both;
}

/* ============================ 弹层 ============================ */
.sheet-veil {
  position: fixed;
  inset: 0;
  z-index: 65;
  display: none;
  place-items: center;
  padding: var(--sp-6);
  background: var(--overlay);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.sheet-veil[data-open='true'] {
  display: grid;
  animation: fade-in var(--dur-base) var(--ease-out) both;
}

.sheet {
  width: min(100%, 460px);
  max-height: 86dvh;
  display: flex;
  flex-direction: column;
  border-radius: var(--r-xl);
  background: var(--surface);
  border: 1px solid var(--hairline);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: fade-up var(--dur-base) var(--ease-spring) both;
}

.sheet-head {
  flex: none;
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-4) var(--sp-3) var(--sp-5);
}

.sheet-head h2 {
  flex: 1;
  font-size: var(--fs-subhead);
  font-weight: 600;
}

.sheet-body {
  padding: 0 var(--sp-5) var(--sp-5);
  overflow-y: auto;
}

.sheet-foot {
  flex: none;
  display: flex;
  justify-content: flex-end;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-5) var(--sp-5);
}

.field {
  margin-top: var(--sp-4);
}

.field label {
  display: block;
  font-size: var(--fs-caption);
  font-weight: 500;
  color: var(--text-3);
  margin-bottom: 6px;
}

.field input,
.field select {
  width: 100%;
  height: 36px;
  padding: 0 var(--sp-3);
  border: 1px solid var(--hairline);
  border-radius: var(--r-sm);
  background: var(--surface-2);
  font-size: var(--fs-footnote);
  outline: none;
  transition: border-color var(--dur-fast) var(--ease-out),
    box-shadow var(--dur-fast) var(--ease-out);
}

.field input:focus,
.field select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 16%, transparent);
}

.field-note {
  margin-top: 6px;
  font-size: var(--fs-caption2);
  color: var(--text-4);
  line-height: 1.45;
}

.switch-row {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-top: var(--sp-4);
}

.switch-row > div {
  flex: 1;
}

.switch-row strong {
  display: block;
  font-size: var(--fs-footnote);
  font-weight: 500;
}

.switch-row span {
  font-size: var(--fs-caption2);
  color: var(--text-4);
}

.switch {
  position: relative;
  flex: none;
  width: 42px;
  height: 26px;
  border-radius: var(--r-full);
  background: var(--fill);
  transition: background-color var(--dur-base) var(--ease-out);
}

.switch[aria-checked='true'] {
  background: var(--green);
}

.switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 22px;
  height: 22px;
  border-radius: var(--r-full);
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2), 0 2px 6px rgba(0, 0, 0, 0.12);
  transition: transform var(--dur-base) var(--ease-spring);
}

.switch[aria-checked='true']::after {
  transform: translateX(16px);
}

/* ============================ 提示条 ============================ */
.toast-host {
  position: fixed;
  left: 50%;
  bottom: var(--sp-7);
  z-index: 80;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
  transform: translateX(-50%);
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 9px var(--sp-4);
  border-radius: var(--r-full);
  font-size: var(--fs-footnote);
  color: var(--text-1);
  background: var(--overlay-card);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--hairline);
  box-shadow: var(--shadow-md);
  animation: fade-up var(--dur-base) var(--ease-spring) both;
}

.toast[data-tone='error'] {
  color: var(--red);
}

.toast[data-tone='error'] .icon,
.toast[data-tone='ok'] .icon {
  width: 14px;
  height: 14px;
}

.toast[data-tone='ok'] {
  color: var(--green);
}

/* ============================ 错误条 ============================ */
.notice {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-md);
  border: 1px solid color-mix(in srgb, var(--red) 28%, var(--hairline));
  background: color-mix(in srgb, var(--red) 7%, transparent);
  color: var(--text-1);
  font-size: var(--fs-footnote);
  line-height: 1.5;
}

.notice .icon {
  width: 15px;
  height: 15px;
  color: var(--red);
  margin-top: 2px;
}

.notice pre {
  margin: 6px 0 0;
  font-family: var(--font-mono);
  font-size: var(--fs-caption);
  color: var(--text-3);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
