:root {
  --ink: #10161f;
  --ink-soft: #2b3647;
  --ink-mute: #5d6879;
  --paper: #f7f6f3;
  --paper-2: #ffffff;
  --line: #e2ded6;
  --navy: #16243c;
  --navy-soft: #2b3d5c;
  --gold: #a98b52;
  --gold-soft: #c7ab76;
  --gold-pale: #f0e7d6;
  --shadow-sm: 0 1px 2px rgba(16, 22, 31, .05), 0 8px 24px -16px rgba(16, 22, 31, .18);
  --shadow-md: 0 2px 4px rgba(16, 22, 31, .04), 0 24px 60px -32px rgba(16, 22, 31, .26);
  --serif-cn: "Noto Serif SC", "Songti SC", "SimSun", serif;
  --serif-en: "Cormorant Garamond", "Noto Serif SC", serif;
  --sans: "Inter", "Noto Serif SC", -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  --maxw: 1080px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  letter-spacing: .005em;
}

body.lang-en { font-family: var(--sans); }

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- 顶栏 ---------- */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 60;
  background: rgba(247, 246, 243, .82);
  backdrop-filter: saturate(150%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .5s var(--ease), background .5s var(--ease), box-shadow .5s var(--ease);
}

.topbar.is-stuck {
  border-bottom-color: var(--line);
  box-shadow: 0 10px 30px -24px rgba(16, 22, 31, .5);
}

.topbar-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px 28px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--navy);
  font-family: var(--serif-en);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: .06em;
  white-space: nowrap;
}

.brand-mark {
  width: 22px; height: 22px;
  border: 1px solid var(--gold);
  position: relative;
  transform: rotate(45deg);
  transition: transform .9s var(--ease);
}
.brand-mark::after {
  content: "";
  position: absolute;
  inset: 4px;
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
}
.brand:hover .brand-mark { transform: rotate(225deg); }

.nav {
  display: flex;
  gap: 2px;
  margin-left: auto;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 14px), transparent 100%);
}
.nav::-webkit-scrollbar { display: none; }

.nav a {
  position: relative;
  padding: 6px 12px;
  font-size: 13.5px;
  color: var(--ink-mute);
  text-decoration: none;
  white-space: nowrap;
  transition: color .35s var(--ease);
}
.nav a::after {
  content: "";
  position: absolute;
  left: 12px; right: 12px; bottom: 2px;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .5s var(--ease);
}
.nav a:hover, .nav a.is-active { color: var(--navy); }
.nav a:hover::after, .nav a.is-active::after { transform: scaleX(1); }

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.lang-switch {
  display: inline-flex;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper-2);
  padding: 2px;
  position: relative;
}
.lang-switch button {
  appearance: none;
  flex: 0 0 auto;
  white-space: nowrap;
  border: 0;
  background: transparent;
  color: var(--ink-mute);
  font: inherit;
  font-size: 12.5px;
  letter-spacing: .04em;
  padding: 5px 13px;
  border-radius: 999px;
  cursor: pointer;
  transition: color .35s var(--ease), background .45s var(--ease);
}
.lang-switch button:hover { color: var(--navy); }
.lang-switch button.is-active {
  color: #fff;
  background: linear-gradient(135deg, var(--navy), #2b3d5c);
  box-shadow: inset 0 0 0 1px rgba(201, 173, 120, .45);
}

.ghost-btn, .solid-btn {
  appearance: none;
  font: inherit;
  font-size: 13px;
  letter-spacing: .03em;
  padding: 7px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: all .4s var(--ease);
  white-space: nowrap;
}
.ghost-btn {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-soft);
}
.ghost-btn:hover {
  border-color: var(--gold);
  color: var(--navy);
  background: rgba(240, 231, 214, .5);
}
.solid-btn {
  border: 1px solid transparent;
  background: linear-gradient(135deg, var(--navy), #2b3d5c);
  color: #fff;
}
.solid-btn:hover {
  box-shadow: 0 10px 26px -14px rgba(22, 36, 60, .8);
  transform: translateY(-1px);
}

.topbar-progress {
  height: 1.5px;
  background: linear-gradient(90deg, var(--gold), var(--gold-soft));
  width: 0;
  transition: width .15s linear;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 168px 28px 64px;
  overflow: hidden;
}

.hero-bg { position: absolute; inset: 0; pointer-events: none; }
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: .5;
}
.orb-a {
  width: 460px; height: 460px;
  top: -140px; right: -90px;
  background: radial-gradient(circle at 30% 30%, rgba(201, 173, 120, .5), transparent 70%);
  animation: float-a 22s ease-in-out infinite;
}
.orb-b {
  width: 380px; height: 380px;
  bottom: -160px; left: -120px;
  background: radial-gradient(circle at 60% 40%, rgba(22, 36, 60, .22), transparent 70%);
  animation: float-b 28s ease-in-out infinite;
}
@keyframes float-a {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-40px, 36px) scale(1.08); }
}
@keyframes float-b {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(36px, -30px) scale(1.06); }
}

