/* Shared typography for Traditional and Simplified Chinese content panels. */
html:lang(zh) {
  --zh-reading-size: 18px;
  --zh-reading-leading: 1.8;
  --zh-note-leading: 1.65;
}

html:lang(zh) :is(#welcome-letter, #content-dialog, #explore-dialog, #privacy-dialog, #finding-santa, .flight-help-dialog, .flight-ranking, .online-photobooth) {
  line-break: strict;
  word-break: normal;
}

html:lang(zh) :is(#welcome-letter, #content-dialog, #explore-dialog, #privacy-dialog, #finding-santa, .flight-help-dialog, .flight-ranking, .online-photobooth) :is(h2, h3, h4) {
  font-synthesis: none;
  letter-spacing: .025em;
  text-wrap: balance;
}

html:lang(zh) :is(#welcome-letter, #content-dialog, #explore-dialog, #privacy-dialog, #finding-santa, .flight-help-dialog, .flight-ranking, .online-photobooth) :is(h2, h3, h4) em {
  font-style: normal;
}

/* Fit the Chinese event name on one title line on a typical phone. */
html:lang(zh) #welcome-letter-title {
  font-size: clamp(17px, 3vw, 22px);
  line-height: 1.65;
  font-weight: 500;
}
html:lang(zh) #welcome-letter-title :is(em, span) {
  display: inline;
  margin: 0;
  color: inherit;
  font-size: clamp(24px, 7.7vw, 38px);
  line-height: 1.35;
  white-space: nowrap;
}
html:lang(zh) #welcome-letter-title > span::before { content: "．"; }
html:lang(zh) .welcome-letter-body { max-width: 530px; text-align: start; }
html:lang(zh) .welcome-letter-body p {
  font-size: var(--zh-reading-size);
  line-height: var(--zh-reading-leading);
  margin-block-end: 1em;
}
html:lang(zh) .welcome-letter-body .welcome-salutation {
  font-family: var(--serif);
  font-size: 1.3rem;
  line-height: 1.5;
  margin-block-end: .65em;
}
html:lang(zh) .welcome-instructions { padding-block: .75rem .25rem; border-top: 1px solid #bda37066; }
html:lang(zh) .welcome-instructions strong { color: #295448; line-height: 1.45; }
html:lang(zh) .welcome-letter-body .welcome-signature { font-style: normal; }
html:lang(zh) .welcome-letter-body .welcome-signature span { letter-spacing: .025em; }

/* Keep long stories readable without reducing the map or gallery area. */
html:lang(zh) #content-dialog #modal-title,
html:lang(zh) #explore-title,
html:lang(zh) #privacy-title { font-size: clamp(28px, 5vw, 41px); line-height: 1.3; }

html:lang(zh) #content-dialog .modal-copy > p:not(.eyebrow, #modal-visitor-note),
html:lang(zh) #content-dialog .visitor-information p:not(.visitor-note),
html:lang(zh) #content-dialog .visitor-disclosure p:not(.visitor-note),
html:lang(zh) #content-dialog .message-card .message-card-intro,
html:lang(zh) #content-dialog .event-gallery-intro,
html:lang(zh) #privacy-dialog p:not(.eyebrow, .policy-updated),
html:lang(zh) #explore-dialog .directory-intro {
  font-size: var(--zh-reading-size);
  line-height: var(--zh-reading-leading);
  max-inline-size: 40rem;
  max-inline-size: min(100%, 36ic);
  text-align: start;
}
html:lang(zh) #content-dialog .modal-copy > #modal-lead { font-weight: 600; }
html:lang(zh) #content-dialog .modal-copy .eyebrow,
html:lang(zh) #explore-dialog > .eyebrow,
html:lang(zh) #privacy-dialog > .eyebrow { letter-spacing: .055em; }

html:lang(zh) #content-dialog :is(.visitor-information, .visitor-disclosure) h4 {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.55;
  text-wrap: pretty;
}
html:lang(zh) #content-dialog .visitor-hours { font-size: 16px; line-height: var(--zh-note-leading); }
html:lang(zh) #content-dialog .visitor-hours dd { font-weight: 500; }
html:lang(zh) #content-dialog .visitor-hours > div { padding-block: .42rem; border-bottom: 1px solid #cbbda947; }
html:lang(zh) #content-dialog .visitor-period + .visitor-period { margin-block-start: 1.35rem; }
html:lang(zh) #content-dialog .visitor-disclosure summary { line-height: var(--zh-note-leading); }

