:root {
  /* 浅色国风 · 与设计稿统一（整站通用，内页同步） */
  --bg-base: #f0e8dc;
  --bg-paper: #f7f2ea;
  --card: #fffef8;
  --text: #1a1816;
  --muted: #5c534c;
  --border: #e0d4c4;
  --border-strong: #c4b5a0;
  --accent-gold: #b8973e;
  --accent-gold-soft: rgba(184, 151, 62, 0.22);
  /* 主按钮：稿面铜褐 */
  --btn-primary: #a67c52;
  --btn-primary-hover: #956d48;
  --ok: #2d7a53;
  --bad: #b63d3d;
  --input-bg: #fffcf7;
  --seal-red: #c4352d;
  font-family: "PingFang SC", "Microsoft YaHei", "Songti SC", "STSong", "Noto Serif SC", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  line-height: 1.55;
  background-color: var(--bg-base);
  background-image: linear-gradient(180deg, var(--bg-paper) 0%, var(--bg-base) 100%);
  background-attachment: fixed;
}

/* 不再叠角花，避免与底纹抢戏（邀请页只用你提供的素净底图） */
#screen-gate,
#app-shell {
  position: relative;
  z-index: 1;
}

/* 邀请页：铺满你提供的设计稿（整页视觉） */
.gate-screen {
  min-height: 100vh;
  padding: clamp(1.25rem, 4vw, 2.5rem) 1rem 2rem;
  box-sizing: border-box;
  background-color: #f5f0e8;
  background-image: url("./assets/gate-design-bg.png");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: scroll;
}

@media (min-width: 900px) {
  .gate-screen {
    background-attachment: fixed;
  }
}

.gate-footer-caption {
  margin: 0 0 0.5rem;
  text-align: center;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: #7a6f62;
}

.top {
  padding: 1.5rem 1.25rem 0.5rem;
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1rem;
}

.top .titles {
  flex: 1;
  min-width: 200px;
}

/* —— 刷题区：价值说明 + 主栏与侧栏两列；侧栏为浮动位（sticky），随页面滚动在视口内保持可读，与主内容同步滚过 —— */
.app-layout {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.25rem 0;
  box-sizing: border-box;
  overflow: visible;
}

.app-layout-primary {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: visible;
}

.app-main-sidebar-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) min(17.5rem, 92vw);
  gap: 1.25rem 1.35rem;
  align-items: start;
  min-width: 0;
  overflow: visible;
}

main {
  max-width: none;
  margin: 0;
  padding: 0.75rem 0 2rem;
}

/* 软广 · 命理价值 */
.ad-soft {
  margin-bottom: 1rem;
  border: 1px solid var(--border-strong);
  background: linear-gradient(145deg, rgba(255, 254, 248, 0.98) 0%, rgba(241, 236, 226, 0.65) 100%);
  box-shadow: 0 6px 24px rgba(62, 48, 36, 0.06);
}

.ad-soft--compact {
  margin-bottom: 0.85rem;
  padding: 1rem 1.1rem;
}

.ad-zone-title {
  font-size: 1.05rem;
  font-weight: 700;
  font-family: "Songti SC", "STSong", "Noto Serif SC", serif;
  margin: 0 0 0.65rem;
  line-height: 1.45;
  color: var(--text);
}

.ad-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
  margin-right: 0.4rem;
  vertical-align: middle;
}

.ad-badge--soft {
  background: rgba(61, 110, 88, 0.14);
  color: #2d5c45;
  border: 1px solid rgba(61, 110, 88, 0.28);
}

.ad-badge--hard {
  background: rgba(166, 124, 82, 0.16);
  color: #6b4e32;
  border: 1px solid rgba(166, 124, 82, 0.35);
}

.ad-soft-lead {
  margin: 0 0 0.5rem;
  color: var(--text);
  font-size: 0.92rem;
}

