/* =====================================================================
   站点样式 · 白色基调 + 高饱和控件 + 立体投影
   配色取自全站背景图（等距玩具风）：番茄红 / 橙 / 黄 / 宝蓝 / 青 / 粉 / 绿
   控件颜色按“控件类型”固定：
     主操作（发送/解锁/进入/提交）蓝 · 次要操作（secondary）青
     生成类（直接生成）橙 · 留下印象 粉 · 知识库入口 绿 · 博物馆入口 黄
   折叠栏的强调色按栏目固定（.fc-*）
   ===================================================================== */
:root {
  /* 色板 */
  --red: #ff5a3c;
  --red-d: #cf3a1e;
  --orange: #ff9f1c;
  --orange-d: #d17a00;
  --yellow: #ffc93c;
  --yellow-d: #d9a000;
  --green: #3ccb6a;
  --green-d: #1f9c4a;
  --teal: #14c4b6;
  --teal-d: #0a9488;
  --blue: #2f6bff;
  --blue-d: #1c4ed0;
  --pink: #ff5fa2;
  --pink-d: #d63c80;

  /* 中性色 */
  --ink: #1d2540;
  --muted: #667090;
  --line: #e1e6f4;
  --card: rgba(255, 255, 255, 0.97);
  --accent: var(--blue);
  --accent-soft: #eaf1ff;
  --radius: 6px;
  --cut: 8.5px; /* 折角：斜切的“腿长”约 12px */
  --leg: 12px;

  /* 投影（负扩散半径，让阴影只往下“落”，避免在折叠容器里被裁掉） */
  --shadow-sm: 0 1px 2px rgba(20, 32, 70, 0.1), 0 6px 12px -6px rgba(20, 32, 70, 0.28);
  --shadow: 0 1px 3px rgba(20, 32, 70, 0.1), 0 12px 22px -10px rgba(20, 32, 70, 0.32);
  --shadow-lg: 0 2px 4px rgba(20, 32, 70, 0.08), 0 18px 34px -12px rgba(20, 32, 70, 0.36);
  --shadow-hover: 0 2px 5px rgba(20, 32, 70, 0.12), 0 20px 30px -10px rgba(20, 32, 70, 0.4);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
    "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: #ffffff;
  line-height: 1.65;
  font-size: 15px;
}

/* 全站背景图：铺满视口，40% 不透明度叠在白底上 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  background: url("/img/site-bg.jpg") center center / cover no-repeat;
  opacity: 0.4;
  pointer-events: none;
}

.page {
  position: relative;
  z-index: 1;
  max-width: 820px;
  margin: 0 auto;
  padding: 28px 20px 60px;
}

/* 直接落在背景图上的文字：加一圈白色光晕保证可读 */
.hero-text h1,
.hero-meta,
.hero-contact,
.footer-note,
.museum-header h1,
.museum-sub,
.kb-header h1,
.kb-sub {
  text-shadow: 0 0 8px #fff, 0 0 3px #fff;
}

/* ---------- Hero ---------- */
.hero {
  margin-bottom: 20px;
}
.hero-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.hero-text h1 {
  margin: 0 0 6px;
  font-size: 30px;
  letter-spacing: 2px;
}
.hero-meta {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 14px;
}
.hero-contact {
  margin: 0;
  color: #4d5878;
  font-size: 13.5px;
}
.avatar {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  flex: none;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 30px;
  font-weight: 600;
  background: linear-gradient(135deg, var(--orange), var(--red));
  border: 3px solid #fff;
  box-shadow: 0 12px 18px -6px rgba(255, 90, 60, 0.5);
  overflow: hidden;
}
.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}
.hero-side {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: none;
}
.museum-pill {
  --c: var(--yellow);
  --c-d: var(--yellow-d);
  --glow: rgba(255, 190, 40, 0.7);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 18px 7px 14px;
  text-decoration: none;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}
.museum-pill-logo {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
}
.museum-pill-img {
  width: 18px;
  height: 18px;
  object-fit: cover;
  border-radius: 50%;
}

/* ---------- Chat ---------- */
.chat-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  margin-bottom: 26px;
  border: 1px solid rgba(20, 32, 70, 0.06);
}
.chat-head {
  padding: 14px 18px;
  position: relative;
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding-top: 19px;
}
.chat-head::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--red), var(--orange), var(--yellow), var(--green), var(--teal), var(--blue), var(--pink));
}
.chat-title {
  display: flex;
  align-items: center;
  gap: 12px;
}
.chat-title strong {
  display: block;
  font-size: 15.5px;
}
.chat-title small {
  color: var(--muted);
  font-size: 12.5px;
}
.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(60, 203, 106, 0.25);
  flex: none;
}
.chat-body {
  max-height: 320px;
  overflow-y: auto;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.msg {
  display: flex;
}
.msg.user {
  justify-content: flex-end;
}
.bubble {
  max-width: 78%;
  padding: 10px 14px;
  border-radius: 5px;
  font-size: 14.5px;
  white-space: pre-wrap;
  word-break: break-word;
}
.msg.assistant .bubble {
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 2px 5px 10px -4px rgba(20, 32, 70, 0.3);
  border-top-left-radius: 4px;
}
.msg.user .bubble {
  background: var(--blue);
  color: #fff;
  box-shadow: 2px 5px 10px -4px rgba(47, 107, 255, 0.6);
  border-top-right-radius: 4px;
}
.typing {
  display: inline-flex;
  gap: 4px;
}
.typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue);
  animation: blink 1.2s infinite both;
}
.typing span:nth-child(2) {
  background: var(--orange);
  animation-delay: 0.2s;
}
.typing span:nth-child(3) {
  background: var(--pink);
  animation-delay: 0.4s;
}
@keyframes blink {
  0%,
  80%,
  100% {
    opacity: 0.25;
  }
  40% {
    opacity: 1;
  }
}
.chat-input {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  background: #f7f9ff;
}
.chat-input input {
  flex: 1;
  border: 1.5px solid #d6ddf0;
  border-radius: 5px;
  padding: 10px 12px;
  font-size: 14.5px;
  outline: none;
  background: #fff;
  box-shadow: inset 0 2px 3px rgba(20, 32, 70, 0.06);
}
.chat-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 14px 16px 14px;
  background: #f7f9ff;
  border-bottom: 1px solid var(--line);
}
.chat-mode-btn {
  --c: #fff;
  --c-d: #cfd6ea;
  --glow: rgba(20, 32, 70, 0.28);
  --ring: 0 0 0 1px #d6ddf0;
  padding: 11px 20px 11px 14px;
  font-size: 14px;
  color: var(--muted);
}
.chat-mode-btn.active {
  --c: var(--teal);
  --c-d: var(--teal-d);
  --glow: rgba(20, 196, 182, 0.55);
  --ring: 0 0 0 0 transparent;
  color: #fff;
}
.chat-mode-btn.impr.active {
  --c: var(--pink);
  --c-d: var(--pink-d);
  --glow: rgba(255, 95, 162, 0.6);
}
.chat-panel[hidden] {
  display: none;
}
.chat-panel .chat-input {
  border-top: 1px solid var(--line);
}

