/* Site-wide AI assistant — candy kawaii, centered app window */
#blog-ai-root {
  --bai-bg: #fff8e7;
  --bai-primary: #ffd43b;
  --bai-pink: #ff8fab;
  --bai-blue: #74c0fc;
  --bai-text: #2b2b2b;
  --bai-shadow: 0 12px 40px rgba(255, 143, 171, 0.22);
  --bai-app-radius: 22px;
  font-family: "General Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
  z-index: 99999;
}

/* —— 右下角触发按钮：DeepSeek Q 版形象（贴角） —— */
#blog-ai-toggle {
  position: fixed;
  right: 0;
  bottom: 0;
  display: block;
  width: 66px;
  height: auto;
  padding: 0;
  border: none;
  background: none;
  box-shadow: none;
  cursor: pointer;
  z-index: 99999;
  transform: scale(1);
  transform-origin: 100% 100%;
  transition: transform 0.26s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

#blog-ai-toggle img {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
  user-select: none;
  filter: drop-shadow(-4px -3px 12px rgba(56, 96, 140, 0.18))
    drop-shadow(0 0 10px rgba(56, 96, 140, 0.16));
  transition: filter 0.25s ease;
}

#blog-ai-toggle:hover img {
  filter: drop-shadow(-6px -4px 16px rgba(56, 96, 140, 0.26))
    drop-shadow(0 0 14px rgba(56, 96, 140, 0.22)) brightness(1.04);
}

#blog-ai-toggle:focus-visible {
  outline: 3px solid var(--bai-primary);
  outline-offset: -3px;
  border-radius: 18px;
}

/* 点击时整个人被轻轻压扁一下（不压太扁），松手回弹 */
#blog-ai-toggle.is-squashing {
  transform: scaleX(1.1) scaleY(0.88);
}

#blog-ai-toggle[aria-expanded="true"] {
  opacity: 0.94;
}

@media (prefers-reduced-motion: reduce) {
  #blog-ai-toggle.is-squashing {
    transform: none;
  }
}

/* —— 中央放大窗口 —— */
body.bai-app-open { overflow: hidden; }

.bai-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: grid;
  place-items: center;
  padding: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}

.bai-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.bai-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background:
    radial-gradient(circle at 50% 38%, rgba(255, 248, 231, 0.30), transparent 40rem),
    rgba(33, 22, 30, 0.42);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: default;
}

.bai-app {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 268px 1fr;
  width: min(1120px, 94vw);
  height: min(780px, 90vh);
  overflow: hidden;
  border-radius: var(--bai-app-radius);
  background: var(--bai-bg);
  border: 1.5px solid rgba(255, 212, 59, 0.6);
  box-shadow:
    0 40px 120px rgba(78, 45, 60, 0.4),
    0 0 0 6px rgba(255, 255, 255, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transform: scale(0.92) translateY(18px);
  opacity: 0;
  transition: transform 0.34s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.28s ease;
}

.bai-overlay.is-open .bai-app {
  transform: scale(1) translateY(0);
  opacity: 1;
}

/* —— 左侧栏 —— */
.bai-aside {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px 16px;
  background:
    linear-gradient(180deg, rgba(255, 243, 191, 0.7) 0%, rgba(255, 216, 232, 0.5) 55%, rgba(208, 235, 255, 0.45) 100%);
  border-right: 1px solid rgba(255, 143, 171, 0.22);
}

.bai-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.bai-brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  overflow: hidden;
  background: linear-gradient(145deg, #fff3bf 0%, #ffd8e8 54%, #d0ebff 100%);
  box-shadow: 0 8px 18px rgba(255, 143, 171, 0.3);
}

.bai-brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.bai-brand-text b {
  display: block;
  font-size: 15px;
  font-weight: 800;
}

.bai-brand-text span {
  font-size: 11px;
  color: rgba(43, 43, 43, 0.6);
}

.bai-new-chat {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 12px;
  border: 1.5px dashed rgba(255, 143, 171, 0.5);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.55);
  color: var(--bai-text);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
}