html:lang(zh) #explore-dialog .directory-item { min-inline-size: 0; align-items: center; text-align: start; padding-block: .75rem; }
html:lang(zh) #explore-dialog .directory-item strong { font-size: 21px; font-weight: 600; line-height: 1.38; text-wrap: pretty; }
html:lang(zh) #explore-dialog .directory-item small { color: #626a5b; line-height: 1.55; }
html:lang(zh) #explore-dialog footer { flex-wrap: wrap; gap: .5rem 1rem; }

html:lang(zh) #content-dialog .event-gallery-caption { font-size: 16px; font-weight: 600; line-height: var(--zh-note-leading); }
html:lang(zh) #content-dialog .event-gallery-thumbnails span { line-height: 1.5; text-wrap: pretty; }
html:lang(zh) #content-dialog .message-card label { font-size: 15px; font-weight: 600; }
html:lang(zh) #content-dialog .message-card :is(input, textarea) { font-size: 16px; line-height: var(--zh-note-leading); }

/* Keep the app dialogs' headings together and the game controls legible. */
html:lang(zh) :is(#flight-title, #flight-paused-title, #finding-santa[data-state="won"] #flight-result-title, .opb-header h2) br { display: none; }
html:lang(zh) :is(#flight-title, #flight-paused-title, #finding-santa[data-state="won"] #flight-result-title, .opb-header h2) em { display: inline; white-space: nowrap; }
html:lang(zh) #finding-santa .flight-panel h2,
html:lang(zh) #finding-santa[data-state="won"] .flight-result h2,
html:lang(zh) .online-photobooth .opb-header h2 { font-size: clamp(28px, 5vw, 40px); line-height: 1.32; }
html:lang(zh) :is(.flight-help-dialog, .flight-ranking) h2 { font-size: clamp(26px, 5vw, 34px); line-height: 1.35; }
html:lang(zh) #finding-santa .flight-ready .flight-intro,
html:lang(zh) #finding-santa .flight-pause-panel > p:not(.flight-kicker),
html:lang(zh) #finding-santa .flight-result-copy,
html:lang(zh) :is(#finding-santa, .flight-help-dialog) :is(.flight-guide-step p, .flight-guide-goal, .flight-guide-extras, .flight-help-status),
html:lang(zh) .online-photobooth .opb-header > div > p:last-child {
  font-size: var(--zh-reading-size);
  line-height: 1.65;
}
html:lang(zh) :is(#finding-santa, .flight-help-dialog) .flight-guide-step strong { font-weight: 600; line-height: 1.5; }
html:lang(zh) :is(#finding-santa, .flight-help-dialog) .flight-guide-switch { flex-wrap: wrap; }
html:lang(zh) .flight-ranking td { line-height: 1.5; }
html:lang(zh) .flight-ranking td strong { overflow-wrap: anywhere; }
html:lang(zh) .online-photobooth :is(.opb-studio h3, .opb-preview h3, .opb-frames legend) { font-size: 17px; font-weight: 600; line-height: 1.45; }
html:lang(zh) .online-photobooth .opb-frame-copy strong { font-size: 15px; line-height: 1.4; }
html:lang(zh) .online-photobooth .opb-frame-copy small { line-height: 1.45; }
html:lang(zh) .online-photobooth :is(.opb-status, .opb-privacy, .opb-upload-hint) { line-height: var(--zh-note-leading); }

@media (max-width: 600px) {
  html:lang(zh) { --zh-reading-size: 16px; --zh-reading-leading: 1.75; }
  html:lang(zh) .welcome-letter-body { margin-block-start: 1.25rem; }
  html:lang(zh) #content-dialog :is(.visitor-information, .visitor-disclosure) h4 { font-size: 16px; }
  html:lang(zh) #content-dialog .visitor-hours > div { gap: .1rem; }
  html:lang(zh) #explore-dialog .directory-item strong { font-size: 19px; }
  html:lang(zh) .online-photobooth .opb-frame-copy strong { font-size: 14px; }
}

@media (max-width: 500px) {
  html:lang(zh) #explore-list { grid-template-columns: minmax(0, 1fr); gap: 0; }
}
