/* Game-forward multilingual typography. Loaded after every visual layer. */
:root {
  --font-ui: "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Bahnschrift SemiCondensed", "Arial Narrow", "Segoe UI Variable Display", "Segoe UI", sans-serif;
  --font-score: Bahnschrift, "Arial Black", "Segoe UI Black", "Segoe UI Variable Display", "Segoe UI", sans-serif;
  --font-brand: Onest, "Bahnschrift SemiCondensed", "Segoe UI Variable Display", "Segoe UI", sans-serif;
  --type-micro: clamp(10px, 2.55vw, 11px);
  --type-small: clamp(11px, 2.9vw, 12.5px);
  --type-body: clamp(12.5px, 3.2vw, 14px);
  --type-control: clamp(12.5px, 3.15vw, 14px);
  --type-subtitle: clamp(16px, 4.2vw, 19px);
  --type-title: clamp(30px, 8.4vw, 40px);
  --game-shadow: 0 2px 0 rgba(0, 0, 0, .72), 0 7px 18px rgba(0, 0, 0, .28);
  --game-shadow-soft: 0 1px 0 rgba(0, 0, 0, .72), 0 4px 12px rgba(0, 0, 0, .22);
}

html {
  font-size: 16px;
  font-synthesis: none;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body,
button,
input,
textarea,
select {
  font-family: var(--font-ui) !important;
  font-optical-sizing: auto;
  font-kerning: normal;
  font-variant-ligatures: contextual common-ligatures;
}

body {
  font-size: var(--type-body);
  line-height: 1.48;
}

.brand-lockup strong,
.score-lockup strong,
.prize-card__main strong,
.section-heading h1,
.profile-card h2,
.ton-card h2,
.referral-card h2,
.rules-card h2,
.arara-shout-card__head strong,
.tap-cry {
  font-family: var(--font-display) !important;
  font-stretch: condensed;
}

.score-lockup strong,
.prize-card__main strong,
.player-stat strong,
.profile-grid strong,
.leader-row__score strong,
#arara-shout-price,
#arara-shout-level {
  font-family: var(--font-score) !important;
}

.brand-lockup strong {
  font-family: var(--font-brand) !important;
  font-size: 16px !important;
  font-weight: 900 !important;
  line-height: .95 !important;
  letter-spacing: .12em !important;
  text-shadow: var(--game-shadow-soft);
}

.brand-lockup span,
.prize-card__eyebrow,
.score-lockup span,
.player-strip__name span,
.player-stat > span,
.card-kicker,
.section-heading > div > span,
.daily-card__copy > span,
.task-card__copy > span,
.arara-shout-card__head span,
.adsgram-card__copy > span {
  font-size: var(--type-micro) !important;
  font-weight: 780 !important;
  line-height: 1.18 !important;
  letter-spacing: .115em !important;
  text-transform: uppercase;
}

.preview-ribbon,
.prize-card__stats,
.prize-card__main p,
.player-strip__name strong,
.player-stat strong,
.arara-strength-caption small,
.ticket-progress,
.ticket-progress small,
.daily-card__copy small,
.task-card__copy small,
.fairness-note p,
.rank-explainer p,
.leader-row__name span,
.leader-row__score span,
.profile-card > p,
.profile-grid span,
.ton-card > p,
.ton-card small,
.referral-card > p,
.referral-card > small,
.rules-card li span,
.arara-shout-card > p,
.arara-shout-card__next,
.arara-shout-card > small,
.adsgram-card__copy small,
.adsgram-card__status {
  font-size: var(--type-small) !important;
  line-height: 1.44 !important;
}

.tap-hint {
  font-family: var(--font-display) !important;
  font-size: clamp(11px, 3vw, 13px) !important;
  font-weight: 900 !important;
  line-height: 1.1 !important;
  letter-spacing: .18em !important;
  text-transform: uppercase;
  text-shadow: var(--game-shadow-soft);
}

.arara-strength-caption b {
  font-family: var(--font-display) !important;
  font-size: clamp(10px, 2.75vw, 12px) !important;
  font-weight: 900 !important;
  line-height: 1.05 !important;
  letter-spacing: .08em !important;
  text-transform: uppercase;
}

.section-lead,
.fairness-note strong,
.rank-explainer strong,
.daily-card__copy strong,
.task-card__copy strong,
.leader-row__name strong,
.leader-row__score strong,
.profile-grid strong,
.ton-card h2,
.referral-card h2,
.rules-card strong,
.adsgram-card__copy strong {
  font-size: var(--type-body) !important;
  line-height: 1.3 !important;
}

.section-heading h1 {
  font-size: var(--type-title) !important;
  font-weight: 950 !important;
  line-height: .94 !important;
  letter-spacing: -.045em !important;
  text-transform: uppercase;
  text-shadow: var(--game-shadow);
}