.bai-new-chat:hover {
  background: rgba(255, 255, 255, 0.85);
  border-color: var(--bai-pink);
}

.bai-new-chat:active { transform: scale(0.98); }

.bai-side-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(43, 43, 43, 0.45);
  padding: 0 4px;
}

.bai-context-card {
  padding: 11px 12px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 212, 59, 0.5);
  font-size: 11.5px;
  line-height: 1.5;
}

.bai-context-card b {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(43, 43, 43, 0.5);
  display: block;
  margin-bottom: 3px;
}

.blog-ai-page-hint {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.5;
  color: rgba(43, 43, 43, 0.7);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.bai-side-foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bai-quota {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 212, 59, 0.55);
  font-size: 11.5px;
  font-weight: 700;
  align-self: flex-start;
}

#blog-ai-quota::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--bai-primary);
  box-shadow: 0 0 8px rgba(255, 212, 59, 0.8);
}

.blog-ai-auth-bar {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  padding: 8px 10px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 143, 171, 0.28);
}

.bai-avatar {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.85);
  background: linear-gradient(145deg, #ffd8e8, #d0ebff);
  color: #b5608a;
  font-weight: 800;
  font-size: 14px;
  cursor: default;
  padding: 0;
}

.bai-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.bai-avatar.is-clickable {
  cursor: pointer;
}

.bai-avatar.is-clickable:hover::after {
  content: "换";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(43, 43, 43, 0.55);
  color: #fff;
  font-size: 11px;
}

.bai-avatar-uploading {
  font-size: 10px;
  color: rgba(43, 43, 43, 0.7);
}

.bai-avatar:disabled {
  opacity: 0.7;
  cursor: wait;
}

.blog-ai-auth-user {
  flex: 1 1 auto;
  font-size: 12px;
  font-weight: 600;
  color: rgba(43, 43, 43, 0.8);
  max-width: 120px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.blog-ai-auth-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  flex: 0 0 auto;
}

.blog-ai-auth-link {
  border: none;
  background: rgba(255, 255, 255, 0.75);
  color: var(--bai-text);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
}

.blog-ai-auth-link:hover {
  background: rgba(255, 143, 171, 0.35);
}

/* —— 主区 —— */
.bai-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: linear-gradient(180deg, #fffdf6 0%, #fff8e7 100%);
}

.bai-topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  background: linear-gradient(120deg, #fff3bf 0%, #ffd8e8 55%, #d0ebff 100%);
  border-bottom: 1px solid rgba(255, 143, 171, 0.22);
}

.bai-topbar h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: var(--bai-text);
}

.bai-topbar p {
  margin: 3px 0 0;
  font-size: 11.5px;
  color: rgba(43, 43, 43, 0.6);
}

.bai-topbar-spacer { flex: 1; }

.bai-win-btn {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.6);
  color: rgba(43, 43, 43, 0.7);
  font-size: 14px;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.2s, color 0.2s;
}

.bai-win-btn:hover {
  background: rgba(255, 143, 171, 0.22);
  color: var(--bai-text);
}

.bai-win-close:hover {
  background: rgba(229, 77, 66, 0.16);
  color: #e54d42;
}

/* —— 消息区 —— */
#blog-ai-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#blog-ai-messages {
  flex: 1;
  overflow-y: auto;
  padding: 22px clamp(16px, 4vw, 40px);
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: linear-gradient(180deg, #fffdf6 0%, #fff8e7 100%);
  scroll-behavior: smooth;
}

#blog-ai-messages::-webkit-scrollbar { width: 8px; }
#blog-ai-messages::-webkit-scrollbar-thumb {
  background: rgba(255, 143, 171, 0.3);
  border-radius: 99px;
}

