/* System faces keep the first playable frame independent of font downloads. */
:root {
  --z-han-ui: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", "Noto Sans SC", system-ui, sans-serif;
  --z-han-story: "Songti SC", "Noto Serif CJK SC", "Noto Serif SC", "Source Han Serif SC", var(--z-han-ui);
}
html:lang(zh) body,
html:lang(zh) :is(.player-home, .arcade-policy, .genbay-auth, #account-gate) {
  font-family: var(--z-han-ui);
  line-break: strict;
}
html:lang(zh) :is(button, input, select, textarea, [data-sidebar="menu-button"]),
.arcade-editor textarea:lang(zh) {
  font-family: var(--z-han-ui);
}
html:lang(zh) :is(.arcade-policy-copy p, .genbay-auth-panel p, .player-game-copy p, .library-heading p, .feature-copy > p, .ticket-copy p),
.arcade-editor textarea:lang(zh) {
  line-height: 1.7;
  letter-spacing: .012em;
}

/* The games library uses broad, open headlines and quiet navigation. */
html:lang(zh) :is(.library-heading h1, .library-heading h1 span:lang(zh), .library-more h2, .chapter-head h2, .ticket-copy h3, .library-card h3),
html:lang(zh) .feature #game-title {
  font-family: var(--z-han-ui);
  font-weight: 600;
  line-height: 1.28;
  letter-spacing: .015em;
}
html:lang(zh) .feature #game-title { font-size: clamp(36px, 5.6vw, 66px); }
html:lang(zh) :is(.genre, .chip, .ticket-copy p, .lang, .play, .free) {
  font-family: var(--z-han-ui);
  letter-spacing: .025em;
}
html:lang(zh) :is(.genre, .chip, .play, .player-play) { font-weight: 600; }
html:lang(zh) :is(.ticket-copy p, .chip) { font-size: max(.8125rem, 12px); }

/* Song-style chapter titles give the court its own voice. Controls stay sans. */
html:lang(zh) :is(.book-storyTitle, .book-guideTitle, #levelName, #headline) {
  font-family: var(--z-han-story);
  font-weight: 600;
  line-height: 1.22;
  letter-spacing: .025em;
  text-wrap: balance;
}
html:lang(zh) :is(dialog h2, .objective, .routeCopy strong, .resultButtons button, .guideHeading p, #account-gate h2, #account-gate button) {
  font-family: var(--z-han-ui);
  font-weight: 600;
  letter-spacing: .015em;
}
html:lang(zh) :is(.book-guideText, .book-storyText, #walkCaption, #awardHint, .ruleList dd, #gameInfo p, #account-gate p) {
  font-family: var(--z-han-ui);
  line-height: 1.6;
}
html:lang(zh) .book-guideLevels .routeCopy strong { line-height: 1.35; }
html:lang(zh) #awardStats dt { font-size: .75rem; }

/* Forms and reports share UI lettering. Numeric metrics retain tabular figures. */
html:lang(zh) :is(.player-content h1, .player-game h2, .arcade-policy-copy h1, .arcade-policy-copy h2, .arcade-report h1, .arcade-report h2, [data-slot="sidebar-inset"] h1, .genbay-auth-panel h1, .genbay-auth-panel h2) {
  font-family: var(--z-han-ui);
  font-weight: 600;
  line-height: 1.32;
  letter-spacing: .01em;
}
html:lang(zh) :is(.player-settings summary, .player-records summary, .player-settings h3, .arcade-table th, .arcade-tabs button[aria-pressed="true"]) { font-weight: 600; }
html:lang(zh) :is(.arcade-toolbar, .arcade-table, .player-settings label, .arcade-editor label) { line-height: 1.55; }
html:lang(zh) .arcade-report .arcade-metrics span { font-size: .8125rem; line-height: 1.45; }
html:lang(zh) .arcade-policy-copy p { line-height: 1.85; }
html:lang(zh) .arcade-editor textarea:lang(en) { font-family: system-ui, sans-serif; }
@media (max-width: 699px) {
  html:lang(zh) .book-guideText { font-size: clamp(13px, 3.6vw, 16px); }
  html:lang(zh) .book-guideLevels .routeCopy strong { font-size: clamp(12px, 3.2vw, 15px); }
  html:lang(zh) .feature #game-title { font-size: clamp(36px, 9vw, 52px); }
}
