/* First-paint defaults. The approved rail is present before the async decoder;
   the runtime may update these same variables, but never reveals legacy UI. */
#home-screen.home-approved-ui #home-profile { --home-approved-image: url('https://sgcdn.gxqlove.top/zhimajiangjun/static-20261103-9e2f00eadfcd/assets/home-approved-ui-v1/avatar-frame.png'); }
#home-screen.home-approved-ui #home-settings { --home-approved-image: url('https://sgcdn.gxqlove.top/zhimajiangjun/static-20261103-9e2f00eadfcd/assets/home-approved-ui-v1/settings.png'); }
#home-screen.home-approved-ui #home-official-announcement { --home-approved-image: url('https://sgcdn.gxqlove.top/zhimajiangjun/static-20261103-9e2f00eadfcd/assets/home-approved-ui-v1/announcement.png'); }
#home-screen.home-approved-ui #home-review { --home-approved-image: url('https://sgcdn.gxqlove.top/zhimajiangjun/static-20261103-9e2f00eadfcd/assets/home-approved-ui-v1/review.png'); }
#home-screen.home-approved-ui #home-leaderboard { --home-approved-image: url('https://sgcdn.gxqlove.top/zhimajiangjun/static-20261103-9e2f00eadfcd/assets/home-approved-ui-v1/leaderboard.png'); }
#home-screen.home-approved-ui #home-coins-button { --home-approved-image: url('https://sgcdn.gxqlove.top/zhimajiangjun/static-20261103-9e2f00eadfcd/assets/home-approved-ui-v1/resource-coin.png'); }
#home-screen.home-approved-ui .home-stamina-resource { --home-approved-image: url('https://sgcdn.gxqlove.top/zhimajiangjun/static-20261103-9e2f00eadfcd/assets/home-approved-ui-v1/resource-stamina.png'); }
#home-screen.home-approved-ui #home-league-hall { --home-approved-image: url('https://sgcdn.gxqlove.top/zhimajiangjun/static-20261103-9e2f00eadfcd/assets/home-approved-ui-v1/hall-connected.png'); }

@font-face {
  font-family: 'Campaign WenKai';
  src: url('https://sgcdn.gxqlove.top/zhimajiangjun/static-20261103-9e2f00eadfcd/assets/fonts/campaign-wenkai-screen-v6.woff2') format('woff2');
  font-style: normal;
  font-weight: 400;
  font-display: block;
}

/* Screen-reading WenKai has a genuine Regular master with Medium-like ink.
   Includes Chinese, Latin, digits and punctuation without synthetic bold.
   Typography only: sizes, line heights, cards and library artwork are retained.
   Known header IDs give this late, scoped rule priority over legacy type rules. */
/* Root-level feedback shares the page face and real Regular master too. */
#home-notice.home-toast :is(b, span),
#home-screen ~ :is(#daily-reward-panel, #stamina-panel, #home-review-panel,
  #home-profile-panel, #settings-panel, #official-announcement-panel,
  #leaderboard-panel, #rank-detail-panel, #league-hall-panel,
  #general-library-panel, #weapon-library-panel, #item-library-panel)
  :is(*, #daily-reward-title, #home-review-title, #stamina-title) {
  font-family: 'Campaign WenKai', KaiTi, STKaiti, serif !important;
  font-weight: 400 !important;
  font-synthesis: none !important;
  font-variant-numeric: lining-nums tabular-nums;
}

/* Stipend ledger: a single reading order at every height, not four competing
   buttons. The original section, reward text and disabled state still own data. */
