/* =========================================================
   Global font fix - Newtoko Boylove
   Mục tiêu:
   - Đồng bộ font tiếng Việt trên PC + mobile
   - Tránh chữ bị méo/đậm giả trên iPhone/Chrome/Safari
   - Áp dụng cho cả form, chat, bình luận, cửa hàng, BXH
========================================================= */

:root{
    --ntk-font-main: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
}

html,
body{
    font-family: var(--ntk-font-main) !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
    text-rendering: optimizeLegibility !important;
    font-synthesis-weight: none !important;
    font-synthesis-style: none !important;
}

body,
button,
input,
textarea,
select,
option,
label,
a,
p,
span,
div,
small,
strong,
b,
h1,
h2,
h3,
h4,
h5,
h6,
table,
td,
th{
    font-family: var(--ntk-font-main) !important;
}

/* Form trên iPhone/Android không tự đổi font, không bị zoom font kỳ */
input,
textarea,
select,
button{
    -webkit-appearance: none;
    appearance: none;
    font-size: 15px;
    line-height: 1.45;
}

/* Chữ tiêu đề vẫn nổi nhưng không bị quá dày/méo */
.logo,
.menu,
h1,
h2,
h3,
.home-title,
.story-title-new,
.chapter-title,
.shop18-title,
.ranking-name,
.comment-user-name,
.chat-name,
.chat-author,
.profile-name,
button,
.btn,
.btn-link{
    font-weight: 700 !important;
    letter-spacing: 0 !important;
}

/* Các nút quan trọng có thể đậm hơn một chút nhưng vẫn không bị vỡ font */
.shop18-btn,
.story-save-btn,
.comment-form button,
.auth-form button,
.search button,
.home-shop18-btn{
    font-weight: 800 !important;
}

/* Bình luận/chat dài: chữ không tràn và không bị co ép */
.comment-content,
.comment-content p,
.chat-message,
.chat-message p,
.chat-text,
.shop18-desc,
.story-desc-new,
.home-title,
.ranking-name{
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
}

/* Mobile: giữ font ổn định, tránh Safari tự phóng/chỉnh chữ */
@media(max-width: 768px){
    html,
    body{
        -webkit-text-size-adjust: 100% !important;
        text-size-adjust: 100% !important;
    }

    body,
    button,
    input,
    textarea,
    select{
        font-family: var(--ntk-font-main) !important;
    }

    h1{font-weight:700 !important;}
    h2,h3{font-weight:700 !important;}
}
