/* ĐA NGÔN NGỮ (18/10): phông + giãn dòng an toàn cho chữ Khmer, Lào, Thái và Trung/Hàn/Nhật.
   - Khmer/Lào/Thái: Noto Sans (SIL OFL 1.1, © The Noto Project Authors; gói @fontsource-variable 5.3.0) tự lưu trên máy chủ (CSP 'self'),
     khai báo DƯỚI TÊN các họ phông sẵn có ('Be Vietnam Pro', 'Sora') với unicode-range => mọi chỗ đang dùng các họ đó tự có chữ Khmer/Lào/Thái,
     trình duyệt chỉ tải tệp khi trang thật sự có ký tự của chữ đó (~20–60 KB).
   - Trung/Hàn/Nhật: phông HỆ THỐNG trước (PingFang / Microsoft YaHei / Hiragino / Yu Gothic / Apple SD Gothic Neo / Malgun Gothic / Noto CJK).
   - Chữ có dấu chồng cao/thấp (Khmer, Lào, Thái): giãn dòng tối thiểu để không bị cắt; ngắt dòng an toàn (không tràn ngang). */
/* Từng độ đậm khai báo RIÊNG (Chrome chọn mặt chữ đúng độ đậm trước khi xét unicode-range — một mặt 100–900 bị bỏ qua ở 600) */
@font-face{font-family:'Be Vietnam Pro';font-style:normal;font-display:swap;font-weight:300;src:url(/wb/static/noto-km.woff2) format('woff2');unicode-range:U+1780-17FF,U+19E0-19FF,U+200C-200D,U+25CC}
@font-face{font-family:'Be Vietnam Pro';font-style:normal;font-display:swap;font-weight:400;src:url(/wb/static/noto-km.woff2) format('woff2');unicode-range:U+1780-17FF,U+19E0-19FF,U+200C-200D,U+25CC}
@font-face{font-family:'Be Vietnam Pro';font-style:normal;font-display:swap;font-weight:500;src:url(/wb/static/noto-km.woff2) format('woff2');unicode-range:U+1780-17FF,U+19E0-19FF,U+200C-200D,U+25CC}
@font-face{font-family:'Be Vietnam Pro';font-style:normal;font-display:swap;font-weight:600;src:url(/wb/static/noto-km.woff2) format('woff2');unicode-range:U+1780-17FF,U+19E0-19FF,U+200C-200D,U+25CC}
@font-face{font-family:'Be Vietnam Pro';font-style:normal;font-display:swap;font-weight:700;src:url(/wb/static/noto-km.woff2) format('woff2');unicode-range:U+1780-17FF,U+19E0-19FF,U+200C-200D,U+25CC}
@font-face{font-family:'Be Vietnam Pro';font-style:normal;font-display:swap;font-weight:800;src:url(/wb/static/noto-km.woff2) format('woff2');unicode-range:U+1780-17FF,U+19E0-19FF,U+200C-200D,U+25CC}
@font-face{font-family:'Be Vietnam Pro';font-style:normal;font-display:swap;font-weight:300;src:url(/wb/static/noto-lo.woff2) format('woff2');unicode-range:U+0E81-0EDF}
@font-face{font-family:'Be Vietnam Pro';font-style:normal;font-display:swap;font-weight:400;src:url(/wb/static/noto-lo.woff2) format('woff2');unicode-range:U+0E81-0EDF}
@font-face{font-family:'Be Vietnam Pro';font-style:normal;font-display:swap;font-weight:500;src:url(/wb/static/noto-lo.woff2) format('woff2');unicode-range:U+0E81-0EDF}
@font-face{font-family:'Be Vietnam Pro';font-style:normal;font-display:swap;font-weight:600;src:url(/wb/static/noto-lo.woff2) format('woff2');unicode-range:U+0E81-0EDF}
@font-face{font-family:'Be Vietnam Pro';font-style:normal;font-display:swap;font-weight:700;src:url(/wb/static/noto-lo.woff2) format('woff2');unicode-range:U+0E81-0EDF}
@font-face{font-family:'Be Vietnam Pro';font-style:normal;font-display:swap;font-weight:800;src:url(/wb/static/noto-lo.woff2) format('woff2');unicode-range:U+0E81-0EDF}
@font-face{font-family:'Be Vietnam Pro';font-style:normal;font-display:swap;font-weight:300;src:url(/wb/static/noto-th.woff2) format('woff2');unicode-range:U+0E01-0E5B}
@font-face{font-family:'Be Vietnam Pro';font-style:normal;font-display:swap;font-weight:400;src:url(/wb/static/noto-th.woff2) format('woff2');unicode-range:U+0E01-0E5B}
@font-face{font-family:'Be Vietnam Pro';font-style:normal;font-display:swap;font-weight:500;src:url(/wb/static/noto-th.woff2) format('woff2');unicode-range:U+0E01-0E5B}
@font-face{font-family:'Be Vietnam Pro';font-style:normal;font-display:swap;font-weight:600;src:url(/wb/static/noto-th.woff2) format('woff2');unicode-range:U+0E01-0E5B}
@font-face{font-family:'Be Vietnam Pro';font-style:normal;font-display:swap;font-weight:700;src:url(/wb/static/noto-th.woff2) format('woff2');unicode-range:U+0E01-0E5B}
@font-face{font-family:'Be Vietnam Pro';font-style:normal;font-display:swap;font-weight:800;src:url(/wb/static/noto-th.woff2) format('woff2');unicode-range:U+0E01-0E5B}
@font-face{font-family:'Sora';font-style:normal;font-display:swap;font-weight:300;src:url(/wb/static/noto-km.woff2) format('woff2');unicode-range:U+1780-17FF,U+19E0-19FF,U+200C-200D,U+25CC}
@font-face{font-family:'Sora';font-style:normal;font-display:swap;font-weight:400;src:url(/wb/static/noto-km.woff2) format('woff2');unicode-range:U+1780-17FF,U+19E0-19FF,U+200C-200D,U+25CC}
@font-face{font-family:'Sora';font-style:normal;font-display:swap;font-weight:500;src:url(/wb/static/noto-km.woff2) format('woff2');unicode-range:U+1780-17FF,U+19E0-19FF,U+200C-200D,U+25CC}
@font-face{font-family:'Sora';font-style:normal;font-display:swap;font-weight:600;src:url(/wb/static/noto-km.woff2) format('woff2');unicode-range:U+1780-17FF,U+19E0-19FF,U+200C-200D,U+25CC}
@font-face{font-family:'Sora';font-style:normal;font-display:swap;font-weight:700;src:url(/wb/static/noto-km.woff2) format('woff2');unicode-range:U+1780-17FF,U+19E0-19FF,U+200C-200D,U+25CC}
@font-face{font-family:'Sora';font-style:normal;font-display:swap;font-weight:800;src:url(/wb/static/noto-km.woff2) format('woff2');unicode-range:U+1780-17FF,U+19E0-19FF,U+200C-200D,U+25CC}
@font-face{font-family:'Sora';font-style:normal;font-display:swap;font-weight:300;src:url(/wb/static/noto-lo.woff2) format('woff2');unicode-range:U+0E81-0EDF}
@font-face{font-family:'Sora';font-style:normal;font-display:swap;font-weight:400;src:url(/wb/static/noto-lo.woff2) format('woff2');unicode-range:U+0E81-0EDF}
@font-face{font-family:'Sora';font-style:normal;font-display:swap;font-weight:500;src:url(/wb/static/noto-lo.woff2) format('woff2');unicode-range:U+0E81-0EDF}
@font-face{font-family:'Sora';font-style:normal;font-display:swap;font-weight:600;src:url(/wb/static/noto-lo.woff2) format('woff2');unicode-range:U+0E81-0EDF}
@font-face{font-family:'Sora';font-style:normal;font-display:swap;font-weight:700;src:url(/wb/static/noto-lo.woff2) format('woff2');unicode-range:U+0E81-0EDF}
@font-face{font-family:'Sora';font-style:normal;font-display:swap;font-weight:800;src:url(/wb/static/noto-lo.woff2) format('woff2');unicode-range:U+0E81-0EDF}
@font-face{font-family:'Sora';font-style:normal;font-display:swap;font-weight:300;src:url(/wb/static/noto-th.woff2) format('woff2');unicode-range:U+0E01-0E5B}
@font-face{font-family:'Sora';font-style:normal;font-display:swap;font-weight:400;src:url(/wb/static/noto-th.woff2) format('woff2');unicode-range:U+0E01-0E5B}
@font-face{font-family:'Sora';font-style:normal;font-display:swap;font-weight:500;src:url(/wb/static/noto-th.woff2) format('woff2');unicode-range:U+0E01-0E5B}
@font-face{font-family:'Sora';font-style:normal;font-display:swap;font-weight:600;src:url(/wb/static/noto-th.woff2) format('woff2');unicode-range:U+0E01-0E5B}
@font-face{font-family:'Sora';font-style:normal;font-display:swap;font-weight:700;src:url(/wb/static/noto-th.woff2) format('woff2');unicode-range:U+0E01-0E5B}
@font-face{font-family:'Sora';font-style:normal;font-display:swap;font-weight:800;src:url(/wb/static/noto-th.woff2) format('woff2');unicode-range:U+0E01-0E5B}
/* Họ «Noto Sans Khmer/Lao/Thai» trong ngăn xếp dự phòng: máy có sẵn => dùng phông máy; không có => tệp tự lưu */
@font-face{font-family:'Noto Sans Khmer';font-style:normal;font-display:swap;font-weight:100 900;src:local('Noto Sans Khmer'),url(/wb/static/noto-km.woff2) format('woff2')}
@font-face{font-family:'Noto Sans Lao';font-style:normal;font-display:swap;font-weight:100 900;src:local('Noto Sans Lao'),url(/wb/static/noto-lo.woff2) format('woff2')}
@font-face{font-family:'Noto Sans Thai';font-style:normal;font-display:swap;font-weight:100 900;src:local('Noto Sans Thai'),url(/wb/static/noto-th.woff2) format('woff2')}

