/**
 * SOHO AI 找灵感 —— 前台样式
 * 设计原则：只用 .soa- 前缀的类名，不改主题任何样式；颜色跟随设置里的品牌色。
 */

:root {
  --soa-accent: #3182CE;
  --soa-ink: #1f2733;
  --soa-muted: #8a94a6;
  --soa-line: #e6e9ef;
  --soa-bg: #f7f9fc;
}

/* ============ 导航栏图标（34px 圆形字标） ============ */
.soa-nav-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: var(--soa-accent);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .5px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 10px;
  vertical-align: middle;
  position: relative;
  line-height: 1;
  font-family: inherit;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .14);
  transition: transform .15s ease, box-shadow .15s ease;
  padding: 0;
}
.soa-nav-btn:hover {
  transform: translateY(-1px) scale(1.05);
  box-shadow: 0 3px 10px rgba(0, 0, 0, .2);
}
.soa-nav-btn:focus-visible {
  outline: 2px solid var(--soa-accent);
  outline-offset: 2px;
}

/* 右下角悬浮形态 */
.soa-float-btn {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 99998;
  width: 52px;
  height: 52px;
  font-size: 17px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .22);
}

/* 首次访问的小橙点提示 */
.soa-dot {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ED8936;
  border: 2px solid #fff;
  box-sizing: content-box;
}

/* 短代码/自定义 HTML 放出来的行内按钮 */
.soa-inline-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--soa-accent);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 9px 18px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.soa-inline-trigger:hover { filter: brightness(1.07); }

/* ============ 遮罩 + 居中大面板 ============ */
.soa-mask {
  position: fixed;
  inset: 0;
  background: rgba(15, 22, 33, .46);
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow: auto;
}
.soa-mask.on { display: flex; }

.soa-panel {
  width: 70vw;
  max-width: 880px;
  height: 640px;
  max-height: 88vh;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .3);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: var(--soa-ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  font-size: 14px;
  line-height: 1.6;
  text-align: left;
}

