/* 灵枢智能助手 — 科技机器人主题 */
:root {
  --yc-bg-deep: #040b14;
  --yc-bg-panel: #0a1422;
  --yc-bg-card: rgba(12, 28, 48, 0.72);
  --yc-cyan: #3de8ff;
  --yc-cyan-dim: rgba(61, 232, 255, 0.45);
  --yc-blue: #1a6cff;
  --yc-purple: #7b5cff;
  --yc-text: #e8f4ff;
  --yc-text-muted: #6b8fb8;
  --yc-border: rgba(61, 232, 255, 0.18);
  --yc-glow: 0 0 20px rgba(61, 232, 255, 0.35);
  --yc-glow-strong: 0 0 28px rgba(26, 108, 255, 0.5), 0 0 48px rgba(61, 232, 255, 0.15);
}

/* —— 悬浮机器人入口 —— */
.yc-assist-fab {
  position: fixed;
  right: 16px;
  bottom: calc(76px + env(safe-area-inset-bottom, 0px));
  z-index: 900;
  width: 64px;
  height: 72px;
  border: none;
  background: transparent;
  cursor: pointer;
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}
.yc-assist-fab.visible {
  display: flex;
}

/* 与主应用桌面限宽对齐 */
@media (min-width: 768px) {
  .yc-assist-fab.visible {
    right: max(20px, calc(50% - 260px + 8px));
  }

  .yc-assist-panel {
    left: 50%;
    right: auto;
    width: min(520px, 100%);
    transform: translateX(-50%) translateY(100%);
  }

  .yc-assist-panel.open {
    transform: translateX(-50%) translateY(0);
  }
}

@media (min-width: 1200px) {
  .yc-assist-fab.visible {
    right: max(20px, calc(50% - 280px + 8px));
  }

  .yc-assist-panel {
    width: min(560px, 100%);
  }
}
.yc-assist-fab.need-login {
  opacity: 0.72;
}
.yc-assist-fab.need-login .yc-assist-fab-core {
  box-shadow: 0 0 16px rgba(61, 232, 255, 0.25);
}
.yc-assist-fab-ring {
  position: absolute;
  top: 2px;
  left: 50%;
  width: 58px;
  height: 58px;
  margin-left: -29px;
  border-radius: 50%;
  border: 1px solid var(--yc-cyan-dim);
  box-shadow: inset 0 0 12px rgba(61, 232, 255, 0.15);
  animation: yc-fab-spin 8s linear infinite;
}
.yc-assist-fab-ring::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: var(--yc-cyan);
  border-right-color: rgba(123, 92, 255, 0.6);
  opacity: 0.85;
}
@keyframes yc-fab-spin {
  to {
    transform: rotate(360deg);
  }
}
.yc-assist-fab-core {
  position: relative;
  z-index: 1;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(145deg, #0f2844 0%, #061018 100%);
  border: 1px solid var(--yc-border);
  box-shadow: var(--yc-glow-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.yc-assist-fab:hover .yc-assist-fab-core,
.yc-assist-fab:focus-visible .yc-assist-fab-core {
  transform: scale(1.05);
  box-shadow: 0 0 32px rgba(61, 232, 255, 0.55);
}
.yc-assist-fab:active .yc-assist-fab-core {
  transform: scale(0.96);
}
.yc-assist-fab-robot {
  display: block;
  width: 36px;
  height: 36px;
  filter: drop-shadow(0 0 6px rgba(61, 232, 255, 0.5));
}
.yc-assist-fab-label {
  position: relative;
  z-index: 1;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--yc-cyan);
  text-shadow: 0 0 8px rgba(61, 232, 255, 0.6);
}

/* —— 遮罩 —— */
.yc-assist-mask {
  position: fixed;
  inset: 0;
  z-index: 950;
  background: radial-gradient(ellipse at 50% 100%, rgba(26, 108, 255, 0.12) 0%, transparent 55%),
    rgba(2, 6, 12, 0.72);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.yc-assist-mask.open {
  opacity: 1;
  pointer-events: auto;
}

/* —— 主面板 —— */
.yc-assist-panel {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 960;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  background: var(--yc-bg-panel);
  border-radius: 20px 20px 0 0;
  border: 1px solid var(--yc-border);
  border-bottom: none;
  box-shadow: 0 -12px 48px rgba(0, 0, 0, 0.5), var(--yc-glow);
  transform: translateY(100%);
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  overflow: hidden;
}
.yc-assist-panel.open {
  transform: translateY(0);
}
.yc-assist-panel-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(61, 232, 255, 0.06) 0%, transparent 28%),
    linear-gradient(135deg, rgba(123, 92, 255, 0.04) 0%, transparent 40%),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 24px,
      rgba(61, 232, 255, 0.03) 24px,
      rgba(61, 232, 255, 0.03) 25px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 24px,
      rgba(61, 232, 255, 0.03) 24px,
      rgba(61, 232, 255, 0.03) 25px
    );
  opacity: 0.7;
}
.yc-assist-scanline {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  top: 0;
  background: linear-gradient(90deg, transparent, var(--yc-cyan), transparent);
  opacity: 0.35;
  animation: yc-scan 4s ease-in-out infinite;
  pointer-events: none;
}
@keyframes yc-scan {
  0%,
  100% {
    top: 0;
    opacity: 0.2;
  }
  50% {
    top: 120px;
    opacity: 0.5;
  }
}