/* ---------- 按钮：折纸风 ----------
   · 直角 + 右上角“折角”（斜切 + 翻起的一小片深色纸）
   · 对角折痕把纸面分成一亮一暗两个三角面
   · 投影向右下方落，没有底边
   覆盖：所有 button、博物馆入口、PDF 下载、App 链接。 */
button {
  --c: var(--blue);
  --c-d: var(--blue-d);
  --glow: rgba(47, 107, 255, 0.55);
  cursor: pointer;
  border: none;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}
:is(button:where(:not(.fold-head, .kb-tab, .link-danger, .entry-face, .writing-head, .lightbox-close)), .museum-pill, .pdf-download, .app-link) {
  position: relative;
  isolation: isolate;
  border: none !important;
  border-radius: 0 !important;
  background: linear-gradient(225deg, transparent var(--cut), var(--c) var(--cut));
  box-shadow: var(--ring, 0 0 0 0 transparent), 3px 6px 10px -4px var(--glow);
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.2s ease;
}
:is(button:where(:not(.fold-head, .kb-tab, .link-danger, .entry-face, .writing-head, .lightbox-close)), .museum-pill, .pdf-download, .app-link)::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.28) 0 50%, rgba(0, 0, 0, 0.08) 50% 100%);
  clip-path: polygon(0 0, calc(100% - var(--leg)) 0, 100% var(--leg), 100% 100%, 0 100%);
}
:is(button:where(:not(.fold-head, .kb-tab, .link-danger, .entry-face, .writing-head, .lightbox-close)), .museum-pill, .pdf-download, .app-link)::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: var(--leg);
  height: var(--leg);
  pointer-events: none;
  background: linear-gradient(225deg, transparent 50%, var(--c-d) 50%);
}
:is(button:where(:not(.fold-head, .kb-tab, .link-danger, .entry-face, .writing-head, .lightbox-close)), .museum-pill, .pdf-download, .app-link):hover {
  transform: translate(-1px, -2px);
  box-shadow: var(--ring, 0 0 0 0 transparent), 5px 10px 14px -4px var(--glow);
  filter: brightness(1.05);
}
:is(button:where(:not(.fold-head, .kb-tab, .link-danger, .entry-face, .writing-head, .lightbox-close)), .museum-pill, .pdf-download, .app-link):active {
  transform: translate(1px, 2px);
  box-shadow: var(--ring, 0 0 0 0 transparent), 1px 2px 4px -2px var(--glow);
}
button:disabled {
  opacity: 0.55;
  cursor: default;
  transform: none !important;
  filter: none !important;
}
button.secondary {
  --c: var(--teal);
  --c-d: var(--teal-d);
  --glow: rgba(20, 196, 182, 0.55);
  color: #fff;
}
button.ghost {
  --c: #fff;
  --c-d: #cfd6ea;
  --glow: rgba(20, 32, 70, 0.28);
  --ring: 0 0 0 1px #d6ddf0;
  color: var(--muted);
}

