@charset "UTF-8";
/* =========================================================================
 * assets/css/font.css —— 全站字体：UKIJTor.ttf
 * -------------------------------------------------------------------------
 * 放字体（任意一个位置都能自动找到，首选第一个）：
 *   assets/fonts/UKIJTor.ttf      ← 推荐
 *   assets/font/UKIJTor.ttf
 *   assets/UKIJTor.ttf
 *   网站根目录/UKIJTor.ttf
 *
 * 引入方式：在每个页面的 <head> 里，放在 base.css / 页面 css 之后：
 *   <link rel="stylesheet" href="assets/css/font.css?v=版本号">
 *
 * ★ 特别注意：下面所有规则都【不碰 <i> 和 .fa-* 】，
 *   否则 Font Awesome 的图标会全部变成方框（□）。
 * ========================================================================= */

/* ---------- 1. 字体声明：多路径兜底 + font-display:swap ---------- */
@font-face{
  font-family:'UKIJTor';
  font-style:normal;
  font-weight:400;
  font-display:swap;                 /* 字体没下完先用系统字体显示，不白屏 */
  src:url('../fonts/UKIJTor.ttf') format('truetype'),
      url('../font/UKIJTor.ttf')  format('truetype'),
      url('../UKIJTor.ttf')       format('truetype'),
      url('../../UKIJTor.ttf')    format('truetype'),
      url('UKIJTor.ttf')          format('truetype');
}

/* ---------- 2. 全局应用（html / body 两级都写，兼容性最好） ---------- */
html,
body{
  font-family:'UKIJTor', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB',
              'Microsoft YaHei', 'Noto Naskh Arabic', 'Scheherazade New', 'Segoe UI',
              Helvetica, Arial, sans-serif;
}

body{
  font-family:'UKIJTor', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB',
              'Microsoft YaHei', 'Noto Naskh Arabic', 'Scheherazade New', 'Segoe UI',
              Helvetica, Arial, sans-serif !important;

  /* ---- 以下是为这套字体做的“适配优化” ---- */
  line-height:1.7;                   /* 维/阿文字母有上下附加符，行距大一点才不挤 */
  text-rendering:optimizeLegibility;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  overflow-wrap:break-word;
  word-wrap:break-word;
  -webkit-text-size-adjust:100%;
}

/* ---------- 3. 表单控件 + 常见文本元素：统一继承（★ 不含 i / .fa-*） ---------- */
body button, body input, body select, body textarea, body optgroup, body option,
body h1, body h2, body h3, body h4, body h5, body h6,
body a, body abbr, body b, body blockquote, body cite, body dd, body div, body dl, body dt,
body em, body figcaption, body figure, body footer, body header, body kbd, body label,
body legend, body li, body main, body nav, body p, body pre, body q, body s, body samp,
body section, body small, body span, body strong, body sub, body summary, body sup,
body table, body tbody, body td, body tfoot, body th, body thead, body time, body tr,
body u, body ul, body var{
  font-family:inherit !important;
}

/* ---------- 4. 阿/维文不能有字间距，否则连写字母会被拆开 ---------- */
body, body button, body input, body select, body textarea, body optgroup, body option,
body a, body p, body span, body div, body li, body label, body td, body th, body small,
body b, body strong, body em, body h1, body h2, body h3, body h4, body h5, body h6{
  letter-spacing:normal !important;
}

/* ---------- 5. ★ 图标保护：Font Awesome 保持自己的字体 ---------- */
.fa, .fas, .far, .fal, .fat, .fad, .fab, .fass, .fasr, .fasl, .fasr,
.fa-solid, .fa-regular, .fa-light, .fa-thin, .fa-duotone, .fa-brands, .fa-sharp,
[class^="fa-"], [class*=" fa-"]{
  font-family:'Font Awesome 6 Free', 'Font Awesome 6 Brands', 'Font Awesome 5 Free', 'FontAwesome' !important;
  font-style:normal;
  letter-spacing:0 !important;
}
i{
  font-style:normal;                 /* 站内 <i> 全部当图标用，避免斜体把图标拉歪 */
}

/* ---------- 6. 需要单独指定阿文/维文的地方，加 class="use-ar" 即可 ---------- */
.use-ar, .kino-ar, [dir="rtl"]{
  font-family:'UKIJTor', 'Noto Naskh Arabic', 'Scheherazade New', 'Amiri', serif !important;
}
[dir="rtl"]{ direction:rtl; text-align:right; }