#zhifu-page-loading a {
  display: inline-flex;
  color: inherit;
  text-decoration: none;
  padding: 10px 18px;
  border: 1px solid #d9dee5;
  border-radius: 10px;
  background: white;
}
#zhifu-page-loading [hidden] {
  display: none !important;
}
#zhifu-loading-detail {
  max-width: 360px;
  color: #596574;
  padding: 0 20px;
}
#zhifu-page-loading[data-recovery='true'] {
  display: grid !important;
}
#zhifu-page-loading[data-recovery='true'] #zhifu-loading-error {
  display: block;
  font-size: 22px;
  font-weight: 600;
}
#zhifu-recovery-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
}
#zhifu-page-loading {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-content: center;
  gap: 12px;
  text-align: center;
  background: #f7f8fa;
  color: #3c4856;
  font: 14px/1.6 system-ui;
}
#zhifu-loading-progress {
  position: fixed;
  inset: 0 0 auto;
  height: 2px;
  overflow: hidden;
  opacity: 0;
}
#zhifu-page-loading[data-pending='true'] #zhifu-loading-progress {
  opacity: 1;
}
#zhifu-loading-progress::before {
  content: '';
  display: block;
  width: 100%;
  height: 100%;
  background: #4d748e;
  transform-origin: left center;
  animation: zhifu-page-progress 5.2s linear both;
}
@keyframes zhifu-page-progress {
  0% {
    transform: scaleX(0.06);
  }
  12% {
    transform: scaleX(0.42);
  }
  50% {
    transform: scaleX(0.67);
  }
  100% {
    transform: scaleX(0.86);
  }
}
.zhifu-loading-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
#zhifu-page-loading:not([data-recovery='true']) #zhifu-loading-error,
#zhifu-page-loading:not([data-recovery='true']) #zhifu-recovery-actions,
#zhifu-page-loading:not([data-recovery='true']) #zhifu-loading-detail {
  display: none;
}
#zhifu-page-loading[data-recovery='true'] #zhifu-loading-progress {
  display: none;
}
@media (prefers-reduced-motion: reduce) {
  #zhifu-loading-progress::before {
    animation: none;
    transform: scaleX(0.67);
  }
}
/* 2026-11-12：加载骨架（超时/慢网时让「正在加载」可被看见，而不是空白页）。 */
#zhifu-loading-skeleton {
  display: grid;
  gap: 10px;
  width: min(420px, 72vw);
  margin: 0 auto;
  justify-items: center;
}
#zhifu-loading-skeleton i {
  display: block;
  width: 100%;
  height: 14px;
  border-radius: 7px;
  background: linear-gradient(90deg, #e8ecf1 25%, #f4f6f9 37%, #e8ecf1 63%);
  background-size: 400% 100%;
  animation: zhifu-skeleton 1.4s ease infinite;
}
#zhifu-loading-skeleton i:nth-child(2) {
  width: 78%;
}
#zhifu-loading-skeleton i:nth-child(3) {
  width: 56%;
}
#zhifu-loading-skeleton-label {
  color: #596574;
  font-size: 13px;
  margin-top: 4px;
}
@keyframes zhifu-skeleton {
  0% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0 50%;
  }
}
/* 2026-11-12：业务数据失败的区块错误（保留页面框架，不整页崩）。 */
.zhifu-section-error {
  margin: 24px auto;
  max-width: 640px;
  padding: 24px;
  border: 1px solid #e3c9c9;
  border-radius: 14px;
  background: #fff8f6;
  color: #513a3a;
  text-align: center;
}
.zhifu-section-error h2 {
  margin: 0 0 8px;
  font-size: 18px;
}
.zhifu-section-error p {
  margin: 0 0 16px;
  color: #6b5454;
}
.zhifu-section-error__retry {
  border: 1px solid #d9dee5;
  border-radius: 10px;
  background: white;
  color: inherit;
  padding: 10px 20px;
  cursor: pointer;
}
/* 2026-11-12：断网提示（恢复后由韧性层自动触发区块重试）。 */
#zhifu-offline-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10001;
  padding: 10px 16px;
  text-align: center;
  font: 14px/1.5 system-ui;
  color: #5a3b16;
  background: #fff4e5;
  border-bottom: 1px solid #f0d2a6;
}
#zhifu-offline-banner[hidden] {
  display: none !important;
}
/* 降级态下隐藏页面级残留错误提示，只保留区块错误。 */
html[data-zhifu-degraded='true'] #product-live-error,
html[data-zhifu-degraded='true'] body > p[role='alert'] {
  display: none !important;
}

/* Keep real navigation available while protected business content initializes. */
body:has(> .site-header) #zhifu-page-loading:not([data-recovery='true']) {
  top: 64px;
}
#zhifu-loading-progress {
  top: 64px;
}
@media (max-width: 720px) {
  body:has(> .site-header) #zhifu-page-loading:not([data-recovery='true']),
  #zhifu-loading-progress {
    top: 0;
  }
}