.hero-inner {
  position: relative;
  max-width: var(--maxw);
  margin: 0 auto;
}

.hero-kicker {
  margin: 0 0 14px;
  font-size: 12px;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--gold);
}

.hero-name {
  margin: 0;
  font-family: var(--serif-en);
  font-size: clamp(42px, 7vw, 74px);
  line-height: 1.08;
  font-weight: 600;
  letter-spacing: .01em;
  color: var(--navy);
}

.hero-objectives {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.hero-objectives li {
  font-family: var(--serif-cn);
  font-size: clamp(16px, 2vw, 19px);
  color: var(--ink-soft);
  padding: 4px 16px 4px 0;
  position: relative;
}
.hero-objectives li + li { padding-left: 16px; }
.hero-objectives li + li::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  width: 1px; height: 18px;
  background: var(--line);
  transform: translateY(-50%);
}

.hero-rule {
  margin: 32px 0 26px;
  height: 1px;
  background: var(--line);
  max-width: 560px;
  position: relative;
  overflow: hidden;
}
.hero-rule i {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--gold), transparent);
  transform-origin: left;
  animation: rule-in 1.8s var(--ease) .3s both;
}
@keyframes rule-in { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.hero-intro {
  margin: 0;
  max-width: 740px;
  font-family: var(--serif-cn);
  font-size: clamp(15.5px, 1.6vw, 17.5px);
  line-height: 2;
  color: var(--ink-soft);
}
body.lang-en .hero-intro { font-family: var(--sans); line-height: 1.85; }
body.lang-en .nav a { font-size: 12.8px; padding: 6px 9px; }
body.lang-en .nav a::after { left: 9px; right: 9px; }

.hero-meta {
  margin-top: 36px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 24px;
}

.works-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: var(--navy);
  font-size: 14px;
  letter-spacing: .02em;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .7);
  padding: 9px 18px;
  border-radius: 999px;
  transition: all .45s var(--ease);
}
.works-link .works-url { color: var(--gold); }
.works-link svg {
  width: 14px; height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  transition: transform .45s var(--ease);
}
.works-link:hover {
  border-color: var(--gold-soft);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}
.works-link:hover svg { transform: translate(2px, -2px); }

.hero-contacts {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 0;
  padding: 0;
  font-size: 14px;
  color: var(--ink-mute);
}
.hero-contacts a { color: inherit; text-decoration: none; border-bottom: 1px solid var(--line); }
.hero-contacts a:hover { color: var(--navy); border-color: var(--gold); }

.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  width: 1px; height: 34px;
  background: var(--line);
  overflow: hidden;
}
.scroll-hint i {
  position: absolute;
  top: 0; left: 0;
  width: 1px; height: 18px;
  background: var(--gold);
  animation: hint 2.4s var(--ease) infinite;
}
@keyframes hint {
  0% { transform: translateY(-18px); opacity: 0; }
  40% { opacity: 1; }
  100% { transform: translateY(34px); opacity: 0; }
}

/* ---------- 章节 ---------- */
.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 30px 28px;
  scroll-margin-top: 92px;
}

.section-head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 20px;
}
.section-index {
  font-family: var(--serif-en);
  font-size: 15px;
  color: var(--gold);
  letter-spacing: .14em;
}
.section-title {
  margin: 0;
  font-family: var(--serif-cn);
  font-size: clamp(21px, 2.6vw, 27px);
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--navy);
}
body.lang-en .section-title { font-family: var(--serif-en); letter-spacing: .02em; }
.section-head .head-rule {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--line), transparent);
}