/* ---------- Resume folds ---------- */
.resume {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* 各栏目强调色 */
.fc-blue { --fc: var(--blue); --fc-d: var(--blue-d); --fc-ink: #fff; }
.fc-red { --fc: var(--red); --fc-d: var(--red-d); --fc-ink: #fff; }
.fc-orange { --fc: var(--orange); --fc-d: var(--orange-d); --fc-ink: #fff; }
.fc-yellow { --fc: var(--yellow); --fc-d: var(--yellow-d); --fc-ink: var(--ink); }
.fc-green { --fc: var(--green); --fc-d: var(--green-d); --fc-ink: #fff; }
.fc-teal { --fc: var(--teal); --fc-d: var(--teal-d); --fc-ink: #fff; }
.fc-pink { --fc: var(--pink); --fc-d: var(--pink-d); --fc-ink: #fff; }

.fold {
  --fc: var(--blue);
  --fc-d: var(--blue-d);
  --fc-ink: #fff;
  background: var(--card);
  border: 1px solid rgba(20, 32, 70, 0.06);
  border-left: 6px solid var(--fc);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.fold-head {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  color: var(--ink);
  padding: 15px 18px;
  font-size: 16px;
  font-weight: 700;
  border-radius: 0;
  box-shadow: none;
  filter: none;
}
.fold-head:hover {
  filter: none;
  background: #f5f8ff;
}
.fold-head:active {
  transform: none;
  box-shadow: none;
}
.fold-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--fc);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--fc) 25%, transparent);
  flex: none;
}
.fold-title {
  flex: 1;
  text-align: left;
}
.fold-count {
  --c: var(--fc);
  --c-d: var(--fc-d);
  --glow: color-mix(in srgb, var(--fc) 55%, transparent);
  font-size: 12px;
  font-weight: 700;
  color: var(--fc-ink);
  padding: 1px 14px 1px 10px;
}
.fold-caret {
  color: var(--fc);
  transition: transform 0.25s ease;
  font-size: 13px;
}
.fold.open .fold-caret {
  transform: rotate(180deg);
}
.fold-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.28s ease;
}
.fold.open .fold-body {
  grid-template-rows: 1fr;
}
.fold-inner {
  overflow: hidden;
  padding: 0 18px;
}
.fold.open .fold-inner {
  padding: 2px 18px 18px;
  border-top: 1px solid var(--line);
}

/* ---------- 卡片式折叠栏（Q&A、周围人对我的评价）----------
   标题栏本身是一张悬浮卡片；展开后每条内容是单列纵向堆叠的独立卡片，
   不再套在一张大卡片里。 */
.fold.fold-cards {
  background: none;
  border: none;
  box-shadow: none;
  border-radius: 0;
  overflow: visible;
}
.fold-cards .fold-head {
  background: var(--card);
  border: 1px solid rgba(20, 32, 70, 0.06);
  border-left: 6px solid var(--fc);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.fold-cards .fold-head:hover {
  background: var(--card);
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}
.fold-cards .fold-head:active {
  transform: translateY(1px);
  box-shadow: var(--shadow-sm);
}
/* 左右各留 18px、底部留 28px，让卡片的投影不被 overflow:hidden 裁掉 */
.fold-cards .fold-inner {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 0 18px;
}
.fold-cards.open .fold-inner {
  padding: 18px 18px 28px;
  border-top: none;
}

.qa-card,
.impr-card {
  background: var(--card);
  border: 1px solid rgba(20, 32, 70, 0.06);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 18px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.qa-card:hover,
.impr-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

/* Q&A */
.qa-q,
.qa-a {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.qa-q {
  font-weight: 700;
  margin-bottom: 10px;
}
.qa-a {
  color: #3b4562;
  white-space: pre-wrap;
  line-height: 1.7;
}
.qa-q::before,
.qa-a::before {
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 0;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  white-space: normal;
}
.qa-q::before {
  content: "Q";
  background: linear-gradient(225deg, transparent 6px, var(--blue) 6px);
  box-shadow: 2px 4px 7px -3px rgba(47, 107, 255, 0.6);
}
.qa-a::before {
  content: "A";
  background: linear-gradient(225deg, transparent 6px, var(--orange) 6px);
  box-shadow: 2px 4px 7px -3px rgba(255, 159, 28, 0.65);
}

/* 周围人对我的评价：每张卡片的左侧色条轮换 */
.impr-card {
  border-left: 6px solid var(--pink);
}
.impr-card:nth-child(7n + 2) { border-left-color: var(--orange); }
.impr-card:nth-child(7n + 3) { border-left-color: var(--teal); }
.impr-card:nth-child(7n + 4) { border-left-color: var(--blue); }
.impr-card:nth-child(7n + 5) { border-left-color: var(--green); }
.impr-card:nth-child(7n + 6) { border-left-color: var(--yellow); }
.impr-card:nth-child(7n + 7) { border-left-color: var(--red); }
.impr-text {
  color: #2c3552;
  line-height: 1.75;
  white-space: pre-wrap;
}
.impr-text::before {
  content: "“";
  color: var(--pink);
  font-size: 30px;
  font-weight: 800;
  line-height: 0;
  vertical-align: -10px;
  margin-right: 4px;
}
.impr-card .impr-who {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  text-align: right;
}

/* section content */
.bullet {
  margin: 8px 0 0;
  padding-left: 18px;
}
.bullet li {
  margin-bottom: 6px;
  color: #3b4562;
  font-size: 14.5px;
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
  padding-bottom: 4px;
}
.tag,
.pill,
.fold-count,
.pdf-tag {
  --c: var(--blue);
  --c-d: var(--blue-d);
  --glow: rgba(47, 107, 255, 0.55);
  --chip-cut: 6px;
  position: relative;
  color: #fff;
  background: linear-gradient(225deg, transparent var(--chip-cut), var(--c) var(--chip-cut));
  border-radius: 0;
  box-shadow: 2px 4px 8px -3px var(--glow);
}
.tag::after,
.pill::after,
.fold-count::after,
.pdf-tag::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 8.5px;
  height: 8.5px;
  pointer-events: none;
  background: linear-gradient(225deg, transparent 50%, var(--c-d) 50%);
}
.tag {
  padding: 5px 18px 5px 14px;
  font-size: 13.5px;
  font-weight: 600;
}
.tag:nth-child(7n + 2) { --c: var(--orange); --c-d: var(--orange-d); --glow: rgba(255, 159, 28, 0.6); }
.tag:nth-child(7n + 3) { --c: var(--teal); --c-d: var(--teal-d); --glow: rgba(20, 196, 182, 0.55); }
.tag:nth-child(7n + 4) { --c: var(--pink); --c-d: var(--pink-d); --glow: rgba(255, 95, 162, 0.55); }
.tag:nth-child(7n + 5) { --c: var(--green); --c-d: var(--green-d); --glow: rgba(60, 203, 106, 0.55); }
.tag:nth-child(7n + 6) { --c: var(--yellow); --c-d: var(--yellow-d); --glow: rgba(255, 201, 60, 0.7); color: var(--ink); }
.tag:nth-child(7n + 7) { --c: var(--red); --c-d: var(--red-d); --glow: rgba(255, 90, 60, 0.55); }
.entry {
  padding: 12px 0;
  border-bottom: 1px dashed var(--line);
}
.entry:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.entry-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
}
.entry-org {
  font-weight: 700;
  font-size: 15px;
}
.entry-period {
  color: var(--muted);
  font-size: 13px;
  font-style: italic;
  flex: none;
}
.entry-role {
  color: var(--fc, var(--blue));
  font-weight: 600;
  font-size: 13.5px;
  margin-top: 2px;
}

/* ---------- Footer ---------- */
.footer {
  margin-top: 34px;
  text-align: center;
}
.kb-btn {
  --c: var(--green);
  --c-d: var(--green-d);
  --glow: rgba(60, 203, 106, 0.6);
  color: #fff;
  padding: 11px 30px;
  border-radius: 24px;
  font-weight: 700;
}
.footer-note {
  margin-top: 16px;
  color: var(--muted);
  font-size: 12.5px;
}

/* ---------- Modal ---------- */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(20, 32, 70, 0.4);
  display: grid;
  place-items: center;
  z-index: 50;
  backdrop-filter: blur(2px);
}
.modal-mask[hidden] {
  display: none;
}
.modal {
  background: #fff;
  border-radius: var(--radius);
  border-top: 5px solid var(--blue);
  padding: 24px;
  width: min(90vw, 360px);
  box-shadow: 0 4px 10px rgba(20, 32, 70, 0.15), 0 30px 60px -20px rgba(20, 32, 70, 0.55);
}
.modal h3 {
  margin: 0 0 6px;
}
.modal-sub {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 13.5px;
}
.modal input,
.gate-card input {
  width: 100%;
  border: 1.5px solid #d6ddf0;
  border-radius: 5px;
  padding: 10px 12px;
  font-size: 14.5px;
  outline: none;
  box-shadow: inset 0 2px 3px rgba(20, 32, 70, 0.06);
}
input:focus,
textarea:focus {
  border-color: var(--blue) !important;
  box-shadow: 0 0 0 3px rgba(47, 107, 255, 0.18) !important;
}
.modal-error,
.error {
  color: var(--red);
  font-size: 13px;
  margin: 8px 0 0;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

/* ---------- Knowledge base page ---------- */
.gate {
  min-height: 70vh;
  display: grid;
  place-items: center;
}
.gate-card {
  background: #fff;
  border-radius: var(--radius);
  border-top: 5px solid var(--blue);
  box-shadow: var(--shadow-lg);
  padding: 30px;
  width: min(92vw, 380px);
  text-align: center;
}
.gate-card h2 {
  margin: 0 0 8px;
}
.gate-card p {
  color: var(--muted);
  font-size: 13.5px;
  margin: 0 0 16px;
}
.gate-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
}
.ghost-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 13.5px;
}
.ghost-link:hover {
  color: var(--blue);
}

.kb-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 22px;
}
.kb-header h1 {
  margin: 0;
  font-size: 24px;
}
.kb-sub {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13.5px;
}
.kb-header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: none;
}
.kb-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.kb-col,
.kb-answered {
  background: var(--card);
  border: 1px solid rgba(20, 32, 70, 0.06);
  border-top: 5px solid var(--blue);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 16px;
}
.kb-col + .kb-col {
  border-top-color: var(--orange);
}
.kb-answered {
  margin-top: 18px;
  border-top-color: var(--green);
}
.kb-col-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  min-height: 38px;
}
.kb-col-head h2,
.kb-answered h2 {
  margin: 0;
  font-size: 15.5px;
}
.pill {
  font-size: 12px;
  font-weight: 700;
  padding: 1px 14px 1px 10px;
}
.kb-col + .kb-col .pill {
  --c: var(--orange);
  --c-d: var(--orange-d);
  --glow: rgba(255, 159, 28, 0.6);
}
.kb-answered .pill {
  --c: var(--green);
  --c-d: var(--green-d);
  --glow: rgba(60, 203, 106, 0.55);
}
.kb-col-head button {
  font-size: 12.5px;
  padding: 7px 12px;
  flex: none;
}
.interview-controls {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.interview-controls input {
  flex: 1;
  min-width: 0;
  border: 1.5px solid #d6ddf0;
  border-radius: 5px;
  padding: 8px 11px;
  font-size: 13px;
  outline: none;
  background: #fff;
}
.interview-controls button {
  flex: none;
  font-size: 12.5px;
  padding: 8px 12px;
  white-space: nowrap;
}
.kb-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.empty {
  color: var(--muted);
  font-size: 13.5px;
  text-align: center;
  padding: 16px 0;
}
.qcard {
  border: 1px solid rgba(20, 32, 70, 0.06);
  border-radius: 5px;
  padding: 12px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}
.qcard-q {
  font-weight: 700;
  font-size: 14.5px;
  margin-bottom: 8px;
}
.src {
  font-weight: 500;
  font-size: 11.5px;
  color: var(--blue);
  background: var(--accent-soft);
  border-radius: 5px;
  padding: 1px 7px;
  margin-left: 4px;
}
.qcard-input {
  width: 100%;
  min-height: 66px;
  resize: vertical;
  border: 1.5px solid #d6ddf0;
  border-radius: 5px;
  padding: 9px 11px;
  font: inherit;
  font-size: 14px;
  outline: none;
  background: #fff;
}
.qcard-a {
  font-size: 14px;
  color: #3b4562;
  background: #f7f9ff;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 9px 11px;
  white-space: pre-wrap;
}
.qcard.answered {
  background: #f1fcf5;
  border-color: #cdeedb;
}
.qcard-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 9px;
}
.qcard-actions button {
  font-size: 13px;
  padding: 7px 14px;
}
.link-danger {
  background: none;
  color: var(--red);
  border: none;
  box-shadow: none;
  padding: 7px 4px;
}
.link-danger:hover {
  text-decoration: underline;
  filter: none;
}
.link-danger:active {
  transform: none;
  box-shadow: none;
}