/* —— 顶栏 + 机器人 —— */
.yc-assist-head {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 14px 10px;
  border-bottom: 1px solid var(--yc-border);
  flex-shrink: 0;
  background: linear-gradient(180deg, rgba(15, 40, 68, 0.5) 0%, transparent 100%);
}
.yc-assist-hero {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.yc-assist-avatar-wrap {
  position: relative;
  flex-shrink: 0;
  width: 56px;
  height: 56px;
}
.yc-assist-avatar-pulse {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid var(--yc-cyan-dim);
  animation: yc-pulse 2.2s ease-out infinite;
}
@keyframes yc-pulse {
  0% {
    transform: scale(0.92);
    opacity: 0.8;
  }
  70% {
    transform: scale(1.12);
    opacity: 0;
  }
  100% {
    transform: scale(1.12);
    opacity: 0;
  }
}
.yc-assist-avatar {
  position: relative;
  z-index: 1;
  display: block;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(145deg, #0d2238, #061018);
  border: 1px solid var(--yc-border);
  box-shadow: var(--yc-glow);
  padding: 4px;
  box-sizing: border-box;
}
.yc-assist-msg-avatar svg {
  width: 100%;
  height: 100%;
  display: block;
  filter: drop-shadow(0 0 4px rgba(61, 232, 255, 0.4));
}
.yc-assist-status {
  position: absolute;
  right: -2px;
  bottom: -2px;
  z-index: 2;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 6px;
  background: linear-gradient(135deg, #0d8844, #06c755);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 0 8px rgba(6, 199, 85, 0.5);
  letter-spacing: 0.02em;
}
.yc-assist-hero-text {
  min-width: 0;
}
.yc-assist-head h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: var(--yc-text);
  letter-spacing: 0.04em;
}
.yc-assist-title-accent {
  background: linear-gradient(90deg, var(--yc-cyan), var(--yc-blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 800;
}
.yc-assist-head .sub {
  display: block;
  font-size: 11px;
  color: var(--yc-text-muted);
  font-weight: 400;
  margin-top: 3px;
  letter-spacing: 0.02em;
}
.yc-assist-close {
  flex-shrink: 0;
  border: 1px solid var(--yc-border);
  background: rgba(0, 0, 0, 0.35);
  color: var(--yc-cyan);
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
}
.yc-assist-close:hover {
  background: rgba(61, 232, 255, 0.12);
  box-shadow: var(--yc-glow);
}

/* —— 标签 —— */
.yc-assist-tabs {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 8px;
  padding: 10px 14px;
  flex-shrink: 0;
}
.yc-assist-tab {
  flex: 1;
  border: 1px solid var(--yc-border);
  background: rgba(0, 0, 0, 0.25);
  color: var(--yc-text-muted);
  font-size: 13px;
  padding: 9px 10px;
  cursor: pointer;
  border-radius: 10px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.yc-tab-ico {
  font-size: 10px;
  opacity: 0.7;
}
.yc-assist-tab.hidden {
  display: none;
}

.yc-assist-tab.active {
  color: var(--yc-text);
  border-color: rgba(61, 232, 255, 0.45);
  background: linear-gradient(135deg, rgba(26, 108, 255, 0.25) 0%, rgba(61, 232, 255, 0.08) 100%);
  box-shadow: inset 0 0 20px rgba(61, 232, 255, 0.08), 0 0 16px rgba(26, 108, 255, 0.2);
  font-weight: 600;
}
.yc-assist-tab.active .yc-tab-ico {
  color: var(--yc-cyan);
  opacity: 1;
}

.yc-assist-pane {
  position: relative;
  z-index: 2;
  display: none;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
.yc-assist-pane.active {
  display: flex;
}
.yc-assist-panel .yc-assist-pane.active .yc-assist-msgs {
  max-height: calc(92vh - 240px);
}

/* —— 对话区 —— */
.yc-assist-msgs {
  flex: 1;
  overflow-y: auto;
  padding: 12px 14px;
  min-height: 160px;
  -webkit-overflow-scrolling: touch;
}
.yc-assist-msg {
  margin-bottom: 14px;
  display: flex;
  gap: 8px;
  max-width: 94%;
}
.yc-assist-msg.user {
  flex-direction: row-reverse;
  margin-left: auto;
}
.yc-assist-msg.assistant,
.yc-assist-msg.system {
  align-self: flex-start;
}
.yc-assist-msg-avatar {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: linear-gradient(145deg, #0f2844, #061018);
  border: 1px solid var(--yc-border);
  padding: 3px;
  box-sizing: border-box;
  box-shadow: 0 0 10px rgba(61, 232, 255, 0.2);
}
.yc-assist-msg.user .yc-assist-msg-avatar {
  display: none;
}
.yc-assist-bubble-wrap {
  flex: 1;
  min-width: 0;
}
.yc-assist-bubble {
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}
.yc-assist-msg.user .yc-assist-bubble {
  background: linear-gradient(135deg, rgba(26, 108, 255, 0.9) 0%, rgba(61, 232, 255, 0.35) 100%);
  color: #fff;
  border: 1px solid rgba(61, 232, 255, 0.35);
  border-bottom-right-radius: 4px;
  box-shadow: 0 4px 16px rgba(26, 108, 255, 0.25);
}
.yc-assist-msg.assistant .yc-assist-bubble {
  background: var(--yc-bg-card);
  color: var(--yc-text);
  border: 1px solid var(--yc-border);
  border-bottom-left-radius: 4px;
  backdrop-filter: blur(8px);
}

/* AI 回复富文本排版 */
.yc-assist-rich {
  white-space: normal;
}
.yc-assist-rich .yc-md-h {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--yc-cyan);
  letter-spacing: 0.02em;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(61, 232, 255, 0.15);
}
.yc-assist-rich .yc-md-p {
  margin: 0 0 8px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--yc-text);
}
.yc-assist-rich .yc-md-p:last-child {
  margin-bottom: 0;
}
.yc-assist-rich .yc-md-ol > li .yc-md-sub {
  margin: 6px 0 0;
  padding: 6px 10px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--yc-text-muted);
  background: rgba(0, 0, 0, 0.22);
  border-left: 2px solid var(--yc-cyan-dim);
  border-radius: 0 8px 8px 0;
}
.yc-assist-rich .yc-md-ol > li .yc-md-sub + .yc-md-sub {
  margin-top: 4px;
}
.yc-assist-rich > .yc-md-sub,
.yc-assist-rich .yc-md-p + .yc-md-sub {
  margin: -4px 0 10px 12px;
  padding: 6px 10px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--yc-text-muted);
  background: rgba(0, 0, 0, 0.2);
  border-left: 2px solid var(--yc-cyan-dim);
  border-radius: 0 8px 8px 0;
}
.yc-assist-rich .yc-md-ol,
.yc-assist-rich .yc-md-ul {
  margin: 0 0 10px;
  padding: 0 0 0 4px;
  list-style: none;
}
.yc-assist-rich .yc-md-ol {
  counter-reset: yc-md;
}
.yc-assist-rich .yc-md-ol > li {
  position: relative;
  margin-bottom: 10px;
  padding-left: 28px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--yc-text);
}
.yc-assist-rich .yc-md-ol > li::before {
  counter-increment: yc-md;
  content: counter(yc-md);
  position: absolute;
  left: 0;
  top: 1px;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: linear-gradient(135deg, rgba(26, 108, 255, 0.5), rgba(61, 232, 255, 0.25));
  border: 1px solid var(--yc-border);
  font-size: 11px;
  font-weight: 700;
  color: var(--yc-cyan);
  text-align: center;
  line-height: 18px;
}
.yc-assist-rich .yc-md-ol--cn > li::before {
  content: '•';
  font-size: 14px;
}
.yc-assist-rich .yc-md-li-title {
  font-weight: 600;
  color: #fff;
}
.yc-assist-rich .yc-md-ul > li {
  position: relative;
  margin-bottom: 6px;
  padding-left: 14px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--yc-text-muted);
}
.yc-assist-rich .yc-md-ul > li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--yc-cyan);
  box-shadow: 0 0 6px var(--yc-cyan);
}
.yc-assist-rich strong {
  font-weight: 600;
  color: #fff;
}