.section-heading > div > span,
.card-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 19px;
  padding: 3px 7px 2px;
  border: 1px solid rgba(223, 184, 78, .2);
  border-radius: var(--game-radius-token, 3px);
  background: rgba(223, 184, 78, .055);
}

.profile-card h2,
.ton-card h2,
.referral-card h2,
.rules-card h2 {
  font-size: var(--type-subtitle) !important;
  font-weight: 900 !important;
  line-height: 1.05 !important;
  letter-spacing: -.025em !important;
  text-shadow: var(--game-shadow-soft);
}

.prize-card__main strong {
  font-size: clamp(48px, 14.5vw, 66px) !important;
  font-weight: 950 !important;
  line-height: .86 !important;
  letter-spacing: -.065em !important;
  font-variant-numeric: tabular-nums lining-nums;
  -webkit-text-stroke: .35px rgba(255, 255, 255, .16);
  text-shadow: var(--game-shadow) !important;
}

.prize-card__currency {
  font-family: var(--font-score) !important;
  font-weight: 950 !important;
  text-shadow: var(--game-shadow-soft);
}

.score-lockup strong {
  font-size: clamp(44px, 13vw, 62px) !important;
  font-weight: 950 !important;
  line-height: .88 !important;
  letter-spacing: -.055em !important;
  font-variant-numeric: tabular-nums lining-nums;
  -webkit-text-stroke: .45px rgba(255, 255, 255, .15);
}

.player-strip__name strong {
  font-size: clamp(12px, 3.1vw, 14px) !important;
  font-weight: 850 !important;
  line-height: 1.08 !important;
}

.player-stat strong,
.profile-grid strong,
.leader-row__score strong {
  font-size: clamp(13px, 3.4vw, 16px) !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  letter-spacing: -.02em !important;
  text-shadow: var(--game-shadow-soft);
}

.ticket-progress > div:first-child span,
.ticket-progress > div:first-child strong {
  font-family: var(--font-display) !important;
  font-weight: 850 !important;
}

.ticket-progress > div:first-child strong {
  font-size: clamp(12px, 3.1vw, 14px) !important;
  font-variant-numeric: tabular-nums lining-nums;
}

#energy-value,
#energy-max,
#ticket-count,
#community-count,
#community-tickets,
#profile-score,
#profile-tickets,
#profile-taps,
#referral-count,
#streak-value,
#player-rank,
#arara-shout-price {
  font-variant-numeric: tabular-nums lining-nums;
}

.gold-button,
.primary-button,
.daily-card__button,
.task-card__action,
.ton-connect-button,
.ton-disconnect-button,
.referral-code button,
.arara-shout-card__button,
.arara-shout-card button,
.adsgram-card__button,
.arara-bonus-buy,
.leaderboard-state button {
  min-height: 46px !important;
  padding: 10px 14px !important;
  border-radius: var(--game-radius-control, 5px 5px 2px 5px) !important;
  font-family: var(--font-display) !important;
  font-size: var(--type-control) !important;
  font-weight: 900 !important;
  line-height: 1.05 !important;
  letter-spacing: .035em !important;
  text-transform: uppercase;
  white-space: normal;
  text-wrap: balance;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .18);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .28),
    inset 0 -3px 0 rgba(68, 34, 8, .22),
    0 7px 15px rgba(0, 0, 0, .22) !important;
  transition: transform .12s ease, filter .12s ease, box-shadow .12s ease !important;
}

.gold-button:active,
.primary-button:active,
.daily-card__button:active,
.task-card__action:active,
.ton-connect-button:active,
.ton-disconnect-button:active,
.referral-code button:active,
.arara-shout-card button:active,
.adsgram-card__button:active,
.arara-bonus-buy:active,
.leaderboard-state button:active {
  transform: translateY(2px) scale(.985) !important;
  filter: brightness(.95);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .14),
    inset 0 -1px 0 rgba(68, 34, 8, .22),
    0 3px 8px rgba(0, 0, 0, .2) !important;
}

button:disabled {
  text-shadow: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05) !important;
}

.task-card {
  grid-template-columns: 44px minmax(0, 1fr) minmax(96px, auto) !important;
}

.task-card__copy strong {
  font-weight: 850 !important;
  overflow-wrap: anywhere;
  text-wrap: pretty;
}

.task-card__action {
  min-width: 96px !important;
  max-width: 138px;
}

.arara-shout-card__head strong {
  font-size: clamp(22px, 6vw, 29px) !important;
  font-weight: 950 !important;
  line-height: .92 !important;
  letter-spacing: -.035em !important;
  text-shadow: var(--game-shadow);
}

#arara-shout-level {
  font-size: clamp(11px, 2.9vw, 13px) !important;
  font-weight: 900 !important;
  letter-spacing: .04em !important;
  text-transform: uppercase;
}

