/* Open-license Noto/Source Han fonts first; native Traditional Chinese fonts are the offline fallback. */
:root {
  --font-ui:
    'Noto Sans TC', 'Source Han Sans TC', 'Microsoft JhengHei UI', 'Microsoft JhengHei',
    'Noto Sans SC', 'Segoe UI', system-ui, sans-serif;
  --font-zh-cn:
    'Noto Sans SC', 'Microsoft YaHei UI', 'Microsoft YaHei', 'Noto Sans TC', system-ui, sans-serif;
}
html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.75;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
html[lang='zh-CN'] body {
  font-family: var(--font-zh-cn);
}
button,
input,
select,
textarea {
  font-family: inherit;
  line-height: 1.55;
}
input,
select,
textarea {
  font-size: 14px;
}
::placeholder {
  color: #77837b;
  opacity: 1;
}
@media (max-width: 640px) {
  body {
    font-size: 15px;
  }
  input,
  select,
  textarea {
    font-size: 16px;
  }
}
/* Keep typography readable even when a component provides compact UI sizes. */
body {
  font-family: var(--font-ui) !important;
  font-size: 16px !important;
  line-height: 1.75 !important;
  color: #203a30;
}
html[lang='zh-CN'] body {
  font-family: var(--font-zh-cn) !important;
}
body
  :where(
    small,
    .eyebrow,
    .notice,
    .section-intro,
    .breadcrumb,
    .filter,
    .card-meta,
    .image-label,
    .form-note,
    .line-rate,
    .field-label,
    .price-product-id,
    .record-id,
    .guide-content,
    .contact-links,
    footer > span
  ) {
  font-size: max(12px, 0.875em) !important;
  line-height: 1.65;
}
body :where(input, select, textarea) {
  font-size: 16px;
}
.admin-shell {
  font-family: var(--font-ui) !important;
}
.admin-shell
  :where(
    small,
    .eyebrow,
    .notice,
    label,
    .record-card,
    .admin-contact,
    .admin-price,
    .admin-toolbar,
    .pipeline-row,
    .service-line,
    .sidebar-label,
    .sidebar-nav button,
    .footer-links,
    .settings-history,
    .price-product-id,
    .stat-card p,
    .stat-card small,
    .record-pagination,
    .plain-button,
    .form-row,
    .commercial-panel
  ) {
  font-size: max(12px, 0.875em) !important;
  line-height: 1.65;
}
.admin-shell .sidebar-label,
.admin-shell .sidebar-nav button,
.admin-shell .sidebar-bottom {
  font-size: 12px !important;
}
.admin-shell :where(input, select, textarea) {
  font-size: 16px;
}
.admin-shell .price-table td,
.admin-shell .price-table th {
  font-size: 12px !important;
}
@media (max-width: 640px) {
  body :where(input, select, textarea) {
    font-size: 16px !important;
  }
  .admin-shell :where(.sidebar-nav button, .locale-switch, .sidebar-bottom) {
    font-size: 11px !important;
  }
}
