/* MiSans font-only UI repair, 2026-10-07. Original Xiaomi TTFs remain unchanged.
 * This versioned stylesheet replaces the old CSS reference, not the business UI.
 * Existing font sizes, weights, line heights, spacing, icons and code faces remain.
 */
@font-face {
  font-family: "MiSans";
  src: url("./MiSans-Light.ttf") format("truetype");
  font-weight: 300; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "MiSans";
  src: url("./MiSans-Regular.ttf") format("truetype");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "MiSans";
  src: url("./MiSans-Medium.ttf") format("truetype");
  font-weight: 500 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "MiSans";
  src: url("./MiSans-Bold.ttf") format("truetype");
  font-weight: 700 900; font-style: normal; font-display: swap;
}
:root {
  --orange-misans-font: "MiSans", -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", "Segoe UI", sans-serif;
  --orange-ui-font: var(--orange-misans-font) !important;
  --orange-display-font: var(--orange-misans-font) !important;
  --orange-stable-font: var(--orange-misans-font) !important;
  --oe-font: var(--orange-misans-font) !important;
  --el-font-family: var(--orange-misans-font) !important;
  --cd-font: var(--orange-misans-font) !important;
  --cd-number-font: "MiSans", "Segoe UI", sans-serif !important;
}
html, body, #orangeRouteLoader {
  font-family: var(--orange-misans-font) !important;
}
/* Explicit code, serial-number, print/preview and icon declarations still win. */
:where(button, input, textarea, select, option):not(
  .fa, .fas, .far, .fab, [class*="fa-"], .iconfont, .el-icon,
  .window-titlebar__controls button, .admin-titlebar__controls button,
  .yunmu-copy-row input, .yunmu-light-sn input, .light-cloud-inventory textarea,
  .tap-qr-info textarea, [data-orange-typography-exempt],
  [data-orange-typography-exempt] *, [data-font="monospace"],
  .orange-print-root *, .pap-live-preview *, .pap-phone-screen *, .pd-phone *
) {
  font-family: var(--orange-misans-font);
}
.orange-workspace-header :is(input, textarea, select, button):not(
  [data-orange-typography-exempt], [data-orange-typography-exempt] *,
  [data-font="monospace"], .font-mono, .monospace, .iconfont, .el-icon,
  .fa, .fas, .far, .fab, [class*="fa-"]
) {
  font-family: var(--orange-misans-font) !important;
}
input[type="file"]::file-selector-button {
  font-family: var(--orange-misans-font) !important;
}
#content .rc-health > strong {
  font-family: var(--orange-misans-font) !important;
}
/* The restored notice is quiet, focusable, non-modal and hidden when printing. */
#orangeFontNotice {
  position: fixed; right: 12px; bottom: 6px; z-index: 1;
  padding: 4px 8px; border-radius: 4px; background: #fffdf9;
  color: #655b50; font: 11px/16px var(--orange-misans-font);
  text-decoration: none;
}
#orangeFontNotice:hover { text-decoration: underline; }
#orangeFontNotice:focus-visible { outline: 2px solid #906222; outline-offset: 2px; }
@media print { #orangeFontNotice { display: none; } }