.bottom-nav button span {
  font-family: var(--font-display) !important;
  font-size: clamp(9.5px, 2.55vw, 11px) !important;
  font-weight: 850 !important;
  line-height: 1.05 !important;
  letter-spacing: .025em !important;
  text-transform: uppercase;
}

.bottom-nav button.is-active span {
  font-weight: 950 !important;
  text-shadow: 0 0 10px rgba(201, 232, 70, .3);
}

.tap-cry {
  font-size: clamp(18px, 5vw, 25px) !important;
  font-weight: 950 !important;
  line-height: .9 !important;
  letter-spacing: -.025em !important;
  text-transform: uppercase;
}

.toast {
  font-size: var(--type-body) !important;
  font-weight: 720 !important;
  line-height: 1.38 !important;
}

/* Script-specific native stacks prevent mixed or missing glyphs. */
html[lang^="ru"], html[lang^="uk"], html[lang^="bg"], html[lang^="sr"] {
  --font-ui: "Segoe UI Variable Text", "Segoe UI", Roboto, Arial, sans-serif;
  --font-display: "Bahnschrift SemiCondensed", "Arial Narrow", "Segoe UI Variable Display", "Segoe UI", sans-serif;
  --font-score: Bahnschrift, "Arial Black", "Segoe UI Black", "Segoe UI", sans-serif;
}

html[lang^="ar"], html[lang^="fa"], html[lang^="ur"] {
  --font-ui: "Noto Sans Arabic", "Segoe UI", Tahoma, Arial, sans-serif;
  --font-display: "Noto Sans Arabic", "Segoe UI", Tahoma, Arial, sans-serif;
  --font-score: "Noto Sans Arabic", "Segoe UI", Tahoma, Arial, sans-serif;
}

html[lang^="hi"] {
  --font-ui: "Noto Sans Devanagari", Mangal, "Nirmala UI", sans-serif;
  --font-display: "Noto Sans Devanagari", "Nirmala UI", sans-serif;
  --font-score: "Noto Sans Devanagari", "Nirmala UI", sans-serif;
}

html[lang^="zh"] {
  --font-ui: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-display: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-score: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

html[lang^="ja"] {
  --font-ui: "Noto Sans JP", "Hiragino Sans", "Yu Gothic UI", sans-serif;
  --font-display: "Noto Sans JP", "Hiragino Sans", "Yu Gothic UI", sans-serif;
  --font-score: "Noto Sans JP", "Hiragino Sans", "Yu Gothic UI", sans-serif;
}

html[lang^="ko"] {
  --font-ui: "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --font-display: "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --font-score: "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}

html[lang^="th"] {
  --font-ui: "Noto Sans Thai", Tahoma, sans-serif;
  --font-display: "Noto Sans Thai", Tahoma, sans-serif;
  --font-score: "Noto Sans Thai", Tahoma, sans-serif;
}

html[dir="rtl"] body { line-height: 1.62; }

html[dir="rtl"] .brand-lockup span,
html[dir="rtl"] .prize-card__eyebrow,
html[dir="rtl"] .score-lockup span,
html[dir="rtl"] .card-kicker,
html[dir="rtl"] .section-heading > div > span,
html[dir="rtl"] .daily-card__copy > span,
html[dir="rtl"] .task-card__copy > span,
html[dir="rtl"] .arara-shout-card__head span,
html[dir="rtl"] .adsgram-card__copy > span,
html.locale-cjk .brand-lockup span,
html.locale-cjk .prize-card__eyebrow,
html.locale-cjk .score-lockup span,
html.locale-cjk .card-kicker,
html.locale-cjk .section-heading > div > span {
  letter-spacing: 0 !important;
  text-transform: none;
}

html.locale-long .task-card {
  grid-template-columns: 42px minmax(0, 1fr) minmax(104px, auto) !important;
}

html.locale-long .task-card__action { min-width: 104px !important; }

@media (max-width: 380px) {
  :root {
    --type-micro: 10px;
    --type-small: 11px;
    --type-body: 12.25px;
    --type-control: 11.75px;
    --type-title: clamp(28px, 8.4vw, 34px);
  }

  .prize-card__main strong { font-size: clamp(45px, 14vw, 56px) !important; }
  .score-lockup strong { font-size: clamp(41px, 12.5vw, 53px) !important; }

  .task-card {
    grid-template-columns: 40px minmax(0, 1fr) minmax(86px, auto) !important;
  }

  .task-card__action {
    min-width: 86px !important;
    padding-inline: 9px !important;
  }

  .arara-strength-caption small {
    max-width: 112px !important;
    white-space: normal !important;
  }
}

@media (max-width: 335px) {
  .task-card {
    grid-template-columns: 38px minmax(0, 1fr) !important;
  }

  .task-card__action {
    grid-column: 1 / -1;
    width: 100%;
    max-width: none;
  }
}
