/* ============================================================
   五气朝元 · 全站朝元境氛围层 site-jing.css
   为任意页面注入「命局即地形」山水 + 五行流场 + 阴阳双生浮钮，
   与首页 body.jing 视觉一致；工具页表单功能完全不受影响。
   ============================================================ */

/* 隐藏原通用春山图，改以命局即地形山水为主背景 */
body.jing-ambient .theme-shanshui { display: none !important; }

/* 命局即地形（主背景层，替代春山图） */
#jing-ambient {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: -3;
  pointer-events: none;
}

/* 五行流场（活在山水与远韵文字之间） */
#jing-flow {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: -2;
  pointer-events: none;
}

/* 阴阳双生切换 · 翻显过渡 */
#jing-ambient.flip { animation: jingFlip .9s ease both; }
@keyframes jingFlip {
  0%   { opacity: 1; filter: blur(0); }
  46%  { opacity: 0; filter: blur(16px); }
  54%  { opacity: 0; filter: blur(16px); }
  100% { opacity: 1; filter: blur(0); }
}

/* 阴阳双生浮钮（右下角） */
#jing-yy {
  position: fixed;
  right: 1.1rem;
  bottom: 1.1rem;
  z-index: 60;
  width: 3.1rem;
  height: 3.1rem;
  border-radius: 50%;
  border: 1px solid rgba(176, 138, 79, .7);
  background: rgba(20, 16, 10, .42);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  color: #e8dcc0;
  font: 600 1rem/1 'Songti SC', 'STSong', serif;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: .3s;
  box-shadow: 0 2px 14px rgba(0, 0, 0, .25);
}
#jing-yy:hover { border-color: rgba(217, 72, 47, .85); color: #fff; }
#jing-yy .lab { writing-mode: vertical-rl; letter-spacing: .12em; }
#jing-yy.yin {
  background: rgba(20, 28, 54, .5);
  border-color: rgba(120, 150, 200, .85);
  color: #cfe0ff;
}
#jing-yy.yin:hover { border-color: rgba(120, 150, 200, 1); color: #fff; }

@media (prefers-reduced-motion: reduce) {
  #jing-ambient.flip { animation: none; }
}

/* ════════════════════════════════════════
   四层一线 · 全站册页与钤记（工具页）
   ════════════════════════════════════════ */

/* 工具页：古绢纸底纹覆盖在山水之上 */
body.jing-ambient::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: url("ancient-paper.webp") center/cover;
  opacity: 0.18;
  pointer-events: none;
}

/* 册页蝴蝶装：工具内容包裹 */
.arch-album-tool {
  position: relative;
  max-width: 860px;
  margin: 2rem auto;
  padding: 0;
  background:
    url("ancient-paper.webp") center/cover,
    linear-gradient(135deg, rgba(232,220,200,0.92) 0%, rgba(212,196,168,0.85) 100%);
  border-radius: 6px;
  box-shadow:
    0 4px 24px rgba(44,36,24,0.12),
    inset 0 0 60px rgba(139,115,85,0.08);
  overflow: hidden;
}
.arch-album-tool::before {
  /* 册页装订线 */
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(to bottom,
    transparent 5%,
    rgba(139,115,85,0.35) 15%,
    rgba(139,115,85,0.5) 50%,
    rgba(139,115,85,0.35) 85%,
    transparent 95%);
  transform: translateX(-50%);
  pointer-events: none;
}
.arch-album-tool .wrap,
.arch-album-tool .page-head,
.arch-album-tool .tool-card {
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
}
/* 左右半页 */
.arch-album-left {
  padding: 2rem 1.5rem 2rem 2.5rem;
  border-right: 1px dashed rgba(139,115,85,0.25);
}
.arch-album-right {
  padding: 2rem 2.5rem 2rem 1.5rem;
  background: rgba(255,255,255,0.05);
}

/* 钤印按钮（工具页表单提交） */
.arch-seal-submit {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.4rem;
  background: transparent;
  border: 2px solid var(--arch-vermilion, #C23A22);
  color: var(--arch-vermilion, #C23A22);
  font-family: inherit;
  font-size: 0.95rem;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.3s;
  letter-spacing: 0.1em;
  overflow: visible;
}
.arch-seal-submit:hover {
  background: var(--arch-vermilion, #C23A22);
  color: #E8DCC8;
}
.arch-seal-submit .seal-icon {
  font-size: 1.1rem;
}

/* 钤印动画（落印） */
.seal-drop-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(44,36,24,0.15);
  opacity: 0;
  animation: seal-fadein 0.3s forwards;
}
@keyframes seal-fadein { to { opacity: 1; } }
.seal-drop-img {
  width: 96px;
  height: 96px;
  object-fit: contain;
  opacity: 0;
  transform: scale(3) rotate(-15deg);
  animation: seal-thud 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.2s forwards;
}
@keyframes seal-thud {
  to { opacity: 1; transform: scale(1) rotate(0deg); }
}
.seal-drop-overlay.hiding {
  animation: seal-fadeout 0.4s forwards;
}
@keyframes seal-fadeout { to { opacity: 0; } }

/* 页面标题 → 册页题签风格 */
.arch-album-tool h1,
.arch-album-tool h2,
.arch-album-tool .page-head h1,
.arch-album-tool .page-head h2 {
  font-family: "Noto Serif SC", "Source Han Serif SC", "STSong", serif;
  letter-spacing: 0.25em;
  color: #2C2418;
  border-bottom: 2px solid rgba(184,134,11,0.4);
  padding-bottom: 0.5rem;
}

@media (max-width: 640px) {
  .arch-album-tool { margin: 1rem auto; }
  .arch-album-tool::before { display: none; }
  .arch-album-left { border-right: none; border-bottom: 1px dashed rgba(139,115,85,0.25); }
}