.bai-msg {
  display: flex;
  gap: 10px;
  max-width: 78%;
  animation: bai-msg-in 0.3s ease both;
}

@keyframes bai-msg-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.bai-msg.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.bai-msg-role {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  overflow: hidden;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.1);
  background: #fff;
}

.bai-msg.bot .bai-msg-role {
  background: linear-gradient(145deg, #fff3bf, #ffd8e8 55%, #d0ebff);
}

.bai-msg.user .bai-msg-role {
  background: linear-gradient(145deg, #b3dcff, #74c0fc);
  color: #1f6aa0;
}

.bai-msg-role img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.bai-msg.user .bai-msg-role.is-clickable {
  cursor: pointer;
  position: relative;
}

.bai-msg.user .bai-msg-role.is-clickable:hover::after {
  content: "换";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(31, 106, 160, 0.6);
  color: #fff;
  font-size: 11px;
}

.bai-msg-bubble {
  padding: 11px 14px;
  border-radius: 16px;
  font-size: 13.5px;
  line-height: 1.65;
  word-break: break-word;
  white-space: pre-wrap;
}

.bai-msg.bot .bai-msg-bubble {
  background: rgba(255, 143, 171, 0.16);
  border: 1px solid rgba(255, 143, 171, 0.3);
  border-top-left-radius: 5px;
}

.bai-msg.user .bai-msg-bubble {
  background: rgba(116, 192, 252, 0.32);
  border: 1px solid rgba(116, 192, 252, 0.42);
  border-top-right-radius: 5px;
}

.bai-msg.system {
  align-self: center;
  max-width: 90%;
}

.bai-msg.system .bai-msg-role { display: none; }

.bai-msg.system .bai-msg-bubble {
  background: rgba(255, 255, 255, 0.7);
  border: 1px dashed rgba(255, 212, 59, 0.6);
  font-size: 12px;
  text-align: center;
}

/* —— 中央账号登录（QQ/微信风格，与糖果色 AI 面板区分） —— */
body.acct-auth-open {
  overflow: hidden;
}

.acct-auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
  box-sizing: border-box;
  background: rgba(0, 0, 0, 0.52);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  font-family: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei",
    sans-serif;
}

.acct-auth-overlay.is-visible {
  display: flex;
}

.acct-auth-modal {
  position: relative;
  box-sizing: border-box;
  width: min(400px, calc(100vw - 32px));
  max-height: min(88vh, 640px);
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
  animation: acct-auth-in 0.28s ease;
}

@keyframes acct-auth-in {
  from {
    opacity: 0;
    transform: scale(0.94) translateY(12px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.acct-auth-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.06);
  color: #666;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.acct-auth-close:hover {
  background: rgba(0, 0, 0, 0.1);
}

.acct-auth-brand {
  padding: 36px 28px 16px;
  text-align: center;
}

.acct-auth-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 14px;
  border: 1px solid rgba(255, 143, 171, 0.35);
  border-radius: 22px;
  background:
    radial-gradient(circle at 30% 22%, rgba(255, 255, 255, 0.95) 0 18%, transparent 19%),
    linear-gradient(145deg, #fff3bf 0%, #ffd8e8 54%, #d0ebff 100%);
  color: #ff8fab;
  font-size: 30px;
  font-weight: 800;
  line-height: 1;
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.85);
  box-shadow: 0 12px 28px rgba(255, 143, 171, 0.28);
}

.acct-auth-title {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: #111;
  letter-spacing: 0.02em;
}

.acct-auth-subtitle {
  margin: 8px 0 0;
  font-size: 13px;
  color: #888;
  line-height: 1.5;
}

.acct-auth-tabs {
  display: flex;
  margin: 0 28px;
  border-bottom: 1px solid #e8e8e8;
}

.acct-auth-tab {
  flex: 1;
  padding: 12px 0;
  border: none;
  background: transparent;
  font-size: 15px;
  color: #888;
  cursor: pointer;
  position: relative;
}

.acct-auth-tab.is-active {
  color: #12b7f5;
  font-weight: 600;
}

.acct-auth-tab.is-active::after {
  content: "";
  position: absolute;
  left: 20%;
  right: 20%;
  bottom: -1px;
  height: 2px;
  background: #12b7f5;
  border-radius: 2px;
}

.acct-auth-body {
  padding: 20px 28px 28px;
}

.acct-auth-label {
  display: block;
  margin-top: 14px;
  font-size: 13px;
  font-weight: 500;
  color: #333;
}

.acct-auth-body .acct-auth-label:first-child {
  margin-top: 0;
}

.acct-auth-input {
  width: 100%;
  box-sizing: border-box;
  margin-top: 8px;
  padding: 11px 12px;
  border: 1px solid #dcdcdc;
  border-radius: 8px;
  font-size: 15px;
  color: #111;
  background: #fafafa;
  transition: border-color 0.2s, background 0.2s;
}

.acct-auth-input:focus {
  outline: none;
  border-color: #12b7f5;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(18, 183, 245, 0.15);
}

.acct-auth-code-row {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.acct-auth-code-row .acct-auth-input {
  flex: 1 1 auto;
  min-width: 0;
  letter-spacing: 0.18em;
}

.acct-auth-code-btn {
  flex: 0 0 auto;
  margin-top: 8px;
  padding: 11px 12px;
  border: 1px solid #12b7f5;
  border-radius: 8px;
  background: #fff;
  color: #12b7f5;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s, opacity 0.2s;
}

.acct-auth-code-btn:hover:not(:disabled) {
  background: #12b7f5;
  color: #fff;
}

.acct-auth-code-btn:disabled {
  border-color: #dcdcdc;
  color: #999;
  opacity: 0.75;
  cursor: default;
}

.acct-auth-hint {
  margin: 8px 0 0;
  font-size: 12px;
  color: #999;
  line-height: 1.45;
}

.acct-auth-error {
  margin: 10px 0 0;
  font-size: 13px;
  color: #e54d42;
  line-height: 1.4;
}

.acct-auth-primary {
  width: 100%;
  margin-top: 22px;
  padding: 12px 16px;
  border: none;
  border-radius: 8px;
  background: #07c160;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}

.acct-auth-primary:hover {
  background: #06ad56;
}

.acct-auth-primary:active {
  transform: scale(0.98);
}

.acct-auth-text-btn {
  display: block;
  width: 100%;
  margin-top: 14px;
  padding: 8px;
  border: none;
  background: transparent;
  font-size: 14px;
  color: #576b95;
  cursor: pointer;
}

.acct-auth-text-btn:hover {
  color: #12b7f5;
}

.acct-auth-foot {
  margin: 16px 0 0;
  font-size: 11px;
  color: #bbb;
  text-align: center;
  line-height: 1.5;
}

@keyframes blogAIImageCardIn {
  to {
    transform: perspective(1100px) rotateX(2deg) rotateY(-3deg) translateY(0);
  }
}

/* —— 输入区 —— */
.bai-composer {
  padding: 14px clamp(16px, 4vw, 24px) 18px;
  border-top: 1px solid rgba(255, 143, 171, 0.2);
  background: #fff;
}

.bai-composer-shell {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 8px 8px 8px 14px;
  border: 1.5px solid rgba(116, 192, 252, 0.45);
  border-radius: 16px;
  background: #fffefb;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.bai-composer-shell:focus-within {
  border-color: var(--bai-pink);
  box-shadow: 0 0 0 3px rgba(255, 143, 171, 0.15);
}

#blog-ai-input {
  flex: 1;
  resize: none;
  min-height: 26px;
  max-height: 140px;
  padding: 6px 0;
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--bai-text);
  background: transparent;
}

#blog-ai-send {
  flex: 0 0 auto;
  padding: 9px 18px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--bai-primary), #ffb347);
  color: var(--bai-text);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