/* ---------- 首页附件 ---------- */
.attachments {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}
.att-label {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
}
.att-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-start;
  padding-bottom: 6px;
}
.att-img {
  display: block;
  border-radius: 5px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.att-img img {
  display: block;
  width: 96px;
  height: 96px;
  object-fit: cover;
}
.att-file {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 5px;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow-sm);
  color: var(--ink);
  text-decoration: none;
  font-size: 13px;
}
.att-file:hover {
  border-color: var(--blue);
}
.att-icon {
  font-size: 14px;
}

/* ---------- 知识库 标签页 ---------- */
.kb-tabs {
  display: flex;
  gap: 8px;
  margin: 18px 0 20px;
  border-bottom: 1px solid var(--line);
}
.kb-tab {
  background: none;
  border: none;
  box-shadow: none;
  padding: 10px 16px;
  font-size: 15px;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  border-radius: 0;
}
.kb-tab:hover,
.kb-tab:active {
  filter: none;
  transform: none;
  box-shadow: none;
}
.kb-tab.active {
  color: var(--blue);
  border-bottom-color: var(--blue);
  font-weight: 700;
}

/* ---------- 显示在首页标记 ---------- */
.qcard.on-home {
  border-color: var(--blue);
}
.home-tag {
  color: var(--blue) !important;
}