.ad-soft-list {
  margin: 0 0 0.65rem;
  padding-left: 1.2rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.ad-soft-list li {
  margin-bottom: 0.35rem;
}

.ad-soft-tagline {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: #3d5747;
}

/* 硬广 · 香品：侧栏浮动（sticky），全浏览器随滚动上下移动；内部图文由 app.js 定时轮播 */
.ad-hard-aside {
  position: sticky;
  top: 1rem;
  align-self: start;
}

.ad-hard {
  border: 1px solid rgba(200, 188, 168, 0.85);
  background: linear-gradient(180deg, rgba(252, 249, 242, 0.97) 0%, rgba(238, 232, 220, 0.88) 100%);
  box-shadow: 0 4px 20px rgba(62, 48, 36, 0.05);
}

.ad-hard-figure {
  margin: 0 0 0.85rem;
  padding: 0;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(200, 188, 168, 0.5);
  background: rgba(245, 240, 232, 0.55);
}

.ad-hard-figure img {
  width: 100%;
  height: auto;
  display: block;
  vertical-align: middle;
  object-fit: contain;
}

.ad-hard-aside .ad-hard-figure img {
  max-height: min(48vh, 360px);
}

/* 侧栏轮播到「整图小店码」时略压高度，避免一条广告占满屏 */
.ad-hard-aside .ad-hard-figure--sidebar-shop img {
  max-height: min(50vh, 340px);
}

/* 侧栏文案/配图轮换时的轻提示（不晃眼） */
.ad-hard-rotate {
  transition: opacity 0.32s ease;
}

.ad-hard-rotate.is-switching {
  opacity: 0.6;
}

.ad-hard-figure--compact img {
  max-height: 220px;
}

.ad-hard-hook {
  margin: 0 0 0.85rem;
  font-size: 0.88rem;
  color: #4a453d;
  line-height: 1.6;
}

.ad-hard-hook strong {
  color: var(--text);
}

.ad-hard-cta {
  display: block;
  text-align: center;
  padding: 0.55rem 0.75rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(180deg, #9e7a58 0%, #8a6a4a 100%);
  border: 1px solid #6f5238;
  border-radius: 8px;
  text-decoration: none;
  letter-spacing: 0.04em;
}

.ad-hard-actions {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.ad-hard-cta--secondary {
  background: linear-gradient(180deg, rgba(255, 254, 250, 0.95) 0%, rgba(236, 228, 216, 0.9) 100%);
  color: #5c4430;
  border-color: #9a8268;
  text-shadow: none;
}

.ad-hard-cta--secondary:hover {
  color: #4a3624;
}

.ad-hard-cta:hover {
  filter: brightness(1.05);
  color: #fff;
}

.ad-hard-cta[href="#"] {
  opacity: 0.88;
}

/* 登录页下方推广条 */
.gate-promo-below {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(212, 196, 168, 0.65);
}

.gate-ad-card {
  background: rgba(255, 253, 246, 0.72);
  border: 1px solid rgba(212, 196, 168, 0.65);
  border-radius: 6px;
  padding: 1rem 1rem;
  margin-bottom: 0.85rem;
}

.gate-ad-card .ad-zone-title {
  font-size: 0.95rem;
}

.gate-ad-card .ad-soft-list {
  font-size: 0.82rem;
}

.gate-contacts {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.65;
  padding: 0.65rem 0.75rem;
  background: rgba(248, 244, 236, 0.55);
  border-radius: 6px;
  border: 1px solid rgba(224, 212, 196, 0.6);
}

.gate-contacts p {
  margin: 0 0 0.45rem;
}

.gate-contacts p:last-child {
  margin-bottom: 0;
}

.contact-label {
  display: inline-block;
  min-width: 4.5rem;
  font-weight: 600;
  color: var(--text);
  margin-right: 0.25rem;
}

.foot {
  text-align: center;
  padding: 1.25rem 1rem 1.5rem;
  color: var(--muted);
  font-size: 0.75rem;
  max-width: 1180px;
  margin: 0 auto;
}

.foot-contacts {
  text-align: left;
  max-width: 36rem;
  margin: 0 auto 0.85rem;
  padding: 0.85rem 1rem;
  background: rgba(255, 254, 248, 0.85);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.65;
}

.foot-contacts p {
  margin: 0 0 0.5rem;
}

.foot-contacts p:last-child {
  margin-bottom: 0;
}

.foot-tech {
  display: block;
  margin-top: 0.35rem;
  color: var(--muted);
}

@media (max-width: 960px) {
  .app-main-sidebar-row {
    grid-template-columns: 1fr;
  }

  .ad-hard-aside {
    position: sticky;
    top: 0.75rem;
  }

  /* 窄屏时硬广在答题流下方，仍完整可见 */
  .ad-hard {
    max-width: 28rem;
  }
}

.top h1 {
  margin: 0 0 0.25rem;
  font-size: 1.45rem;
  font-weight: 700;
  font-family: "Songti SC", "STSong", "Noto Serif SC", "PingFang SC", serif;
  letter-spacing: 0.04em;
}

.titles-with-logo {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
}

.brand-logo {
  flex-shrink: 0;
  width: auto;
  object-fit: contain;
  border-radius: 4px;
}

/* 内页顶栏 logo：白底印章留边 */
.brand-logo-inline {
  margin-top: 0.08rem;
  background: #fff;
  padding: 2px 3px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

/* 邀请页 logo：无衬底，直接压宣纸色 */
.gate-logo {
  display: block;
  margin: 0 auto 0.75rem;
  height: clamp(4.5rem, 14vw, 5.5rem);
  width: auto;
  background: transparent;
  padding: 0;
  box-shadow: none;
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.06));
}

.gate-hero {
  text-align: center;
  margin-bottom: 1.25rem;
}

.gate-hero h1 {
  margin: 0;
  font-size: clamp(1.5rem, 4.8vw, 1.85rem);
  font-weight: 700;
  font-family: "Songti SC", "STSong", "Noto Serif SC", "PingFang SC", serif;
  letter-spacing: 0.14em;
  color: var(--text);
}

.sub {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.gate-after-btn {
  margin: 1rem 0 0;
  text-align: center;
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* 首页：鼓励转发 + 引导加私域申领邀请码 */
.gate-share-invite {
  margin: 1.1rem 0 0;
  padding: 0.9rem 1rem;
  border-radius: 8px;
  background: rgba(184, 151, 62, 0.09);
  border: 1px solid rgba(184, 151, 62, 0.3);
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--text);
}

.gate-share-invite > p {
  margin: 0 0 0.55rem;
}

.gate-share-invite-meta {
  color: var(--muted);
  font-size: 0.84rem;
  margin-bottom: 0.75rem;
}

.gate-assistant-qr {
  margin: 0;
  padding: 0;
  text-align: center;
}

.gate-assistant-qr img {
  display: block;
  width: min(180px, 70vw);
  height: auto;
  margin: 0 auto;
  border-radius: 6px;
  border: 1px solid rgba(184, 151, 62, 0.25);
}

.gate-assistant-qr figcaption {
  margin-top: 0.45rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.gate-loading {
  margin-top: 0.75rem;
  text-align: center;
}

.gate-wrap {
  max-width: min(26rem, calc(100vw - 2rem));
  margin: 2rem auto 2.5rem;
  padding: 2rem 1.75rem 1.75rem;
}

.gate-card {
  background: rgba(255, 254, 248, 0.78);
  border: 1px solid rgba(224, 212, 196, 0.85);
  border-radius: 6px;
  box-shadow: 0 12px 36px rgba(62, 48, 36, 0.05);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.invite-input {
  width: 100%;
  margin-top: 0;
  padding: 0.8rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: var(--input-bg);
  color: var(--text);
  font-size: 1rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.invite-input::placeholder {
  color: #9a9088;
}

.invite-input:hover {
  border-color: #a89882;
}

.invite-input:focus {
  outline: none;
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 3px var(--accent-gold-soft);
}

.err {
  color: var(--bad);
  font-size: 0.88rem;
  margin: 0.5rem 0 0;
}

.gate-warn {
  color: #8a6919;
  font-size: 0.88rem;
  margin: 0.5rem 0 0;
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.btn-small {
  padding: 0.35rem 0.75rem;
  font-size: 0.85rem;
  margin-top: 0;
  align-self: flex-start;
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border-strong);
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem 1.35rem;
  box-shadow: 0 10px 36px rgba(62, 48, 36, 0.07);
}

.hidden {
  display: none !important;
}

.hint,
.meta {
  color: var(--muted);
  font-size: 0.88rem;
}

/* 底部说明：双层线框 + 角花意 */
.gate-footer {
  margin-top: 1.5rem;
  padding: 1.1rem 1rem;
  border: 2px solid #d4c4a8;
  outline: 1px solid rgba(184, 151, 62, 0.45);
  outline-offset: 4px;
  background: linear-gradient(180deg, rgba(255, 254, 248, 0.95) 0%, rgba(248, 244, 236, 0.98) 100%);
  border-radius: 2px;
}

.gate-footer p {
  margin: 0 0 0.6rem;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.65;
}

.gate-footer p:last-child {
  margin-bottom: 0;
}

code {
  background: rgba(224, 212, 196, 0.35);
  padding: 0.12em 0.35em;
  border-radius: 4px;
  font-size: 0.9em;
}

.btn {
  cursor: pointer;
  border: 1px solid var(--border-strong);
  background: #ebe3d7;
  color: var(--text);
  padding: 0.55rem 1.2rem;
  border-radius: 8px;
  font-size: 1rem;
  margin-top: 0.75rem;
}

.btn.primary {
  background: linear-gradient(180deg, var(--btn-primary-hover) 0%, var(--btn-primary) 100%);
  border-color: #8a6845;
  color: #fff;
  text-shadow: none;
}

.gate-wrap .btn.primary {
  width: 100%;
  margin-top: 0.85rem;
  padding: 0.7rem 1.25rem;
  font-weight: 600;
  border-radius: 8px;
  letter-spacing: 0.06em;
}

.btn:hover {
  filter: brightness(1.04);
}

.btn.primary:hover {
  filter: brightness(1.06);
}

.progress-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.progress-bar {
  flex: 1;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}

.progress-bar::after {
  content: "";
  display: block;
  height: 100%;
  width: var(--p, 0%);
  background: linear-gradient(90deg, var(--btn-primary), var(--btn-primary-hover));
  transition: width 0.2s ease;
}

.q-block {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem 1.15rem;
  margin-bottom: 1rem;
  box-shadow: 0 4px 16px rgba(62, 48, 36, 0.06);
}

.q-block .stem {
  margin: 0 0 0.75rem;
  font-weight: 600;
}

.q-meta {
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.opts label {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  padding: 0.35rem 0;
  cursor: pointer;
}

.opts input {
  margin-top: 0.35rem;
}

.result-item {
  border-bottom: 1px solid var(--border);
  padding: 0.9rem 0;
}

.result-item:last-child {
  border-bottom: none;
}

.tag {
  display: inline-block;
  font-size: 0.72rem;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  margin-right: 0.35rem;
}

.tag.ok {
  background: rgba(45, 122, 83, 0.15);
  color: var(--ok);
}

.tag.bad {
  background: rgba(182, 61, 61, 0.12);
  color: var(--bad);
}

.explain {
  margin: 0.5rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.score-big {
  font-size: 1.35rem;
  margin: 0.5rem 0 1rem;
}

.actions {
  margin-top: 1rem;
}

.private-cta {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.private-cta h3 {
  font-size: 1rem;
  margin: 0 0 0.5rem;
}

/* —— 答题半屏浮层：不打断流程，可关闭 —— */
body.quiz-float-open {
  overflow: hidden;
}

.quiz-float-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
}

.quiz-float-overlay:not(.hidden) {
  pointer-events: auto;
}

.quiz-float-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(42, 36, 30, 0.42);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.quiz-float-panel {
  position: relative;
  width: 100%;
  max-width: 520px;
  max-height: min(52vh, 28rem);
  margin: 0 auto 0;
  padding: 1rem 1.15rem 1.25rem;
  background: linear-gradient(180deg, #fffef9 0%, #f3ece0 100%);
  border: 1px solid var(--border-strong);
  border-radius: 14px 14px 0 0;
  box-shadow: 0 -8px 40px rgba(42, 36, 30, 0.18);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  overflow: hidden;
  animation: quiz-float-in 0.28s ease-out;
}

@keyframes quiz-float-in {
  from {
    transform: translateY(100%);
    opacity: 0.85;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.quiz-float-x {
  position: absolute;
  top: 0.45rem;
  right: 0.55rem;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(224, 212, 196, 0.55);
  color: var(--muted);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}

.quiz-float-x:hover {
  background: rgba(212, 196, 168, 0.75);
  color: var(--text);
}

.quiz-float-body {
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  padding-right: 0.25rem;
  margin-top: 0.25rem;
}

.quiz-float-body h3 {
  margin: 0 0 0.4rem;
  font-size: 1.08rem;
  font-family: "Songti SC", "STSong", "Noto Serif SC", serif;
  color: var(--text);
  line-height: 1.35;
}

.quiz-float-lead {
  margin: 0 0 0.55rem;
  font-size: 0.93rem;
  line-height: 1.65;
  color: var(--text);
}

.quiz-float-copy {
  margin: 0 0 0.5rem;
  font-size: 0.93rem;
  line-height: 1.7;
  color: #4a453d;
}

.quiz-float-figure {
  margin: 0 0 0.5rem;
  text-align: center;
}

.quiz-float-figure img {
  max-width: 100%;
  max-height: 8.5rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  object-fit: contain;
  background: rgba(255, 252, 246, 0.9);
}

/* 微信小店整图（头图 + 圆形码）：刻意缩小，避免压过正文 */
.quiz-float-figure--shop {
  margin: 0.2rem auto 0.35rem;
}

.quiz-float-figure--shop img {
  max-width: min(168px, 58vw);
  max-height: min(28vh, 192px);
  width: auto;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 10px;
  border-color: rgba(206, 196, 182, 0.65);
}

@media (min-width: 420px) {
  .quiz-float-figure--shop img {
    max-width: min(188px, 42vw);
    max-height: min(30vh, 210px);
  }
}

.quiz-float-qr-wrap {
  margin: 0.35rem auto 0;
  text-align: center;
  max-width: 200px;
}

.quiz-float-qr-wrap img {
  width: 100%;
  max-width: 200px;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
}

.quiz-float-actions {
  flex-shrink: 0;
  padding-top: 0.15rem;
}

.quiz-float-continue {
  width: 100%;
  margin-top: 0;
  padding: 0.65rem 1rem;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.quiz-float-body .ad-hard-cta {
  margin: 0 0 0.35rem;
}

/* 中途浮层：进店为次要入口，视觉弱于「继续答题」 */
.quiz-float-minishop-actions {
  margin: 0.15rem 0 0.3rem;
  text-align: center;
}

.quiz-float-body .ad-hard-cta.ad-hard-cta--minishop-subtle {
  display: inline-block;
  width: auto;
  max-width: 100%;
  padding: 0.15rem 0.35rem;
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1.4;
  background: transparent !important;
  color: #7a6a5c !important;
  border: none !important;
  box-shadow: none !important;
  text-shadow: none;
  text-decoration: underline;
  text-underline-offset: 0.18em;
  text-decoration-color: rgba(122, 106, 92, 0.45);
}

.quiz-float-body .ad-hard-cta.ad-hard-cta--minishop-subtle:hover {
  color: #5c4d42 !important;
  background: transparent !important;
  filter: none;
  text-decoration-color: rgba(92, 77, 66, 0.55);
}

.quiz-float-body .quiz-float-minishop-actions .ad-hard-cta {
  margin: 0;
}

@media (min-width: 600px) {
  .quiz-float-panel {
    border-radius: 14px;
    margin-bottom: 8vh;
    max-height: min(62vh, 34rem);
  }
}

/* 公众号：可点「心婷解惑」弹出二维码 */
button.contact-gzh-trigger,
button.contact-personal-wx-trigger {
  display: inline;
  padding: 0;
  margin: 0;
  border: none;
  background: none;
  font: inherit;
  font-weight: 700;
  font-family: inherit;
  color: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 0.15em;
  text-decoration-color: rgba(107, 78, 50, 0.42);
}

button.contact-gzh-trigger:hover,
button.contact-personal-wx-trigger:hover {
  color: #6b4e32;
  text-decoration-color: rgba(107, 78, 50, 0.68);
}

button.contact-gzh-trigger:focus-visible,
button.contact-personal-wx-trigger:focus-visible {
  outline: 2px solid var(--accent-gold);
  outline-offset: 2px;
  border-radius: 2px;
}

body.contact-qr-open {
  overflow: hidden;
}

.gzh-qr-modal {
  position: fixed;
  inset: 0;
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  box-sizing: border-box;
  pointer-events: none;
}

.gzh-qr-modal:not(.hidden) {
  pointer-events: auto;
}

.gzh-qr-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(42, 36, 30, 0.48);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.gzh-qr-panel {
  position: relative;
  width: 100%;
  max-width: 20rem;
  padding: 1.35rem 1.15rem 1.45rem;
  background: linear-gradient(180deg, #fffef9 0%, #f3ece0 100%);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  box-shadow: 0 16px 48px rgba(42, 36, 30, 0.22);
  text-align: center;
}

.gzh-qr-panel h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  font-family: "Songti SC", "STSong", "Noto Serif SC", serif;
  color: var(--text);
  font-weight: 700;
}

.gzh-qr-lead {
  margin: 0 0 0.85rem;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.55;
}

.gzh-qr-figure {
  margin: 0;
  display: flex;
  justify-content: center;
}

.gzh-qr-figure img {
  width: min(220px, 72vw);
  height: auto;
  display: block;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
  object-fit: contain;
}

.gzh-qr-x {
  position: absolute;
  top: 0.4rem;
  right: 0.45rem;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(224, 212, 196, 0.55);
  color: var(--muted);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}

.gzh-qr-x:hover {
  background: rgba(212, 196, 168, 0.78);
  color: var(--text);
}
