/* MAN Solar readability comfort layer
   Small, responsive font scaling for dense engineering UI without changing business logic. */
:root {
  --man-ui-font-scale: 1.06;
  --man-ui-touch-scale: 1;
}

@media (min-width: 1440px) {
  :root { --man-ui-font-scale: 1.09; }
}

@media (min-width: 1920px) {
  :root { --man-ui-font-scale: 1.13; }
}

@media (max-width: 768px) {
  :root {
    --man-ui-font-scale: 1.08;
    --man-ui-touch-scale: 1.08;
  }
}

html {
  font-size: calc(16px * var(--man-ui-font-scale));
}

body {
  font-size: 1rem;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* Keep utility-based UI readable while preserving relative hierarchy. */
.text-\[10px\] { font-size: calc(10px * var(--man-ui-font-scale)) !important; }
.text-\[11px\] { font-size: calc(11px * var(--man-ui-font-scale)) !important; }
.text-xs { font-size: calc(0.75rem * var(--man-ui-font-scale)) !important; }
.text-sm { font-size: calc(0.875rem * var(--man-ui-font-scale)) !important; }
.text-base { font-size: calc(1rem * var(--man-ui-font-scale)) !important; }
.text-lg { font-size: calc(1.125rem * var(--man-ui-font-scale)) !important; }
.text-xl { font-size: calc(1.25rem * var(--man-ui-font-scale)) !important; }
.text-2xl { font-size: calc(1.5rem * var(--man-ui-font-scale)) !important; }

input,
select,
textarea,
button {
  font-size: max(13px, 1em);
}

@media (max-width: 768px) {
  input,
  select,
  textarea {
    font-size: max(15px, 1em);
  }

  /* Keep small carousel/icon controls compact on mobile. Map controls keep their own touch size below. */
  button,
  [role="button"] {
    min-height: initial;
  }

  .gm-control-active,
  .gm-style button,
  .amap-control,
  .leaflet-control,
  [class*="map"] button {
    min-width: 40px;
    min-height: 40px;
  }

  .apple-card button {
    min-height: 34px;
  }
}

/* Do not inflate code/math-like compact labels too aggressively. */
code,
pre,
.font-mono,
[class*="mono"] {
  font-size-adjust: none;
}
