    .math-sym {
      font-family: 'Noto Sans Math', system-ui, sans-serif !important;
      font-size: 1.22em;
      line-height: 1;
      vertical-align: -0.06em;
      font-weight: 500;
      display: inline-block;
    }
    .math-fn {
      font-family: system-ui, sans-serif !important;
      font-size: 1.06em;
      font-weight: 700;
      letter-spacing: 0.02em;
      display: inline-block;
      white-space: nowrap;
    }

    .katex { 
      font-size: 1.12em !important; 
      line-height: 1.2 !important;
      text-rendering: geometricPrecision;
      white-space: nowrap !important;
    }
    .katex .sqrt .hide-tail {
      box-sizing: content-box !important;
      padding-top: 0.32em;
      margin-top: -0.32em;
    }
    .katex .sqrt .hide-tail svg {
      transform: scaleY(1.07);
      transform-origin: bottom;
    }
    .katex .sqrt > .root {
      position: relative;
      top: -0.16em;
      left: -0.07em;
    }
    .katex .sqrt > .root .mord {
      font-size: 1.14em;
    }
    /* Гармонійний та єдиний шрифт для запитань і відповідей */
    #qBodyContainer, #qBodyContainer table, #qBodyContainer button {
      font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    }
    #qBodyContainer .katex .text { 
      font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    }

    .katex-display { 
      white-space: normal !important; 
      display: block !important; 
      margin: 0.75rem 0 !important;
      overflow-x: auto;
      overflow-y: hidden;
    }
    .katex-display > .katex {
      white-space: nowrap !important;
    }
    .katex .mfrac {
      margin: 0 0.15em;
    }
    .katex .frac-line {
      border-bottom-width: 1.2px !important;
    }

    table .katex, td .katex {
      display: inline-flex !important;
      align-items: center;
      justify-content: center;
    }

    /* Збільшений і чіткий значок вектора */
    .katex .accent {
      font-size: 1.18em !important;
    }
    .katex .accent svg {
      transform: scaleY(1.35);
      transform-origin: center;
    }
    .katex .accent path {
      stroke-width: 1.35px !important;
    }

    .figure-box {
      background-color: #ffffff;
      border: 1px solid #e2e8f0;
      border-radius: 12px;
      padding: 6px;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    #qPromptContainer {
      line-height: 1.55 !important;
    }

    #qPromptContainer p, #qPromptContainer div {
      margin-bottom: 0.35rem;
    }

    /* iOS Safari compatibility: prevent -webkit-user-select:none from blocking input typing & ensure smooth scrolling/taps */
    input, textarea, select {
      -webkit-user-select: text !important;
      user-select: text !important;
    }
    button, [onclick] {
      touch-action: manipulation;
      -webkit-tap-highlight-color: transparent;
    }
    #qBodyContainer {
      min-width: 0;
      width: 100%;
    }
    #qBodyContainer img,
    #qBodyContainer svg:not(.katex svg) {
      max-width: 100%;
      height: auto;
    }
    #qBodyContainer .katex svg {
      max-width: none !important;
      height: inherit !important;
    }
    .katex-display {
      max-width: 100%;
      -webkit-overflow-scrolling: touch;
    }
    .backdrop-blur-sm {
      -webkit-backdrop-filter: blur(4px);
    }
    .backdrop-blur-md {
      -webkit-backdrop-filter: blur(12px);
    }

    html.light body { background-color: #f0f4f8; color: #0f172a; }
    html.light .theme-accent-bg { background-color: #0080c8 !important; color: #ffffff !important; }
    html.light .theme-accent-bg:hover { background-color: #0073b0 !important; }
    html.light .theme-accent-border { border-color: #0080c8 !important; }
    html.light .theme-accent-text { color: #0080c8 !important; }
    html.light .theme-badge { background-color: #f0f9ff !important; color: #0080c8 !important; border-color: #0080c8 !important; }
    html.light .theme-timer-icon { color: #0080c8 !important; }
    html.light .theme-finish-btn { background-color: #0080c8 !important; }
    html.light .theme-finish-btn:hover { background-color: #0073b0 !important; }

    html.official body { background-color: #fcfcfc; color: #0f172a; }
    html.official .theme-accent-bg { background-color: #c82333 !important; color: #ffffff !important; }
    html.official .theme-accent-bg:hover { background-color: #a71d2a !important; }
    html.official .theme-accent-border { border-color: #c82333 !important; }
    html.official .theme-accent-text { color: #c82333 !important; }
    html.official .theme-badge { background-color: #fef2f2 !important; color: #c82333 !important; border-color: #c82333 !important; }
    html.official .theme-timer-icon { color: #c82333 !important; }
    html.official .theme-finish-btn { background-color: #c82333 !important; }
    html.official .theme-finish-btn:hover { background-color: #a71d2a !important; }

    html.dark body { background-color: #020617; color: #f8fafc; }
    html.dark .theme-accent-bg { background-color: #0080c8 !important; color: #ffffff !important; }
    html.dark .theme-accent-bg:hover { background-color: #0073b0 !important; }
    html.dark .theme-accent-border { border-color: #0080c8 !important; }
    html.dark .theme-accent-text { color: #38bdf8 !important; }
    html.dark .theme-badge { background-color: #082f49 !important; color: #38bdf8 !important; border-color: #0369a1 !important; }
    html.dark .theme-timer-icon { color: #38bdf8 !important; }
    html.dark .theme-finish-btn { background-color: #0080c8 !important; }
    html.dark .theme-finish-btn:hover { background-color: #0073b0 !important; }

              .auth-brand-pro { font-family: 'Poppins', sans-serif; font-size: 60px; font-weight: 600; dominant-baseline: central; fill: #082f49; }
              .auth-brand-matika { font-family: 'Poppins', sans-serif; font-size: 60px; font-weight: 600; dominant-baseline: central; fill: url(#promatikaWordGradAuth); }
              .auth-tagline-top { font-family: 'Poppins', sans-serif; font-size: 25px; font-weight: 700; fill: #0e7490; letter-spacing: 0.8px; }
              .auth-tagline-bottom { font-family: 'Poppins', sans-serif; font-size: 25px; font-weight: 800; fill: #082f49; letter-spacing: 0.8px; }
              html.dark .auth-brand-pro { fill: #ffffff; }
              html.dark .auth-brand-matika { fill: url(#promatikaWordGradAuthDark); }
              html.dark .auth-tagline-top { fill: #38bdf8; }
              html.dark .auth-tagline-bottom { fill: #e2e8f0; }
              html.dark .auth-logo-divider { stroke: #38bdf8; opacity: 0.5; }

              .mob-sim-fill-primary { fill: #082f49; }
              .mob-sim-fill-grad { fill: url(#mobWordGradSim); }
              html.dark .mob-sim-fill-primary { fill: #ffffff; }
              html.dark .mob-sim-fill-grad { fill: url(#mobWordGradSimDark); }
              html.official .mob-sim-fill-primary { fill: #1e293b; }
              html.official .mob-sim-fill-grad { fill: #c82333; }

              @import url('https://fonts.googleapis.com/css2?family=Poppins:wght@600;700;800&amp;display=swap');
              .sim-brand-pro { font-family: 'Poppins', sans-serif; font-size: 60px; font-weight: 600; dominant-baseline: central; fill: #082f49; }
              .sim-brand-matika { font-family: 'Poppins', sans-serif; font-size: 60px; font-weight: 600; dominant-baseline: central; fill: url(#promatikaWordGradSim); }
              .sim-tagline-top { font-family: 'Poppins', sans-serif; font-size: 28px; font-weight: 800; fill: #0e7490; letter-spacing: 0.8px; }
              .sim-tagline-bottom { font-family: 'Poppins', sans-serif; font-size: 28px; font-weight: 800; fill: #082f49; letter-spacing: 0.8px; }
              html.dark .sim-brand-pro { fill: #ffffff; }
              html.dark .sim-brand-matika { fill: url(#promatikaWordGradSimDark); }
              html.dark .sim-tagline-top { fill: #38bdf8; }
              html.dark .sim-tagline-bottom { fill: #e2e8f0; }
              html.dark .sim-logo-divider { stroke: #38bdf8; opacity: 0.5; }
              html.official .sim-brand-pro { fill: #1e293b; }
              html.official .sim-brand-matika { fill: #c82333; }
              html.official .sim-tagline-top { fill: #c82333; }
              html.official .sim-tagline-bottom { fill: #1e293b; }
              html.official .sim-logo-divider { stroke: #c82333; opacity: 0.5; }