/* Markdown 表格 → 真表格 */
.yc-md-table-wrap {
  margin: 8px 0 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 10px;
  border: 1px solid var(--yc-border);
  background: rgba(0, 0, 0, 0.25);
  box-shadow: inset 0 0 24px rgba(61, 232, 255, 0.04);
}
.yc-md-table {
  width: 100%;
  min-width: 280px;
  border-collapse: collapse;
  font-size: 12px;
  table-layout: fixed;
}
.yc-md-table th {
  padding: 9px 8px;
  text-align: left;
  font-weight: 600;
  color: var(--yc-cyan);
  background: linear-gradient(180deg, rgba(26, 108, 255, 0.28) 0%, rgba(26, 108, 255, 0.12) 100%);
  border-bottom: 1px solid var(--yc-border);
  white-space: nowrap;
  word-break: keep-all;
}
.yc-md-table td {
  padding: 9px 8px;
  color: var(--yc-text);
  line-height: 1.45;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  vertical-align: top;
  word-break: break-word;
}
.yc-md-table tbody tr:last-child td {
  border-bottom: none;
}
.yc-md-table tbody tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.03);
}
.yc-md-table th:nth-child(1),
.yc-md-table td:nth-child(1) {
  width: 18%;
}
.yc-md-table th:nth-child(4),
.yc-md-table td:nth-child(4) {
  width: 22%;
  white-space: nowrap;
}
.yc-md-hr {
  border: none;
  height: 1px;
  margin: 10px 0;
  background: linear-gradient(90deg, transparent, var(--yc-cyan-dim), transparent);
}
.yc-assist-msg.assistant .yc-assist-bubble-wrap {
  max-width: 100%;
}
.yc-assist-msg.assistant {
  max-width: 98%;
}