#home-screen ~ #league-hall-panel.campaign-league[data-view='stipend'] .league-stipends {
  grid-template-columns: minmax(0, 1fr); grid-template-rows: repeat(4, minmax(0, 1fr));
  gap: 0;
}
#home-screen ~ #league-hall-panel.campaign-league[data-view='stipend'] .league-stipend-row {
  position: relative; display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 88px; grid-template-rows: auto;
  align-items: center; gap: 8px; padding: 6px 4px;
  border: 0; border-bottom: 1px solid #b59a74;
  background: none; box-shadow: none; border-radius: 0;
}
#home-screen ~ #league-hall-panel.campaign-league[data-view='stipend'] .league-stipend-row::before {
  content: ''; width: 42px; height: 48px; grid-column: 1;
  background: var(--stipend-rank-badge) center / contain no-repeat;
}
#home-screen ~ #league-hall-panel.campaign-league[data-view='stipend'] .league-stipend-row:nth-child(1) { --stipend-rank-badge: url('https://sgcdn.gxqlove.top/zhimajiangjun/static-20261103-9e2f00eadfcd/assets/ranks12/rank-03.png'); }
#home-screen ~ #league-hall-panel.campaign-league[data-view='stipend'] .league-stipend-row:nth-child(2) { --stipend-rank-badge: url('https://sgcdn.gxqlove.top/zhimajiangjun/static-20261103-9e2f00eadfcd/assets/ranks12/rank-06.png'); }
#home-screen ~ #league-hall-panel.campaign-league[data-view='stipend'] .league-stipend-row:nth-child(3) { --stipend-rank-badge: url('https://sgcdn.gxqlove.top/zhimajiangjun/static-20261103-9e2f00eadfcd/assets/ranks12/rank-09.png'); }
#home-screen ~ #league-hall-panel.campaign-league[data-view='stipend'] .league-stipend-row:nth-child(4) { --stipend-rank-badge: url('https://sgcdn.gxqlove.top/zhimajiangjun/static-20261103-9e2f00eadfcd/assets/ranks12/rank-12.png'); }
#home-screen ~ #league-hall-panel.campaign-league[data-view='stipend'] .league-stipend-row > div { grid-column: 2; min-width: 0; }
#home-screen ~ #league-hall-panel.campaign-league[data-view='stipend'] .league-stipend-row h3 { display: flex; align-items: baseline; flex-wrap: wrap; column-gap: 5px; margin: 0 0 3px; font-size: 18px; line-height: 1.3; color: #442b1c; }
#home-screen ~ #league-hall-panel.campaign-league[data-view='stipend'] .league-stipend-row h3 small { display: inline; margin: 0; font-size: 10px; color: #82321e; white-space: nowrap; }
#home-screen ~ #league-hall-panel.campaign-league[data-view='stipend'] .league-stipend-row p { display: flex; flex-wrap: wrap; gap: 0 7px; margin: 0; font-size: 12px; line-height: 1.4; color: #62482e; overflow-wrap: normal; word-break: normal; }
#home-screen ~ #league-hall-panel.campaign-league[data-view='stipend'] .stipend-reward-group { white-space: nowrap; }
#home-screen ~ #league-hall-panel.campaign-league[data-view='stipend'] .league-stipend-row .league-button { grid-column: 3; min-width: 0; min-height: 44px; padding: 6px; font-size: 13px; line-height: 1.35; }
#home-screen ~ #league-hall-panel.campaign-league[data-view='stipend'] .league-stipend-row .league-button:disabled { border-color: transparent; background: none; box-shadow: none; opacity: 1; color: #705f49; cursor: default; white-space: nowrap; font-size: 12px; padding: 0; }
#home-screen ~ #league-hall-panel.campaign-league[data-view='stipend'] .league-stipend-row.is-current { background: #a05d2520; }
#home-screen ~ #league-hall-panel.campaign-league[data-view='stipend'] .league-ad-stipend { padding-top: 10px; }
@media (max-height: 700px) {
  #home-screen ~ #league-hall-panel.campaign-league[data-view='stipend'] .league-body { gap: 5px; }
  #home-screen ~ #league-hall-panel.campaign-league[data-view='stipend'] .league-stipend-row { grid-template-columns: 32px minmax(0, 1fr) 74px; gap: 6px; padding: 4px 0; }
  #home-screen ~ #league-hall-panel.campaign-league[data-view='stipend'] .league-stipend-row::before { width: 32px; height: 40px; }
  #home-screen ~ #league-hall-panel.campaign-league[data-view='stipend'] .league-stipend-row h3 { font-size: 15px; margin-bottom: 2px; }
  #home-screen ~ #league-hall-panel.campaign-league[data-view='stipend'] .league-stipend-row p { font-size: 11px; line-height: 1.35; }
  #home-screen ~ #league-hall-panel.campaign-league[data-view='stipend'] .league-stipend-row .league-button { font-size: 12px; padding: 4px; }
  #home-screen ~ #league-hall-panel.campaign-league[data-view='stipend'] .league-ad-stipend { padding-top: 6px; }
}