/* Trung (giản thể) / Nhật / Hàn: họ phông hệ thống theo đúng ngôn ngữ (chữ Hán khác nét giữa zh/ja/ko) */
:root:lang(zh) { --zb-cjk: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Noto Sans SC", "Source Han Sans SC", "WenQuanYi Micro Hei"; }
:root:lang(ja) { --zb-cjk: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", "Meiryo", "Noto Sans CJK JP", "Noto Sans JP"; }
:root:lang(ko) { --zb-cjk: "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans CJK KR", "Noto Sans KR", "Nanum Gothic"; }
:root:is(:lang(zh), :lang(ja), :lang(ko)) body,
:root:is(:lang(zh), :lang(ja), :lang(ko)) :is(input, textarea, select, button) {
  font-family: 'Be Vietnam Pro', var(--zb-cjk), system-ui, sans-serif;
}
:root:is(:lang(zh), :lang(ja), :lang(ko)) { --cx-display: 'Sora', 'Be Vietnam Pro', var(--zb-cjk), system-ui, sans-serif; }
:root:is(:lang(zh), :lang(ja)) body { line-break: strict; }
:root:lang(ko) body { word-break: keep-all; }

/* Khmer / Lào / Thái: phông hệ thống dự phòng + giãn dòng */
:root:lang(km) { --zb-sea: "Noto Sans Khmer", "Khmer OS System", "Khmer UI", "Khmer Sangam MN", "Leelawadee UI"; }
:root:lang(lo) { --zb-sea: "Noto Sans Lao", "Phetsarath OT", "Lao UI", "Lao Sangam MN", "Leelawadee UI"; }
:root:lang(th) { --zb-sea: "Noto Sans Thai", "Leelawadee UI", "Thonburi", "Tahoma"; }
:root:is(:lang(km), :lang(lo), :lang(th)) body,
:root:is(:lang(km), :lang(lo), :lang(th)) :is(input, textarea, select, button) {
  font-family: 'Be Vietnam Pro', var(--zb-sea), system-ui, sans-serif;
}
:root:is(:lang(km), :lang(lo), :lang(th)) body { line-height: 1.7; }
:root:is(:lang(km), :lang(lo)) :is(h1, h2, h3, h4, p, li, dt, dd, label, summary, small, td, th, a, button, span, strong, b, em) { line-height: 1.6 !important; }
:root:lang(th) :is(h1, h2, h3, h4, p, li, dt, dd, label, summary, small, td, th, a, button, span, strong, b, em) { line-height: 1.5 !important; }

/* Không bao giờ tràn ngang vì một «từ» dài (Khmer/Lào/Thái không có dấu cách giữa các từ; CJK không có dấu cách) */
:root:not(:lang(vi)):not(:lang(en)) :is(p, li, dd, td, th, label, summary, h1, h2, h3, h4, a, button, span) { overflow-wrap: break-word; }
/* break-word (không phải anywhere): không làm co bề rộng tối thiểu => nút/viên chọn không bị ngắt từng ký tự */
:root:not(:lang(vi)) .ui-pill { white-space: nowrap; }

/* Bộ chọn ngôn ngữ (partial _lang_picker.html) — dùng chung đầu trang, «Tôi», trang đăng nhập/đăng ký */
.lp { position: relative; display: inline-block; }
.lp > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 4px 10px;
  border-radius: 999px; border: 1px solid var(--cx-line2, rgba(127,127,127,.35)); color: inherit; font-size: .82rem; line-height: 1.2; }
.lp > summary::-webkit-details-marker { display: none; }
.lp > summary:focus-visible { outline: 2px solid var(--cx-a1, #e7b84a); outline-offset: 2px; }
.lp-ic { width: 16px; height: 16px; flex: none; }
.lp-cur { white-space: nowrap; }
.lp-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 60; min-width: 190px; margin: 0; padding: 6px; list-style: none;
  background: var(--cx-surface, #10172a); color: var(--cx-fg, inherit); border: 1px solid var(--cx-line2, rgba(127,127,127,.35));
  border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.lp-menu li { margin: 0; }
.lp-menu button { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 10px; min-height: 40px; padding: 6px 10px;
  border: 0; border-radius: 8px; background: transparent; color: inherit; font: inherit; font-size: .92rem; line-height: 1.6 !important; text-align: left; cursor: pointer; }
.lp-menu button:hover, .lp-menu button:focus-visible { background: var(--cx-surface2, rgba(127,127,127,.15)); }
.lp-menu button[aria-current="true"] { font-weight: 700; }
.lp-menu .lp-code { font-size: .7rem; opacity: .6; text-transform: uppercase; letter-spacing: .04em; }
.lp-up .lp-menu { top: auto; bottom: calc(100% + 6px); }
.lp-left .lp-menu { right: auto; left: 0; }
.lp-short { display: none; font-size: .72rem; font-weight: 700; letter-spacing: .04em; }
.lp-compact > summary { min-height: 34px; padding: 4px 9px; }
.lp-compact .lp-cur { display: none; }
.lp-compact .lp-short { display: inline; }
.zh-lang { display: inline-flex; align-items: center; }
@media (max-width: 779px) { .zh-lang { display: none; } }
.lp-row { display: block; width: 100%; }
.lp-row > summary { width: 100%; justify-content: flex-start; border: 0; border-radius: 10px; min-height: 48px; padding: 8px 12px; font-size: .95rem; }
.lp-row .lp-menu { position: static; box-shadow: none; margin-top: 4px; width: 100%; }
.legal-note { margin: 0 0 16px; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--cx-line2, rgba(127,127,127,.35)); font-size: .9rem; }

/* bộ chọn trên trang đăng nhập / đăng ký / pháp lý: góc phải trên của thẻ */
.login-card, .legal { position: relative; }
.login-lang { display: flex; justify-content: flex-end; margin: -4px 0 8px; }
.login-card > .login-lang { position: absolute; top: 12px; right: 12px; margin: 0; z-index: 5; }  /* sau form trong DOM (nút Đăng nhập là submit đầu tiên) */
.login-lang .zb-lang { display: block; }
.lp-auth .lp-menu { right: 0; }
.ui-lang { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; }
.ui-lang-h { margin: 0; font-weight: 600; }
/* Khmer/Lào/Thái/CJK: giãn chữ (letter-spacing) làm vỡ cụm ký tự ghép (Khmer hiện ô vuông) => tắt cho mọi phần tử ở các ngôn ngữ này */
:root:is(:lang(km), :lang(lo), :lang(th), :lang(zh), :lang(ja), :lang(ko)) body * { letter-spacing: normal !important; }