/* 人工客服 */
.yc-support-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 10px 14px 12px;
}
.yc-support-top {
  flex-shrink: 0;
  margin-bottom: 8px;
}
.yc-support-status {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--yc-text-muted);
}
.yc-support-status--waiting {
  background: rgba(255, 160, 50, 0.15);
  color: #ffc46e;
}
.yc-support-status--active {
  background: rgba(6, 199, 85, 0.15);
  color: #5ee89a;
}
.yc-support-status--closed {
  background: rgba(255, 255, 255, 0.06);
  color: var(--yc-text-muted);
}
.yc-support-idle {
  text-align: center;
  padding: 24px 12px;
}
.yc-support-idle.hidden {
  display: none;
}
.yc-support-idle-t {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--yc-text);
}
.yc-support-idle-d {
  margin: 0 0 16px;
  font-size: 12px;
  line-height: 1.55;
  color: var(--yc-text-muted);
}
.yc-support-connect-btn {
  border: 1px solid rgba(61, 232, 255, 0.5);
  background: linear-gradient(135deg, rgba(26, 108, 255, 0.45), rgba(61, 232, 255, 0.15));
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  padding: 12px 28px;
  border-radius: 24px;
  cursor: pointer;
  box-shadow: var(--yc-glow);
}
.yc-support-msgs {
  flex: 1;
  overflow-y: auto;
  min-height: 120px;
  max-height: calc(92vh - 280px);
  -webkit-overflow-scrolling: touch;
}
.yc-support-msg {
  margin-bottom: 10px;
  display: flex;
}
.yc-support-msg.user {
  justify-content: flex-end;
}
.yc-support-msg.admin {
  justify-content: flex-start;
}
.yc-support-msg.system {
  justify-content: center;
}
.yc-support-bubble {
  max-width: 88%;
  padding: 9px 12px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.5;
}
.yc-support-msg.user .yc-support-bubble {
  background: linear-gradient(135deg, rgba(26, 108, 255, 0.85), rgba(61, 232, 255, 0.35));
  color: #fff;
  border-bottom-right-radius: 4px;
}
.yc-support-msg.admin .yc-support-bubble,
.yc-support-bubble.from-admin {
  background: linear-gradient(135deg, rgba(12, 40, 72, 0.95), rgba(26, 108, 255, 0.35));
  border: 1px solid rgba(61, 232, 255, 0.45);
  color: #e8f4ff;
  border-bottom-left-radius: 4px;
  box-shadow: 0 2px 12px rgba(26, 108, 255, 0.2);
}
.yc-support-text {
  word-break: break-word;
}
.yc-support-msg.system .yc-support-bubble {
  background: transparent;
  color: var(--yc-text-muted);
  font-size: 12px;
  text-align: center;
  max-width: 100%;
}
.yc-support-bubble.system {
  border: 1px dashed var(--yc-border);
  border-radius: 10px;
}
.yc-support-who {
  font-size: 10px;
  color: var(--yc-cyan);
  margin-bottom: 4px;
}
.yc-support-foot {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  padding-top: 8px;
  border-top: 1px solid var(--yc-border);
  flex-shrink: 0;
}
.yc-support-foot.hidden {
  display: none;
}
.yc-support-input {
  flex: 1;
  min-height: 40px;
  border: 1px solid var(--yc-border);
  border-radius: 10px;
  background: rgba(4, 12, 22, 0.85);
  color: var(--yc-text);
  padding: 8px 12px;
  font-size: 14px;
  resize: none;
  font-family: inherit;
}
.yc-support-send {
  flex-shrink: 0;
  height: 40px;
  padding: 0 16px;
  border: none;
  border-radius: 10px;
  background: var(--yc-blue);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}