/* 2026-10-15: shared secondary-page presentation, retaining approved art. */
#home-screen ~ :is(#home-profile-panel, #settings-panel, #official-announcement-panel,
  #leaderboard-panel, #rank-detail-panel, #general-library-panel,
  #weapon-library-panel, #item-library-panel, #league-hall-panel) {
  --campaign-font: 'Campaign WenKai', KaiTi, STKaiti, serif;
  --campaign-ink: #442b1c;
  --campaign-muted: #71563d;
  --campaign-red: #943a2d;
}
#home-screen ~ :is(#home-profile-panel, #settings-panel, #official-announcement-panel,
  #leaderboard-panel, #rank-detail-panel, #general-library-panel,
  #weapon-library-panel, #item-library-panel) :is(h2, h3, h4, #settings-title) {
  font-family: var(--campaign-font) !important;
  font-weight: 600 !important;
  font-synthesis: weight !important;
  color: var(--campaign-ink) !important;
}
/* Selection changes ink/state only; the hit target never shrinks or moves. */
#home-screen ~ :is(#daily-reward-panel, #stamina-panel, #home-review-panel,
  #home-profile-panel, #settings-panel, #official-announcement-panel,
  #leaderboard-panel, #rank-detail-panel, #league-hall-panel,
  #general-library-panel, #weapon-library-panel, #item-library-panel)
  button:active:not(:disabled) {
  transform: none !important;
  transition-property: filter, background-color, color !important;
}
#home-screen ~ :is(#home-profile-panel, #settings-panel, #official-announcement-panel,
  #leaderboard-panel, #league-hall-panel) :is(button, input, select):focus-visible {
  outline-color: #947451 !important;
}
/* The old 94vw setting ignored the overlay's horizontal safe padding. */
#home-screen ~ #home-profile-panel.campaign-secondary > .home-profile-card {
  width: min(100%, 380px) !important;
  min-width: 0 !important;
}
#home-screen ~ #settings-panel.campaign-secondary > .settings-card {
  width: min(100%, 390px) !important;
  min-width: 0 !important;
  max-height: calc(100dvh - 32px - env(safe-area-inset-top) - env(safe-area-inset-bottom)) !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  scrollbar-gutter: stable both-edges;
}

/* Stamina actions share one two-line rhythm on the approved painted skins.
   Native buttons, live reward captions and quota spans retain their owners. */