/* ---------- 简历编辑器 ---------- */
.editor-head,
.editor-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.editor-foot {
  margin-top: 18px;
  justify-content: flex-start;
}
.save-hint {
  color: var(--green-d);
  font-size: 13px;
}
.resume-editor {
  margin-top: 8px;
}
.editor-block {
  background: #fff;
  border: 1px solid rgba(20, 32, 70, 0.06);
  border-left: 6px solid var(--teal);
  border-radius: 5px;
  box-shadow: var(--shadow);
  padding: 16px;
  margin-bottom: 18px;
}
.ed-label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin: 4px 0 6px;
}
.section-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.section-move {
  display: inline-flex;
  gap: 6px;
}
.btn-move {
  --c: #fff;
  --c-d: #cfd6ea;
  --glow: rgba(20, 32, 70, 0.28);
  --ring: 0 0 0 1px #d6ddf0;
  width: 28px;
  height: 28px;
  line-height: 1;
  padding: 0;
  border: 1px solid var(--line);
  color: var(--blue);
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
}
.ed-title {
  width: 100%;
  font-weight: 700;
}
.resume-editor input,
.resume-editor textarea {
  width: 100%;
  border: 1.5px solid #d6ddf0;
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
  color: var(--ink);
  background: #fff;
  box-sizing: border-box;
}
.resume-editor input:focus,
.resume-editor textarea:focus {
  outline: none;
}
.ed-lines {
  resize: vertical;
  line-height: 1.6;
  margin-top: 6px;
}
.basic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}
.basic-field span {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
}
.entry-edit {
  border: 1px dashed #c9d2ea;
  border-radius: 5px;
  padding: 12px;
  margin: 10px 0;
  background: #fafbff;
}
.entry-edit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-bottom: 8px;
}
.entry-edit-actions {
  margin-top: 6px;
  text-align: right;
}
.att-manage {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}
.att-manage-label {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
}
.att-empty {
  color: var(--muted);
  font-size: 13px;
  margin: 0 0 8px;
}
.att-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
}
.att-row-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  text-decoration: none;
  font-size: 13px;
  min-width: 0;
}
.att-row-link span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.att-thumb-sm {
  width: 34px;
  height: 34px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--line);
}
.att-upload {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.att-upload input[type="file"] {
  font-size: 13px;
  width: auto;
  border: none;
  padding: 0;
  box-shadow: none;
}

/* ---------- 留下印象 ---------- */
.impr-panel {
  padding: 16px 18px 18px;
  background: #f7f9ff;
}
.impr-hint {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
}
.impr-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}
.impr-actions button {
  --c: var(--pink);
  --c-d: var(--pink-d);
  --glow: rgba(255, 95, 162, 0.6);
  padding: 10px 26px 10px 20px;
  font-weight: 700;
}
.impr-panel .modal-error {
  margin-top: 10px;
}

.impr-textarea {
  width: 100%;
  min-height: 120px;
  resize: vertical;
  border: 1.5px solid #d6ddf0;
  border-radius: 5px;
  padding: 10px 12px;
  font: inherit;
  font-size: 13px;
  color: var(--ink);
  box-sizing: border-box;
  line-height: 1.6;
}
.impr-textarea:focus {
  outline: none;
}

.impr-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}
.impr-fields input {
  width: 100%;
  border: 1.5px solid #d6ddf0;
  border-radius: 5px;
  padding: 9px 12px;
  font: inherit;
  font-size: 13px;
  color: var(--ink);
  box-sizing: border-box;
}
.impr-fields input:focus {
  outline: none;
}
/* 知识库评价卡片的署名行 */
.impr-meta {
  color: var(--muted);
  font-weight: 500;
  font-size: 13px;
  margin-top: 8px;
}

/* ---------- Face ID / Touch ID 按钮 ---------- */
.biometric-btn {
  --c: var(--teal);
  --c-d: var(--teal-d);
  --glow: rgba(20, 196, 182, 0.55);
  margin-top: 14px;
  width: 100%;
  color: #fff;
  border-radius: 5px;
  padding: 10px 14px;
  font-size: 14px;
  cursor: pointer;
}
.biometric-btn:disabled {
  opacity: 0.6;
  cursor: default;
}

/* ---------- 栏目专属背景图层（已停用，保留样式便于恢复）---------- */
#bgLayer {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
#bgLayer[hidden] {
  display: none;
}
.bg-frame {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 0.8s ease;
}
.bg-frame.show {
  opacity: 0.5;
}

/* ---------- 知识库：头像编辑 ---------- */
.avatar-editor {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 10px;
}
.avatar-preview {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  flex: none;
  overflow: hidden;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 30px;
  font-weight: 600;
  background: linear-gradient(135deg, var(--orange), var(--red));
  border: 3px solid #fff;
  box-shadow: 0 12px 18px -6px rgba(255, 90, 60, 0.5);
}
.avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.avatar-editor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* ---------- 头像裁剪弹窗 ---------- */
.crop-modal {
  text-align: center;
}
.crop-stage {
  position: relative;
  width: 320px;
  max-width: 100%;
  margin: 12px auto 0;
  aspect-ratio: 1 / 1;
  border-radius: 5px;
  overflow: hidden;
  background: #eef1fa;
  touch-action: none;
}
#cropCanvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
}
#cropCanvas:active {
  cursor: grabbing;
}
.crop-frame {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow: 0 0 0 2000px rgba(255, 255, 255, 0.35);
  pointer-events: none;
}
#cropZoom {
  width: 90%;
  margin: 14px auto 4px;
  display: block;
  accent-color: var(--blue);
}

/* ---------- 知识库：每栏背景图管理 ---------- */
.bg-manage {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}
.bg-manage-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.bg-thumb {
  width: 96px;
  height: 54px;
  object-fit: cover;
  border-radius: 8px;
  background: #eef1fa;
  border: 1px solid var(--line);
  flex: none;
}
.bg-thumb-empty {
  display: inline-block;
}
.bg-thumb-empty::after {
  content: "默认无背景";
  display: grid;
  place-items: center;
  width: 96px;
  height: 54px;
  font-size: 11px;
  color: var(--muted);
}
.bg-only-block .ed-label {
  margin-bottom: 0;
}