.yc-support-err {
  color: #ffb8b8;
  font-size: 13px;
  text-align: center;
}
.yc-assist-msg.system {
  max-width: 100%;
  justify-content: center;
}
.yc-assist-msg.system .yc-assist-msg-avatar {
  display: none;
}
.yc-assist-msg.system .yc-assist-bubble {
  background: rgba(61, 232, 255, 0.06);
  border: 1px dashed var(--yc-border);
  color: var(--yc-text-muted);
  font-size: 12px;
  text-align: center;
  border-radius: 12px;
}
.yc-assist-msg.error .yc-assist-bubble {
  background: rgba(255, 80, 80, 0.12);
  border: 1px solid rgba(255, 120, 120, 0.35);
  color: #ffb8b8;
}

.yc-assist-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 14px 8px;
  flex-shrink: 0;
}
.yc-assist-chip {
  border: 1px solid var(--yc-border);
  background: rgba(61, 232, 255, 0.06);
  color: var(--yc-cyan);
  font-size: 12px;
  padding: 7px 12px;
  border-radius: 20px;
  cursor: pointer;
  text-align: left;
  max-width: 100%;
  transition: background 0.15s, box-shadow 0.15s;
}
.yc-assist-chip:active {
  background: rgba(61, 232, 255, 0.18);
  box-shadow: var(--yc-glow);
}

