/* ============================================================
   朋友圈文案 + 找图建议 抽屉样式(2026-11-03 新增)
   ------------------------------------------------------------
   作用域:全部规则前缀 .fc-,只影响本抽屉,不改 admin.css /
           ui-refresh.css / ui.js / mobile-layer.css / tablet-layer.css
   断点:桌面右侧抽屉 420px;≤767px 手机端改为底部全屏抽屉
   注:本版不做 AI 文生图、不下载图片、不抓取外链,界面不出现“一键出图”措辞
   ============================================================ */

.fc-root {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
}
.fc-root.on { display: block; }

.fc-mask {
  position: absolute;
  inset: 0;
  background: rgba(10, 30, 23, .42);
  opacity: 0;
  transition: opacity .18s ease;
}
.fc-root.on .fc-mask { opacity: 1; }

.fc-drawer {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 420px;
  max-width: 100vw;
  display: flex;
  flex-direction: column;
  background: var(--card, #fff);
  color: var(--ink, #163a2d);
  border-left: 1px solid var(--line, #e6f2ed);
  box-shadow: -8px 0 32px rgba(16, 46, 36, .18);
  transform: translateX(24px);
  opacity: 0;
  transition: transform .22s cubic-bezier(.22, .61, .36, 1), opacity .18s ease;
  overflow: hidden;
}
.fc-root.on .fc-drawer { transform: translateX(0); opacity: 1; }

.fc-drawer * { box-sizing: border-box; }

/* ---------- 头部 ---------- */
.fc-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--line, #e6f2ed);
  background: var(--card, #fff);
}
.fc-head-main { min-width: 0; flex: 1; }
.fc-kicker {
  font-size: 11px;
  letter-spacing: .08em;
  color: var(--green, #14A178);
  font-weight: 600;
  text-transform: uppercase;
}
.fc-head h2 {
  margin: 3px 0 4px;
  font-size: 17px;
  line-height: 1.35;
  color: var(--ink, #163a2d);
  font-weight: 700;
}
.fc-sub {
  margin: 0;
  font-size: 12px;
  line-height: 1.55;
  color: var(--ink-3, #73988a);
  overflow-wrap: anywhere;
}
.fc-close {
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--line, #e6f2ed);
  background: transparent;
  color: var(--ink-2, #497263);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.fc-close:hover { background: var(--green-light, #E7F7F0); color: var(--green, #14A178); }
.fc-close:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(20, 161, 120, .22); }

/* ---------- 页签 ---------- */
.fc-tabs {
  display: flex;
  gap: 4px;
  padding: 0 12px;
  border-bottom: 1px solid var(--line, #e6f2ed);
  background: var(--card, #fff);
  overflow-x: auto;
}
.fc-tab {
  flex: none;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  padding: 10px 12px 9px;
  font-size: 13px;
  color: var(--ink-2, #497263);
  cursor: pointer;
  white-space: nowrap;
}
.fc-tab:hover { color: var(--green, #14A178); }
.fc-tab.on {
  color: var(--green, #14A178);
  border-bottom-color: var(--green, #14A178);
  font-weight: 600;
}
.fc-tab:focus-visible { outline: none; box-shadow: inset 0 0 0 2px rgba(20, 161, 120, .3); border-radius: 6px; }

/* ---------- 主体滚动区 ---------- */
.fc-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 14px 16px 24px;
  background: var(--bg, #F4F6FA);
}

/* ---------- 表单 ---------- */
.fc-form {
  background: var(--card, #fff);
  border: 1px solid var(--line, #e6f2ed);
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 2px 14px rgba(22, 58, 45, .05);
}
.fc-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 12px;
}
.fc-fi { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.fc-fi > span { font-size: 12px; color: var(--ink-3, #73988a); }
.fc-span2 { grid-column: span 2; }
.fc-fi input,
.fc-fi select,
.fc-fi textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line, #e6f2ed);
  border-radius: 9px;
  background: var(--card, #fff);
  color: var(--ink, #163a2d);
  font-size: 13px;
  font-family: inherit;
  padding: 8px 10px;
  line-height: 1.5;
}
.fc-fi textarea { resize: vertical; min-height: 54px; }
.fc-fi input:focus,
.fc-fi select:focus,
.fc-fi textarea:focus {
  outline: none;
  border-color: var(--green, #14A178);
  box-shadow: 0 0 0 3px rgba(20, 161, 120, .16);
}
.fc-emoji-wrap { justify-content: flex-end; }
.fc-switch {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 12.5px;
  color: var(--ink-2, #497263);
  min-height: 38px;
}
.fc-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.fc-track {
  position: relative;
  flex: none;
  width: 38px;
  height: 20px;
  border-radius: 999px;
  background: #D6E3DD;
  transition: background .16s ease;
}
.fc-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .18);
  transition: transform .16s ease;
}
.fc-switch input:checked + .fc-track { background: var(--green, #14A178); }
.fc-switch input:checked + .fc-track .fc-thumb { transform: translateX(18px); }
.fc-switch input:focus-visible + .fc-track { box-shadow: 0 0 0 3px rgba(20, 161, 120, .22); }

.fc-form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--line, #e6f2ed);
}
.fc-hint { font-size: 11.5px; color: var(--ink-3, #73988a); line-height: 1.5; flex: 1 1 180px; min-width: 0; }

/* ---------- 按钮 ---------- */
.fc-btn {
  border: 1px solid var(--line, #e6f2ed);
  background: var(--card, #fff);
  color: var(--ink, #163a2d);
  border-radius: 9px;
  padding: 8px 14px;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: background .15s, border-color .15s, transform .1s;
}
.fc-btn:hover { border-color: var(--green, #14A178); color: var(--green, #14A178); }
.fc-btn:active:not(:disabled) { transform: translateY(1px); }
.fc-btn:disabled { opacity: .55; cursor: default; }
.fc-btn.primary {
  background: linear-gradient(135deg, #3DBE95, #14A178);
  border-color: transparent;
  color: #fff;
  font-weight: 600;
}
.fc-btn.primary:hover { filter: brightness(.96); color: #fff; }
.fc-btn.sm { padding: 5px 10px; font-size: 12px; border-radius: 7px; }
.fc-btn.ghost { background: transparent; color: var(--ink-2, #497263); }
.fc-btn.ghost:hover { background: #FDECEB; border-color: var(--red, #E6473D); color: var(--red, #E6473D); }
.fc-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(20, 161, 120, .22); }

/* ---------- 来源标注 ---------- */
.fc-sourcebar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 12px 0 0;
  padding: 9px 12px;
  border-radius: 10px;
  background: var(--card, #fff);
  border: 1px solid var(--line, #e6f2ed);
  font-size: 12px;
}
.fc-src-badge {
  flex: none;
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  border: 1px solid transparent;
  white-space: nowrap; /* 2026-11-03:降级角标文案较长,禁止折成三行 */
}
.fc-src-badge.ai { background: #E8F3FF; color: #1A62C2; border-color: #BBD9F7; }
.fc-src-badge.tpl { background: #FFF4DE; color: #8A5700; border-color: #F3D9A2; }
/* 2026-11-03:说明单独占一行,避免长角标 + 长说明把 420px 抽屉挤成竖排 */
.fc-src-note { color: var(--ink-3, #73988a); flex: 1 1 100%; order: 3; min-width: 0; overflow-wrap: anywhere; line-height: 1.55; }
.fc-retry {
  flex: none;
  margin-left: auto;
  border: 0;
  background: transparent;
  color: var(--green, #14A178);
  font-size: 12px;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
}
.fc-retry:hover { background: var(--green-light, #E7F7F0); }

/* ---------- 结果卡 ---------- */
.fc-results { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.fc-ver {
  background: var(--card, #fff);
  border: 1px solid var(--line, #e6f2ed);
  border-radius: 14px;
  padding: 13px 14px;
  box-shadow: 0 2px 14px rgba(22, 58, 45, .05);
}
.fc-ver-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fc-vtype { font-size: 13px; font-weight: 700; color: var(--ink, #163a2d); }
.fc-vsrc { font-size: 11px; padding: 1px 7px; border-radius: 999px; border: 1px solid transparent; }
.fc-vsrc.ai { background: #E8F3FF; color: #1A62C2; border-color: #BBD9F7; }
.fc-vsrc.tpl { background: #FFF4DE; color: #8A5700; border-color: #F3D9A2; }
.fc-vlen { margin-left: auto; font-size: 11.5px; color: var(--ink-3, #73988a); }
.fc-vtext {
  margin-top: 8px;
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--ink, #163a2d);
  word-break: break-word;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
mark.fc-bad {
  background: #FFE1DE;
  color: #B3271F;
  padding: 0 2px;
  border-radius: 3px;
  text-decoration: underline dotted #B3271F;
  cursor: help;
}
.fc-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.fc-tags span {
  font-size: 11.5px;
  color: var(--green, #14A178);
  background: var(--green-light, #E7F7F0);
  border-radius: 999px;
  padding: 2px 8px;
  overflow-wrap: anywhere;
}
.fc-comp { margin-top: 9px; font-size: 12px; line-height: 1.5; }
.fc-comp.ok { color: var(--success, #0B7552); }
.fc-comp.warn { color: #B3271F; }
.fc-issues {
  margin: 6px 0 0;
  padding-left: 18px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--ink-2, #497263);
}
.fc-issues li { overflow-wrap: anywhere; }
.fc-issues b { color: #B3271F; }
.fc-ver-actions { display: flex; justify-content: flex-end; margin-top: 10px; }

/* ---------- 空态 / 加载 ---------- */
.fc-empty {
  text-align: center;
  padding: 34px 18px;
  background: var(--card, #fff);
  border: 1px dashed var(--line, #e6f2ed);
  border-radius: 14px;
  color: var(--ink-2, #497263);
}
.fc-empty-ico { font-size: 26px; line-height: 1; margin-bottom: 8px; }
.fc-empty p { margin: 0; font-size: 13px; line-height: 1.7; }
.fc-busy {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 22px 16px;
  border-radius: 14px;
  background: var(--card, #fff);
  border: 1px solid var(--line, #e6f2ed);
  font-size: 13px;
  color: var(--ink-2, #497263);
}
.fc-spin {
  flex: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(20, 161, 120, .25);
  border-top-color: var(--green, #14A178);
  animation: fc-rotate .8s linear infinite;
}
@keyframes fc-rotate { to { transform: rotate(360deg); } }

/* ---------- 找图建议 ---------- */
.fc-plan-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.fc-plan-head > div { flex: 1 1 220px; min-width: 0; }
.fc-plan-head h3 { margin: 0 0 4px; font-size: 15px; color: var(--ink, #163a2d); }
.fc-plan-head p { margin: 0; font-size: 11.5px; line-height: 1.6; color: var(--ink-3, #73988a); }
.fc-media-check {
  padding: 9px 12px;
  border-radius: 10px;
  background: var(--green-light, #E7F7F0);
  color: var(--ink-2, #497263);
  font-size: 12px;
  line-height: 1.65;
  margin-bottom: 12px;
  overflow-wrap: anywhere;
}
.fc-plans { display: flex; flex-direction: column; gap: 12px; }
.fc-plan {
  background: var(--card, #fff);
  border: 1px solid var(--line, #e6f2ed);
  border-radius: 14px;
  padding: 13px 14px;
  box-shadow: 0 2px 14px rgba(22, 58, 45, .05);
}
.fc-plan-title { font-size: 13px; font-weight: 700; color: var(--green, #14A178); }
.fc-plan-scene { margin-top: 6px; font-size: 13px; line-height: 1.7; color: var(--ink, #163a2d); overflow-wrap: anywhere; }
.fc-plan dl { margin: 9px 0 0; display: flex; flex-direction: column; gap: 5px; }
.fc-plan dl > div { display: flex; gap: 8px; font-size: 12.5px; line-height: 1.6; }
.fc-plan dt { flex: none; width: 82px; color: var(--ink-3, #73988a); }
.fc-plan dd { margin: 0; min-width: 0; color: var(--ink, #163a2d); overflow-wrap: anywhere; }
.fc-kw {
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
  background: var(--bg, #F4F6FA);
  border: 1px solid var(--line, #e6f2ed);
  border-radius: 5px;
  padding: 1px 6px;
  user-select: all;
}
.fc-plan-tip {
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px dashed var(--line, #e6f2ed);
  font-size: 11.5px;
  line-height: 1.6;
  color: #8A5700;
  overflow-wrap: anywhere;
}
.fc-plan-foot { margin-top: 12px; font-size: 11.5px; line-height: 1.65; color: var(--ink-3, #73988a); }

/* ---------- 历史 ---------- */
.fc-hist-intro { font-size: 12px; color: var(--ink-3, #73988a); margin-bottom: 10px; line-height: 1.6; }
.fc-hist-list { display: flex; flex-direction: column; gap: 10px; }
.fc-hist {
  background: var(--card, #fff);
  border: 1px solid var(--line, #e6f2ed);
  border-radius: 12px;
  padding: 11px 12px;
}
.fc-hist-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fc-hist-time { font-size: 11.5px; color: var(--ink-3, #73988a); }
.fc-hist-week { margin-left: auto; font-size: 11.5px; color: var(--green, #14A178); }
.fc-hist-topic { margin-top: 6px; font-size: 13px; font-weight: 600; color: var(--ink, #163a2d); overflow-wrap: anywhere; }
.fc-hist-preview { margin-top: 4px; font-size: 12px; line-height: 1.6; color: var(--ink-2, #497263); overflow-wrap: anywhere; }
.fc-hist-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }

/* ---------- 深色 ---------- */
[data-theme="dark"] .fc-drawer,
[data-theme="dark"] .fc-head,
[data-theme="dark"] .fc-tabs { background: var(--card, #16221d); }
[data-theme="dark"] .fc-body { background: var(--bg, #0d1613); }
[data-theme="dark"] .fc-form,
[data-theme="dark"] .fc-ver,
[data-theme="dark"] .fc-plan,
[data-theme="dark"] .fc-hist,
[data-theme="dark"] .fc-empty,
[data-theme="dark"] .fc-busy,
[data-theme="dark"] .fc-sourcebar { background: #16221d; border-color: var(--line, #303d38); }
[data-theme="dark"] .fc-fi input,
[data-theme="dark"] .fc-fi select,
[data-theme="dark"] .fc-fi textarea { background: #101b17; border-color: var(--line, #303d38); color: var(--ink, #e6f3ee); }
[data-theme="dark"] .fc-track { background: #2C3A34; }
[data-theme="dark"] .fc-kw { background: #101b17; border-color: var(--line, #303d38); }
[data-theme="dark"] .fc-media-check { background: rgba(20, 161, 120, .14); }
[data-theme="dark"] mark.fc-bad { background: rgba(230, 71, 61, .26); color: #FFB4AE; }
[data-theme="dark"] .fc-btn { background: #16221d; border-color: var(--line, #303d38); color: var(--ink, #e6f3ee); }
[data-theme="dark"] .fc-btn.ghost { background: transparent; }
[data-theme="dark"] .fc-hist-preview,
[data-theme="dark"] .fc-issues { color: var(--ink-2, #9CCBBB); }

/* ---------- 平板 ---------- */
@media (max-width: 1023px) and (min-width: 768px) {
  .fc-drawer { width: 400px; }
}

/* ---------- 手机:底部全屏抽屉 ---------- */
@media (max-width: 767px) {
  .fc-drawer {
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    border-left: 0;
    border-top: 1px solid var(--line, #e6f2ed);
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -8px 28px rgba(16, 46, 36, .22);
    transform: translateY(18px);
  }
  .fc-root.on .fc-drawer { transform: translateY(0); }
  .fc-head { padding: 13px 14px 10px; }
  .fc-head h2 { font-size: 16px; }
  .fc-body { padding: 12px 12px calc(20px + env(safe-area-inset-bottom)); }
  .fc-form-grid { grid-template-columns: 1fr; }
  .fc-span2 { grid-column: span 1; }
  .fc-form-actions { flex-direction: column; align-items: stretch; }
  .fc-form-actions .fc-btn.primary { width: 100%; min-height: 44px; }
  .fc-close { width: 38px; height: 38px; }
  .fc-plan dl > div { flex-direction: column; gap: 1px; }
  .fc-plan dt { width: auto; }
  .fc-tab { min-height: 44px; }
  .fc-ver-actions .fc-btn { min-height: 38px; }
}

/* ---------- 减少动态效果 ---------- */
@media (prefers-reduced-motion: reduce) {
  .fc-mask, .fc-drawer, .fc-track, .fc-thumb { transition: none; }
  .fc-spin { animation-duration: 2.4s; }
}