#home-screen ~ #stamina-panel.campaign-dialog--reference .stamina-actions button {
  height: 14.5% !important;
  padding: 0 3cqw 4.4cqw 21cqw !important;
  font-size: clamp(16px, 5.3cqw, 23px) !important;
  line-height: 1.3 !important;
  text-align: center !important;
  transform: none !important;
}
#home-screen ~ #stamina-panel.campaign-dialog--reference #stamina-video {
  top: 61.35% !important;
  /* Slice the existing frame so its corners/strokes keep their proportions. */
  background: none !important;
  border: 10px solid transparent !important;
  border-image: url('https://sgcdn.gxqlove.top/zhimajiangjun/static-20261103-9e2f00eadfcd/assets/home-dialog-art-v2/button-red.png') 18 fill / 10px !important;
}
#home-screen ~ #stamina-panel.campaign-dialog--reference #stamina-share {
  top: 77.4% !important;
  background: url('https://sgcdn.gxqlove.top/zhimajiangjun/static-20261103-9e2f00eadfcd/assets/home-dialog-art-v2/button-share.png') center / 100% 100% no-repeat !important;
}
#home-screen ~ #stamina-panel.campaign-dialog--reference .stamina-actions button:disabled {
  /* Keep the opaque skin over the baked source controls; grayscale conveys
     availability without revealing a second frame or icon underneath. */
  opacity: 1 !important;
}
#home-screen ~ #stamina-panel.campaign-dialog--reference #stamina-video:disabled {
  color: #fff0cc !important;
}
#home-screen ~ #stamina-panel.campaign-dialog--reference #stamina-video::before {
  --ad-mark-size: 8cqw;
  left: calc(22.5% - 4cqw) !important;
  top: 43.5% !important;
}
#home-screen ~ #stamina-panel.campaign-dialog--reference .stamina-limit-note span {
  left: 30.4% !important;
  width: 57.8% !important;
  top: 70.6% !important;
  font-size: clamp(12px, 3.65cqw, 16px) !important;
  line-height: 1.4 !important;
  text-align: center !important;
  color: #fff0cc !important;
}
#home-screen ~ #stamina-panel.campaign-dialog--reference .stamina-limit-note span + span {
  top: 86.65% !important;
  color: #71563d !important;
}
#home-screen ~ #stamina-panel.campaign-dialog--reference #stamina-recovery {
  font-size: clamp(12px, 3.8cqw, 16px) !important;
  line-height: 1.55 !important;
}
#home-screen ~ #settings-panel.campaign-secondary .tutorial-settings-row {
  flex: none;
  min-width: 0;
}
#home-screen ~ #settings-panel.campaign-secondary .tutorial-settings-row .checkbox-row {
  min-width: 0;
  white-space: nowrap;
}
#home-screen ~ #settings-panel.campaign-secondary #reset-first-run,
#home-screen ~ #home-profile-panel.campaign-secondary .home-profile-uid button {
  min-height: 44px;
  border: 0 !important;
  border-radius: 0 !important;
  background: url('https://sgcdn.gxqlove.top/zhimajiangjun/static-20261103-9e2f00eadfcd/assets/home-dialog-art-v2/button-red.png') center / 100% 100% no-repeat !important;
  color: #fff1d1 !important;
  box-shadow: none !important;
  font-size: 14px;
}
#home-screen ~ #settings-panel.campaign-secondary #reset-first-run { flex: none; }
#home-screen ~ #home-profile-panel.campaign-secondary #home-profile-sheet-avatar .campaign-profile-figure {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
  object-position: center !important;
  transform: none !important;
}
/* Explicit rows prevent the paper panel's spare height stretching each gap. */
#home-screen ~ #official-announcement-panel.campaign-secondary > .official-announcement-card {
  grid-template-rows: 60px auto minmax(0, 1fr) !important;
  align-content: start !important;
  align-items: start !important;
  row-gap: 12px !important;
}
#home-screen ~ #official-announcement-panel.campaign-secondary #official-announcement-title { align-self: center !important; }
#home-screen ~ #official-announcement-panel.campaign-secondary #official-announcement-date {
  margin: 0 !important;
  align-self: start !important;
}
#home-screen ~ #official-announcement-panel.campaign-secondary #official-announcement-content {
  grid-row: 3 !important;
  align-self: stretch !important;
  margin: 0 !important;
  padding: 12px 4px 0 !important;
  border-top: 1px solid #b99d74 !important;
  border-radius: 0 !important;
}
#home-screen ~ #leaderboard-panel.campaign-secondary > .leaderboard-card {
  grid-template-rows: 60px minmax(0, 1fr) minmax(0, 1fr) !important;
  align-items: start !important;
  row-gap: 18px !important;
}
#home-screen ~ #leaderboard-panel.campaign-secondary .leaderboard-board {
  height: 100%;
  margin: 0 !important;
  min-width: 0;
  padding-top: 12px !important;
  border-top: 1px solid #b99d74 !important;
}
#home-screen ~ #leaderboard-panel.campaign-secondary .home-library-list {
  flex: 0 1 auto !important;
  scrollbar-gutter: stable;
}
/* Fixed-still geometry owns containment and the shared foot baseline.
   Centering the transparent 256px canvas would detach feet from the shadow. */

/* One name-label role across catalogue and detail, for every general.
   Detail headings must not inherit the generic synthetic heading weight. */
#home-screen ~ #general-library-panel.library-approved-v11 #general-library-detail .general-detail__name,
#home-screen ~ #general-library-panel.library-approved-v11 .general-atlas-entry .library-atlas-entry__name {
  font-family: var(--campaign-font) !important;
  font-size: 22px !important;
  font-weight: 400 !important;
  line-height: 30px !important;
  letter-spacing: .08em !important;
  font-synthesis: none !important;
  text-shadow: none !important;
}