.yc-assist-foot {
  display: flex;
  gap: 8px;
  padding: 10px 14px 8px;
  border-top: 1px solid var(--yc-border);
  flex-shrink: 0;
  align-items: flex-end;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.35) 0%, transparent 100%);
}
.yc-assist-input {
  flex: 1;
  min-height: 42px;
  max-height: 100px;
  resize: none;
  border: 1px solid var(--yc-border);
  border-radius: 12px;
  background: rgba(4, 12, 22, 0.8);
  color: var(--yc-text);
  font-size: 15px;
  padding: 10px 14px;
  line-height: 1.4;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.yc-assist-input::placeholder {
  color: var(--yc-text-muted);
}
.yc-assist-input:focus {
  outline: none;
  border-color: var(--yc-cyan);
  box-shadow: 0 0 0 2px rgba(61, 232, 255, 0.15), var(--yc-glow);
}
.yc-assist-send {
  flex-shrink: 0;
  height: 42px;
  padding: 0 18px;
  border: 1px solid rgba(61, 232, 255, 0.4);
  border-radius: 12px;
  background: linear-gradient(135deg, var(--yc-blue) 0%, #0d4d9e 100%);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(26, 108, 255, 0.35);
  transition: transform 0.15s, box-shadow 0.15s;
}
.yc-assist-send:active:not(:disabled) {
  transform: scale(0.97);
}
.yc-assist-send:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}
.yc-assist-typing {
  font-size: 12px;
  color: var(--yc-cyan);
  padding: 0 14px 6px 54px;
  min-height: 18px;
  letter-spacing: 0.05em;
}
.yc-assist-typing.is-active::after {
  content: ' ···';
  animation: yc-blink 0.9s ease-in-out infinite;
}
@keyframes yc-blink {
  0%,
  100% {
    opacity: 0.25;
  }
  50% {
    opacity: 1;
  }
}
.yc-assist-foot-actions {
  text-align: center;
  padding: 0 14px 12px;
  position: relative;
  z-index: 2;
}
.yc-assist-foot-actions button {
  background: none;
  border: none;
  color: var(--yc-text-muted);
  font-size: 12px;
  cursor: pointer;
  letter-spacing: 0.04em;
}
.yc-assist-foot-actions button:hover {
  color: var(--yc-cyan);
}

/* —— 价格计算器 —— */
.yc-assist-calc {
  flex: 1;
  overflow-y: auto;
  padding: 10px 14px 14px;
  -webkit-overflow-scrolling: touch;
}
.yc-calc-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--yc-cyan);
  margin-bottom: 6px;
}
.yc-calc-select {
  width: 100%;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px solid var(--yc-border);
  background: rgba(4, 12, 22, 0.85);
  color: var(--yc-text);
  font-size: 14px;
  margin-bottom: 10px;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.2);
}
.yc-calc-meta {
  font-size: 12px;
  line-height: 1.55;
  color: var(--yc-text-muted);
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  border-left: 3px solid var(--yc-cyan);
  background: rgba(61, 232, 255, 0.05);
}
.yc-calc-section {
  margin-bottom: 14px;
}
.yc-calc-section-h {
  font-size: 13px;
  font-weight: 600;
  color: var(--yc-text);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}
.yc-calc-section-h .muted {
  font-weight: 400;
  color: var(--yc-text-muted);
  font-size: 11px;
}
.yc-calc-link {
  border: none;
  background: none;
  color: var(--yc-cyan);
  font-size: 12px;
  margin-left: 8px;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.yc-calc-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.yc-calc-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 11px 12px;
  border-radius: 12px;
  background: var(--yc-bg-card);
  border: 1px solid var(--yc-border);
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.yc-calc-item:hover {
  border-color: rgba(61, 232, 255, 0.35);
}
.yc-calc-item:has(input:checked) {
  border-color: rgba(61, 232, 255, 0.5);
  box-shadow: inset 0 0 24px rgba(61, 232, 255, 0.06);
}
.yc-calc-item.locked {
  border-color: rgba(26, 108, 255, 0.25);
}
.yc-calc-item input {
  margin-top: 3px;
  flex-shrink: 0;
  accent-color: var(--yc-cyan);
}
.yc-calc-item-title {
  font-size: 14px;
  color: var(--yc-text);
  line-height: 1.35;
}
.yc-calc-item-sub {
  font-size: 11px;
  color: var(--yc-text-muted);
  margin-top: 4px;
  line-height: 1.4;
}
.yc-calc-total-box {
  background: linear-gradient(135deg, rgba(26, 108, 255, 0.2) 0%, rgba(61, 232, 255, 0.08) 100%);
  border: 1px solid rgba(61, 232, 255, 0.35);
  border-radius: 14px;
  padding: 14px;
  margin-top: 8px;
  box-shadow: var(--yc-glow);
}
.yc-calc-total-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 14px;
  color: var(--yc-text-muted);
}
.yc-calc-total-row strong {
  font-size: 26px;
  font-weight: 800;
  background: linear-gradient(90deg, #fff, var(--yc-cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: -0.02em;
}
.yc-calc-hint {
  font-size: 11px;
  color: var(--yc-text-muted);
  margin: 10px 0 0;
  line-height: 1.45;
}
.yc-calc-breakdown {
  font-size: 11px;
  color: var(--yc-text-muted);
  margin-top: 10px;
  line-height: 1.5;
  max-height: 120px;
  overflow-y: auto;
}
.yc-calc-skipped-h {
  margin-top: 6px;
  color: var(--yc-cyan-dim);
}
.yc-calc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.yc-calc-btn {
  flex: 1;
  min-width: 90px;
  padding: 11px 12px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--yc-border);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}
