/*
 * Dam San UI typography — one locally served Vietnamese-capable family.
 * The browser must never rely on a third-party font request for app controls.
 * Official print/PDF documents and glyph icons are separate surfaces.
 */
@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("/assets/fonts/plus-jakarta-sans/PlusJakartaSans-Variable.ttf") format("truetype");
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("/assets/fonts/plus-jakarta-sans/PlusJakartaSans-Italic-Variable.ttf") format("truetype");
  font-style: italic;
  font-weight: 200 800;
  font-display: swap;
}
:root {
  --damsan-ui-font: "Plus Jakarta Sans", Arial, Helvetica, sans-serif;
  --damsan-type-small: 12px;
  --damsan-type-body: 14px;
  --damsan-type-label: 13px;
  --damsan-type-title: 20px;
  font-family: var(--damsan-ui-font);
  font-synthesis: weight style;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
/* Covers inline style rules, Tailwind utilities, dynamically injected components,
   user-facing map controls and the legacy Times New Roman journal preview. */
@media screen {
  body, body *:not(.custom-icon):not(.material-icons):not(.material-symbols-outlined):not(.fa):not(.fas):not(.far):not(.fab):not(.mdi) {
    font-family: var(--damsan-ui-font) !important;
  }
  /* Only real printed paper remains serif in on-screen previews. */
  body .dj-local-paper, body .dj-local-paper *,
  body .dj-pdf-paper, body .dj-pdf-paper * {
    font-family: "Times New Roman", Times, serif !important;
  }

  /* Admin's operational tiles previously used 8/10px labels, unrelated to the
     rest of the UI. Preserve the two-column arrangement but make both levels legible. */
  #admin-operations-tools > .grid > button {
    min-width: 0;
    padding: clamp(13px, 3vw, 20px);
  }
  #admin-operations-tools > .grid > button p:first-of-type {
    font-size: 13px !important;
    line-height: 1.4;
    letter-spacing: .015em;
    text-transform: none;
    overflow-wrap: anywhere;
  }
  #admin-operations-tools > .grid > button p:not(:first-of-type) {
    font-size: 12px !important;
    line-height: 1.45;
    letter-spacing: normal;
    text-transform: none;
    overflow-wrap: anywhere;
  }
  #youth-workspace > nav a {
    font-weight: 700;
    line-height: 1.4;
  }
  @media (max-width: 640px) {
    #youth-workspace > nav {
      display: grid;
      grid-template-columns: minmax(0, 1fr);
      gap: 10px;
    }
    #youth-workspace > nav a {
      display: flex;
      width: 100%;
      min-height: 46px;
      justify-content: flex-start;
    }
  }
}