/* 卡片 */
.card {
  position: relative;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 26px 30px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .6s var(--ease), transform .6s var(--ease), border-color .6s var(--ease);
}
.card + .card { margin-top: 18px; }
.card::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--gold), var(--gold-pale));
  transform: scaleY(0);
  transform-origin: top;
  transition: transform .7s var(--ease);
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: #d8d2c6;
}
.card:hover::before { transform: scaleY(1); }

.card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 16px;
  margin-bottom: 14px;
}
.card-title {
  margin: 0;
  font-family: var(--serif-cn);
  font-size: 17.5px;
  font-weight: 600;
  color: var(--navy);
  letter-spacing: .02em;
}
body.lang-en .card-title { font-family: var(--sans); font-weight: 600; }
.card-role {
  font-size: 14px;
  color: var(--ink-mute);
}
.card-role::before { content: "／"; color: var(--line); margin-right: 6px; }
.card-period {
  margin-left: auto;
  font-size: 12.5px;
  letter-spacing: .08em;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.block { margin-top: 10px; }
.block-label {
  display: inline;
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
}
.block-label::after { content: "："; color: var(--ink-mute); font-weight: 400; }
body.lang-en .block-label::after { content: ": "; }
.block-text {
  display: inline;
  font-size: 14.8px;
  color: var(--ink-soft);
  line-height: 1.95;
}

/* 列表式章节 */
.bullets { list-style: none; margin: 0; padding: 0; }
.bullets > li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 14px;
  font-size: 15.2px;
  color: var(--ink-soft);
  line-height: 1.95;
}
.bullets > li::before {
  content: "";
  position: absolute;
  left: 2px; top: .78em;
  width: 7px; height: 7px;
  border: 1px solid var(--gold);
  transform: rotate(45deg);
  transition: background .5s var(--ease);
}
.bullets > li:hover::before { background: var(--gold); }

.sub-bullets { list-style: none; margin: 10px 0 0; padding: 0; }
.sub-bullets li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 7px;
  font-size: 14.4px;
  color: var(--ink-mute);
}
.sub-bullets li::before {
  content: "";
  position: absolute;
  left: 0; top: .82em;
  width: 10px; height: 1px;
  background: var(--line);
}
.sub-bullets li.is-highlight {
  color: var(--navy);
  font-weight: 500;
}
.sub-bullets li.is-highlight::before { background: var(--gold); }

/* 标签式章节 */
.labeled { display: grid; gap: 2px; }
.labeled-row {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 18px;
  padding: 14px 4px;
  border-bottom: 1px solid var(--line);
  transition: background .5s var(--ease), padding-left .5s var(--ease);
}
.labeled-row:last-child { border-bottom: 0; }
.labeled-row:hover { background: rgba(240, 231, 214, .35); padding-left: 12px; }
.labeled-key {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--navy);
}
.labeled-val {
  font-size: 14.8px;
  color: var(--ink-soft);
}

/* 教育 */
.edu-item { padding: 16px 0; border-bottom: 1px solid var(--line); }
.edu-item:last-child { border-bottom: 0; }
.edu-head {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  align-items: baseline;
}
.edu-title {
  font-family: var(--serif-cn);
  font-size: 16.5px;
  font-weight: 600;
  color: var(--navy);
}
body.lang-en .edu-title { font-family: var(--sans); }
.edu-period {
  margin-left: auto;
  font-size: 12.5px;
  letter-spacing: .08em;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}
.edu-notes { margin: 8px 0 0; padding: 0; list-style: none; }
.edu-notes li {
  font-size: 14.4px;
  color: var(--ink-mute);
  padding-left: 18px;
  position: relative;
}
.edu-notes li::before {
  content: "";
  position: absolute;
  left: 0; top: .82em;
  width: 9px; height: 1px;
  background: var(--gold-soft);
}

/* 项目序号 */
.project-no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px; height: 26px;
  border: 1px solid var(--gold-soft);
  border-radius: 50%;
  font-family: var(--serif-en);
  font-size: 13px;
  color: var(--gold);
  margin-right: 4px;
  flex: 0 0 auto;
}

