/* 凡聊分享 · 前台样式
   全部挂在 .fshs 下面，变量自己带一份，主题的深浅切换不会打乱它。 */

.fshs {
  --fs-ink: var(--ink, #2b2f3d);
  --fs-ink-2: var(--ink-2, #4a4f5e);
  --fs-mute: var(--grey, #9296a8);
  --fs-line: var(--line, #e4e6f1);
  --fs-card: var(--white, #fff);
  --fs-accent: #c2603c;
  --fs-accent-soft: rgba(194, 96, 60, .08);
  --fs-danger: #c0452f;
  --fs-r: 12px;
  --fs-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  font-family: var(--fs-sans);
  color: var(--fs-ink);
}

/* ---------------- 文末那一条 ---------------- */
.fshs-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 34px 0 6px;
  padding-top: 18px;
  border-top: 1px solid var(--fs-line);
  font-size: 13px;
}
.fshs-bar-t {
  color: var(--fs-mute);
  font-size: 12.5px;
  letter-spacing: .06em;
}
.fshs-bar-line {
  width: 34px;
  height: 1px;
  background: var(--fs-line);
  margin-right: 4px;
}
.fshs-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 13px;
  border: 1px solid var(--fs-line);
  border-radius: 999px;
  background: var(--fs-card);
  color: var(--fs-ink-2);
  font-family: inherit;
  font-size: 12.5px;
  line-height: 1;
  cursor: pointer;
  transition: border-color .16s, color .16s, background .16s, transform .16s;
}
.fshs-chip svg { flex: none; opacity: .72; }
.fshs-chip:hover {
  border-color: var(--fs-accent);
  color: var(--fs-accent);
  background: var(--fs-accent-soft);
}
.fshs-chip:hover svg { opacity: 1; }
.fshs-chip:active { transform: translateY(1px); }

/* ---------------- 右下角浮动 ---------------- */
.fshs-fab {
  position: fixed;
  right: 22px;
  bottom: 26px;
  z-index: 9000;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--fs-line);
  border-radius: 50%;
  background: var(--fs-card);
  color: var(--fs-ink-2);
  box-shadow: 0 6px 20px rgba(24, 28, 48, .13);
  cursor: pointer;
  transition: transform .16s, color .16s, border-color .16s;
}
.fshs-fab:hover {
  color: var(--fs-accent);
  border-color: var(--fs-accent);
  transform: translateY(-1px);
}

/* ---------------- 面板 ---------------- */
.fshs-mask {
  position: fixed;
  inset: 0;
  z-index: 9500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(18, 22, 38, .46);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}
.fshs-mask[hidden] { display: none; }

.fshs-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 760px;
  max-height: min(88vh, 900px);
  border-radius: 18px;
  background: #fdfcfa;
  box-shadow: 0 30px 70px rgba(12, 16, 32, .28);
  overflow: hidden;
}
.fshs-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid #eeecf2;
}
.fshs-head-l { flex: 1; min-width: 0; }
.fshs-head-l b {
  display: block;
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: -.01em;
  line-height: 1.45;
  color: #262a38;
}
.fshs-head-l a {
  display: block;
  margin-top: 4px;
  font-size: 11.5px;
  color: #9296a8;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fshs-x {
  flex: none;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: #9195a6;
  cursor: pointer;
}
.fshs-x:hover { background: #f1f0f5; color: #262a38; }

.fshs-tabs {
  display: flex;
  gap: 4px;
  padding: 10px 16px 0;
  border-bottom: 1px solid #eeecf2;
  overflow-x: auto;
}
.fshs-tabs[hidden] { display: none; }
.fshs-tabs button {
  flex: none;
  padding: 9px 13px 11px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  color: #767b8c;
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: color .15s, border-color .15s;
}
.fshs-tabs button:hover { color: #262a38; }
.fshs-tabs button.on {
  color: #c2603c;
  border-bottom-color: #c2603c;
  font-weight: 600;
}

.fshs-stage {
  flex: 1;
  min-height: 0;
  padding: 18px 20px 22px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.fshs-hint {
  margin: 0 0 14px;
  font-size: 12px;
  line-height: 1.75;
  color: #85899a;
}

/* 卡片预览 */
.fshs-cards {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.fshs-card {
  width: 216px;
  border: 1px solid #e6e4ee;
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(24, 28, 48, .05);
}
.fshs-card canvas {
  display: block;
  width: 100%;
  height: auto;
}
.fshs-card-t {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 9px;
  border-top: 1px solid #f0eff5;
  font-size: 11px;
  color: #8a8e9d;
}
.fshs-card-t b { color: #3a3f4d; font-weight: 600; }

/* 文案框 */
.fshs-text {
  width: 100%;
  margin: 14px 0 0;
  padding: 11px 13px;
  border: 1px solid #e6e4ee;
  border-radius: 10px;
  background: #fff;
  color: #3a3f4d;
  font-family: inherit;
  font-size: 12.5px;
  line-height: 1.8;
  resize: vertical;
  min-height: 96px;
}

.fshs-acts {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.fshs-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 15px;
  border: 1px solid #dcdae6;
  border-radius: 9px;
  background: #fff;
  color: #3a3f4d;
  font-family: inherit;
  font-size: 12.5px;
  cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
}
.fshs-btn:hover { border-color: #b9b6c9; }
.fshs-btn.primary {
  border-color: #c2603c;
  background: #c2603c;
  color: #fff;
}
.fshs-btn.primary:hover { background: #ad5334; border-color: #ad5334; }
.fshs-btn:disabled { opacity: .55; cursor: default; }

.fshs-empty {
  padding: 26px 0;
  text-align: center;
  font-size: 12.5px;
  color: #9296a8;
}

/* 提示条 */
.fshs-toast {
  position: absolute;
  left: 50%;
  bottom: 22px;
  transform: translate(-50%, 8px);
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(32, 36, 52, .92);
  color: #fff;
  font-size: 12.5px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s, transform .18s;
}
.fshs-toast[hidden] { display: none; }
.fshs-toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---------------- 窄屏 ---------------- */
@media (max-width: 720px) {
  .fshs-mask { padding: 0; align-items: flex-end; }
  .fshs-panel {
    max-width: none;
    max-height: 92vh;
    border-radius: 16px 16px 0 0;
  }
  .fshs-stage { padding: 16px; }
  .fshs-cards { gap: 10px; }
  .fshs-card { width: calc(50% - 5px); }
  .fshs-fab { right: 14px; bottom: 18px; width: 42px; height: 42px; }
  .fshs-bar { gap: 6px; }
  .fshs-chip { padding: 0 11px; }
  .fshs-chip span { font-size: 12px; }
}

/* ---------- 手机上「长按保存到相册」的大图预览 ---------- */

.fshs-big {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(18, 14, 12, .88);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}

.fshs-big-in {
  width: 100%;
  max-width: 520px;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #fff;
  border-radius: 14px;
  padding: 12px 14px 14px;
  box-sizing: border-box;
  overflow: hidden;
}

.fshs-big-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: #3a3f4d;
}

.fshs-big-n { font-weight: 600; letter-spacing: .2px; }

.fshs-big-x {
  border: 0;
  background: transparent;
  font-size: 20px;
  line-height: 1;
  color: #8a8f9c;
  cursor: pointer;
  padding: 4px 6px;
}

.fshs-big-tip {
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
  color: #c0392b;
  background: #fff6f3;
  border: 1px solid #ffe3da;
  border-radius: 8px;
  padding: 8px 10px;
}

.fshs-big-img {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  background: #f6f5f3;
  border-radius: 10px;
}

.fshs-big-img img {
  display: block;
  max-width: 100%;
  max-height: 64vh;
  width: auto;
  height: auto;
  -webkit-user-select: auto;
  user-select: auto;
  -webkit-touch-callout: default;
}

.fshs-big-ft {
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.fshs-big-ft .fshs-btn { flex: 1 1 0; }

@media (max-width: 420px) {
  .fshs-big { padding: 8px; }
  .fshs-big-img img { max-height: 58vh; }
}