/* ---------- 首页入口大按钮 ---------- */
.gateway {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin: 8px 0 6px;
}
.big-entry {
  position: relative;
  display: block;
  text-decoration: none;
  color: var(--ink);
  background: var(--card);
  border: 1px solid rgba(20, 32, 70, 0.06);
  border-bottom: 5px solid var(--yellow);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 24px 18px;
  transition: transform 0.25s cubic-bezier(0.22, 1.2, 0.4, 1), box-shadow 0.25s ease;
}
.big-entry:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}
.big-entry[hidden] {
  display: none;
}
.entry-face {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
  background: none;
  border: none;
  box-shadow: none;
  cursor: pointer;
  color: inherit;
  padding: 0;
  filter: none;
}
.entry-face:hover,
.entry-face:active {
  filter: none;
  transform: none;
  box-shadow: none;
}
.entry-logo-wrap {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--ink);
  background: var(--yellow);
  box-shadow: 0 12px 16px -6px rgba(255, 190, 40, 0.7);
  transition: transform 0.4s cubic-bezier(0.22, 1.4, 0.4, 1);
  overflow: hidden;
}
.big-entry:hover .entry-logo-wrap {
  transform: scale(1.06) rotate(-3deg);
}
.entry-logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.entry-label {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.5px;
}
/* 简历门：展开为密码框（非线性弹跳） */
.entry-pw {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  animation: pwPop 0.46s cubic-bezier(0.18, 1.5, 0.4, 1) both;
}
.entry-pw[hidden] {
  display: none;
}
.big-entry.expanded .entry-label {
  display: none;
}
.entry-pw input {
  flex: 1;
  min-width: 0;
  border: 1.5px solid #d6ddf0;
  border-radius: 5px;
  padding: 10px 12px;
  font: inherit;
  font-size: 14px;
  color: var(--ink);
}
.entry-pw input:focus {
  outline: none;
}
.entry-pw button {
  flex: none;
  padding: 10px 18px;
}
.entry-pw-err {
  color: var(--red);
  font-size: 13px;
  margin: 10px 0 0;
  text-align: center;
}
.big-entry.expanded .entry-logo-wrap {
  transform: scale(0.72);
  animation: logoBounce 0.5s cubic-bezier(0.18, 1.5, 0.4, 1);
}
@keyframes pwPop {
  0% {
    transform: scale(0.55) translateY(6px);
    opacity: 0;
  }
  60% {
    transform: scale(1.06);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}
@keyframes logoBounce {
  0% {
    transform: scale(1);
  }
  45% {
    transform: scale(1.18) rotate(-6deg);
  }
  100% {
    transform: scale(0.72);
  }
}

/* ---------- 博物馆子页面 ---------- */
.museum-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.museum-header h1 {
  margin: 0 0 4px;
  font-size: 26px;
  letter-spacing: 1px;
}
.museum-sub {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}
.museum-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}
.museum-tab {
  --c: #fff;
  --c-d: #cfd6ea;
  --glow: rgba(20, 32, 70, 0.28);
  --ring: 0 0 0 1px #d6ddf0;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 20px;
  font-size: 14px;
  cursor: pointer;
  color: var(--ink);
}
.museum-tab.active {
  --c: var(--blue);
  --c-d: var(--blue-d);
  --glow: rgba(47, 107, 255, 0.55);
  --ring: 0 0 0 0 transparent;
  color: #fff;
}
.museum-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 18px;
}
.museum-card {
  margin: 0;
  background: var(--card);
  border: 1px solid rgba(20, 32, 70, 0.06);
  border-radius: 5px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.museum-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}
.museum-thumb {
  cursor: zoom-in;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #eef1fa;
}
.museum-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}
.museum-card:hover .museum-thumb img {
  transform: scale(1.05);
}
.museum-card figcaption {
  padding: 10px 12px;
  font-size: 13px;
  color: #3b4562;
}
/* 灯箱 */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(12, 16, 30, 0.88);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}
.lightbox[hidden] {
  display: none;
}
.lightbox-stage {
  position: relative;
  max-width: 92vw;
  max-height: 80vh;
  display: flex;
}
.lightbox-stage img {
  max-width: 92vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 8px;
  display: block;
}
.watermark {
  position: absolute;
  inset: -50%;
  pointer-events: none;
  transform: rotate(-24deg);
  background-repeat: repeat;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='120'%3E%3Ctext x='8' y='64' font-family='sans-serif' font-size='19' fill='rgba(255,255,255,0.32)'%3E@Eveglow_liu%3C/text%3E%3C/svg%3E");
}
.lightbox-close {
  position: absolute;
  top: 18px;
  right: 22px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.2);
  box-shadow: none;
  color: #fff;
  font-size: 24px;
  line-height: 1;
  padding: 0;
  cursor: pointer;
}
.lightbox-caption {
  margin: 16px 0 0;
  color: #f4f6ff;
  font-size: 14px;
  text-align: center;
  max-width: 80vw;
}
.no-scroll {
  overflow: hidden;
}
/* 写作 */
.museum-writings {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.writing-item {
  background: var(--card);
  border: 1px solid rgba(20, 32, 70, 0.06);
  border-left: 6px solid var(--orange);
  border-radius: 5px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.writing-item:nth-child(4n + 2) { border-left-color: var(--teal); }
.writing-item:nth-child(4n + 3) { border-left-color: var(--pink); }
.writing-item:nth-child(4n + 4) { border-left-color: var(--green); }
.writing-head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 16px 18px;
  background: none;
  border: none;
  box-shadow: none;
  cursor: pointer;
  color: inherit;
  text-align: left;
  border-radius: 0;
}
.writing-head:hover {
  filter: none;
  background: #f5f8ff;
}
.writing-head:active {
  transform: none;
  box-shadow: none;
}
.writing-title {
  font-size: 16px;
  font-weight: 700;
}
.writing-caret {
  transition: transform 0.2s ease;
  color: var(--blue);
}
.writing-item.open .writing-caret {
  transform: rotate(180deg);
}
.writing-caption {
  margin: -6px 18px 0;
  color: var(--muted);
  font-size: 13px;
}
.writing-body {
  display: none;
  padding: 4px 18px 18px;
}
.writing-item.open .writing-body {
  display: block;
}

/* ---------- 博物馆 PDF 下载卡片 ---------- */
.writing-pdf-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 18px 0;
}
.writing-pdf .writing-caption {
  margin-top: 6px;
}
.pdf-tag {
  --c: var(--red);
  --c-d: var(--red-d);
  --glow: rgba(255, 90, 60, 0.55);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.4px;
  padding: 1px 12px 1px 7px;
}
.pdf-download {
  --c: var(--blue);
  --c-d: var(--blue-d);
  --glow: rgba(47, 107, 255, 0.55);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 12px 18px 18px;
  padding: 7px 18px 7px 14px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
}
.pdf-link {
  color: var(--blue);
  text-decoration: none;
  font-size: 13px;
}