#blog-ai-send:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

#blog-ai-send:not(:disabled):hover {
  transform: scale(1.04);
}

.bai-composer-hint {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  padding: 0 4px;
  font-size: 11px;
  color: rgba(43, 43, 43, 0.5);
}

.bai-count {
  margin-left: auto;
}

.bai-count span {
  font-weight: 700;
}

/* —— 移动端：侧栏折叠为顶部条，窗口接近全屏 —— */
@media (max-width: 768px) {
  #blog-ai-toggle {
    right: 0;
    bottom: 0;
    width: 56px;
  }

  .bai-overlay {
    padding: max(8px, env(safe-area-inset-top, 0px)) 8px max(8px, env(safe-area-inset-bottom, 0px));
    box-sizing: border-box;
  }

  .bai-app {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    width: min(100%, calc(100vw - 16px));
    height: min(100vh, calc(100vh - 16px));
    height: min(100dvh, calc(100dvh - 16px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)));
    min-width: 0;
    border-radius: 18px;
    border: 1px solid rgba(255, 212, 59, 0.52);
  }

  .bai-aside {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    max-width: 100%;
    min-width: 0;
    padding: 10px 12px;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 143, 171, 0.22);
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .bai-aside::-webkit-scrollbar {
    display: none;
  }

  .bai-brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 12px;
  }

  .bai-brand-text,
  .bai-side-label,
  .bai-context-card,
  .bai-side-foot {
    display: none;
  }

  .bai-new-chat {
    padding: 8px 12px;
    white-space: nowrap;
  }

  #blog-ai-messages {
    padding: 14px;
  }

  .bai-msg {
    max-width: 92%;
  }

  .bai-topbar {
    gap: 8px;
    padding: 12px 14px;
  }

  .bai-topbar h2 {
    font-size: 15px;
  }

  .bai-topbar p {
    max-width: 58vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .bai-win-btn {
    width: 28px;
    height: 28px;
    border-radius: 8px;
  }

  .bai-composer {
    padding: 10px 10px calc(12px + env(safe-area-inset-bottom, 0px));
  }

  .bai-composer-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 8px;
    padding: 7px 7px 7px 12px;
    border-radius: 14px;
  }

  #blog-ai-input {
    min-width: 0;
    font-size: 13px;
  }

  #blog-ai-send {
    min-width: 4.25rem;
    padding: 8px 12px;
    border-radius: 11px;
    font-size: 12.5px;
  }

  .bai-composer-hint {
    gap: 6px;
    font-size: 10px;
  }

  @keyframes blogAIImageCardIn {
    to {
      transform: perspective(900px) rotateX(1.5deg) rotateY(-2deg) translateY(0);
    }
  }
}

/* —— 人机验证：外壳做成柔和的玻璃卡片（内部 iframe 由 Cloudflare 渲染，无法改） —— */
.acct-auth-turnstile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin: 12px 0 6px;
  padding: 10px 12px 8px;
  border: 1px solid rgba(18, 183, 245, 0.16);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(240, 248, 255, 0.86));
  box-shadow: 0 2px 10px rgba(56, 96, 140, 0.07);
}

.acct-auth-turnstile-hint {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: #8b98a8;
  font-size: 11px;
  letter-spacing: 0.08em;
}

.acct-auth-turnstile-hint::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #12b7f5;
  box-shadow: 0 0 0 3px rgba(18, 183, 245, 0.16);
}

.acct-auth-turnstile-slot {
  display: flex;
  justify-content: center;
  width: 100%;
}

.acct-auth-turnstile-slot > div,
.acct-auth-turnstile-slot iframe {
  border-radius: 12px;
}

/* 无需人工交互时插槽为空，直接收起，不留白 */
.acct-auth-turnstile-slot:empty {
  display: none;
}