/* ===== 想法卡片 · 发布页弹层（跟随站点主色） ===== */
.cs-overlay {
  --cs-primary: var(--ls-primary, #ff2e63);
  --cs-primary-soft: color-mix(in srgb, var(--ls-primary, #ff2e63) 16%, transparent);
  --cs-primary-strong: color-mix(in srgb, var(--ls-primary, #ff2e63) 72%, white);
  position: fixed;
  inset: 0;
  z-index: var(--ls-z-overlay, 100000);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(20, 18, 24, .55);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #222;
}
.cs-overlay.show { display: flex; }
.cs-overlay * { box-sizing: border-box; }
.cs-panel { width: min(1000px, 100%); max-height: 92vh; display: flex; flex-direction: column; background: #f7f5f2; border-radius: 22px; overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,.4); }
.cs-phead { display: flex; align-items: center; gap: 12px; padding: 16px 20px; background: #fff; border-bottom: 1px solid #efe9e3; }
.cs-ptitle { font-size: 18px; font-weight: 800; color: #1a1a1a; }
.cs-psub { font-size: 13px; color: #9a8f88; }
.cs-psub:empty { display: none; }
.cs-psub .cs-link { color: var(--cs-primary); font-weight: 700; text-decoration: none; }
.cs-pclose { margin-left: auto; width: 34px; height: 34px; border-radius: 50%; border: none; background: #f1ece7; color: #8a817a; font-size: 16px; cursor: pointer; transition: background .15s; }
.cs-pclose:hover { background: #e6ded7; }
.cs-pbody { flex: 1; overflow: auto; padding: 18px 20px; }
.cs-main { display: grid; grid-template-columns: 1fr 340px; gap: 20px; align-items: start; }
.cs-left { display: flex; flex-direction: column; gap: 12px; }
#cs-text { width: 100%; min-height: 140px; resize: vertical; border: 2px solid #ece6e0; border-radius: 16px; padding: 14px 16px; font-size: 15px; line-height: 1.7; background: #fff; color: #222; outline: none; transition: border-color .15s, box-shadow .15s; }
#cs-text:focus { border-color: var(--cs-primary); box-shadow: 0 0 0 4px var(--cs-primary-soft); }
#cs-text::placeholder { color: #c3bab3; }
.cs-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.cs-tab { border: none; cursor: pointer; background: #fff; color: #6a625c; border-radius: 999px; padding: 6px 14px; font-size: 13px; font-weight: 600; box-shadow: 0 2px 6px rgba(0,0,0,.05); transition: all .15s; }
.cs-tab:hover { color: var(--cs-primary); }
.cs-tab.on { background: var(--cs-primary); color: #fff; box-shadow: 0 4px 12px var(--cs-primary-soft); }
.cs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 10px; }
.cs-tpl { position: relative; aspect-ratio: 3 / 4; border: 3px solid transparent; border-radius: 14px; cursor: pointer; overflow: hidden; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 10px rgba(0,0,0,.1); transition: transform .15s, border-color .15s, box-shadow .15s; }
.cs-tpl span { font-size: 13px; font-weight: 800; text-shadow: 0 1px 2px rgba(255,255,255,.4); }
.cs-tpl:hover { transform: translateY(-3px); }
.cs-tpl.on { border-color: var(--cs-primary); box-shadow: 0 0 0 3px var(--cs-primary-soft), 0 6px 14px var(--cs-primary-soft); }
.cs-empty { grid-column: 1 / -1; padding: 20px; text-align: center; color: #b0a8a2; font-size: 13px; }
.cs-tpl-img { background-size: cover; background-position: center; }
.cs-tpl-add { background: #fff; border: 2px dashed #e2d9d1; color: #b0a8a2; box-shadow: none; }
.cs-tpl-add span { font-size: 12px; font-weight: 600; text-align: center; line-height: 1.5; text-shadow: none; }
.cs-del { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; font-size: 14px; line-height: 22px; text-align: center; cursor: pointer; }
.cs-right { display: flex; justify-content: center; }
#cs-canvas { width: 100%; max-width: 320px; height: auto; border-radius: 16px; box-shadow: 0 12px 30px rgba(0,0,0,.16); background: #fff; }
.cs-pfoot { display: flex; justify-content: center; gap: 12px; padding: 14px 20px; background: #fff; border-top: 1px solid #efe9e3; }
.cs-btn { border: none; cursor: pointer; border-radius: 999px; padding: 11px 26px; font-size: 15px; font-weight: 800; transition: transform .12s, box-shadow .12s, filter .12s; }
.cs-btn:hover { transform: translateY(-2px); filter: brightness(1.04); }
.cs-btn-ghost { background: #f3eee9; color: #4a423c; }
.cs-btn-main { background: var(--cs-primary); color: #fff; box-shadow: 0 6px 16px var(--cs-primary-soft); }
.cs-toast { position: fixed; left: 50%; bottom: 70px; transform: translateX(-50%); z-index: calc(var(--ls-z-overlay, 100000) + 1); background: rgba(30,30,30,.92); color: #fff; padding: 10px 18px; border-radius: 12px; font-size: 14px; }
.cs-success { position: fixed; inset: 0; z-index: calc(var(--ls-z-overlay, 100000) + 2); display: flex; align-items: center; justify-content: center; background: rgba(20, 18, 24, .45); }
.cs-success-card { background: #fff; border-radius: 20px; padding: 28px 36px; text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,.3); animation: csPop .22s ease-out; }
.cs-success-icon { font-size: 46px; line-height: 1; }
.cs-success-title { font-size: 20px; font-weight: 800; color: #1a1a1a; margin-top: 8px; }
.cs-success-sub { font-size: 13px; color: #9a8f88; margin: 6px 0 16px; }
.cs-success-btn { display: inline-block; padding: 10px 28px; border-radius: 999px; background: var(--ls-primary, #ff2e63); color: #fff; font-weight: 800; text-decoration: none; }
@keyframes csPop { from { opacity: 0; transform: scale(.9); } to { opacity: 1; transform: scale(1); } }
[data-card-open] { font-size: 0; }
[data-card-open] i { font-size: 20px; }
@media (max-width: 760px) {
  .cs-overlay { padding: 8px; }
  .cs-panel { border-radius: 16px; max-height: 94vh; }
  .cs-main { grid-template-columns: 1fr; gap: 14px; }
  .cs-right { order: -1; }
  .cs-pbody { padding: 12px; }
  .cs-phead { padding: 12px 14px; }
  .cs-ptitle { font-size: 16px; }
  #cs-canvas { max-width: 260px; }
  .cs-btn { padding: 10px 18px; font-size: 14px; }
}
