/* ==========================================================================
   8FO SMART CARD · 数智名片
   一套 CSS 同时服务两个面：公开名片页（.sc）与名片编辑器（.ed）。
   公开页是「访客只读的身份页」，编辑器是「主人的工作台」，两者共用色板与字体，
   但密度不同：公开页留白大、字大；编辑器信息密、控件小。
   ========================================================================== */

:root {
  --sc-navy: #05273F;
  --sc-navy-2: #0A3A5C;
  --sc-gold: #C8963E;
  --sc-ink: #0B1C29;
  --sc-t2: #44586A;
  --sc-t3: #6B7C89;
  --sc-line: #E4E9E6;
  --sc-bg: #F5F7F6;
  --sc-accent: #C8963E;
  --sc-radius: 14px;
  --sc-av-radius: 50%;
  --sc-name-font: "Noto Serif SC", "Songti SC", Georgia, serif;
  --sc-hero-bg: radial-gradient(120% 140% at 12% -20%, #14507A 0%, #072F49 46%, #041C2D 100%);
  --sc-hero-ink: #FFFFFF;
  --sc-hero-sub: rgba(255, 255, 255, .68);
  --sc-sans: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --sc-latin: "IBM Plex Sans", "Helvetica Neue", Arial, var(--sc-sans);
}

.sc *,
.sc *::before,
.sc *::after { box-sizing: border-box; }

.sc {
  margin: 0;
  min-height: 100vh;
  background: var(--sc-bg);
  color: var(--sc-ink);
  font-family: var(--sc-sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
.sc h1, .sc h2, .sc h3, .sc p { margin: 0; }
.sc a { color: inherit; text-decoration: none; }
.sc img { max-width: 100%; display: block; }
.sc button { font: inherit; }

/* 深色区由内容自然撑开：顶栏 + 主视觉都在这个容器里，
   面板用负 margin 压在容器下沿上。这样深色边界永远落在面板背后，
   不依赖任何视口高度魔法数字，长名 / 长职位也不会穿帮。 */
.sc-hero-wrap {
  position: relative;
  background: var(--sc-hero-bg);
  overflow: hidden;
}
/* 封面图：铺满深色区，但不完全盖死——留约四成模板主色透出来，
   否则一张冷调封面会把 creative（暖棕）、professional（墨绿）的个性抹平。
   上面再压一层自下而上的深色渐变，保证名字与职位在任何一张图上都够对比度。 */
.sc-hero-wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--sc-cover);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  opacity: .6;
}
.sc-hero-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg,
    rgba(6,18,30,.10) 0%, rgba(6,18,30,.20) 46%,
    rgba(6,18,30,.56) 82%, rgba(6,18,30,.86) 100%);
}
.sc-main { position: relative; z-index: 1; padding-bottom: 64px; }

/* ------------------------------------------------------------------ 顶栏 */
.sc-top {
  position: relative;
  z-index: 2;
  max-width: 1080px;
  margin: 0 auto;
  padding: 22px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.sc-brand {
  display: inline-flex;
  align-items: baseline;
  gap: 1px;
  color: var(--sc-hero-ink);
  font-family: var(--sc-latin);
  letter-spacing: .02em;
}
.sc-brand-m {
  font-size: 22px;
  font-weight: 700;
  color: var(--sc-gold);
}
.sc-brand-t { font-size: 17px; font-weight: 600; letter-spacing: .16em; }
.sc-top-nav { display: flex; align-items: center; gap: 18px; }
.sc-top-nav a { color: var(--sc-hero-sub); font-size: 13px; }
.sc-top-nav a:hover { color: #fff; }
.sc-top-cta {
  border: 1px solid rgba(255, 255, 255, .34);
  border-radius: 100px;
  padding: 7px 16px;
  color: #fff !important;
  font-size: 12.5px;
}
.sc-top-cta:hover { background: rgba(255, 255, 255, .1); }

/* 本人的预览条：明确告知「别人看到的是这个，你自己在看预览」 */
.sc-owner-bar {
  position: relative;
  z-index: 2;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px 10px;
  display: flex;
  gap: 12px;
  align-items: center;
  color: rgba(255, 255, 255, .7);
  font-size: 12px;
}
.sc-owner-bar a {
  color: var(--sc-gold);
  border-bottom: 1px solid rgba(200, 150, 62, .4);
}

/* ------------------------------------------------------------------ 主视觉 */
.sc-hero {
  position: relative;
  z-index: 1;
  max-width: 1080px;
  margin: 0 auto;
  padding: 18px 24px 104px;
}
.sc-hero-in {
  display: flex;
  align-items: center;
  gap: 26px;
}
.sc-av {
  flex: 0 0 auto;
  width: 112px;
  height: 112px;
  border-radius: var(--sc-av-radius);
  overflow: hidden;
  background: linear-gradient(135deg, #1D5C87, #0A2E47);
  border: 3px solid rgba(255, 255, 255, .16);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .28);
  display: flex;
  align-items: center;
  justify-content: center;
}
.sc-avatar-img { width: 100%; height: 100%; object-fit: cover; }
.sc-avatar-mono {
  font-family: var(--sc-name-font);
  font-size: 40px;
  color: #fff;
  letter-spacing: .02em;
}
.sc-id { min-width: 0; }
.sc-name {
  font-family: var(--sc-name-font);
  font-size: 38px;
  line-height: 1.2;
  letter-spacing: .01em;
  color: var(--sc-hero-ink);
  font-weight: 600;
}
.sc-name-en {
  margin-top: 4px;
  font-family: var(--sc-latin);
  font-size: 13px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--sc-hero-sub);
}
.sc-title {
  margin-top: 10px;
  font-size: 15.5px;
  color: var(--sc-hero-ink);
  opacity: .92;
}
.sc-meta {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: var(--sc-hero-sub);
}
.sc-loc { letter-spacing: .04em; }
.sc-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px 3px 8px;
  border-radius: 100px;
  background: rgba(200, 150, 62, .14);
  border: 1px solid rgba(200, 150, 62, .4);
  color: var(--sc-gold);
  font-family: var(--sc-latin);
  font-size: 10.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  white-space: nowrap;
}
.sc-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--sc-gold);
  box-shadow: 0 0 0 3px rgba(200, 150, 62, .18);
}
.sc-org {
  display: block;
  margin-top: 6px;
  font-size: 13.5px;
  color: var(--sc-hero-sub);
}
a.sc-org { border-bottom: 1px solid rgba(255, 255, 255, .22); }

