/* ============================================
   联系作者
   ============================================ */

#contact {
  background:
    repeating-linear-gradient(45deg,
      transparent 0px, transparent 3px,
      rgba(160, 120, 70, 0.04) 3px, rgba(160, 120, 70, 0.04) 4px),
    repeating-linear-gradient(0deg,
      transparent 0px, transparent 12px,
      rgba(160, 120, 70, 0.03) 12px, rgba(160, 120, 70, 0.03) 13px),
    radial-gradient(ellipse at center,
      rgba(245, 235, 215, 0) 40%,
      rgba(140, 100, 60, 0.18) 100%),
    linear-gradient(135deg, #f3e9d0 0%, #ecdfc0 50%, #e3d4b0 100%);
}

body.contact-open .audio-toggle {
  display: none !important;
}

.contact-close {
  position: absolute;
  top: 24px;
  right: 28px;
  width: 40px;
  height: 40px;
  border: 1px solid var(--c-gold);
  background: rgba(245, 235, 215, 0.7);
  color: var(--c-ink);
  font-size: 24px;
  cursor: pointer;
  border-radius: 50%;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  font-family: serif;
  line-height: 1;
}

.contact-close:hover {
  background: var(--c-gold-light);
  color: var(--c-paper);
  box-shadow: 0 0 10px rgba(201, 169, 110, 0.7);
  transform: rotate(90deg);
}

.contact-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  padding: 40px 20px;
  z-index: 5;
}

/* 标题（与图鉴标题样式呼应） */
.contact-title-wrap {
  position: relative;
  display: inline-block;
  padding: 8px 60px;
}

.contact-title-wrap::before,
.contact-title-wrap::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 50px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--c-gold) 50%, transparent);
}
.contact-title-wrap::before { left: 0; }
.contact-title-wrap::after { right: 0; }

.contact-title {
  font-family: var(--font-kai);
  font-size: 34px;
  color: var(--c-ink);
  letter-spacing: 16px;
  font-weight: 600;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
  background: linear-gradient(180deg, #2a2418 0%, #4a3a22 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  padding: 0 8px;
  margin: 0;
}

.contact-subtitle {
  font-family: var(--font-kai);
  font-size: 13px;
  color: var(--c-ink-light);
  letter-spacing: 5px;
  text-align: center;
  margin-top: 4px;
}

/* 信息卡 */
.contact-card {
  display: flex;
  align-items: center;
  gap: 48px;
  padding: 32px 44px;
  background:
    radial-gradient(circle at 20% 30%, rgba(160, 120, 70, 0.04) 1px, transparent 2px),
    radial-gradient(circle at 70% 60%, rgba(160, 120, 70, 0.05) 1px, transparent 2px),
    linear-gradient(180deg, #f8f0dc 0%, #efe2c4 100%);
  background-size: 8px 8px, 11px 11px, 100% 100%;
  border: 1.5px solid rgba(184, 145, 90, 0.55);
  border-radius: 2px;
  box-shadow:
    inset 0 0 0 1px rgba(245, 235, 215, 0.7),
    0 6px 18px rgba(0, 0, 0, 0.16);
}

/* 二维码框 */
.contact-qr-frame {
  position: relative;
  width: 220px;
  height: 220px;
  overflow: hidden;
  border: 3px solid rgba(245, 235, 215, 0.95);
  box-shadow:
    0 0 0 1px rgba(201, 169, 110, 0.45),
    inset 0 0 0 1px rgba(255, 248, 230, 0.55),
    0 4px 12px rgba(0, 0, 0, 0.18);
  background: #fff;
  flex-shrink: 0;
}

/* 用 object-fit cover 自动裁掉上下空白；位置居中即可完整露出二维码 */
.contact-qr-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}

/* 文字信息列 */
.contact-info {
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-family: var(--font-kai);
}

.contact-row {
  display: flex;
  align-items: baseline;
  gap: 14px;
  font-size: 18px;
  color: var(--c-ink);
  letter-spacing: 3px;
}

.contact-row .label {
  color: var(--c-ink-light);
  font-size: 14px;
  letter-spacing: 4px;
  min-width: 78px;
  border-right: 1px solid rgba(184, 145, 90, 0.4);
  padding-right: 14px;
  text-align: right;
}

.contact-row .value {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 4px;
}

.contact-row.phone .value {
  font-family: var(--font-song);
  letter-spacing: 2px;
  font-variant-numeric: tabular-nums;
}

.contact-tip {
  font-family: var(--font-kai);
  font-size: 12px;
  color: var(--c-ink-muted);
  letter-spacing: 4px;
  margin-top: 4px;
}

/* 印章 */
.contact-seal {
  width: 56px;
  height: 56px;
  background: var(--c-seal);
  color: var(--c-paper);
  font-family: var(--font-kai);
  font-size: 28px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.2);
  align-self: flex-end;
  margin-bottom: -10px;
}

/* hero / ending 入口动画 */
#hero .contact-entry-btn,
#ending .contact-entry-btn {
  opacity: 0;
}
#hero .contact-entry-btn {
  animation: fadeIn 1.2s 3.7s forwards;
}
#ending .contact-entry-btn {
  animation: fadeIn 1.2s 3.3s forwards;
}

/* 移动端 */
@media (max-width: 900px) {
  .contact-close {
    top: 12px !important;
    right: 12px !important;
    width: 44px !important;
    height: 44px !important;
    font-size: 22px !important;
    z-index: 9999 !important;
    background: rgba(184, 69, 62, 0.92) !important;
    color: #f0e6d2 !important;
    border-color: #f0e6d2 !important;
  }
  .contact-title { font-size: 22px; letter-spacing: 8px; }
  .contact-title-wrap { padding: 6px 36px; }
  .contact-title-wrap::before,
  .contact-title-wrap::after { width: 26px; }
  .contact-subtitle { font-size: 11px; letter-spacing: 4px; }
  .contact-content { gap: 18px; padding: 20px 12px; }

  .contact-card {
    flex-direction: column;
    gap: 18px;
    padding: 20px 24px;
  }
  .contact-qr-frame {
    width: 170px;
    height: 170px;
  }
  .contact-row { font-size: 14px; gap: 10px; }
  .contact-row .label { font-size: 12px; min-width: 60px; padding-right: 10px; }
  .contact-row .value { font-size: 15px; }
  .contact-tip { font-size: 11px; letter-spacing: 3px; }
  .contact-seal { width: 40px; height: 40px; font-size: 20px; }

  #hero .contact-entry-btn,
  #ending .contact-entry-btn {
    padding: 6px 18px;
    font-size: 11px;
    letter-spacing: 4px;
  }
}

@media (max-width: 900px) and (orientation: landscape) {
  .contact-content { gap: 12px; padding: 12px 12px; }
  .contact-card { flex-direction: row; gap: 22px; padding: 14px 22px; }
  .contact-qr-frame {
    width: 130px;
    height: 130px;
  }
  .contact-title { font-size: 18px; letter-spacing: 6px; }
}