/* 空降模版 i18n: mobile text fitting + Arabic text direction (layout stays LTR) */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
/* NOTE: do NOT use word-break:break-word / overflow-wrap:anywhere globally —
   in narrow flex boxes it breaks text one character per line ("竖排"). */
body { overflow-wrap: break-word; }
img { max-width: 100%; height: auto; }
.content #intro h1 { font-size: clamp(1.4rem, 7vw, 3rem); }
.content #intro h2 { font-size: clamp(0.95rem, 4vw, 1.6rem); }
.content #intro p { font-size: clamp(0.9rem, 3.6vw, 1.2rem); }
.content #loadingScreen h2 { font-size: clamp(1rem, 4.6vw, 2.2rem); }
.content #loadingScreen h3 { font-size: clamp(0.85rem, 3.6vw, 1.2rem); }
.content .step h2 { font-size: clamp(1rem, 4.4vw, 2.2rem); }
.content .step-title li h4 { font-size: clamp(0.7rem, 3.2vw, 1.2rem); }
.content .custom-button { font-size: clamp(0.85rem, 3.4vw, 1rem); }
.content #loadingScreen ul li { font-size: clamp(0.9rem, 3.6vw, 1.35rem); }
#thankYouPage h2 { font-size: clamp(1.25rem, 6vw, 2.2rem); }
#thankYouPage h4 { font-size: clamp(0.82rem, 3.5vw, 1.1rem); line-height: 1.5; }
#thankYouPage p, #thankYouPage li { font-size: clamp(0.78rem, 3.3vw, 1rem); line-height: 1.6; }
.download-hint { font-size: clamp(0.85rem, 3.6vw, 1.3rem); }
#retryPopup h3 { font-size: clamp(1rem, 4.4vw, 1.3rem); }
#retryPopup p { font-size: clamp(0.85rem, 3.6vw, 1rem); }
#ageRejectToast div { line-height: 1.5; }

/* text-option buttons: never shrink, never break per character */
#step1 .option-list button,
#step2 .option-list button,
#step3 .option-list button,
#intro button,
#retryPopup button,
.content .custom-button {
  flex: 0 0 auto;
  white-space: nowrap;
  word-break: keep-all;
  overflow-wrap: normal;
  min-width: 84px;
}

/* long words / URLs may still break, normal text wraps by word */
h1, h2, h3, h4, p, li, button, .download-hint, .name {
  word-break: normal;
  overflow-wrap: break-word;
  white-space: normal;
}

/* Arabic: only Arabic TEXT reads right-to-left.
   Panels / buttons / step strip keep their original layout & positions. */
html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3, html[lang="ar"] h4,
html[lang="ar"] p, html[lang="ar"] li, html[lang="ar"] .download-hint,
html[lang="ar"] .name {
  direction: rtl;
  unicode-bidi: isolate;
  text-align: right;
}
html[lang="ar"] .content #intro button,
html[lang="ar"] .content .step button,
html[lang="ar"] .content .custom-button,
html[lang="ar"] .step-title li h4 { text-align: center; }