/* ------------------------------------------------------------------ 操作面板 */
.sc-panel {
  position: relative;
  z-index: 2;
  max-width: 1032px;
  margin: -76px auto 0;
  background: #fff;
  border: 1px solid var(--sc-line);
  border-radius: var(--sc-radius);
  padding: 20px 24px;
  box-shadow: 0 18px 48px rgba(6, 32, 49, .12);
}
.sc-acts { display: flex; flex-wrap: wrap; gap: 10px; }
.sc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 42px;
  padding: 0 20px;
  border-radius: 8px;
  border: 1px solid #D3DBD7;
  background: #fff;
  color: var(--sc-ink);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background .16s, border-color .16s, transform .16s;
  white-space: nowrap;
}
.sc-btn:hover { border-color: #B9C6C0; background: #FBFCFB; }
.sc-btn:active { transform: translateY(1px); }
.sc-btn--primary {
  background: var(--sc-accent);
  border-color: var(--sc-accent);
  color: #08222F;
  font-weight: 600;
}
.sc-btn--primary:hover { background: #D8A64D; border-color: #D8A64D; }
.sc-btn--ghost { border-color: transparent; color: var(--sc-t2); background: #F3F6F4; }
.sc-btn--ghost:hover { background: #EAEFEC; }

.sc-quick {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--sc-line);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.sc-q {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 9px;
  background: #F7F9F8;
  border: 1px solid transparent;
  font-size: 13px;
  min-width: 0;
}
.sc-q:hover { background: #F0F4F2; border-color: #E1E8E5; }
.sc-q-m {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: var(--pc, #6E8391);
}
.sc-q-m svg { width: 15px; height: 15px; display: block; }
.sc-q-b { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.sc-q-l {
  font-size: 11.5px;
  line-height: 1.35;
  color: var(--sc-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sc-q-v {
  font-size: 13px;
  line-height: 1.4;
  font-weight: 500;
  color: var(--sc-ink);
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ------------------------------------------------------------------ 双栏 */
.sc-grid {
  max-width: 1032px;
  margin: 26px auto 0;
  padding: 0 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 336px;
  gap: 30px;
  align-items: start;
}
.sc-col, .sc-side { min-width: 0; }
.sc-side { display: flex; flex-direction: column; gap: 22px; }

.sc-sec { margin: 0 0 26px; }
.sc-sec:last-child { margin-bottom: 0; }
.sc-sec-t {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 12px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--sc-t3);
}
.sc-sec-t::before {
  content: "";
  width: 14px;
  height: 2px;
  background: var(--sc-accent);
  border-radius: 2px;
}
.sc-bio p {
  font-size: 15px;
  line-height: 1.85;
  color: #263B4A;
  margin-bottom: 12px;
}
.sc-bio p:last-child { margin-bottom: 0; }

.sc-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.sc-tag {
  padding: 5px 11px;
  border-radius: 100px;
  background: #EDF2EF;
  color: #3C5348;
  font-size: 12.5px;
}

/* 联系渠道 */
.sc-chs { display: flex; flex-direction: column; gap: 8px; }
.sc-ch {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 13px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--sc-line);
  transition: border-color .16s, box-shadow .16s, transform .16s;
  min-width: 0;
}
a.sc-ch:hover {
  border-color: #CFDAD4;
  box-shadow: 0 6px 18px rgba(8, 34, 47, .07);
  transform: translateY(-1px);
}
.sc-ch-mark {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--pc, #7C8A94);
  color: #fff;
  font-family: var(--sc-latin);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .02em;
}
.sc-ch-mark--plain {
  background: #EFF3F1;
  color: #5D7367;
  font-size: 9.5px;
  letter-spacing: .04em;
}
.sc-ch-body { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.sc-ch-lab {
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--sc-t3);
  display: flex;
  align-items: center;
  gap: 6px;
}
.sc-ch-val {
  font-size: 13.5px;
  color: var(--sc-ink);
  overflow-wrap: anywhere;
}
.sc-lock {
  font-size: 9.5px;
  letter-spacing: 0;
  padding: 1px 5px;
  border-radius: 4px;
  background: #F0F3F1;
  color: #8A9A92;
  text-transform: none;
}

/* 外链 */
.sc-links { display: flex; flex-direction: column; gap: 8px; }
.sc-lk {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--sc-line);
  transition: border-color .16s, box-shadow .16s, transform .16s;
  min-width: 0;
}
.sc-lk:hover {
  border-color: #CFDAD4;
  box-shadow: 0 6px 18px rgba(8, 34, 47, .07);
  transform: translateY(-1px);
}
.sc-lk-mark {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--pc, #7C8A94);
  color: #fff;
  font-family: var(--sc-latin);
  font-size: 11px;
  font-weight: 700;
}
.sc-lk-mark--plain { background: #EFF3F1; color: #5D7367; }
.sc-lk-body { min-width: 0; display: flex; flex-direction: column; }
.sc-lk-lab {
  font-size: 13.5px;
  color: var(--sc-ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sc-lk-host {
  font-family: var(--sc-latin);
  font-size: 11px;
  color: #8B9AA4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sc-lk-go { margin-left: auto; color: #B4C1BB; font-size: 13px; }

/* 二维码 / 企业卡 */
.sc-qrbox {
  background: #fff;
  border: 1px solid var(--sc-line);
  border-radius: var(--sc-radius);
  padding: 16px;
}
.sc-qr { display: flex; align-items: center; gap: 14px; }
.sc-qr img {
  width: 96px;
  height: 96px;
  border-radius: 8px;
  background: #fff;
}
.sc-qr-t { font-size: 12.5px; line-height: 1.6; color: var(--sc-t2); }

.sc-orgbox {
  background: #fff;
  border: 1px solid var(--sc-line);
  border-radius: var(--sc-radius);
  padding: 16px;
}
.sc-orgcard { display: block; }
.sc-orgcard-b {
  display: inline-block;
  font-family: var(--sc-latin);
  font-size: 9.5px;
  letter-spacing: .12em;
  color: var(--sc-gold);
  border: 1px solid rgba(200, 150, 62, .36);
  border-radius: 4px;
  padding: 1px 6px;
}
.sc-orgcard-n {
  display: block;
  margin-top: 9px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
}
.sc-orgcard-m {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  color: var(--sc-t3);
}
.sc-orgcard-go {
  display: inline-block;
  margin-top: 10px;
  font-size: 12px;
  color: var(--sc-t2);
  border-bottom: 1px solid var(--sc-line);
}

/* ------------------------------------------------------------------ 页脚 */
.sc-foot {
  max-width: 1032px;
  margin: 44px auto 0;
  padding: 26px 24px 0;
  border-top: 1px solid var(--sc-line);
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
}
.sc-foot-l {
  font-family: var(--sc-latin);
  font-size: 11px;
  letter-spacing: .14em;
  color: #7E8F99;
}
.sc-foot-s { margin-top: 5px; font-size: 11.5px; color: #9AA8B0; max-width: 460px; }
.sc-foot-cta {
  font-size: 12.5px;
  color: var(--sc-ink);
  border-bottom: 1px solid var(--sc-accent);
  padding-bottom: 2px;
}

/* ------------------------------------------------------------------ 模板差异
   六个模板改的是「气质」：主视觉、字族、圆角、密度。
   只换颜色会被一眼看穿是同一个东西。 */
.tpl-corporate { --sc-radius: 6px; --sc-av-radius: 10px;
  --sc-hero-bg: linear-gradient(180deg, #0E2F49 0%, #0B2A42 100%);
  --sc-name-font: var(--sc-latin); }
.tpl-corporate .sc-name { font-size: 34px; letter-spacing: .01em; font-weight: 600; }
.tpl-corporate .sc-sec-t { letter-spacing: .1em; }
.tpl-corporate .sc-btn { border-radius: 4px; }
.tpl-corporate .sc-panel { border-radius: 6px; }

.tpl-minimal { --sc-hero-bg: linear-gradient(180deg, #FFFFFF 0%, #F7F8F7 100%);
  --sc-hero-ink: #0B1C29; --sc-hero-sub: #77878F; --sc-radius: 0px; }
/* 极简模板整页浅色，不要深色区块，封面也不显示 */
.tpl-minimal .sc-hero-wrap { background: none; }
.tpl-minimal .sc-hero-wrap::before,
.tpl-minimal .sc-hero-wrap::after { content: none; }
.tpl-minimal .sc-top-nav a { color: #77878F; }
.tpl-minimal .sc-top-nav a:hover { color: #0B1C29; }
.tpl-minimal .sc-top-cta { border-color: #D6DEDB; color: #0B1C29 !important; }
.tpl-minimal .sc-brand { color: #0B1C29; }
.tpl-minimal .sc-av { border-color: #E4E9E6; box-shadow: none; background: #EDF1EF; }
.tpl-minimal .sc-avatar-mono { color: #6B7C89; }
.tpl-minimal .sc-name { font-size: 46px; font-weight: 400; letter-spacing: -.02em; }
.tpl-minimal .sc-hero { padding-bottom: 40px; border-bottom: 1px solid var(--sc-line); }
.tpl-minimal .sc-panel { background: transparent; border: 0; border-radius: 0; box-shadow: none;
  margin-top: 0; padding-top: 22px; }
.tpl-minimal .sc-owner-bar { color: #77878F; }
.tpl-minimal .sc-badge { background: transparent; }

.tpl-creative { --sc-radius: 22px; --sc-av-radius: 32% 68% 60% 40% / 48% 42% 58% 52%;
  --sc-hero-bg: radial-gradient(90% 120% at 80% 0%, #6B4A3A 0%, #2E2A3F 52%, #171C2C 100%); }
.tpl-creative .sc-name { letter-spacing: .02em; }
.tpl-creative .sc-hero-in { align-items: flex-end; }
.tpl-creative .sc-av { width: 124px; height: 124px; }
.tpl-creative .sc-panel { border-radius: 22px; }
.tpl-creative .sc-sec-t::before { width: 22px; background: #D08A5E; }
.tpl-creative .sc-btn--primary { background: #D08A5E; border-color: #D08A5E; }

.tpl-industrial { --sc-radius: 3px; --sc-av-radius: 3px;
  --sc-hero-bg: linear-gradient(180deg, #14181B 0%, #101417 60%, #0B0E10 100%);
  --sc-name-font: var(--sc-sans); }
.tpl-industrial .sc-name { font-size: 33px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; }
.tpl-industrial .sc-hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 78%);
  mask-image: linear-gradient(180deg, #000 0%, transparent 78%);
}
.tpl-industrial .sc-sec-t::before { background: #E0A33E; }
.tpl-industrial .sc-panel { border-radius: 3px; }
.tpl-industrial .sc-btn { border-radius: 3px; }
.tpl-industrial .sc-av { border-color: rgba(224, 163, 62, .5); }

.tpl-professional { --sc-radius: 8px; --sc-av-radius: 50%;
  --sc-hero-bg: linear-gradient(160deg, #123A33 0%, #0C2A25 100%);
  --sc-accent: #C8A96A; }
.tpl-professional .sc-name { font-weight: 400; letter-spacing: .03em; }
.tpl-professional .sc-bio p { color: #1F3330; }
.tpl-professional .sc-btn--primary { background: #C8A96A; border-color: #C8A96A; }

/* 深色主视觉下，正文仍保持浅底；只有 minimal 是整页浅色 */
.tpl-minimal .sc-main { padding-top: 0; }

/* ------------------------------------------------------------------ 抽屉 / 提示 */
.sc-sheet {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(4, 18, 28, .52);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 18px;
}
.sc-sheet[hidden] { display: none; }
.sc-sheet-in {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 16px;
  padding: 22px 22px 24px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .3);
  animation: sc-up .22s ease-out;
}
@keyframes sc-up { from { transform: translateY(14px); opacity: 0; } }
.sc-sheet-x {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 30px;
  height: 30px;
  border: 0;
  background: transparent;
  font-size: 20px;
  color: #90A0A8;
  cursor: pointer;
}
.sc-sheet-in h3 { font-size: 16px; margin-bottom: 14px; }
.sc-sheet-p { font-size: 13px; color: #5C6E7C; margin-bottom: 12px; }
.sc-sheet-ta {
  width: 100%;
  min-height: 82px;
  border: 1px solid #DDE3E0;
  border-radius: 9px;
  padding: 10px 12px;
  font: inherit;
  font-size: 13.5px;
  resize: vertical;
}
.sc-sheet-ta:focus { outline: 2px solid rgba(200, 150, 62, .3); border-color: #C8963E; }
.sc-sheet-row { margin-top: 12px; display: flex; justify-content: flex-end; }
.sc-share { text-align: center; }
.sc-share-qr { margin: 0 auto 10px; width: 180px; height: 180px; border-radius: 8px; }
.sc-share-t { font-family: var(--sc-latin); font-size: 12.5px; color: #6B7C89; }
.sc-share-btns { display: flex; gap: 10px; justify-content: center; margin-top: 14px; }
.sc-toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  transform: translateX(-50%);
  z-index: 80;
  background: #0B1C29;
  color: #fff;
  font-size: 13px;
  padding: 10px 18px;
  border-radius: 100px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
  animation: sc-up .2s ease-out;
}
body.sc-lock { overflow: hidden; }

/* ------------------------------------------------------------------ 404 */
.sc-404 {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: radial-gradient(120% 140% at 50% 0%, #0B3A5C 0%, #041C2D 70%);
  color: #fff;
}
.sc-404-in { text-align: center; padding: 40px 24px; max-width: 460px; }
.sc-404-code {
  font-family: var(--sc-latin);
  font-size: 13px;
  letter-spacing: .3em;
  color: var(--sc-gold);
  margin-bottom: 10px;
}
.sc-404 h1 { font-family: var(--sc-name-font); font-size: 26px; margin-bottom: 10px; }
.sc-404-p { color: rgba(255, 255, 255, .62); font-size: 13.5px; margin-bottom: 22px; }
.sc-404-acts { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.sc-404 .sc-btn { border-color: rgba(255, 255, 255, .28); background: transparent; color: #fff; }
.sc-404 .sc-btn--primary { background: var(--sc-gold); border-color: var(--sc-gold); color: #08222F; }

/* ------------------------------------------------------------------ 响应式 */
@media (max-width: 900px) {
  .sc-grid { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .sc-side { order: 2; }
  /* 单列时按「关于 → 领域 → 怎么联系我 → 其他入口 → 扫码/企业」重排。
     联系方式是名片的第二重要信息，不该被 4 组链接压到最后。
     桌面端两栏结构不受影响，这里只在窄屏把两个容器拆平。 */
  .sc-grid { display: flex; flex-direction: column; gap: 0; }
  .sc-col, .sc-side { display: contents; }
  .sc-sec--about { order: 1; }
  .sc-sec--tags { order: 2; }
  .sc-chans { order: 3; }
  .sc-sec--link { order: 4; }
  .sc-qrbox { order: 5; }
  .sc-orgbox { order: 6; }
  .sc-panel { max-width: none; margin: -60px 16px 0; padding: 18px; }
  .sc-grid { padding: 0 16px; }
  .sc-foot { padding: 22px 16px 0; margin-top: 32px; }
  .sc-hero { padding: 10px 16px 88px; }
  .sc-top { padding: 16px; }
  .sc-owner-bar { padding: 0 16px 8px; }
  .sc-qr { gap: 12px; }
}
@media (max-width: 560px) {
  .sc { font-size: 14.5px; }
  .sc-hero-in { flex-direction: column; align-items: flex-start; gap: 16px; }
  .sc-av { width: 84px; height: 84px; }
  .sc-avatar-mono { font-size: 30px; }
  .sc-name { font-size: 27px; }
  .tpl-minimal .sc-name { font-size: 32px; }
  .sc-title { font-size: 14px; }
  .sc-hero { padding-bottom: 78px; }
  .sc-panel { margin-top: -56px; }
  .sc-acts .sc-btn { flex: 1 1 auto; height: 40px; padding: 0 14px; font-size: 13px; }
  .sc-quick { grid-template-columns: minmax(0, 1fr); }
  .sc-top-nav a:first-child { display: none; }
  .sc-foot { flex-direction: column; align-items: flex-start; }
}

/* ==========================================================================
   编辑器
   ========================================================================== */
.ed {
  margin: 0;
  min-height: 100vh;
  background: #F4F6F5;
  color: #0B1C29;
  font-family: var(--sc-sans);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
.ed *, .ed *::before, .ed *::after { box-sizing: border-box; }
.ed a { color: inherit; text-decoration: none; }
.ed h1, .ed h2, .ed h3, .ed p { margin: 0; }
.ed button { font: inherit; }
.ed input, .ed select, .ed textarea { font: inherit; color: inherit; }

.ed-top {
  position: sticky;
  top: 0;
  z-index: 30;
  height: 58px;
  background: #05273F;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 20px;
}
.ed-brand { display: flex; align-items: baseline; gap: 8px; color: #fff; }
.ed-brand b { font-family: var(--sc-latin); font-size: 17px; letter-spacing: .04em; }
.ed-brand span { font-size: 12px; color: rgba(255, 255, 255, .55); letter-spacing: .06em; }
.ed-top-sp { flex: 1; }
.ed-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 10px;
  border-radius: 100px;
  font-size: 11.5px;
  background: rgba(255, 255, 255, .1);
  color: rgba(255, 255, 255, .8);
}
.ed-pill i { width: 6px; height: 6px; border-radius: 50%; background: #8FA6B8; }
.ed-pill.is-live { background: rgba(47, 125, 95, .22); color: #9FD9C1; }
.ed-pill.is-live i { background: #67D3A4; }
.ed-pill.is-draft { background: rgba(200, 150, 62, .18); color: #E3C58C; }
.ed-pill.is-draft i { background: #C8963E; }
.ed-pill.is-frozen { background: rgba(180, 85, 59, .2); color: #F0B9A6; }
.ed-top a.ed-link {
  font-size: 12.5px;
  color: rgba(255, 255, 255, .72);
  padding: 6px 10px;
  border-radius: 6px;
}
.ed-top a.ed-link:hover { background: rgba(255, 255, 255, .08); color: #fff; }

.ed-wrap {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr) 396px;
  gap: 0;
  min-height: calc(100vh - 58px);
  align-items: start;
}

/* 左栏 */
.ed-nav {
  position: sticky;
  top: 58px;
  padding: 18px 12px;
  border-right: 1px solid #E4E9E6;
  min-height: calc(100vh - 58px);
  background: #FAFBFA;
}
.ed-nav button {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 9px 11px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #4A5D6B;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  margin-bottom: 2px;
}
.ed-nav button:hover { background: #EFF3F1; color: #0B1C29; }
.ed-nav button.is-on { background: #E7EEE9; color: #0B1C29; font-weight: 600; }
.ed-nav button em {
  margin-left: auto;
  font-style: normal;
  font-size: 10.5px;
  background: #DCE6E0;
  color: #4F6A5C;
  padding: 1px 6px;
  border-radius: 100px;
}
.ed-nav .ed-nav-sep {
  margin: 14px 11px 8px;
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #A3B0B8;
}

/* 中栏 */
.ed-body { padding: 22px 26px 80px; min-width: 0; }
.ed-pane { display: none; }
.ed-pane.is-on { display: block; }
.ed-pane-h { margin-bottom: 18px; }
.ed-pane-h h1 { font-size: 19px; font-weight: 600; letter-spacing: -.2px; }
.ed-pane-h p { margin-top: 5px; font-size: 12.5px; color: #7A8B95; line-height: 1.6; }

.ed-card {
  background: #fff;
  border: 1px solid #E4E9E6;
  border-radius: 10px;
  padding: 18px 20px;
  margin-bottom: 16px;
}
.ed-card-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.ed-card-h h2 { font-size: 13.5px; font-weight: 600; }
.ed-card-h span { font-size: 11.5px; color: #93A2AB; }

.ed-field { margin-bottom: 13px; }
.ed-field:last-child { margin-bottom: 0; }
.ed-label {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 5px;
  font-size: 11.5px;
  color: #63767F;
  letter-spacing: .02em;
}
.ed-label b { color: #B4553B; font-weight: 400; }
.ed-input, .ed-select, .ed-textarea {
  width: 100%;
  border: 1px solid #DDE3E0;
  border-radius: 7px;
  background: #FBFCFB;
  padding: 9px 11px;
  font-size: 13.5px;
  transition: border-color .15s, background .15s;
}
.ed-input:focus, .ed-select:focus, .ed-textarea:focus {
  outline: none;
  border-color: #C8963E;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(200, 150, 62, .12);
}
.ed-textarea { min-height: 108px; resize: vertical; line-height: 1.7; }
.ed-hint { margin-top: 5px; font-size: 11px; color: #94A3AB; line-height: 1.5; }
.ed-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ed-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
@media (max-width: 1080px) { .ed-3 { grid-template-columns: 1fr 1fr; } }

.ed-line {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-top: 1px solid #F0F3F1;
}
.ed-line:first-child { border-top: 0; }
.ed-line .ed-grow { flex: 1; min-width: 0; }
.ed-line-name { font-size: 13px; }
.ed-line-sub { font-size: 11.5px; color: #8A9AA6; overflow-wrap: anywhere; }

.ed-avatar-row { display: flex; align-items: flex-start; gap: 16px; }
.ed-avatar {
  position: relative;
  width: 88px;
  height: 88px;
  flex: 0 0 auto;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(135deg, #1D5C87, #0A2E47);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
}
.ed-avatar img { width: 100%; height: 100%; object-fit: cover; }
.ed-avatar::after {
  content: "更换";
  position: absolute;
  inset: auto 0 0;
  padding: 3px 0;
  background: rgba(4, 20, 30, .62);
  color: #fff;
  font-size: 10px;
  text-align: center;
}
.ed-cover {
  position: relative;
  width: 100%;
  height: 96px;
  border-radius: 8px;
  border: 1px dashed #D6DEDA;
  background: linear-gradient(135deg, #F3F7FA, #E7EDF2);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #93A2AB;
  font-size: 12px;
  cursor: pointer;
}
.ed-cover img { width: 100%; height: 100%; object-fit: cover; }

.ed-tpls { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.ed-tpl {
  border: 1px solid #E1E7E4;
  border-radius: 8px;
  padding: 8px;
  background: #fff;
  cursor: pointer;
  text-align: left;
}
.ed-tpl:hover { border-color: #C6D2CB; }
.ed-tpl.is-on { border-color: #C8963E; box-shadow: 0 0 0 2px rgba(200, 150, 62, .16); }
.ed-tpl-swatch {
  height: 42px;
  border-radius: 5px;
  margin-bottom: 6px;
  position: relative;
  overflow: hidden;
}
.ed-tpl-swatch::after {
  content: "";
  position: absolute;
  left: 9px;
  right: 9px;
  bottom: 8px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, .5);
}
.ed-tpl-name { font-size: 11.5px; color: #475B69; }

.ed-swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.ed-swatch {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 0;
}
.ed-swatch.is-on { border-color: #0B1C29; box-shadow: 0 0 0 2px #fff inset; }

.ed-list { display: flex; flex-direction: column; }
.ed-item {
  border: 1px solid #E4E9E6;
  border-radius: 9px;
  padding: 12px 13px;
  margin-bottom: 9px;
  background: #fff;
}
.ed-item.is-drag { opacity: .45; }
.ed-item-h {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 10px;
}
.ed-grip {
  width: 18px;
  height: 22px;
  flex: 0 0 auto;
  cursor: grab;
  background-image: radial-gradient(#C3CFC9 1px, transparent 1px);
  background-size: 5px 5px;
  background-position: 2px 3px;
  border-radius: 3px;
}
.ed-item-t { font-size: 12.5px; font-weight: 600; }
.ed-item-x {
  margin-left: auto;
  border: 0;
  background: transparent;
  color: #A3B0B8;
  font-size: 12px;
  cursor: pointer;
  padding: 3px 6px;
  border-radius: 5px;
}
.ed-item-x:hover { background: #FBEEEA; color: #B4553B; }
.ed-updown { display: flex; gap: 2px; }
.ed-updown button {
  width: 22px;
  height: 22px;
  border: 1px solid #E1E7E4;
  background: #fff;
  border-radius: 4px;
  color: #7A8B95;
  font-size: 10px;
  cursor: pointer;
  line-height: 1;
}
.ed-updown button:hover { background: #F4F7F5; }
.ed-empty {
  padding: 26px 18px;
  border: 1px dashed #DCE3DF;
  border-radius: 9px;
  text-align: center;
  color: #93A2AB;
  font-size: 12.5px;
  line-height: 1.7;
}
.ed-add {
  width: 100%;
  height: 38px;
  border: 1px dashed #CFD9D4;
  border-radius: 8px;
  background: #FAFBFA;
  color: #4F6A5C;
  font-size: 12.5px;
  cursor: pointer;
}
.ed-add:hover { background: #F2F6F3; border-color: #B9C8C0; }

.ed-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  padding: 0 18px;
  border-radius: 7px;
  border: 1px solid #D3DBD7;
  background: #fff;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}
.ed-btn:hover { background: #FAFBFA; border-color: #BFCBC5; }
.ed-btn--primary { background: #05273F; border-color: #05273F; color: #fff; }
.ed-btn--primary:hover { background: #0A3A5C; border-color: #0A3A5C; }
.ed-btn--gold { background: #C8963E; border-color: #C8963E; color: #08222F; font-weight: 600; }
.ed-btn--gold:hover { background: #D8A64D; border-color: #D8A64D; }
.ed-btn--sm { height: 30px; padding: 0 12px; font-size: 12px; }
.ed-btn:disabled { opacity: .55; cursor: not-allowed; }

.ed-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.ed-bar .ed-grow { flex: 1; }

.ed-note {
  padding: 11px 13px;
  border-radius: 8px;
  background: #F1F5F3;
  border: 1px solid #E1E8E4;
  font-size: 12px;
  line-height: 1.65;
  color: #4E6559;
}
.ed-warn {
  padding: 11px 13px;
  border-radius: 8px;
  background: #FDF4F1;
  border: 1px solid #F2DCD4;
  font-size: 12px;
  color: #8E4A34;
  line-height: 1.65;
}

/* 统计 */
.ed-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 16px; }
.ed-kpi {
  background: #fff;
  border: 1px solid #E4E9E6;
  border-radius: 9px;
  padding: 13px 14px;
}
.ed-kpi b { display: block; font-size: 22px; font-weight: 600; letter-spacing: -.4px; }
.ed-kpi span { font-size: 11px; color: #8A9AA6; }
.ed-chart { display: flex; align-items: flex-end; gap: 3px; height: 120px; padding-top: 8px; }
.ed-chart i {
  flex: 1;
  background: #C8D8CF;
  border-radius: 2px 2px 0 0;
  min-height: 2px;
  position: relative;
}
.ed-chart i:hover { background: #C8963E; }

/* 右栏预览 */
.ed-side {
  position: sticky;
  top: 58px;
  height: calc(100vh - 58px);
  border-left: 1px solid #E4E9E6;
  background: #EDF1EF;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ed-side-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  color: #6B7C89;
}
.ed-side-h a { color: #4A5D6B; border-bottom: 1px solid #C3CFC9; }
.ed-frame {
  flex: 1;
  width: 100%;
  border: 1px solid #DCE3DF;
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(8, 34, 47, .08);
}
.ed-frame iframe { width: 100%; height: 100%; border: 0; display: block; }

.ed-toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  z-index: 90;
  background: #0B1C29;
  color: #fff;
  font-size: 13px;
  padding: 10px 18px;
  border-radius: 100px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .22);
}
.ed-toast.is-bad { background: #8E3A26; }

/* 移动端：左栏转横向标签，预览折叠 */
.ed-preview-toggle { display: none !important; }
@media (max-width: 1180px) {
  .ed-wrap { grid-template-columns: 190px minmax(0, 1fr) 340px; }
}
@media (max-width: 1040px) {
  .ed-wrap { grid-template-columns: 180px minmax(0, 1fr); }
  .ed-side { display: none; }
  .ed-body { padding: 18px 18px 90px; }
  .ed-preview-toggle { display: inline-flex !important; }
}
@media (max-width: 760px) {
  .ed-top { padding: 0 12px; gap: 8px; }
  .ed-brand span { display: none; }
  .ed-wrap { display: block; }
  .ed-nav {
    position: static;
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid #E4E9E6;
    padding: 8px 10px;
    display: flex;
    gap: 6px;
    overflow-x: auto;
    background: #FAFBFA;
  }
  .ed-nav button { width: auto; margin: 0; white-space: nowrap; padding: 7px 12px; }
  .ed-nav button em, .ed-nav .ed-nav-sep { display: none; }
  .ed-body { padding: 14px 12px 90px; }
  .ed-2, .ed-3 { grid-template-columns: 1fr; }
  .ed-kpis { grid-template-columns: 1fr 1fr; }
  .ed-tpls { grid-template-columns: 1fr 1fr; }
  .ed-side.is-open {
    display: flex;
    position: fixed;
    inset: 58px 0 0;
    z-index: 40;
    height: auto;
  }
}

/* ------------------------------------------------------------------ AI 生成 */
.ed-ai .ed-card-h span { color: #8A6A2A; }
.ed-ai-in { display: flex; gap: 8px; align-items: stretch; }
.ed-ai-in .ed-input { flex: 1 1 auto; min-width: 0; }
.ed-ai-in .ed-btn { flex: 0 0 auto; height: auto; padding: 0 18px; }
.ed-ai-list { margin-top: 14px; border-top: 1px solid #EFF2F0; }
.ed-ai-row {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 9px 0; border-bottom: 1px solid #F4F6F5;
}
.ed-ai-row:last-child { border-bottom: 0; }
.ed-ai-row input[type=checkbox] { flex: 0 0 auto; margin: 4px 0 0; width: 15px; height: 15px; accent-color: var(--sc-accent); }
.ed-ai-k { flex: 0 0 92px; font-size: 12px; color: #6B7C89; padding-top: 1px; }
.ed-ai-v { flex: 1 1 auto; min-width: 0; font-size: 13px; color: var(--sc-ink); word-break: break-word; }
.ed-ai-v small { display: block; color: #8A98A2; font-size: 11.5px; margin-top: 2px; }
.ed-ai-bar { display: flex; gap: 8px; align-items: center; margin-top: 14px; flex-wrap: wrap; }
.ed-ai-note { font-size: 12px; color: #8A6A2A; }
@media (max-width: 560px) {
  .ed-ai-in { flex-wrap: wrap; }
  .ed-ai-in .ed-btn { width: 100%; height: 40px; }
  .ed-ai-k { flex-basis: 76px; }
}

/* ---------------------------------------------------------------- 预览链接提示条
   这条只出现在「拿 token 打开的未公开名片」上。放在主人提示条同一位置，
   但语气是「你正在看一份尚未公开的东西」，不是「这是你的卡」。 */
.sc-owner-bar--preview::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--sc-gold);
  flex: none;
}

/* ---------------------------------------------------------------- 编辑器：预览链接与清空 */
.ed-card--danger { border-color: #F0D6CE; background: #FEFBFA; }
.ed-card--danger .ed-card-h h2 { color: #8E4A34; }
.ed-btn--danger { background: #fff; border-color: #E3B8AA; color: #9C3F26; }
.ed-btn--danger:hover { background: #B4523A; border-color: #B4523A; color: #fff; }

.ed-pv {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 10px;
  padding: 11px 13px;
  border: 1px dashed #D9E0DC;
  border-radius: 8px;
  background: #FAFBFA;
}
.ed-pv code {
  font-size: 12px;
  line-height: 1.55;
  color: #2A4657;
  word-break: break-all;
}
.ed-pv small { font-size: 11px; color: #94A3AB; }