.yc-calc-btn.primary {
  background: linear-gradient(135deg, var(--yc-blue), #0a4080);
  color: #fff;
  border-color: rgba(61, 232, 255, 0.4);
  box-shadow: 0 4px 20px rgba(26, 108, 255, 0.35);
}
.yc-calc-btn.secondary {
  background: rgba(0, 0, 0, 0.35);
  color: var(--yc-cyan);
}
.yc-calc-btn:active {
  transform: scale(0.98);
}
.yc-calc-err {
  color: #ff9e9e;
  font-size: 13px;
}

/* 工作记录草稿确认卡片 */
.yc-assist-bubble-wrap .yc-assist-draft-card,
.yc-assist-draft-standalone .yc-assist-draft-card {
  margin: 12px 0 0;
  max-width: 100%;
  width: 100%;
}
.yc-assist-draft-card {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(61, 232, 255, 0.35);
  background: rgba(8, 28, 48, 0.85);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  box-sizing: border-box;
}
.yc-assist-msg.assistant.has-draft .yc-assist-bubble {
  padding-bottom: 8px;
}
.yc-assist-msg.assistant.has-draft .yc-assist-bubble-wrap {
  flex: 1;
  min-width: 0;
  width: 100%;
}
.yc-assist-draft-card.is-submitted {
  border-color: rgba(80, 220, 140, 0.45);
  opacity: 0.92;
}
.yc-assist-draft-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--yc-cyan);
  margin-bottom: 10px;
}
.yc-assist-draft-fields {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.yc-assist-draft-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
}
.yc-assist-draft-field span {
  color: rgba(200, 230, 255, 0.75);
}
.yc-assist-draft-field textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(61, 232, 255, 0.25);
  background: rgba(0, 0, 0, 0.35);
  color: #e8f4ff;
  font-size: 13px;
  line-height: 1.45;
  resize: vertical;
  min-height: 44px;
}
.yc-assist-draft-field textarea:read-only {
  opacity: 0.85;
}
.yc-assist-draft-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}
.yc-assist-draft-btn {
  padding: 9px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--yc-border);
  cursor: pointer;
  background: rgba(0, 0, 0, 0.35);
  color: var(--yc-cyan);
}
.yc-assist-draft-btn.primary {
  background: linear-gradient(135deg, var(--yc-blue), #0a4080);
  color: #fff;
  border-color: rgba(61, 232, 255, 0.45);
}
.yc-assist-draft-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.yc-assist-draft-hint {
  font-size: 11px;
  color: rgba(180, 210, 230, 0.65);
}
.yc-assist-draft-ok {
  margin-top: 8px;
  font-size: 12px;
  color: #7dffb0;
}

.yc-assist-orphan-drafts {
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px dashed rgba(61, 232, 255, 0.2);
}
.yc-assist-orphan-drafts-head {
  font-size: 12px;
  color: rgba(140, 220, 255, 0.85);
  margin-bottom: 10px;
  padding: 0 4px;
  line-height: 1.5;
}
.yc-assist-draft-standalone {
  width: 100%;
  margin-bottom: 10px;
}

.yc-assist-chips.is-collapsed {
  display: none;
}

@media (max-width: 480px) {
  .yc-assist-msgs {
    padding: 10px 12px 14px;
  }
  .yc-assist-msg.assistant,
  .yc-assist-msg.assistant.has-draft {
    max-width: 100%;
    width: 100%;
  }
  .yc-assist-msg-avatar {
    width: 28px;
    height: 28px;
  }
  .yc-assist-draft-card {
    padding: 14px 12px;
    border-radius: 14px;
  }
  .yc-assist-draft-title {
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 12px;
  }
  .yc-assist-draft-fields {
    gap: 10px;
  }
  .yc-assist-draft-field textarea {
    font-size: 14px;
    min-height: 48px;
    padding: 10px 12px;
  }
  .yc-assist-draft-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    margin-top: 14px;
  }
  .yc-assist-draft-btn.primary {
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
  }
  .yc-assist-draft-hint {
    text-align: center;
    line-height: 1.45;
  }
  .yc-assist-chips {
    padding: 0 12px 10px;
    gap: 6px;
  }
  .yc-assist-chip {
    font-size: 11px;
    padding: 6px 10px;
    line-height: 1.35;
  }
  .yc-assist-panel .yc-assist-pane.active .yc-assist-msgs {
    max-height: calc(92vh - 200px);
  }
}

.hidden {
  display: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .yc-assist-fab-ring,
  .yc-assist-fab-ring::before,
  .yc-assist-avatar-pulse,
  .yc-assist-scanline {
    animation: none;
  }
}