.highlight-list { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 10px; }
.highlight-item {
  padding: 12px 16px;
  background: linear-gradient(180deg, rgba(240, 231, 214, .42), rgba(240, 231, 214, .12));
  border-left: 2px solid var(--gold-soft);
  border-radius: 0 3px 3px 0;
  transition: transform .5s var(--ease);
}
.highlight-item:hover { transform: translateX(4px); }
.highlight-name {
  font-weight: 600;
  color: var(--navy);
  font-size: 14.8px;
}
.highlight-name::after { content: " — "; color: var(--gold); font-weight: 400; }
.highlight-text { font-size: 14.4px; color: var(--ink-soft); }

.result-block {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}
.result-block .block-label { color: var(--gold); }

/* ---------- 入场动画 ---------- */
.reveal > * { opacity: 1; }
.anim {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
}
.anim.is-in { opacity: 1; transform: none; }

.hero-kicker, .hero-name, .hero-objectives, .hero-intro, .hero-meta {
  animation: hero-in 1.1s var(--ease) both;
}
.hero-name { animation-delay: .08s; }
.hero-objectives { animation-delay: .18s; }
.hero-intro { animation-delay: .3s; }
.hero-meta { animation-delay: .42s; }
@keyframes hero-in {
  from { opacity: 0; transform: translateY(26px); }
  to { opacity: 1; transform: none; }
}

/* ---------- 页脚 ---------- */
.footer {
  margin-top: 40px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, transparent, rgba(240, 231, 214, .35));
}
.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 30px 28px 44px;
  font-size: 13px;
  color: var(--ink-mute);
  letter-spacing: .08em;
  display: flex;
  gap: 10px;
  align-items: center;
}
.footer-sep { color: var(--gold); }