/* ---------- Markdown 排版 ---------- */
.markdown h1,
.markdown h2,
.markdown h3 {
  margin: 16px 0 8px;
  line-height: 1.4;
}
.markdown h1 {
  font-size: 22px;
}
.markdown h2 {
  font-size: 19px;
}
.markdown h3 {
  font-size: 16px;
}
.markdown p {
  margin: 8px 0;
  line-height: 1.8;
}
.markdown ul,
.markdown ol {
  padding-left: 22px;
  margin: 8px 0;
}
.markdown li {
  margin: 4px 0;
}
.markdown blockquote {
  margin: 10px 0;
  padding: 4px 14px;
  border-left: 4px solid var(--blue);
  color: #3b4562;
  background: var(--accent-soft);
  border-radius: 0 8px 8px 0;
}
.markdown code {
  background: #eef1fa;
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 13px;
}
.markdown pre {
  background: #eef1fa;
  padding: 12px 14px;
  border-radius: 5px;
  overflow: auto;
}
.markdown pre code {
  background: none;
  padding: 0;
}
.markdown img {
  max-width: 100%;
  border-radius: 8px;
}
.markdown a {
  color: var(--blue);
}

/* ---------- 知识库：logo 编辑 ---------- */
.logo-editor {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 10px;
}
.logo-item {
  display: flex;
  align-items: center;
  gap: 14px;
}
.logo-preview {
  width: 60px;
  height: 60px;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--ink);
  background: var(--yellow);
  box-shadow: 0 10px 14px -6px rgba(255, 190, 40, 0.7);
  overflow: hidden;
}
.logo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.logo-item-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 6px;
}

