/* Shared UI typography. Code and icon selectors may intentionally override this. */
:root {
    --ui-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "微软雅黑", sans-serif;
}

html body {
    font-family: var(--font-xai, var(--ui-font-family));
}

html body button,
html body input,
html body select,
html body textarea {
    font-family: inherit !important;
}

/* Keep action controls visually consistent across every system page. */
html body button,
html body input[type="button"],
html body input[type="submit"],
html body input[type="reset"],
html body .btn,
html body [role="button"] {
    border-radius: 9999px !important;
    font-weight: 400 !important;
}

html body button b,
html body button strong,
html body input[type="button"] b,
html body input[type="button"] strong,
html body input[type="submit"] b,
html body input[type="submit"] strong,
html body input[type="reset"] b,
html body input[type="reset"] strong,
html body .btn b,
html body .btn strong,
html body [role="button"] b,
html body [role="button"] strong {
    font-weight: 400 !important;
}

/* Keep status labels and badges readable without bold emphasis. */
html body :where(
    .status,
    .badge,
    .pill,
    .tag,
    .chip,
    .tier,
    .rank,
    .priority,
    .limit,
    .share-tag,
    .product-rank,
    .uploaded-file-tag,
    .ss-goods-tag-item,
    [class^="status-"],
    [class*=" status-"],
    [class*="-status"],
    [class^="badge-"],
    [class*=" badge-"],
    [class*="-badge"],
    [class^="pill-"],
    [class*=" pill-"],
    [class*="-pill"],
    [class^="tag-"],
    [class*=" tag-"],
    [class^="chip-"],
    [class*=" chip-"],
    span[style*="border-radius:999px"],
    span[style*="border-radius:12px"][style*="padding:2px 10px"],
    span[style*="border-radius:6px"][style*="padding:3px 10px"][style*="font-size:12px"],
    span[style*="border-radius:3px"][style*="padding:1px 6px"]
) {
    font-weight: 400 !important;
}

html body :where(
    .status,
    .badge,
    .pill,
    .tag,
    .chip,
    .tier,
    .rank,
    .priority,
    .limit,
    .share-tag,
    .product-rank,
    .uploaded-file-tag,
    .ss-goods-tag-item,
    [class^="status-"],
    [class*=" status-"],
    [class*="-status"],
    [class^="badge-"],
    [class*=" badge-"],
    [class*="-badge"],
    [class^="pill-"],
    [class*=" pill-"],
    [class*="-pill"],
    [class^="tag-"],
    [class*=" tag-"],
    [class^="chip-"],
    [class*=" chip-"],
    span[style*="border-radius:999px"],
    span[style*="border-radius:12px"][style*="padding:2px 10px"],
    span[style*="border-radius:6px"][style*="padding:3px 10px"][style*="font-size:12px"],
    span[style*="border-radius:3px"][style*="padding:1px 6px"]
) :is(b, strong) {
    font-weight: 400 !important;
}
