.sgc-language-toggle{border-bottom:0;text-align:start;padding-block:10px;gap:11px}
.sgc-language-current{max-width:42%;color:var(--sgc-muted);font-size:12px;overflow-wrap:anywhere;text-align:end}
.sgc-language-dialog{box-sizing:border-box;width:min(440px,calc(100% - 28px));max-height:calc(100dvh - 40px);padding:20px;border:1px solid var(--sgc-line,#e2e7ee);border-radius:16px;background:var(--sgc-paper,#fff);color:var(--sgc-ink,#253244);box-shadow:0 20px 60px #10203630;font-family:var(--sgc-font,system-ui,sans-serif);overscroll-behavior:contain}
.sgc-language-dialog::backdrop{background:#16223466}
.sgc-language-dialog header{display:flex;align-items:center;justify-content:space-between;gap:12px}
.sgc-language-dialog h2{margin:0;font-size:20px;line-height:1.4}
.sgc-language-close{display:grid;place-items:center;flex:0 0 44px;width:44px;height:44px;border:0;border-radius:8px;background:var(--sgc-canvas,#f5f6f9);color:inherit;font-size:27px;cursor:pointer}
.sgc-language-note{margin:8px 0 16px;color:var(--sgc-muted,#637184);font-size:13px;line-height:1.6}
.sgc-language-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.sgc-language-options button{position:relative;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;min-height:60px;padding:10px 26px 10px 12px;padding-inline:12px 26px;border:1px solid var(--sgc-line,#e2e7ee);border-radius:9px;background:var(--sgc-paper,#fff);color:var(--sgc-ink,#253244);text-align:start;font-family:inherit;font-size:15px;line-height:1.5;cursor:pointer;overflow-wrap:anywhere}
.sgc-language-options small{color:var(--sgc-muted,#637184);font-size:12px}
.sgc-language-options [aria-checked="true"]{border-color:var(--sgc-accent,#b74455);background:var(--sgc-tint,#faedf0);color:var(--sgc-deep,#703342)}
.sgc-language-options [aria-checked="true"]::after{position:absolute;inset-inline-end:10px;content:'✓';color:var(--sgc-accent,#b74455);font-size:16px;font-weight:700}
.sgc-language-dialog button:focus-visible{outline:2px solid var(--sgc-accent,#b74455);outline-offset:2px}
.sgc-language-status{position:absolute;inline-size:1px;block-size:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
html[data-sgc-language]:not([data-sgc-language="zh-CN"]) .sgc-my-menu-item{text-align:start;padding-block:10px}
html[data-sgc-language]:not([data-sgc-language="zh-CN"]) .sgc-my-menu-label{overflow-wrap:anywhere}
html[data-sgc-language]:not([data-sgc-language="zh-CN"]) .sgc-fixed-menu-item-v1>span:last-child{font-size:11px;line-height:1.25;max-width:100%;overflow-wrap:anywhere;text-align:center}
html[data-sgc-language]:not([data-sgc-language="zh-CN"]) .sgc-my-pills a,html[data-sgc-language]:not([data-sgc-language="zh-CN"]) .sgc-my-pills span{white-space:normal}
html[data-sgc-language="ar"] .sgc-my-menu-chevron{transform:scaleX(-1)}
html[data-sgc-language="ar"] .sgc-my-theme-options{padding-inline:46px 12px}
html[data-sgc-language="ar"] .sgc-my-theme-options button{text-align:start}
html[data-sgc-language="ar"] :is(#my-phone,#my-uid,#my-invite,#my-balance,#home-phone,#home-uid,#home-balance,#home-available,[inputmode="tel"],[inputmode="numeric"]){direction:ltr;unicode-bidi:isolate}
[data-sgc-display-text]{font-size:0!important;line-height:0!important;letter-spacing:0!important}
[data-sgc-display-text]::before{content:attr(data-sgc-display-text)!important;position:static!important;inset:auto!important;display:inline!important;float:none!important;width:auto!important;height:auto!important;max-width:none!important;transform:none!important;box-sizing:border-box;border:0!important;margin:0!important;padding:0!important;background:transparent!important;pointer-events:none;color:inherit;font-size:var(--sgc-i18n-font,14px)!important;line-height:var(--sgc-i18n-line,1.5)!important;letter-spacing:var(--sgc-i18n-spacing,normal)!important;white-space:normal;overflow-wrap:anywhere}
@media(max-width:350px){.sgc-language-dialog{padding:14px}.sgc-language-options{gap:6px}.sgc-language-options button{font-size:14px}}

/* Load after the page CSS and language.css. All rules are language-scoped.
 * Preserve source-text hiding when SPA labels use data-sgc-display-text:
 * adjust its typography variables, never override font-size:0!important.
 */

/* The original home badge is 120px x 36px (112px x 34px on narrow phones).
 * Let the translated name set its width; move the whole badge to a new row
 * when needed, then wrap only if it is wider than the complete card. */
html[data-sgc-language]:not([data-sgc-language="zh-CN"]) .sgc-home-links-head {
  flex-wrap: wrap;
  gap: 10px 12px;
  align-items: center;
}
html[data-sgc-language]:not([data-sgc-language="zh-CN"]) .sgc-home-links-head > h2 {
  flex: 1 1 140px;
  min-width: 0;
  margin-block: 0;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
html[data-sgc-language]:not([data-sgc-language="zh-CN"]) .sgc-home-links-head .home-links-mark {
  flex: 0 0 22px;
}
html[data-sgc-language]:not([data-sgc-language="zh-CN"]) .sgc-home-mall-entry {
  box-sizing: border-box;
  flex: 0 1 auto;
  width: auto;
  max-width: 100%;
  min-width: 0;
  height: auto;
  min-height: 40px;
  margin-inline-start: auto;
  padding: 8px 12px;
  gap: 6px;
  white-space: normal;
}
html[data-sgc-language]:not([data-sgc-language="zh-CN"]) .sgc-home-mall-entry .home-hot {
  flex: 0 0 auto;
  font-size: 12px;
  line-height: 1.5;
}
html[data-sgc-language]:not([data-sgc-language="zh-CN"]) .sgc-home-mall-title-v12 {
  min-width: 0;
  font-family: var(--sgc-font, system-ui, sans-serif);
  font-size: 14px;
  line-height: 1.6;
  letter-spacing: normal;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
  --sgc-i18n-font: 14px !important;
  --sgc-i18n-line: 1.6 !important;
  --sgc-i18n-spacing: normal !important;
}

/* Five translated ledger tabs cannot fit in five equal phone-width columns.
 * The existing tab IDs, order, selected style and keyboard handlers remain. */
html[data-sgc-language]:not([data-sgc-language="zh-CN"]) .sgc-my-shell[data-view="account-details"] .sgc-account-ledger-filters {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
}
html[data-sgc-language]:not([data-sgc-language="zh-CN"]) .sgc-my-shell[data-view="account-details"] .sgc-account-ledger-filters button[data-filter="all"] {
  grid-column: 1 / -1;
}
html[data-sgc-language]:not([data-sgc-language="zh-CN"]) .sgc-my-shell[data-view="account-details"] .sgc-my-ledger-balance small {
  color: var(--sgc-muted, #637184);
}
html[data-sgc-language]:not([data-sgc-language="zh-CN"]) .sgc-my-shell[data-view="account-details"] .sgc-account-ledger-filters button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 9px 8px;
  font-size: 13px;
  line-height: 1.5;
  white-space: normal;
  overflow-wrap: anywhere;
  text-align: center;
  --sgc-i18n-font: 13px !important;
  --sgc-i18n-line: 1.5 !important;
}
html[data-sgc-language]:not([data-sgc-language="zh-CN"]) .sgc-account-ledger-toolbar,
html[data-sgc-language]:not([data-sgc-language="zh-CN"]) .sgc-account-ledger-pagination {
  flex-wrap: wrap;
}
html[data-sgc-language]:not([data-sgc-language="zh-CN"]) .sgc-account-ledger-toolbar > span,
html[data-sgc-language]:not([data-sgc-language="zh-CN"]) .sgc-account-ledger-pagination > span {
  min-width: 0;
  overflow-wrap: anywhere;
}
html[data-sgc-language]:not([data-sgc-language="zh-CN"]) .sgc-my-shell[data-view="account-details"] .sgc-account-ledger button {
  min-height: 44px;
  white-space: normal;
  line-height: 1.5;
  overflow-wrap: anywhere;
  --sgc-i18n-line: 1.5 !important;
}
html[data-sgc-language]:not([data-sgc-language="zh-CN"]) .sgc-account-ledger-details dt {
  min-width: 0;
  overflow-wrap: anywhere;
}

/* Calendar keeps seven columns. Names and status text gain vertical room
 * rather than a smaller font. JS should provide localized short weekdays. */
html[data-sgc-language]:not([data-sgc-language="zh-CN"]) .sgc-daily-checkin-v1 .sgc-checkin-hero-title {
  flex: 1 1 0;
  min-width: 0;
}
html[data-sgc-language]:not([data-sgc-language="zh-CN"]) .sgc-daily-checkin-v1 .sgc-checkin-date-stamp {
  flex: 0 1 112px;
  min-width: 80px;
  max-width: 45%;
  overflow-wrap: anywhere;
}
html[data-sgc-language]:not([data-sgc-language="zh-CN"]) .sgc-daily-checkin-v1 .sgc-checkin-reward-line {
  flex-wrap: wrap;
}
html[data-sgc-language]:not([data-sgc-language="zh-CN"]) .sgc-daily-checkin-v1 .sgc-checkin-reward-unit {
  white-space: normal;
  line-height: 1.5;
  --sgc-i18n-line: 1.5 !important;
}
html[data-sgc-language]:not([data-sgc-language="zh-CN"]) .sgc-daily-checkin-v1 .sgc-checkin-month-nav {
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  gap: 6px;
}
html[data-sgc-language]:not([data-sgc-language="zh-CN"]) .sgc-daily-checkin-v1 .sgc-checkin-month-arrow {
  width: 44px;
  height: 44px;
}
html[data-sgc-language]:not([data-sgc-language="zh-CN"]) .sgc-daily-checkin-v1 .sgc-checkin-month-nav h2 {
  min-width: 0;
  font-size: 16px;
  line-height: 1.5;
  overflow-wrap: anywhere;
  --sgc-i18n-font: 16px !important;
  --sgc-i18n-line: 1.5 !important;
}
html[data-sgc-language]:not([data-sgc-language="zh-CN"]) .sgc-daily-checkin-v1 .sgc-checkin-summary p {
  min-width: 0;
  padding-inline: 5px;
  overflow-wrap: anywhere;
}
html[data-sgc-language]:not([data-sgc-language="zh-CN"]) .sgc-daily-checkin-v1 .sgc-checkin-week span {
  min-width: 0;
  padding-inline: 1px;
  font-size: 12px;
  line-height: 1.5;
  white-space: normal;
  overflow-wrap: anywhere;
  --sgc-i18n-font: 12px !important;
  --sgc-i18n-line: 1.5 !important;
}
html[data-sgc-language]:not([data-sgc-language="zh-CN"]) .sgc-daily-checkin-v1 .sgc-checkin-day {
  min-height: 62px;
  padding: 6px 2px;
  gap: 4px;
}
html[data-sgc-language]:not([data-sgc-language="zh-CN"]) .sgc-daily-checkin-v1 .sgc-checkin-day-state {
  max-width: 100%;
  min-height: 17px;
  font-size: 12px;
  line-height: 1.4;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
  --sgc-i18n-font: 12px !important;
  --sgc-i18n-line: 1.4 !important;
}
html[data-sgc-language]:not([data-sgc-language="zh-CN"]) .sgc-daily-checkin-v1 .sgc-checkin-legend-item {
  min-width: 0;
  max-width: 100%;
  white-space: normal;
}
html[data-sgc-language]:not([data-sgc-language="zh-CN"]) .sgc-daily-checkin-v1 .sgc-checkin-legend-mark {
  flex: 0 0 13px;
}
html[data-sgc-language]:not([data-sgc-language="zh-CN"]) .sgc-daily-checkin-v1 .sgc-checkin-slot {
  flex-wrap: wrap;
  gap: 8px 12px;
}
html[data-sgc-language]:not([data-sgc-language="zh-CN"]) .sgc-daily-checkin-v1 .sgc-checkin-slot > div {
  flex: 1 1 160px;
  min-width: 0;
}
html[data-sgc-language]:not([data-sgc-language="zh-CN"]) .sgc-daily-checkin-v1 .sgc-checkin-slot > span {
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.5;
  --sgc-i18n-line: 1.5 !important;
}

/* Profile labels remain visible above full-width inputs. The upload button
 * joins normal flow so longer translated status text cannot overlap it. */
html[data-sgc-language]:not([data-sgc-language="zh-CN"]) .sgc-my-shell[data-view="profile"] .sgc-my-form-field {
  min-width: 0;
  max-width: 100%;
}
html[data-sgc-language]:not([data-sgc-language="zh-CN"]) .sgc-my-shell[data-view="profile"] .sgc-my-form-label {
  font-size: 14px;
  line-height: 1.6;
  white-space: normal;
  overflow-wrap: anywhere;
  --sgc-i18n-font: 14px !important;
  --sgc-i18n-line: 1.6 !important;
}
html[data-sgc-language]:not([data-sgc-language="zh-CN"]) .sgc-my-shell[data-view="profile"] .sgc-my-input {
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  font-size: 16px;
  line-height: 1.5;
}
html[data-sgc-language]:not([data-sgc-language="zh-CN"]) .sgc-my-shell[data-view="profile"] .sgc-my-qr-upload {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-height: 56px;
  padding: 10px;
}
html[data-sgc-language]:not([data-sgc-language="zh-CN"]) .sgc-my-shell[data-view="profile"] .sgc-my-qr-upload .sgc-my-upload-name {
  flex: 1 1 150px;
  min-width: 0;
  padding: 0;
  overflow: visible;
  font-size: 12px;
  line-height: 1.6;
  white-space: normal;
  overflow-wrap: anywhere;
  --sgc-i18n-font: 12px !important;
  --sgc-i18n-line: 1.6 !important;
}
html[data-sgc-language]:not([data-sgc-language="zh-CN"]) .sgc-my-shell[data-view="profile"] .sgc-my-qr-upload .sgc-my-upload-action {
  position: static;
  flex: 0 1 auto;
  max-width: 100%;
  min-width: 88px;
  min-height: 44px;
  padding: 8px 12px;
  font-size: 14px;
  line-height: 1.5;
  white-space: normal;
  overflow-wrap: anywhere;
  --sgc-i18n-font: 14px !important;
  --sgc-i18n-line: 1.5 !important;
}
html[data-sgc-language]:not([data-sgc-language="zh-CN"]) .sgc-my-shell[data-view="profile"] .sgc-my-qr-preview-text {
  flex: 1 1 0;
  min-width: 0;
  overflow: visible;
  white-space: normal;
  overflow-wrap: anywhere;
}
html[data-sgc-language]:not([data-sgc-language="zh-CN"]) .sgc-my-shell[data-view="profile"] .sgc-my-qr-remove {
  align-items: flex-start;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
html[data-sgc-language]:not([data-sgc-language="zh-CN"]) .sgc-my-shell[data-view="profile"] .sgc-my-qr-remove input {
  flex: 0 0 auto;
}

/* Devanagari and Bengali marks need vertical room; keep the same readable
 * font size instead of compressing glyphs or breaking a script cluster. */
html:is([data-sgc-language="hi"], [data-sgc-language="bn"]) :is(.sgc-home-mall-title-v12, .sgc-my-form-label, .sgc-checkin-week span, .sgc-checkin-day-state) {
  line-height: 1.7;
  letter-spacing: normal;
  word-break: normal;
  --sgc-i18n-line: 1.7 !important;
  --sgc-i18n-spacing: normal !important;
}
html[data-sgc-language="ar"] .sgc-account-ledger-row .sgc-my-transaction-amount {
  text-align: end;
  direction: ltr;
  unicode-bidi: isolate;
}