/* ---------- 知识库：博物馆管理 ---------- */
.museum-upload,
.museum-writing-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}
.museum-writing-form {
  flex-direction: column;
}
.museum-md-import {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.museum-upload input[type="text"],
.museum-writing-form input,
.museum-writing-form textarea {
  border: 1.5px solid #d6ddf0;
  border-radius: 5px;
  padding: 10px 12px;
  font: inherit;
  font-size: 14px;
  color: var(--ink);
}
.museum-upload input[type="text"] {
  flex: 1;
  min-width: 160px;
}
.museum-writing-form textarea {
  resize: vertical;
  font-size: 13.5px;
  line-height: 1.7;
}
.museum-manage-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.museum-manage-caption {
  flex: 1;
  font-size: 13.5px;
  color: #3b4562;
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .kb-columns {
    grid-template-columns: 1fr;
  }
  .hero-text h1 {
    font-size: 26px;
  }
  .hero-side {
    gap: 8px;
  }
  .avatar {
    width: 60px;
    height: 60px;
    font-size: 24px;
  }
  .museum-pill {
    padding: 6px 10px;
    font-size: 12.5px;
  }
  .bubble {
    max-width: 88%;
  }
  .chat-mode-btn {
    font-size: 13px;
    padding: 10px 16px 10px 10px;
  }
  .kb-header {
    flex-direction: column;
  }
  .entry-edit-grid {
    grid-template-columns: 1fr;
  }
  .impr-fields {
    grid-template-columns: 1fr;
  }
  .gateway {
    grid-template-columns: 1fr;
  }
  .logo-editor {
    grid-template-columns: 1fr;
  }
  .fold-cards .fold-inner,
  .fold-cards.open .fold-inner {
    padding-left: 14px;
    padding-right: 14px;
  }
}

/* ===== 博物馆 · 我的 App ===== */
.app-list {
  display: grid;
  gap: 18px;
}
.app-card {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  background: var(--card);
  border: 1px solid rgba(20, 32, 70, 0.06);
  border-left: 6px solid var(--green);
  border-radius: 5px;
  padding: 20px;
  box-shadow: var(--shadow-lg);
}
.app-card-icon {
  width: 84px;
  height: 84px;
  border-radius: 19px;
  flex: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}
.app-card-body {
  min-width: 0;
}
.app-card-title {
  margin: 0 0 4px;
  font-size: 20px;
}
.app-card-tagline {
  margin: 0 0 10px;
  font-size: 14px;
  color: var(--muted);
}
.app-card-desc {
  margin: 0 0 10px;
  font-size: 14px;
  line-height: 1.75;
  color: #3b4562;
}
.app-card-points {
  margin: 0 0 14px;
  padding-left: 18px;
  font-size: 13px;
  line-height: 1.9;
  color: #3b4562;
}
.app-card-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.app-link {
  --c: #fff;
  --c-d: #cfd6ea;
  --glow: rgba(20, 32, 70, 0.28);
  --ring: 0 0 0 1px #d6ddf0;
  display: inline-block;
  padding: 8px 18px 8px 14px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  color: var(--ink);
}
.app-link.primary {
  --c: var(--green);
  --c-d: var(--green-d);
  --glow: rgba(60, 203, 106, 0.6);
  --ring: 0 0 0 0 transparent;
  color: #fff;
}
@media (max-width: 560px) {
  .app-card {
    flex-direction: column;
  }
  .app-card-icon {
    width: 64px;
    height: 64px;
    border-radius: 15px;
  }
}

/* =====================================================================
   我来贴标签
   ===================================================================== */
.tag-card {
  margin-bottom: 26px;
  padding: 18px 20px 20px;
  background: var(--card);
  border: 1px solid rgba(20, 32, 70, 0.06);
  border-left: 6px solid var(--red);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}
.tag-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.tag-card-title h2 {
  margin: 0 0 2px;
  font-size: 18px;
}
.tag-card-title p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.tag-card-head button {
  --c: var(--red);
  --c-d: var(--red-d);
  --glow: rgba(255, 90, 60, 0.55);
  flex: none;
  padding: 11px 24px 11px 18px;
  font-weight: 700;
}
.tag-note {
  margin: 14px 0 0;
  padding: 8px 12px;
  font-size: 13px;
  color: var(--green-d);
  background: #effcf3;
  border-left: 4px solid var(--green);
}
.tag-empty {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.tag-results {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.tag-group h3 {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--muted);
  font-weight: 700;
}
.tag-bars {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.tag-bar {
  display: grid;
  grid-template-columns: 5.2em 1fr 3em;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}
.tag-bar-word {
  font-weight: 700;
  white-space: nowrap;
}
.tag-bar-val {
  text-align: right;
  font-size: 12.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
/* 细条：以中线为 0 分，向右为“符合”，向左为“不符合” */
.tag-bar-track {
  position: relative;
  height: 10px;
  background: #eaeef9;
}
.tag-bar-track::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -3px;
  bottom: -3px;
  width: 1.5px;
  background: #b9c2dc;
  z-index: 1;
}
.tag-bar-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 0;
  transition: width 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.tag-bar-fill.pos {
  left: 50%;
  background: linear-gradient(135deg, #5be08a, var(--green));
  clip-path: polygon(0 0, calc(100% - 5px) 0, 100% 100%, 0 100%);
}
.tag-bar-fill.neg {
  right: 50%;
  background: linear-gradient(225deg, #ff8a6e, var(--red));
  clip-path: polygon(5px 0, 100% 0, 100% 100%, 0 100%);
}
.tag-bars-empty {
  color: var(--muted);
  font-size: 13px;
}
.tag-scale {
  display: block;
  position: relative;
  padding-left: calc(5.2em + 10px);
  padding-right: calc(3em + 10px);
  height: 16px;
}
.tag-scale span {
  position: absolute;
  top: 0;
}
.tag-scale span:nth-child(1) { left: calc(5.2em + 10px); }
.tag-scale span:nth-child(2) { left: calc(5.2em + 10px + (100% - 8.2em - 20px) / 2); transform: translateX(-50%); }
.tag-scale span:nth-child(3) { right: calc(3em + 10px); }

/* ---------- 全屏贴标签图层：不透明，盖住整个网页 ---------- */
.tag-layer {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
  background: linear-gradient(rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.6)),
    url("/img/site-bg.jpg") center center / cover no-repeat, #fff;
}
.tag-layer[hidden] {
  display: none;
}
.tag-layer-inner {
  width: min(94vw, 640px);
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.tag-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.tag-progress-text {
  font-weight: 700;
  font-size: 15px;
  text-shadow: 0 0 8px #fff, 0 0 3px #fff;
}
.tag-top button {
  padding: 7px 18px 7px 14px;
  font-size: 13px;
}
.tag-progress {
  height: 8px;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 1px 2px 5px -2px rgba(20, 32, 70, 0.35);
}
.tag-progress span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--red), var(--orange), var(--yellow), var(--green), var(--teal), var(--blue), var(--pink));
  background-size: 640px 100%;
  transition: width 0.3s ease;
}
.tag-stage {
  display: flex;
  justify-content: center;
  padding: 8px 0 14px;
}
/* 形容词卡片：折纸风，右上角折角，左侧色条随卡片轮换 */
.tag-word-card {
  --wc: var(--blue);
  position: relative;
  width: min(100%, 420px);
  min-height: 250px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 28px 24px;
  background: linear-gradient(225deg, transparent 28px, #fff 28px);
  border-left: 10px solid var(--wc);
  box-shadow: 4px 10px 18px -6px rgba(20, 32, 70, 0.4);
}
.tag-word-card::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 39.6px;
  height: 39.6px;
  background: linear-gradient(225deg, transparent 50%, #cfd6ea 50%);
}
.tag-word-card.enter {
  animation: tagCardIn 0.28s cubic-bezier(0.2, 0.9, 0.3, 1.2) both;
}
@keyframes tagCardIn {
  from {
    opacity: 0;
    transform: translate(26px, 8px) rotate(2.5deg);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.tag-ask {
  margin: 0;
  font-size: 13.5px;
  color: var(--muted);
}
.tag-word {
  font-size: 54px;
  font-weight: 800;
  letter-spacing: 4px;
  line-height: 1.2;
  text-align: center;
  color: var(--ink);
}
.tag-choices {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}
.tag-choices button {
  padding: 14px 14px 14px 6px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
}
.tag-choices .tc-p2 { --c: var(--green); --c-d: var(--green-d); --glow: rgba(60, 203, 106, 0.6); }
.tag-choices .tc-p1 { --c: var(--teal); --c-d: var(--teal-d); --glow: rgba(20, 196, 182, 0.55); }
.tag-choices .tc-0 { --c: var(--yellow); --c-d: var(--yellow-d); --glow: rgba(255, 201, 60, 0.7); color: var(--ink); }
.tag-choices .tc-n1 { --c: var(--orange); --c-d: var(--orange-d); --glow: rgba(255, 159, 28, 0.6); }
.tag-choices .tc-n2 { --c: var(--red); --c-d: var(--red-d); --glow: rgba(255, 90, 60, 0.55); }

@media (max-width: 640px) {
  .tag-card-head {
    flex-direction: column;
    align-items: stretch;
  }
  .tag-word {
    font-size: 44px;
  }
  .tag-word-card {
    min-height: 200px;
  }
  .tag-choices {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .tag-choices button {
    padding: 13px 18px 13px 14px;
  }
}

/* display 被上面的规则覆盖时，保证 hidden 属性仍然生效 */
.tag-results[hidden],
.tag-note[hidden],
.tag-empty[hidden] {
  display: none;
}
