/* 背景画：生宣与淡墨远山（assets/bg/，程序绘制的原创图，来源见该目录 README.md）。在 styles.css 之后引入。
   浅色宣纸主题：页面文字用深色墨色。两层都在内容之下，不接收点击，不进分享图与打印。
   body::before 静态底图：横屏、竖屏各一张；上面叠一层半透明纸色，表单与正文所在的中部更净，保证文字对比度
                （竖屏时内容铺满整屏、会滚到下方远山上，所以整屏都罩一层，山也淡一些）。
   body::after  山雾：系统未开「减少动态效果」时缓缓左右飘移、明暗呼吸（只动 transform / opacity）；页面切到后台时
                （html.paused，与首页同一约定）暂停。
   约定：html 不设背景（body 的底色会传到画布上），这两层才不会被 body 的背景盖住。 */
body::before, body::after {
  content: ""; position: fixed; left: 0; top: 0; width: 100vw; height: 100vh; height: 100lvh;   /* 100vw：连保留的滚动条位置一起铺满，宽屏右边不留一条平色 */
  z-index: -1; pointer-events: none;
}
body::before {
  background:
    radial-gradient(ellipse 44% 56% at 50% 40%, rgba(245,239,227,.78), rgba(245,239,227,.42) 62%, rgba(245,239,227,0) 100%),
    linear-gradient(to bottom, rgba(245,239,227,0) 55%, rgba(245,239,227,.25)),
    url("assets/bg/studio-landscape.webp") center bottom / cover no-repeat,
    var(--paper, #eee5d2);
}
body::after {
  top: auto; bottom: 0; height: 36vh; left: -8vw; width: 116vw;
  background: url("assets/bg/studio-mist.webp") center bottom / 100% 100% no-repeat;
  opacity: .55;
}
@media (orientation: portrait) {
  body::before {
    background:
      linear-gradient(to bottom, rgba(245,239,227,.2), rgba(245,239,227,.5) 20%, rgba(245,239,227,.58) 64%, rgba(245,239,227,.42) 86%, rgba(245,239,227,.3)),
      url("assets/bg/studio-portrait.webp") center bottom / cover no-repeat,
      var(--paper, #eee5d2);
  }
  body::after { height: 24vh; opacity: .4; }
}
@media (prefers-reduced-motion: no-preference) {
  body::after { will-change: transform, opacity; animation: naming-bg-mist 46s ease-in-out infinite alternate; }
  html.paused body::after { animation-play-state: paused; }
}
@keyframes naming-bg-mist {
  0%   { transform: translate3d(-3%, 0, 0); opacity: .38; }
  50%  { opacity: .66; }
  100% { transform: translate3d(3%, -1.5%, 0); opacity: .44; }
}
@media print { body::before, body::after { display: none; } }