/* 头部 */
.soa-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--soa-line);
  background: #fff;
  flex: none;
}
.soa-head .soa-badge-ai {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--soa-accent);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.soa-head .soa-ttl { flex: 1; min-width: 0; }
.soa-head .soa-ttl b { display: block; font-size: 16px; font-weight: 700; }
.soa-head .soa-ttl span { display: block; font-size: 12.5px; color: var(--soa-muted); }
.soa-close {
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--soa-muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.soa-close:hover { background: #f1f3f7; color: var(--soa-ink); }

/* 主体滚动区 */
.soa-body {
  flex: 1;
  overflow-y: auto;
  padding: 18px 20px 8px;
  background: var(--soa-bg);
  -webkit-overflow-scrolling: touch;
}

/* 欢迎区 */
.soa-hero { padding: 6px 0 2px; }
.soa-hero p {
  margin: 0 0 10px;
  font-size: 13.5px;
  color: #4a5568;
}
.soa-examples { display: flex; flex-wrap: wrap; gap: 8px; }
.soa-ex {
  background: #fff;
  border: 1px solid var(--soa-line);
  border-radius: 999px;
  padding: 6px 13px;
  font-size: 12.5px;
  color: #4a5568;
  cursor: pointer;
  font-family: inherit;
}
.soa-ex:hover { border-color: var(--soa-accent); color: var(--soa-accent); }

/* 对话气泡 */
.soa-me {
  margin: 4px 0 12px auto;
  max-width: 82%;
  width: fit-content;
  background: var(--soa-accent);
  color: #fff;
  padding: 9px 14px;
  border-radius: 12px 12px 3px 12px;
  font-size: 13.5px;
  word-break: break-word;
}
.soa-status { color: var(--soa-muted); font-size: 13px; padding: 4px 2px 10px; }

/* 「AI 听懂了什么」条 */
.soa-understand {
  background: #fff;
  border: 1px solid var(--soa-line);
  border-left: 3px solid var(--soa-accent);
  border-radius: 0 10px 10px 0;
  padding: 10px 14px;
  margin-bottom: 14px;
  font-size: 12.5px;
  color: #4a5568;
  line-height: 1.9;
}
.soa-understand .k { color: var(--soa-muted); }

/* 分组小标题 */
.soa-sec {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 16px 2px 10px;
  font-size: 13px;
  font-weight: 700;
  color: #2d3748;
}
.soa-sec .soa-src {
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  background: var(--soa-accent);
  border-radius: 999px;
  padding: 2px 9px;
}
.soa-sec .soa-note { font-weight: 400; font-size: 11.5px; color: var(--soa-muted); }

/* 结果卡片 */
.soa-cards { display: flex; flex-direction: column; gap: 10px; }
.soa-card {
  display: block;
  background: #fff;
  border: 1px solid var(--soa-line);
  border-radius: 10px;
  padding: 10px 12px;
  text-decoration: none;
  color: inherit;
  transition: border-color .14s ease, box-shadow .14s ease;
}
a.soa-card:hover {
  border-color: #c7d6e8;
  box-shadow: 0 4px 14px rgba(49, 130, 206, .1);
}
.soa-card-in { display: flex; gap: 11px; }
.soa-thumb {
  width: 104px;
  height: 78px;
  flex: none;
  object-fit: cover;
  border-radius: 7px;
  background: #eef1f5;
}
.soa-card-bd { flex: 1; min-width: 0; }
.soa-card-t {
  font-size: 14.5px;
  font-weight: 600;
  color: #1a2740;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.soa-card-m { font-size: 11.5px; color: var(--soa-muted); margin-top: 3px; }
.soa-card-s {
  font-size: 12.5px;
  color: #5a6472;
  margin-top: 5px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.soa-ev {
  font-size: 11.5px;
  color: #4a5568;
  background: #f3f8f8;
  border-left: 2px solid #2c7a7b;
  padding: 5px 9px;
  margin-top: 7px;
  border-radius: 0 5px 5px 0;
  line-height: 1.65;
}
.soa-chips { margin-top: 6px; }
.soa-chip {
  display: inline-block;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #eef5ee;
  color: #4a7c59;
  margin: 3px 5px 0 0;
}

/* 反馈按钮 */
.soa-fb-wrap { margin-top: 8px; display: flex; align-items: center; gap: 8px; }
.soa-fb {
  border: 1px solid #d7dce5;
  background: #fff;
  border-radius: 999px;
  padding: 1px 9px;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  line-height: 1.8;
}
.soa-fb:hover { border-color: var(--soa-accent); }
.soa-fb.on { opacity: .45; cursor: default; }
.soa-fb-tip { font-size: 11px; color: #b0b7c2; }

/* 站外来源色标 */
.soa-tag {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 4px;
  margin-left: 6px;
  vertical-align: 1px;
}
.soa-tag.local   { background: #ebf4ff; color: #2b6cb0; }
.soa-tag.gooood  { background: #eaf7ef; color: #2f855a; }
.soa-tag.hisheji { background: #e6f7f6; color: #2c7a7b; }
.soa-tag.arch    { background: #fff4ea; color: #c05621; }
.soa-tag.dezeen  { background: #fdf1e7; color: #9c4221; }
.soa-tag.xhs     { background: #fff0f0; color: #c53030; }
.soa-tag.ai      { background: #f3eeff; color: #6b46c1; }

/* 门禁站"带路卡" */
.soa-blocked {
  background: #fffdf8;
  border: 1px dashed #ecdfc4;
  border-radius: 10px;
  padding: 12px 14px;
  margin-top: 10px;
}
.soa-blocked .bi { font-weight: 600; color: #8a6d3b; font-size: 13.5px; }
.soa-blocked .bn { font-size: 12px; color: #9a8a6d; margin-top: 4px; line-height: 1.7; }
.soa-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 9px; }
.soa-lnk {
  background: #faf8f4;
  border: 1px solid #eee6d8;
  border-radius: 9px;
  padding: 6px 13px;
  font-size: 12.5px;
  color: #b58a4a;
  text-decoration: none;
  font-weight: 600;
}
.soa-lnk:hover { background: #f6f1e6; }
.soa-cp {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 9px;
  padding: 6px 13px;
  font-size: 12.5px;
  color: #555;
  cursor: pointer;
  font-family: inherit;
}
.soa-cp:hover { background: #f7f7f7; }
.soa-cp.done { color: #2c7a7b; border-color: #bfe0e0; background: #eef7f7; }

/* 提示条 / 空态 */
.soa-tip {
  background: #fff;
  border: 1px solid var(--soa-line);
  border-radius: 9px;
  padding: 9px 12px;
  font-size: 12px;
  color: #6b7280;
  line-height: 1.7;
  margin-top: 10px;
}
.soa-tip b { color: #4a5568; }
.soa-empty {
  text-align: center;
  color: var(--soa-muted);
  font-size: 13.5px;
  padding: 26px 10px;
}
.soa-more {
  display: block;
  text-align: center;
  background: #fff;
  border: 1px solid var(--soa-line);
  border-radius: 10px;
  padding: 10px;
  font-size: 13px;
  color: var(--soa-accent);
  text-decoration: none;
  font-weight: 600;
  margin-top: 10px;
}
.soa-more:hover { background: #f6faff; }

/* 底部输入区 */
.soa-foot {
  flex: none;
  border-top: 1px solid var(--soa-line);
  padding: 12px 20px 14px;
  background: #fff;
}
.soa-foot-in { display: flex; gap: 10px; align-items: center; }
.soa-input {
  flex: 1;
  min-width: 0;
  border: 1px solid #d7dce5;
  border-radius: 10px;
  padding: 10px 13px;
  font-size: 14px;
  outline: none;
  font-family: inherit;
  color: var(--soa-ink);
  background: #fff;
}
.soa-input:focus { border-color: var(--soa-accent); box-shadow: 0 0 0 3px rgba(49, 130, 206, .12); }
.soa-send {
  flex: none;
  background: var(--soa-accent);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.soa-send:hover { filter: brightness(1.07); }
.soa-send:disabled { opacity: .55; cursor: default; }
.soa-foot-note { font-size: 11px; color: #b0b7c2; margin-top: 7px; text-align: center; }

/* ============ 移动端 ============ */
@media (max-width: 782px) {
  .soa-mask { padding: 0; align-items: stretch; }
  .soa-panel {
    width: 100vw;
    max-width: none;
    height: 100vh;
    max-height: none;
    border-radius: 0;
  }
  .soa-head { padding: 13px 15px; }
  .soa-body { padding: 14px 15px 6px; }
  .soa-foot { padding: 11px 15px 14px; }
  .soa-thumb { width: 84px; height: 66px; }
  .soa-me { max-width: 90%; }
  .soa-float-btn { right: 14px; bottom: 14px; }
}

/* 尊重"减少动画"偏好 */
@media (prefers-reduced-motion: reduce) {
  .soa-nav-btn, .soa-card { transition: none; }
}
