/* Page-level masthead precedes the unchanged lion banner. Footer remains a background. */
.dh-site > .dh-page-header {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 12 / 5;
  margin: 0;
  padding: 0;
  border: 0;
  pointer-events: none;
  overflow: hidden;
}
.dh-site > .dh-page-header > img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
:is(.dashi-checkin-admin-page, .dashi-invitation-admin-page) .dh-page-header { display: none; }

.dh-site {
  --dh-shell-background: radial-gradient(ellipse at 84% 9%, #a42822 0, transparent 66%),
    linear-gradient(160deg, #870e17 0%, #750d16 60%, #520c14 100%);
  --dh-footer-offset: 0px;
  --dh-footer-width: min(100vw, var(--dh-page-width, 480px));
  --dh-footer-art-height: calc(var(--dh-footer-width) * .434);
  isolation: isolate;
  padding-block-end: var(--dh-nav-clearance);
  background: var(--dh-shell-background);
}

.dh-site > .dh-page-footer {
  position: absolute;
  z-index: -1;
  inset-inline: 0;
  inset-block-end: var(--dh-footer-offset);
  width: var(--dh-footer-width);
  max-width: 100%;
  margin-inline: auto;
  height: calc(var(--dh-footer-art-height) + var(--dh-nav-clearance) - var(--dh-footer-offset));
  overflow: hidden;
  mask-image: linear-gradient(to bottom, transparent 0%, #00000050 16%, #000000bd 38%, #000 68%);
  pointer-events: none;
}

.dh-page-footer > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.dh-page-footer::after {
  position: absolute;
  inset: 0;
  /* Keep unboxed footer copy readable now that the artwork sits behind content. */
  background: linear-gradient(to bottom, #65111a55, #65111a18 50%, transparent 85%);
  content: "";
}

.dh-site:has(> [data-dh-bottom-nav]) {
  --dh-footer-offset: calc(var(--dh-nav-height) - 16px);
}

:is(.dashi-card-suite-page, .dashi-points-suite) .dh-site {
  --dh-shell-background: radial-gradient(ellipse at 70% 0%, #9c1d21 0, transparent 65%),
    linear-gradient(160deg, #7a0d17, #550d15);
}

:is(.dashi-history-index-page, .dashi-history-page, .dashi-company-docs-page, .dashi-lucky-page) {
  --dh-page-width: 430px;
}

.dashi-history-index-page .dh-site { --dh-shell-background: linear-gradient(#8d0b10, #5c0509); }
.dashi-history-page .dh-site { --dh-shell-background: linear-gradient(#8e0a10, #5b0509); }
.dashi-company-docs-page .dh-site { --dh-shell-background: linear-gradient(#8b090f, #5d0509); }
.dashi-lucky-page .dh-site { --dh-shell-background: radial-gradient(ellipse at 50% 55%, #c52a15, #8f0c0e 48%, #5d0509); }
.dashi-checkin-page .dh-site { --dh-shell-background: #330305; }
.dashi-checkin-admin-page .dh-site { --dh-shell-background: #f3f0ea; }
.dashi-invitation-admin-page .dh-site { --dh-shell-background: #f4f3f0; }
:is(.dashi-checkin-admin-page, .dashi-invitation-admin-page) .dh-page-footer { display: none; }

.dh-site-body .dh-site > :is(.dashi-page-content, .history-index.page, .history-detail.page, .company-docs.page, .dia-page, .dashi-recovery-progress) {
  background: transparent;
}

/* One continuous red canvas under every member header; the art does not add height. */
.dh-site-body:not(.dashi-checkin-admin-page):not(.dashi-invitation-admin-page) .dh-site {
  --dh-shell-background: linear-gradient(180deg, #79151c 0, #79151c 350px, #65111a 70%, #4e1019 100%);
}

/* A real status message should not look like a stray dark line at the header seam. */
.dashi-identity-page .iv-page > :is(.ops-message, .ops-error) {
  margin: 0 0 12px;
  padding: 10px 13px;
  border: 1px solid #edc18455;
  border-radius: 10px;
  background: #fff1d60d;
  color: #ffe7bb;
  font-size: 12px;
  line-height: 1.6;
}
.dashi-identity-page .iv-page > .ops-error { list-style-position: inside; }

/* 2026-11-28 全站正文中部山河底图；登录页保留自己的头部/中部组合。 */
.dh-site-body:not(.dashi-auth-page):not(.dashi-lucky-puzzle-page):not(.dashi-checkin-admin-page):not(.dashi-invitation-admin-page) .dh-site {
  background:
    linear-gradient(180deg, #4f070d47 0%, #41050b70 42%, #260307b8 100%),
    url("images/page-middle-20261128.webp") center 28%/cover fixed no-repeat #47060c;
}