/* ---------- 弹窗 ---------- */
.modal { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; }
.modal[hidden], .editbar[hidden], .toast[hidden] { display: none !important; }
.modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(16, 22, 31, .5);
  backdrop-filter: blur(3px);
  animation: fade .4s var(--ease) both;
}
.modal-card {
  position: relative;
  width: min(420px, calc(100vw - 40px));
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 30px 32px;
  box-shadow: var(--shadow-md);
  animation: pop .5s var(--ease) both;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop {
  from { opacity: 0; transform: translateY(14px) scale(.98); }
  to { opacity: 1; transform: none; }
}
.modal-card h2 {
  margin: 0 0 8px;
  font-family: var(--serif-cn);
  font-size: 20px;
  color: var(--navy);
}
.modal-note { margin: 0 0 18px; font-size: 13.5px; color: var(--ink-mute); line-height: 1.7; }
.modal-card label { display: block; font-size: 13px; color: var(--ink-soft); margin-bottom: 6px; }
.modal-card input {
  width: 100%;
  font: inherit;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--paper);
  transition: border-color .4s var(--ease), box-shadow .4s var(--ease);
}
.modal-card input:focus {
  outline: 0;
  border-color: var(--gold-soft);
  box-shadow: 0 0 0 3px rgba(201, 173, 120, .18);
}
.form-error { margin: 10px 0 0; font-size: 13px; color: #a3362f; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }

/* ---------- 编辑模式 ---------- */
.editbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 70;
  background: rgba(22, 36, 60, .96);
  backdrop-filter: blur(10px);
  color: #eceef2;
  animation: bar-in .6s var(--ease) both;
}
@keyframes bar-in { from { transform: translateY(100%); } to { transform: none; } }
.editbar-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 12px 28px;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 13.5px;
  flex-wrap: wrap;
}
.editbar-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--gold-soft);
  box-shadow: 0 0 0 0 rgba(201, 173, 120, .6);
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(201, 173, 120, .55); }
  100% { box-shadow: 0 0 0 12px rgba(201, 173, 120, 0); }
}
.editbar-hint { color: rgba(236, 238, 242, .6); font-size: 12.5px; }
.editbar-actions { margin-left: auto; display: flex; gap: 8px; }
.editbar .ghost-btn { border-color: rgba(236, 238, 242, .3); color: #eceef2; }
.editbar .ghost-btn:hover { border-color: var(--gold-soft); background: rgba(201, 173, 120, .16); color: #fff; }
.editbar .solid-btn { background: linear-gradient(135deg, var(--gold), #b9975c); }

body.is-editing { padding-bottom: 72px; }
body.is-editing [data-editable] {
  outline: 1px dashed rgba(169, 139, 82, .5);
  outline-offset: 3px;
  border-radius: 2px;
  cursor: text;
  transition: background .3s var(--ease), outline-color .3s var(--ease);
}
body.is-editing [data-editable]:hover { background: rgba(240, 231, 214, .55); }
body.is-editing [data-editable]:focus {
  outline: 1px solid var(--gold);
  background: #fffdf8;
  box-shadow: 0 0 0 3px rgba(201, 173, 120, .16);
}
body.is-editing .card:hover { transform: none; }
.edit-dirty { background: rgba(201, 173, 120, .14) !important; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 90px;
  transform: translateX(-50%);
  z-index: 95;
  background: var(--navy);
  color: #fff;
  font-size: 13.5px;
  padding: 11px 22px;
  border-radius: 999px;
  box-shadow: var(--shadow-md);
  animation: toast-in .45s var(--ease) both;
}
.toast.is-error { background: #8c2f28; }
@keyframes toast-in {
  from { opacity: 0; transform: translate(-50%, 10px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* ---------- 响应式 ---------- */
@media (max-width: 1100px) {
  .nav { display: none; }
}

@media (max-width: 900px) {
  .topbar-inner { padding: 12px 18px; }
  .hero { padding: 132px 20px 52px; }
  .scroll-hint { display: none; }
  .section { padding: 22px 20px; }
  .card { padding: 20px 20px; }
  .labeled-row { grid-template-columns: 1fr; gap: 4px; }
  .card-period, .edu-period { margin-left: 0; }
  .footer-inner { padding: 24px 20px 36px; }
  .editbar-inner { padding: 10px 18px; }
  .editbar-hint { display: none; }
}

@media (max-width: 420px) {
  .lang-switch button { padding: 5px 9px; font-size: 12px; }
  .topbar-actions { gap: 6px; }
  .ghost-btn, .solid-btn { padding: 6px 12px; font-size: 12.5px; }
}

@media print {
  .topbar, .editbar, .scroll-hint, .grain, .modal, .toast, .lang-switch { display: none !important; }
  body { background: #fff; }
  .hero { padding: 20px 0 10px; }
  .section { padding: 14px 0; page-break-inside: avoid; }
  .card { box-shadow: none; border-color: #ddd; }
  .orb { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .anim { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* ---------- 脱敏开关（仅管理员可见） ---------- */
.mask-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 4px;
  padding: 4px 12px 4px 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper-2);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  transition: border-color .4s var(--ease), background .4s var(--ease);
}
.mask-toggle:hover { border-color: var(--gold-soft); background: rgba(240, 231, 214, .5); }
.mask-toggle input { position: absolute; opacity: 0; width: 0; height: 0; }

.mask-track {
  position: relative;
  width: 30px; height: 17px;
  border-radius: 999px;
  background: #d6d2ca;
  flex: 0 0 auto;
  transition: background .4s var(--ease);
}
.mask-knob {
  position: absolute;
  top: 2px; left: 2px;
  width: 13px; height: 13px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(16, 22, 31, .28);
  transition: transform .4s var(--ease);
}
.mask-toggle input:checked + .mask-track {
  background: linear-gradient(135deg, var(--gold), #b9975c);
}
.mask-toggle input:checked + .mask-track .mask-knob { transform: translateX(13px); }
.mask-toggle input:focus-visible + .mask-track {
  box-shadow: 0 0 0 3px rgba(201, 173, 120, .3);
}
.mask-toggle input:disabled + .mask-track { opacity: .5; }

.mask-text {
  font-size: 12.5px;
  letter-spacing: .02em;
  color: var(--ink-mute);
  font-family: var(--sans);
  font-weight: 400;
}
.mask-toggle input:checked ~ .mask-text { color: var(--gold); }

/* 管理员视角下，被脱敏替换的标题加一点标记 */
.card-title.is-masked::after {
  content: "";
  display: inline-block;
  width: 5px; height: 5px;
  margin-left: 7px;
  border-radius: 50%;
  background: var(--gold-soft);
  vertical-align: middle;
}

@media (max-width: 560px) {
  .section-head { flex-wrap: wrap; }
  .mask-toggle { margin-left: 0; }
}
