/* U.C.M language switcher + 23-language support (2026-11-14). Loaded on every page that has translations. Pure CSS; lang.js only closes the popover and remembers the choice. */

/* ---------- globe button + popover in the top bar ---------- */
details.lang { position: relative; flex: none; }
details.lang > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 12px 0 10px; border-radius: 999px; color: #f2e3c0; font-size: 13px; font-weight: 700; letter-spacing: .06em;
  background: rgba(255, 255, 255, .05); border: 1px solid rgba(139, 108, 255, .4); transition: background .2s ease, border-color .2s ease, color .2s ease; -webkit-tap-highlight-color: transparent; user-select: none; }
details.lang > summary::-webkit-details-marker { display: none; }
details.lang > summary svg { width: 20px; height: 20px; display: block; }
details.lang > summary:hover, details.lang > summary:focus-visible, details.lang[open] > summary { background: rgba(139, 108, 255, .18); border-color: #9ff4ef; color: #fff; outline: none; }
details.lang .lc { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
.lang-pop { position: absolute; top: calc(100% + 12px); inset-inline-end: 0; z-index: 120; width: min(420px, calc(100vw - 24px)); max-height: min(70vh, 520px); overflow-y: auto; padding: 10px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px;
  border-radius: 16px; border: 1px solid rgba(139, 108, 255, .5); background: linear-gradient(160deg, rgba(24, 22, 60, .98), rgba(7, 9, 22, .98)); box-shadow: 0 24px 60px rgba(0, 0, 0, .7), 0 0 40px rgba(110, 80, 230, .2); overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(139, 108, 255, .4) transparent; }
.lang-pop a, .ucm-langs a { display: block; padding: 10px 14px; border-radius: 10px; color: #f2f1f6; text-decoration: none; font-size: 15px; line-height: 1.3; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", Helvetica, Arial, sans-serif; letter-spacing: 0; text-transform: none; }
.lang-pop a:hover, .lang-pop a:focus-visible, .ucm-langs a:hover, .ucm-langs a:focus-visible { background: rgba(139, 108, 255, .2); color: #fff; outline: none; }
.lang-pop a[aria-current="true"], .ucm-langs a[aria-current="true"] { color: #9ff4ef; background: rgba(139, 108, 255, .12); box-shadow: inset 0 0 0 1px rgba(139, 108, 255, .45); }
@media (min-width: 900px) { .lang-pop { grid-template-columns: repeat(3, minmax(0, 1fr)); width: 520px; } }
@media (max-width: 560px) { details.lang > summary { padding: 0; width: 40px; justify-content: center; } details.lang .lc { display: none; } .lang-pop { position: fixed; top: 74px; inset-inline: 12px; width: auto; } }

/* ---------- inside the slide-in menu ---------- */
.ucm-panel .ucm-langs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px; margin: 0 12px; }
.ucm-panel .ucm-langs a { margin: 0; padding: 9px 12px; font-size: 14.5px; }
.ucm-panel .ucm-langs a::before, .ucm-panel .ucm-langs a::after { content: none !important; }

/* ---------- footer row ---------- */
.sfoot-langs { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 18px 0 6px; display: flex; flex-wrap: wrap; gap: 4px 6px; border-top: 1px solid rgba(255, 255, 255, .08); }
.sfoot-langs a { padding: 6px 12px; border-radius: 999px; color: #b9b7c4; text-decoration: none; font-size: 13.5px; border: 1px solid transparent; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", Helvetica, Arial, sans-serif; }
.sfoot-langs a:hover, .sfoot-langs a:focus-visible { color: #9ff4ef; border-color: rgba(139, 108, 255, .4); outline: none; }
.sfoot-langs a[aria-current="true"] { color: #9ff4ef; border-color: rgba(139, 108, 255, .55); background: rgba(139, 108, 255, .1); }

/* ---------- scripts that must not be letter-spaced or forced to capitals (they join letters or have no case) ---------- */
html[data-script="arabic"] :is(h1, h2, h3, .eyebrow, .sfoot-h, .ucm-h, .group, .explore-h, th, .sfoot-copy, .ucm-home, .tsub-l, .h-sub, .gcard-top h3, .statbar b),
html[data-script="indic"] :is(h1, h2, h3, .eyebrow, .sfoot-h, .ucm-h, .group, .explore-h, th, .sfoot-copy, .ucm-home, .tsub-l, .h-sub, .gcard-top h3, .statbar b),
html[data-script="hebrew"] :is(h1, h2, h3, .eyebrow, .sfoot-h, .ucm-h, .group, .explore-h, th, .sfoot-copy, .ucm-home, .tsub-l, .h-sub, .gcard-top h3, .statbar b),
html[data-script="cjk"] :is(h1, h2, h3, .eyebrow, .sfoot-h, .ucm-h, .group, .explore-h, th, .sfoot-copy, .ucm-home, .tsub-l, .h-sub, .gcard-top h3, .statbar b) { letter-spacing: 0 !important; text-transform: none !important; }
html[data-script="cjk"] :is(h1, h2, h3, .eyebrow) { letter-spacing: .02em !important; }
html[data-script="cyrillic"] :is(h1, h2, h3, .eyebrow, .sfoot-h, .ucm-h, .group, .explore-h) { letter-spacing: .04em; }
html[data-script="arabic"] { --display: "Segoe UI", "Noto Sans Arabic", "Geeza Pro", Tahoma, Arial, sans-serif; }
html[data-script="hebrew"] { --display: "Segoe UI", "Noto Sans Hebrew", "Arial Hebrew", Arial, sans-serif; }
html[data-script="indic"] { --display: "Nirmala UI", "Noto Sans Devanagari", "Noto Sans Bengali", "Noto Sans Tamil", "Noto Sans Telugu", "Kohinoor Devanagari", "Segoe UI", sans-serif; }
html[lang="ja"] { --display: "Yu Gothic UI", "Hiragino Sans", "Noto Sans JP", "Meiryo", sans-serif; }
html[lang="ko"] { --display: "Malgun Gothic", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif; }
html[lang="zh-Hans"] { --display: "Microsoft YaHei UI", "PingFang SC", "Noto Sans SC", "Segoe UI", sans-serif; }
html[lang="yue"] { --display: "Microsoft JhengHei UI", "PingFang HK", "Noto Sans TC", "Segoe UI", sans-serif; }
html[lang="ta"] { --display: "Nirmala UI", "Noto Sans Tamil", "Tamil MN", sans-serif; }
html[lang="te"] { --display: "Nirmala UI", "Noto Sans Telugu", "Kohinoor Telugu", sans-serif; }
html[lang="bn"] { --display: "Nirmala UI", "Noto Sans Bengali", "Kohinoor Bangla", sans-serif; }
html[data-script="arabic"] body, html[data-script="indic"] body, html[data-script="hebrew"] body, html[data-script="cjk"] body { line-height: 1.8; }
html[data-script="cjk"] :is(h1, h2, h3, .eyebrow, .sfoot-h, .ucm-h, .sfoot-copy, .ucm-home) { font-family: var(--display); font-weight: 600; }
html[data-script="arabic"] :is(h1, h2, h3, .eyebrow, .sfoot-h, .ucm-h, .sfoot-copy, .ucm-home, .group, th),
html[data-script="indic"] :is(h1, h2, h3, .eyebrow, .sfoot-h, .ucm-h, .sfoot-copy, .ucm-home, .group, th),
html[data-script="hebrew"] :is(h1, h2, h3, .eyebrow, .sfoot-h, .ucm-h, .sfoot-copy, .ucm-home, .group, th) { font-family: var(--display); }

/* ---------- right-to-left (Arabic, Urdu, Hebrew) ---------- */
html[dir="rtl"] body { text-align: right; }
html[dir="rtl"] .ucm-panel { left: auto; right: 0; transform: translateX(108%); border-right: 0; border-left: 1px solid transparent; border-image: linear-gradient(180deg, #9ff4ef, rgba(139, 108, 255, .25) 45%, #ff5fa8 80%, rgba(139, 108, 255, .4)) 1; box-shadow: 0 0 60px rgba(0, 0, 0, .75), -8px 0 40px rgba(110, 80, 230, .18); }
html[dir="rtl"] .ucm-menu-toggle:checked ~ .ucm-panel { transform: translateX(0); }
html[dir="rtl"] .ucm-close { right: auto; left: 14px; }
html[dir="rtl"] .ucm-panel .ucm-home { padding: 26px 20px 10px 56px; }
html[dir="rtl"] .ucm-panel > a:not(.ucm-home):not(.ucm-play) { padding: 11px 40px 11px 14px; }
html[dir="rtl"] .ucm-panel > a:not(.ucm-home):not(.ucm-play)::before { left: auto; right: 16px; }
html[dir="rtl"] .ucm-panel > a:not(.ucm-home):not(.ucm-play)::after { content: "\2039"; right: auto; left: 16px; }
html[dir="rtl"] .ucm-panel > a:not(.ucm-home):not(.ucm-play):hover::after, html[dir="rtl"] .ucm-panel > a:not(.ucm-home):not(.ucm-play):focus-visible::after { transform: translate(-4px, -52%); }
html[dir="rtl"] .ucm-panel .ucm-h::after { background: linear-gradient(270deg, rgba(139, 108, 255, .55), transparent); }
html[dir="rtl"] .sbar-social { border-left: 0; border-right: 1px solid rgba(139, 108, 255, .3); padding: 0 14px 0 0; margin: 0 6px 0 4px; }
html[dir="rtl"] h3::before, html[dir="rtl"] section h2::before { margin-right: 0; margin-left: 9px; }
html[dir="rtl"] ul.plain li { padding-left: 0; padding-right: 26px; }
html[dir="rtl"] ul.plain li::before { left: auto; right: 2px; }
html[dir="rtl"] ol.steps li { padding-left: 0; padding-right: 58px; }
html[dir="rtl"] ol.steps li::before { left: auto; right: 0; }
html[dir="rtl"] h2::before { background: linear-gradient(270deg, transparent, var(--gold-line)); }
html[dir="rtl"] h2::after { transform: none; background: linear-gradient(270deg, transparent, var(--gold-line)); transform: scaleX(-1); }
html[dir="rtl"] .group::after { background: linear-gradient(270deg, var(--gold-line), transparent); }
html[dir="rtl"] .note { border-left: 0; border-right: 2px solid var(--gold-line); border-radius: 10px 0 0 10px; }
html[dir="rtl"] .honest { border-left: 1px solid rgba(139, 108, 255, .45); border-right: 4px solid #f2c46f; }
html[dir="rtl"] th, html[dir="rtl"] td { text-align: right; }
html[dir="rtl"] .plans th:not(:first-child), html[dir="rtl"] .plans td:not(:first-child) { text-align: center; }
html[dir="rtl"] td.num, html[dir="rtl"] th.num { text-align: left; }
html[dir="rtl"] .sfoot, html[dir="rtl"] .sfoot-brand { text-align: right; }
html[dir="rtl"] .sfoot-col a:hover, html[dir="rtl"] .sfoot-col a:focus-visible { transform: translateX(-4px); }
html[dir="rtl"] .sfoot-legal a { margin-left: 0; margin-right: 18px; }
html[dir="rtl"] .gcard-n { text-align: left; }
html[dir="rtl"] .eyebrow::before { transform: scaleX(-1); }
html[dir="rtl"] .eyebrow::after { transform: none; }
html[dir="rtl"] .tcg-hero h1, html[dir="rtl"] .hero p { max-width: 100%; }
html[dir="rtl"] .guide-list p a, html[dir="rtl"] .gcard-link { text-align: center; }
html[dir="rtl"] .qr-card { text-align: right; }
html[dir="rtl"] :is(.tsub, .sbar-nav, .chips, .faq-topics, .cta-row) { direction: rtl; }
/* digits, URLs and brand names inside RTL text keep their own direction automatically; make explicit for inline latin */
html[dir="rtl"] :is(.statbar b, .gcard-n) { direction: ltr; unicode-bidi: isolate; }

/* ---------- header fitting levels (set by lang.js when the bar would overflow) ---------- */
.sbar.fit1 .sbar-social { display: none !important; }
.sbar.fit2 .sbar-nav { display: none !important; }
.sbar.fit3 .sbar-cta { padding: 8px 12px; font-size: 12.5px; letter-spacing: 0; }
.sbar.fit3 .sbar-cta::before { display: none; }
.sbar.fit3 .slogo { height: 32px; }
.sbar.fit3 { gap: 8px; }
.sbar.fit3 .grow { display: none; }
.sbar.fit3 .lang { margin-inline-start: auto; }
.sbar.fit4 { gap: 6px; }
.sbar.fit4 .slogo { height: 28px; flex: none; }
.sbar.fit4 .sbar-cta { flex: 0 1 auto; min-width: 0; max-width: 36vw; display: block; white-space: normal; text-align: center; font-size: 11.5px; line-height: 1.15; padding: 6px 10px; overflow-wrap: anywhere; }
.sbar.fit4 details.lang > summary { width: 34px; height: 34px; }
.sbar .sbar-cta { min-width: 0; }
/* the globe sits right before the app button; keep a calm gap */
.sbar details.lang { margin-inline-start: 2px; }
html[dir="rtl"] .sbar-cta::after { left: auto; right: -50%; }
/* RTL: mirror the hero band artwork so the card sits on the left, behind nothing */
html[dir="rtl"] body[data-kind="tcgapp"] .page::before { transform: scaleX(-1); }

/* the homepage desktop bar (.dbar) uses the same auto-fit levels as the inner pages' bar (lang.js sets .fit1-.fit4) */
.dbar.fit1 .dsocials { display: none !important; }
.dbar.fit2 .dnav { display: none !important; }
.dbar.fit3 .dcta { padding: 8px 12px; font-size: 12.5px; letter-spacing: 0; }
.dbar.fit3 { gap: 8px; }
.dbar.fit3 .grow { display: none; }
.dbar.fit3 .lang { margin-inline-start: auto; }
