/**
 * 全局字体文件引入 — ALKATIP Yazma Tom（维吾尔文手写体）
 *
 * 使用说明：请将字体文件 "ALKATIP Yazma Tom.TTF" 复制到
 *   /public/fonts/ALKATIP Yazma Tom.TTF
 * 即可全局生效（无论是中文界面还是维吾尔文界面，遇到维文字符都会优先用此字体）。
 */

@font-face {
    font-family: "ALKATIP Yazma Tom";
    src: url("/public/fonts/ALKATIP Yazma Tom.TTF") format("truetype");
    font-display: swap;
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: "ALKATIP Yazma Tom";
    src: url("/public/fonts/ALKATIP Yazma Tom.TTF") format("truetype");
    font-display: swap;
    font-weight: bold;
    font-style: normal;
}

/* ============================================================
   全局字体栈：第一优先 ALKATIP Yazma Tom（覆盖维文字符），
   然后依次是 SF Pro（苹果）、PingFang SC（中文）、回退字体。
   无论中文界面还是维文界面，全部应用该字体栈，保证任一界面
   出现维吾尔文时都能正确渲染成 ALKATIP。
   ============================================================ */

html, body,
button, input, select, textarea,
h1, h2, h3, h4, h5, h6, p, span, a, div, li, td, th {
    font-family: "ALKATIP Yazma Tom",
                 -apple-system, BlinkMacSystemFont,
                 "SF Pro Display", "SF Pro Text",
                 "PingFang SC", "PingFang TC", "Hiragino Sans GB",
                 "Microsoft YaHei", "Microsoft JhengHei",
                 "Helvetica Neue", Helvetica, Arial, "Segoe UI",
                 sans-serif !important;
    font-feature-settings: "kern";
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    letter-spacing: 0.01em;
}

/* 维吾尔文 RTL 模式下，维吾尔文专有段落的额外排版优化 */
html[dir="rtl"] body,
html[dir="rtl"] input,
html[dir="rtl"] textarea,
html[dir="rtl"] select {
    font-family: "ALKATIP Yazma Tom",
                 -apple-system, BlinkMacSystemFont,
                 "SF Pro Text", "PingFang SC",
                 "Microsoft YaHei",
                 "Helvetica Neue", Helvetica, Arial, sans-serif !important;
    line-height: 1.75;
}

/* 侧边栏维文菜单项字体略放大，保证手写体清晰可读 */
html[dir="rtl"] .sidebar-menu .menu-item,
html[dir="rtl"] .sidebar-menu .menu-group-title .menu-text {
    font-size: 14.5px;
    letter-spacing: 0;
}

/* 修复输入框、文本框 placeholder 维文字体 */
::-webkit-input-placeholder { font-family: "ALKATIP Yazma Tom", "PingFang SC", "Microsoft YaHei", sans-serif; }
::-moz-placeholder          { font-family: "ALKATIP Yazma Tom", "PingFang SC", "Microsoft YaHei", sans-serif; }
:-ms-input-placeholder      { font-family: "ALKATIP Yazma Tom", "PingFang SC", "Microsoft YaHei", sans-serif; }
::placeholder               { font-family: "ALKATIP Yazma Tom", "PingFang SC", "Microsoft YaHei", sans-serif; }

/* code/monospace 仍保留等宽字体，不被覆盖 */
code, pre, kbd, samp, var,
table.data-table td[style*="monospace"],
.font-mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
                 "Liberation Mono", "Courier New", monospace !important;
}
