.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.language-picker {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  border: 1px solid var(--line, #e3ddd8);
  border-radius: 24px;
  padding: 0 10px;
  color: var(--muted, #77728b);
  background: rgba(255, 255, 255, .65);
  flex-shrink: 0;
}
.language-picker select {
  width: auto;
  min-height: 44px;
  max-width: 104px;
  margin: 0;
  border: 0;
  padding: 0 2px;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.language-picker:focus-within { outline: 2px solid #887dad; outline-offset: 3px; }
.language-picker select:focus { outline: none; box-shadow: none; }
.language-current { display: none; }
.top-right { gap: 10px; flex-shrink: 0; }
html:not(:lang(zh-CN)):not(:lang(zh-TW)) { --sans: 'Segoe UI', system-ui, sans-serif; --serif: Georgia, 'Times New Roman', serif; }
html:lang(ja) { --sans: 'Yu Gothic', 'Meiryo', system-ui, sans-serif; --serif: 'Yu Mincho', 'MS PMincho', serif; }
html:not(:lang(zh-CN)):not(:lang(zh-TW)) .brand small { letter-spacing: 1.2px; }
html:not(:lang(zh-CN)):not(:lang(zh-TW)) .brand > span:last-child { font-size: 18px; white-space: nowrap; }
html:not(:lang(zh-CN)):not(:lang(zh-TW)) .nav-item { white-space: normal; line-height: 1.3; }
html:not(:lang(zh-CN)):not(:lang(zh-TW)) .fortune-advice b,
html:not(:lang(zh-CN)):not(:lang(zh-TW)) .letter-advice b { min-width: 40px; width: auto; flex-shrink: 0; }
html:not(:lang(zh-CN)):not(:lang(zh-TW)) .fortune-chances { flex-wrap: wrap; }
html:not(:lang(zh-CN)):not(:lang(zh-TW)) .fortune-chances > span { min-width: 0; }
html:not(:lang(zh-CN)):not(:lang(zh-TW)) .care-button small { white-space: normal; line-height: 1.5; }
html:not(:lang(zh-CN)):not(:lang(zh-TW)) .adopt-intro h1 { letter-spacing: -.04em; }
html:not(:lang(zh-CN)):not(:lang(zh-TW)) .home-page h1 { text-wrap: balance; }
html:not(:lang(zh-CN)):not(:lang(zh-TW)) .coin-pill { white-space: nowrap; }
html:not(:lang(zh-CN)):not(:lang(zh-TW)) .wish-color b { white-space: normal; }
html:not(:lang(zh-CN)):not(:lang(zh-TW)) .wish-how h3 { line-height: 1.5; }
@media (max-width: 760px) {
  .topbar { column-gap: 8px; height: auto; min-height: 72px; flex-wrap: wrap; padding-block: 10px; row-gap: 8px; }
  .top-right { gap: 6px; margin-left: auto; }
  .language-picker { min-width: 44px; justify-content: center; padding-inline: 8px; }
  .language-picker svg { display: none; }
  .language-picker select { position: absolute; inset: 0; width: 100%; min-width: 100%; max-width: none; opacity: 0; }
  .language-current { display: inline; font-size: 12px; }
  html:not(:lang(zh-CN)):not(:lang(zh-TW)) .topbar .coin-pill > span { display: none; }
  html:not(:lang(zh-CN)):not(:lang(zh-TW)) .brand { letter-spacing: 0; gap: 7px; }
  html:not(:lang(zh-CN)):not(:lang(zh-TW)) .brand > span:last-child { font-size: 17px; }
  html:lang(ja) .brand { font-size: 19px; letter-spacing: 0; gap: 7px; }
  html:not(:lang(zh-CN)):not(:lang(zh-TW)) .prototype-badge,
  html:lang(ja) .prototype-badge { display: none; }
  html:not(:lang(zh-CN)):not(:lang(zh-TW)) .bottom-nav { gap: 2px; }
  html:not(:lang(zh-CN)):not(:lang(zh-TW)) .nav-item { font-size: 10px; padding-inline: 3px; }
  html:not(:lang(zh-CN)):not(:lang(zh-TW)) .care-actions { grid-template-columns: 1fr; }
  html:not(:lang(zh-CN)):not(:lang(zh-TW)) .home-shortcuts { gap: 6px; }
  html:not(:lang(zh-CN)):not(:lang(zh-TW)) .home-shortcuts button { font-size: 10px; padding-inline: 8px; white-space: normal; }
  html:lang(ja) .home-shortcuts button { font-size: 11px; white-space: normal; line-height: 1.5; }
  html:not(:lang(zh-CN)):not(:lang(zh-TW)) .bond-line { flex-wrap: wrap; gap: 8px; }
  html:not(:lang(zh-CN)):not(:lang(zh-TW)) .section-heading { flex-wrap: wrap; }
  html:not(:lang(zh-CN)):not(:lang(zh-TW)) .section-heading h2 { line-height: 1.5; }
  html:not(:lang(zh-CN)):not(:lang(zh-TW)) .daily-slogan-meta { flex-wrap: wrap; }
  html:not(:lang(zh-CN)):not(:lang(zh-TW)) .daily-slogan-meta > span { display: none; }
  html:not(:lang(zh-CN)):not(:lang(zh-TW)) .wish-wallet-item { flex-wrap: wrap; }
  html:not(:lang(zh-CN)):not(:lang(zh-TW)) .wish-wallet-item .text-button { margin-left: 0; }
  html:not(:lang(zh-CN)):not(:lang(zh-TW)) .wish-board-heading { flex-wrap: wrap; }
  html:not(:lang(zh-CN)):not(:lang(zh-TW)) .choice-option h3 { font-size: 16px; }
  html:not(:lang(zh-CN)):not(:lang(zh-TW)) .fortune-grade h2 { font-size: 21px; }
  html:not(:lang(zh-CN)):not(:lang(zh-TW)) .adoption-dock strong { font-size: 13px; }
  html:not(:lang(zh-CN)):not(:lang(zh-TW)) .adoption-dock .primary { padding-inline: 14px; }
}
@media (max-width: 380px) {
  .topbar { height: auto; min-height: 72px; flex-wrap: wrap; padding-block: 10px; row-gap: 8px; }
  .top-right { margin-left: auto; }
  .language-picker { min-width: 44px; justify-content: center; padding-inline: 6px; }
  .language-picker svg { display: none; }
  .topbar .coin-pill { padding-inline: 7px; gap: 4px; }
  .topbar .coin-pill > span { display: none; }
  html:not(:lang(zh-CN)):not(:lang(zh-TW)) .brand > span:last-child { font-size: 16px; }
  html:not(:lang(zh-CN)):not(:lang(zh-TW)) .topbar .brand small { font-size: 8px; letter-spacing: .8px; }
}

/* Script-appropriate fallback fonts and logical-direction refinements. */
html:lang(zh-TW) { --sans: 'Microsoft JhengHei', 'PingFang TC', system-ui, sans-serif; --serif: 'PMingLiU', 'Songti TC', serif; }
html:lang(ko) { --sans: 'Malgun Gothic', system-ui, sans-serif; --serif: 'Malgun Gothic', system-ui, sans-serif; }
html:lang(ar) { --sans: 'Segoe UI', Tahoma, sans-serif; --serif: 'Segoe UI', Tahoma, sans-serif; }
html:lang(hi) { --sans: 'Nirmala UI', 'Mangal', system-ui, sans-serif; --serif: var(--sans); }
html:lang(th) { --sans: 'Leelawadee UI', Tahoma, sans-serif; --serif: var(--sans); }
html:lang(ar) h1, html:lang(ar) h2,
html:lang(hi) h1, html:lang(hi) h2,
html:lang(th) h1, html:lang(th) h2 { letter-spacing: 0; line-height: 1.75; }
.brand > span:last-child { min-width: 0; }
.account-banner strong, .account-banner p,
.wish-wallet-item, .shop-copy, .ops-content { overflow-wrap: anywhere; }
.wish-wallet-item .text-button { display: flex; align-items: center; gap: 5px; max-width: 100%; white-space: normal; line-height: 1.5; text-align: start; }
.wish-wallet-item .text-button svg { flex-shrink: 0; }
.player-message-bar, .player-message-bar > div { flex-wrap: wrap; row-gap: 8px; }
.home-fortune footer { flex-wrap: wrap; }
.home-fortune footer button { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
.rules-text p > b:first-child { display: block; margin-block-end: 4px; }
.wish-note-text, .wish-note-author strong, .ops-body, .ops-message h3 { unicode-bidi: plaintext; }
html[dir='rtl'] .brand,
html[dir='rtl'] .eyebrow { letter-spacing: 0; }
html[dir='rtl'] [data-icon='arrow'] { transform: scaleX(-1); }
html[dir='rtl'] .scene { direction: ltr; }
html[dir='rtl'] .speech-bubble { direction: rtl; }
html[dir='rtl'] .modal-close,
html[dir='rtl'] .ops-close { right: auto; left: 16px; }
html[dir='rtl'] .modal-content,
html[dir='rtl'] .ops-content { text-align: start; }
html[dir='rtl'] .choice-chapter,
html[dir='rtl'] .event-echo,
html[dir='rtl'] .diary-entry { text-align: start; }
html[dir='rtl'] .stat-track i { margin-left: auto; }
html[dir='rtl'] .scene-top .live-dot { margin-right: 0; margin-left: 4px; }
html[dir='rtl'] .price,
html[dir='rtl'] .wish-character-count,
html[dir='rtl'] time { unicode-bidi: isolate; }
@media (max-width: 760px) {
  html:not(:lang(zh-CN)):not(:lang(zh-TW)) .brand > span:last-child {
    max-width: calc(100vw - 100px);
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.45;
  }
  .home-shortcuts button { min-width: 0; }
  .scene-top { flex-wrap: wrap; row-gap: 6px; }
  .choice-selected { flex-wrap: wrap; }
  .choice-selected button { white-space: normal; }
  .diary-summary { flex-wrap: wrap; }
  .account-banner button { white-space: normal; }
}
